Skip to main content

Module event_variants

Module event_variants 

Source
Expand description

The event_variants module contains new-type wrappers around InputEvent for each known EventType.

These event variants guarantee that the underlying InputEvent has the corresponding type. They may also contain additional methods for the specific type and convenient shortcut methods for event creation. An InputEvent can be converted to the corresponding event variant with the InputEvent::destructure() method. Each event variant implements Into<InputEvent> and Deref<Target=InputEvent> for easy back conversion.

Structsยง

AbsoluteAxisEvent
EventType::ABSOLUTE
FFEvent
EventType::FORCEFEEDBACK
FFStatusEvent
EventType::FORCEFEEDBACKSTATUS
KeyEvent
EventType::KEY
LedEvent
EventType::LED
MiscEvent
EventType::MISC
OtherEvent
An event not covered by any other variant.
PowerEvent
EventType::POWER
RelativeAxisEvent
EventType::RELATIVE
RepeatEvent
EventType::REPEAT
SoundEvent
EventType::SOUND
SwitchEvent
EventType::SWITCH
SynchronizationEvent
A bookkeeping event. Usually not important to applications. EventType::SYNCHRONIZATION
UInputEvent
EventType::UINPUT