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

pub enum InputHook {
Show variants 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.

Show fields

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.

Show fields

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.

Show fields

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.

Show fields

Fields of AnyMouseOrKeyPress

global: bool
AnyMousePress

Called on any mouse button press.

Show fields

Fields of AnyMousePress

global: bool
AnyKeyPress

Called on any key press.

Show fields

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.

Show fields

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.

Show fields

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.

Show fields

Fields of AnyKeyRelease

global: bool

Implementations

impl InputHook[src]

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

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

Trait Implementations

impl Clone for InputHook[src]

fn clone(&self) -> InputHook[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for InputHook[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl PartialEq<InputHook> for InputHook[src]

fn eq(&self, other: &InputHook) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &InputHook) -> bool[src]

This method tests for !=.

impl StructuralPartialEq for InputHook[src]

Auto Trait Implementations

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> Content for T[src]

pub fn ref_from_ptr(ptr: *mut c_void, size: usize) -> Option<*mut T>[src]

Builds a pointer to this type from a raw pointer.

pub fn is_size_suitable(size: usize) -> bool[src]

Returns true if the size is suitable to store a type like this.

pub fn indiv_size() -> usize[src]

Returns the size of an individual element.

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Pointable for T

pub const ALIGN: usize

The alignment of pointer.

type Init = T

The type for initializers.

pub unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more

pub unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more

pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more

pub unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more

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

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

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

pub fn vzip(self) -> V