pub enum Event {
Resized(u32, u32),
Moved(i32, i32),
Closed,
ReceivedCharacter(char),
Focused(bool),
KeyboardInput(ElementState, ScanCode, Option<VirtualKeyCode>),
MouseMoved((i32, i32)),
MouseWheel(i32),
MouseInput(ElementState, MouseButton),
Awakened,
}
Variants
Resized | The size of the window has changed.
|
Moved | The position of the window has changed.
|
Closed | The window has been closed.
|
ReceivedCharacter | The window received a unicode character.
|
Focused | The window gained or lost focus.
The parameter is true if the window has gained focus, and false if it has lost focus.
|
KeyboardInput | An event from the keyboard has been received.
|
MouseMoved | The cursor has moved on the window.
The parameter are the (x,y) coords in pixels relative to the top-left corner of the window.
|
MouseWheel | A positive value indicates that the wheel was rotated forward, away from the user;
a negative value indicates that the wheel was rotated backward, toward the user.
|
MouseInput | An event from the mouse has been received.
|
Awakened | The event loop was woken up by another thread.
|
Trait Implementations
Derived Implementations