[][src]Enum basalt::input::InputHook

pub enum InputHook {
    Press {
        global: bool,
        keys: Vec<Qwery>,
        mouse_buttons: Vec<MouseButton>,
    },
    Hold {
        global: bool,
        keys: Vec<Qwery>,
        mouse_buttons: Vec<MouseButton>,
        initial_delay: Duration,
        interval: Duration,
        accel: f32,
    },
    Release {
        global: bool,
        keys: Vec<Qwery>,
        mouse_buttons: Vec<MouseButton>,
    },
    Character,
    MouseEnter,
    MouseLeave,
    MouseMove,
    MouseMotion,
    MouseScroll,
    WindowFocused,
    WindowLostFocus,
    AnyMouseOrKeyPress {
        global: bool,
    },
    AnyMousePress {
        global: bool,
    },
    AnyKeyPress {
        global: bool,
    },
    AnyMouseOrKeyRelease {
        global: bool,
    },
    AnyMouseRelease {
        global: bool,
    },
    AnyKeyRelease {
        global: bool,
    },
}

Variants

Press

Press is called once when all keys and mouse buttons are active.

Fields of Press

global: boolkeys: Vec<Qwery>mouse_buttons: Vec<MouseButton>
Hold

Hold is called while the key and mouse buttons are called. Nothing will be called until the initial delay period has elapsed. After that it will be called every time interval has elapsed. accel is not implemnted at this time.

Fields of Hold

global: boolkeys: Vec<Qwery>mouse_buttons: Vec<MouseButton>initial_delay: Durationinterval: Durationaccel: f32
Release

Release is called when the all keys/buttons have been set to active and then anyone of them has been release. Release is also called when the window loses focus.

Fields of Release

global: boolkeys: Vec<Qwery>mouse_buttons: Vec<MouseButton>
Character

Like a normal key press. Qwery is converted into a Character with modifiers in consideration.

MouseEnter

Called when the mouse enters the window.

MouseLeave

Called when the mouse leaves the window.

MouseMove

Called when the mouse moves within the window.

MouseMotion

Called when the mouse motion is recieved. This is not a window event, but rather a device event. Do not use this in combination with MouseMove as the data units may differ. Example use would be for game camera.

MouseScroll

Called when the mouse is over the window.

WindowFocused

Called when the window gains focus.

WindowLostFocus

Called when the window loses focus.

AnyMouseOrKeyPress

Called on any mouse button or key press.

Fields of AnyMouseOrKeyPress

global: bool
AnyMousePress

Called on any mouse button press.

Fields of AnyMousePress

global: bool
AnyKeyPress

Called on any key press.

Fields of AnyKeyPress

global: bool
AnyMouseOrKeyRelease

Called on any mouse button or key release. Also called when the window loses focus with all the keys and buttons that were currently held before.

Fields of AnyMouseOrKeyRelease

global: bool
AnyMouseRelease

Called on any mouse button release. Also called when the window loses focus with all the mouse buttons that were currently held before.

Fields of AnyMouseRelease

global: bool
AnyKeyRelease

Called on any key release. Also called when the window loses focus with all the keys that were currently held before.

Fields of AnyKeyRelease

global: bool

Methods

impl InputHook[src]

pub fn into_data(&self) -> InputHookData[src]

pub fn ty(&self) -> InputHookTy[src]

Trait Implementations

impl Clone for InputHook[src]

impl PartialEq<InputHook> for InputHook[src]

impl Debug for InputHook[src]

Auto Trait Implementations

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> From<T> for 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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Content for T[src]

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

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

impl<T> SetParameter for T