pub enum Event {
Press(Key),
Release(Key),
Modifiers(Modifiers),
Resize(f32, f32),
Motion(f32, f32),
Cursor(f32, f32),
Scroll(f32, f32),
Text(char),
Focus(bool),
Exit,
}Expand description
A user input event.
Variants§
Press(Key)
A button on some input device was pressed.
Release(Key)
A button on some input device was released.
Modifiers(Modifiers)
Modifiers were changed.
Resize(f32, f32)
The window was resized to the given dimensions.
Motion(f32, f32)
Some motion input was received (e.g. moving mouse or joystick axis).
Cursor(f32, f32)
The mouse cursor was moved to a location.
Scroll(f32, f32)
The mouse wheel or touchpad scroll gesture sent us some scroll event.
Text(char)
Text input was received, usually via the keyboard.
Focus(bool)
The window was focused or lost focus.
Exit
The application exited it’s main event loop
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin 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