pub enum EventSpec {
Tick,
PressRelease {
x: i32,
y: i32,
},
PressDown {
x: i32,
y: i32,
},
PointerDown {
x: i32,
y: i32,
},
PointerUp {
x: i32,
y: i32,
},
PointerMove {
x: i32,
y: i32,
},
DoubleTap {
x: i32,
y: i32,
},
KeyDown {
key: KeySpec,
},
KeyUp {
key: KeySpec,
},
Touch {
count: u8,
points: [TouchPointSpec; 5],
},
}Expand description
Specifies an event to inject. Mirrors Event but is easier to
serialize and does not carry multi-touch arrays.
Coordinate fields (x, y) are in the widget/landscape coordinate space.
Variants§
Tick
Advance animations / timers.
PressRelease
Debounced tap (primary action trigger).
PressDown
Stable contact began.
PointerDown
Raw pointer pressed.
PointerUp
Raw pointer released.
PointerMove
Pointer moved while pressed.
DoubleTap
Two consecutive short taps.
KeyDown
Keyboard key pressed.
KeyUp
Keyboard key released.
Touch
Multi-touch frame with per-point data.
Implementations§
Trait Implementations§
impl Copy for EventSpec
impl Eq for EventSpec
impl StructuralPartialEq for EventSpec
Auto Trait Implementations§
impl Freeze for EventSpec
impl RefUnwindSafe for EventSpec
impl Send for EventSpec
impl Sync for EventSpec
impl Unpin for EventSpec
impl UnsafeUnpin for EventSpec
impl UnwindSafe for EventSpec
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
Mutably borrows from an owned value. Read more