pub enum InputEvent {
Quit,
Exposed,
Resized(Size),
FocusChanged(bool),
MouseDown {
position: Point,
button: MouseButton,
clicks: u8,
},
MouseUp {
position: Point,
button: MouseButton,
clicks: u8,
},
MouseMove {
position: Point,
},
Wheel {
delta: Point,
},
KeyDown {
key: Key,
modifiers: Modifiers,
repeat: bool,
},
KeyUp {
key: Key,
modifiers: Modifiers,
},
Text(String),
Wake,
}Expand description
A window-system event a backend delivers to the engine, in window coordinates.
Variants§
Quit
The user asked to close the window.
Exposed
The window needs repainting.
Resized(Size)
The window changed size.
FocusChanged(bool)
The window gained or lost keyboard focus.
MouseDown
A mouse button went down.
Fields
The button.
MouseUp
A mouse button went up.
Fields
The button.
MouseMove
The pointer moved.
Wheel
The wheel or trackpad scrolled.
KeyDown
A key went down (or repeated).
Fields
KeyUp
A key went up.
Text(String)
Text was typed.
Wake
Another thread asked the loop to wake; see Backend::waker.
Implementations§
Trait Implementations§
Source§impl Clone for InputEvent
impl Clone for InputEvent
Source§impl Debug for InputEvent
impl Debug for InputEvent
Source§impl PartialEq for InputEvent
impl PartialEq for InputEvent
impl StructuralPartialEq for InputEvent
Auto Trait Implementations§
impl Freeze for InputEvent
impl RefUnwindSafe for InputEvent
impl Send for InputEvent
impl Sync for InputEvent
impl Unpin for InputEvent
impl UnsafeUnpin for InputEvent
impl UnwindSafe for InputEvent
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