Enum winit::Event [] [src]

pub enum Event {
    Resized(u32u32),
    Moved(i32i32),
    Closed,
    DroppedFile(PathBuf),
    ReceivedCharacter(char),
    Focused(bool),
    KeyboardInput(ElementStateScanCodeOption<VirtualKeyCode>),
    MouseMoved((i32, i32)),
    MouseWheel(MouseScrollDeltaTouchPhase),
    MouseInput(ElementStateMouseButton),
    TouchpadPressure(f32i64),
    Awakened,
    Refresh,
    Suspended(bool),
    Touch(Touch),
}

Variants

Resized(u32u32)

The size of the window has changed.

Moved(i32i32)

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(ElementStateScanCodeOption<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.

MouseWheel(MouseScrollDeltaTouchPhase)

A mouse wheel movement or touchpad scroll occurred.

MouseInput(ElementStateMouseButton)

An event from the mouse has been received.

TouchpadPressure(f32i64)

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 Debug for Event
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

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