Enum winput::message_loop::Event[][src]

pub enum Event {
    Keyboard {
        vk: Vk,
        scan_code: u32,
        action: Action,
    },
    MouseMoveRelative {
        x: i32,
        y: i32,
    },
    MouseMoveAbsolute {
        x: f32,
        y: f32,
        virtual_desk: bool,
    },
    MouseButton {
        action: Action,
        button: Button,
    },
    MouseWheel {
        delta: f32,
        direction: WheelDirection,
    },
}

An event of any kind.

Variants

Keyboard

Fields of Keyboard

vk: Vk

The virtual keycode of the key that was pressed.

scan_code: u32

The scan code of that key.

action: Action

The action that was taken on the key.

MouseMoveRelative

Fields of MouseMoveRelative

x: i32

The x coordinate of the mouse, in per-monitor-aware screen coordinates.

y: i32

The y coordinate of the mouse, in per-monitor-aware screen coordinates.

MouseMoveAbsolute

Fields of MouseMoveAbsolute

x: f32

The x coordinate of the mouse in screen coordinates.

y: f32

The y coordinate of the mouse in screen coordinates.

virtual_desk: bool

If this flag is set to true, the x and y coordinates map to the entier virtual desktop (this is relevent if multiple monitors are used).

MouseButton

Fields of MouseButton

action: Action

The action that was taken on the mouse button.

button: Button

The mouse button involved in the event.

MouseWheel

Fields of MouseWheel

delta: f32

The amount of rotation of the wheel. Positive values indicate that the wheel was rotated forward, away from the user; a negative value means that the wheel was rotated backward, toward the user.

direction: WheelDirection

The direction of the wheel.

Trait Implementations

impl Clone for Event[src]

impl Copy for Event[src]

impl Debug for Event[src]

Auto Trait Implementations

impl RefUnwindSafe for Event

impl Send for Event

impl Sync for Event

impl Unpin for Event

impl UnwindSafe for Event

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.