pub enum InputEvent<B: InputBackend> {
Show 17 variants
DeviceAdded {
device: B::Device,
},
DeviceRemoved {
device: B::Device,
},
Keyboard {
event: B::KeyboardKeyEvent,
},
PointerMotion {
event: B::PointerMotionEvent,
},
PointerMotionAbsolute {
event: B::PointerMotionAbsoluteEvent,
},
PointerButton {
event: B::PointerButtonEvent,
},
PointerAxis {
event: B::PointerAxisEvent,
},
TouchDown {
event: B::TouchDownEvent,
},
TouchMotion {
event: B::TouchMotionEvent,
},
TouchUp {
event: B::TouchUpEvent,
},
TouchCancel {
event: B::TouchCancelEvent,
},
TouchFrame {
event: B::TouchFrameEvent,
},
TabletToolAxis {
event: B::TabletToolAxisEvent,
},
TabletToolProximity {
event: B::TabletToolProximityEvent,
},
TabletToolTip {
event: B::TabletToolTipEvent,
},
TabletToolButton {
event: B::TabletToolButtonEvent,
},
Special(B::SpecialEvent),
}
Expand description
Different events that can be generated by an input backend
Variants§
DeviceAdded
An input device was connected
DeviceRemoved
An input device was disconnected
Keyboard
A keyboard event occurred
Fields
event: B::KeyboardKeyEvent
The keyboard event
PointerMotion
A relative pointer motion occurred
Fields
event: B::PointerMotionEvent
The pointer motion event
PointerMotionAbsolute
An absolute pointer motion occurs
Fields
event: B::PointerMotionAbsoluteEvent
The absolute pointer motion event
PointerButton
A pointer button was pressed or released
Fields
event: B::PointerButtonEvent
The pointer button event
PointerAxis
A pointer action occurred while scrolling on an axis
Fields
event: B::PointerAxisEvent
The pointer axis event
TouchDown
A new touchpoint appeared
Fields
event: B::TouchDownEvent
The touch down event
TouchMotion
A touchpoint moved
Fields
event: B::TouchMotionEvent
The touch motion event
TouchUp
A touchpoint was removed
Fields
event: B::TouchUpEvent
The touch up event
TouchCancel
A touch sequence was cancelled
Fields
event: B::TouchCancelEvent
The touch cancel event
TouchFrame
A touch frame was emitted
A set of two events received on the same seat between two frames should be interpreted as an atomic event.
Fields
event: B::TouchFrameEvent
The touch frame event
TabletToolAxis
A tablet tool axis was emitted
Fields
event: B::TabletToolAxisEvent
The tablet tool axis event
TabletToolProximity
A tablet tool proximity was emitted
Fields
event: B::TabletToolProximityEvent
The tablet tool proximity event
TabletToolTip
A tablet tool tip event was emitted
Fields
event: B::TabletToolTipEvent
The tablet tool axis event
TabletToolButton
A tablet tool button was pressed or released
Fields
event: B::TabletToolButtonEvent
The pointer button event
Special(B::SpecialEvent)
Special event specific of this backend
Trait Implementations§
Source§impl<B: Debug + InputBackend> Debug for InputEvent<B>where
B::Device: Debug,
B::KeyboardKeyEvent: Debug,
B::PointerMotionEvent: Debug,
B::PointerMotionAbsoluteEvent: Debug,
B::PointerButtonEvent: Debug,
B::PointerAxisEvent: Debug,
B::TouchDownEvent: Debug,
B::TouchMotionEvent: Debug,
B::TouchUpEvent: Debug,
B::TouchCancelEvent: Debug,
B::TouchFrameEvent: Debug,
B::TabletToolAxisEvent: Debug,
B::TabletToolProximityEvent: Debug,
B::TabletToolTipEvent: Debug,
B::TabletToolButtonEvent: Debug,
B::SpecialEvent: Debug,
impl<B: Debug + InputBackend> Debug for InputEvent<B>where
B::Device: Debug,
B::KeyboardKeyEvent: Debug,
B::PointerMotionEvent: Debug,
B::PointerMotionAbsoluteEvent: Debug,
B::PointerButtonEvent: Debug,
B::PointerAxisEvent: Debug,
B::TouchDownEvent: Debug,
B::TouchMotionEvent: Debug,
B::TouchUpEvent: Debug,
B::TouchCancelEvent: Debug,
B::TouchFrameEvent: Debug,
B::TabletToolAxisEvent: Debug,
B::TabletToolProximityEvent: Debug,
B::TabletToolTipEvent: Debug,
B::TabletToolButtonEvent: Debug,
B::SpecialEvent: Debug,
Auto Trait Implementations§
impl<B> Freeze for InputEvent<B>where
<B as InputBackend>::Device: Freeze,
<B as InputBackend>::KeyboardKeyEvent: Freeze,
<B as InputBackend>::PointerMotionEvent: Freeze,
<B as InputBackend>::PointerMotionAbsoluteEvent: Freeze,
<B as InputBackend>::PointerButtonEvent: Freeze,
<B as InputBackend>::PointerAxisEvent: Freeze,
<B as InputBackend>::TouchDownEvent: Freeze,
<B as InputBackend>::TouchMotionEvent: Freeze,
<B as InputBackend>::TouchUpEvent: Freeze,
<B as InputBackend>::TouchCancelEvent: Freeze,
<B as InputBackend>::TouchFrameEvent: Freeze,
<B as InputBackend>::TabletToolAxisEvent: Freeze,
<B as InputBackend>::TabletToolProximityEvent: Freeze,
<B as InputBackend>::TabletToolTipEvent: Freeze,
<B as InputBackend>::TabletToolButtonEvent: Freeze,
<B as InputBackend>::SpecialEvent: Freeze,
impl<B> RefUnwindSafe for InputEvent<B>where
<B as InputBackend>::Device: RefUnwindSafe,
<B as InputBackend>::KeyboardKeyEvent: RefUnwindSafe,
<B as InputBackend>::PointerMotionEvent: RefUnwindSafe,
<B as InputBackend>::PointerMotionAbsoluteEvent: RefUnwindSafe,
<B as InputBackend>::PointerButtonEvent: RefUnwindSafe,
<B as InputBackend>::PointerAxisEvent: RefUnwindSafe,
<B as InputBackend>::TouchDownEvent: RefUnwindSafe,
<B as InputBackend>::TouchMotionEvent: RefUnwindSafe,
<B as InputBackend>::TouchUpEvent: RefUnwindSafe,
<B as InputBackend>::TouchCancelEvent: RefUnwindSafe,
<B as InputBackend>::TouchFrameEvent: RefUnwindSafe,
<B as InputBackend>::TabletToolAxisEvent: RefUnwindSafe,
<B as InputBackend>::TabletToolProximityEvent: RefUnwindSafe,
<B as InputBackend>::TabletToolTipEvent: RefUnwindSafe,
<B as InputBackend>::TabletToolButtonEvent: RefUnwindSafe,
<B as InputBackend>::SpecialEvent: RefUnwindSafe,
impl<B> Send for InputEvent<B>where
<B as InputBackend>::Device: Send,
<B as InputBackend>::KeyboardKeyEvent: Send,
<B as InputBackend>::PointerMotionEvent: Send,
<B as InputBackend>::PointerMotionAbsoluteEvent: Send,
<B as InputBackend>::PointerButtonEvent: Send,
<B as InputBackend>::PointerAxisEvent: Send,
<B as InputBackend>::TouchDownEvent: Send,
<B as InputBackend>::TouchMotionEvent: Send,
<B as InputBackend>::TouchUpEvent: Send,
<B as InputBackend>::TouchCancelEvent: Send,
<B as InputBackend>::TouchFrameEvent: Send,
<B as InputBackend>::TabletToolAxisEvent: Send,
<B as InputBackend>::TabletToolProximityEvent: Send,
<B as InputBackend>::TabletToolTipEvent: Send,
<B as InputBackend>::TabletToolButtonEvent: Send,
<B as InputBackend>::SpecialEvent: Send,
impl<B> Sync for InputEvent<B>where
<B as InputBackend>::Device: Sync,
<B as InputBackend>::KeyboardKeyEvent: Sync,
<B as InputBackend>::PointerMotionEvent: Sync,
<B as InputBackend>::PointerMotionAbsoluteEvent: Sync,
<B as InputBackend>::PointerButtonEvent: Sync,
<B as InputBackend>::PointerAxisEvent: Sync,
<B as InputBackend>::TouchDownEvent: Sync,
<B as InputBackend>::TouchMotionEvent: Sync,
<B as InputBackend>::TouchUpEvent: Sync,
<B as InputBackend>::TouchCancelEvent: Sync,
<B as InputBackend>::TouchFrameEvent: Sync,
<B as InputBackend>::TabletToolAxisEvent: Sync,
<B as InputBackend>::TabletToolProximityEvent: Sync,
<B as InputBackend>::TabletToolTipEvent: Sync,
<B as InputBackend>::TabletToolButtonEvent: Sync,
<B as InputBackend>::SpecialEvent: Sync,
impl<B> Unpin for InputEvent<B>where
<B as InputBackend>::Device: Unpin,
<B as InputBackend>::KeyboardKeyEvent: Unpin,
<B as InputBackend>::PointerMotionEvent: Unpin,
<B as InputBackend>::PointerMotionAbsoluteEvent: Unpin,
<B as InputBackend>::PointerButtonEvent: Unpin,
<B as InputBackend>::PointerAxisEvent: Unpin,
<B as InputBackend>::TouchDownEvent: Unpin,
<B as InputBackend>::TouchMotionEvent: Unpin,
<B as InputBackend>::TouchUpEvent: Unpin,
<B as InputBackend>::TouchCancelEvent: Unpin,
<B as InputBackend>::TouchFrameEvent: Unpin,
<B as InputBackend>::TabletToolAxisEvent: Unpin,
<B as InputBackend>::TabletToolProximityEvent: Unpin,
<B as InputBackend>::TabletToolTipEvent: Unpin,
<B as InputBackend>::TabletToolButtonEvent: Unpin,
<B as InputBackend>::SpecialEvent: Unpin,
impl<B> UnwindSafe for InputEvent<B>where
<B as InputBackend>::Device: UnwindSafe,
<B as InputBackend>::KeyboardKeyEvent: UnwindSafe,
<B as InputBackend>::PointerMotionEvent: UnwindSafe,
<B as InputBackend>::PointerMotionAbsoluteEvent: UnwindSafe,
<B as InputBackend>::PointerButtonEvent: UnwindSafe,
<B as InputBackend>::PointerAxisEvent: UnwindSafe,
<B as InputBackend>::TouchDownEvent: UnwindSafe,
<B as InputBackend>::TouchMotionEvent: UnwindSafe,
<B as InputBackend>::TouchUpEvent: UnwindSafe,
<B as InputBackend>::TouchCancelEvent: UnwindSafe,
<B as InputBackend>::TouchFrameEvent: UnwindSafe,
<B as InputBackend>::TabletToolAxisEvent: UnwindSafe,
<B as InputBackend>::TabletToolProximityEvent: UnwindSafe,
<B as InputBackend>::TabletToolTipEvent: UnwindSafe,
<B as InputBackend>::TabletToolButtonEvent: UnwindSafe,
<B as InputBackend>::SpecialEvent: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.