#[non_exhaustive]pub enum Event {
PointerMove {
position: Point,
},
PointerDown {
position: Point,
button: PointerButton,
},
PointerUp {
position: Point,
button: PointerButton,
},
DoubleClick {
position: Point,
},
PointerLeave,
Scroll {
position: Point,
delta: Point,
},
KeyDown {
key: Key,
modifiers: Modifiers,
},
KeyUp {
key: Key,
modifiers: Modifiers,
},
FocusLost,
Pinch {
position: Point,
delta: f32,
},
}Expand description
Platform-neutral input event, already converted to logical pixels.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
PointerMove
The pointer moved without a button change.
PointerDown
A pointer button was pressed.
PointerUp
A pointer button was released.
DoubleClick
A second primary click in quick succession, sent after its PointerUp.
PointerLeave
The pointer left the window or canvas.
Scroll
Wheel or trackpad scrolling, in logical pixels. Positive delta.y means
the user scrolled up (content should move down), as on every platform.
Fields
KeyDown
A key was pressed (including auto-repeat).
Fields
KeyUp
A key was released.
Fields
FocusLost
The window or canvas lost keyboard focus.
Pinch
A pinch on a trackpad or Ctrl with the wheel: a zoom gesture.
Trait Implementations§
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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