[][src]Enum sylasteven_system_input_default::InputEvent

pub enum InputEvent {
    Resize {
        width: u32,
        height: u32,
    },
    Key {
        keycode: KeyCode,
        modifiers: Modifiers,
        down: bool,
    },
    TextInput(char),
    MouseClick {
        button: MouseButton,
        modifiers: Modifiers,
        down: bool,
    },
    MouseMove {
        x: f32,
        y: f32,
    },
    MouseWheel(f32),
    File {
        dropped: bool,
        path: PathBuf,
    },
    Quit,
}

An event representing input.

Variants

Resize

The event when the window is resized.

Fields of Resize

width: u32

The new window width.

height: u32

The new window height.

Key

The event when a key is pressed or released.

Fields of Key

keycode: KeyCode

The code of the pressed or released key.

modifiers: Modifiers

The pressed modifiers.

down: bool

A flag if the key is pressed, not released.

TextInput(char)

The event for text input.

MouseClick

The event when a mouse button is clicked or released.

Fields of MouseClick

button: MouseButton

The clicked or released button.

modifiers: Modifiers

The pressed modifiers.

down: bool

A flag if the key is clicked, not released.

MouseMove

The event when the mouse is moved.

Fields of MouseMove

x: f32

The new horizonal posiiton of the mouse.

y: f32

The new vertical posiiton of the mouse.

MouseWheel(f32)

The event when the mouse wheel is rotated.

File

The event for files dragged or dropped over the window.

Fields of File

dropped: bool

A flag, if the file is dropped, not just hovered.

path: PathBuf

The path of the file.

Quit

The quit event.

Auto Trait Implementations

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> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> Erased for T

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

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

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,