Enum winit::Event
[−]
[src]
pub enum Event { Resized(u32, u32), Moved(i32, i32), Closed, DroppedFile(PathBuf), ReceivedCharacter(char), Focused(bool), KeyboardInput(ElementState, ScanCode, Option<VirtualKeyCode>), MouseMoved(i32, i32), MouseEntered, MouseLeft, MouseWheel(MouseScrollDelta, TouchPhase), MouseInput(ElementState, MouseButton), TouchpadPressure(f32, i64), Awakened, Refresh, Suspended(bool), Touch(Touch), }
Variants
Resized(u32, u32)
The size of the window has changed.
Moved(i32, i32)
The position of the window has changed.
Closed
The window has been closed.
DroppedFile(PathBuf)
A file has been dropped into the window.
ReceivedCharacter(char)
The window received a unicode character.
Focused(bool)
The window gained or lost focus.
The parameter is true if the window has gained focus, and false if it has lost focus.
KeyboardInput(ElementState, ScanCode, Option<VirtualKeyCode>)
An event from the keyboard has been received.
MouseMoved(i32, i32)
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.
MouseEntered
The cursor has entered the window.
MouseLeft
The cursor has left the window.
MouseWheel(MouseScrollDelta, TouchPhase)
A mouse wheel movement or touchpad scroll occurred.
MouseInput(ElementState, MouseButton)
An event from the mouse has been received.
TouchpadPressure(f32, i64)
Touchpad pressure event.
At the moment, only supported on Apple forcetouch-capable macbooks. The parameters are: pressure level (value between 0 and 1 representing how hard the touchpad is being pressed) and stage (integer representing the click level).
Awakened
The event loop was woken up by another thread.
Refresh
The window needs to be redrawn.
Suspended(bool)
App has been suspended or resumed.
The parameter is true if app was suspended, and false if it has been resumed.
Touch(Touch)
Touch event has been received
Trait Implementations
impl Clone for Event
[src]
fn clone(&self) -> Event
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more