pub enum Input {
Button(ButtonArgs),
Move(Motion),
Text(String),
Resize(f64, f64),
Focus(bool),
Cursor(bool),
Close(CloseArgs),
}
Expand description
Models input events.
Variants§
Button(ButtonArgs)
Changed button state.
Move(Motion)
Moved mouse cursor.
Text(String)
Text (usually from keyboard).
Resize(f64, f64)
Window got resized.
Focus(bool)
Window gained or lost focus.
Cursor(bool)
Window gained or lost cursor.
Close(CloseArgs)
Window closed.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Input
impl<'de> Deserialize<'de> for Input
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<ButtonArgs> for Input
impl From<ButtonArgs> for Input
source§fn from(args: ButtonArgs) -> Self
fn from(args: ButtonArgs) -> Self
Converts to this type from the input type.
source§impl From<ControllerAxisArgs> for Input
impl From<ControllerAxisArgs> for Input
source§fn from(args: ControllerAxisArgs) -> Self
fn from(args: ControllerAxisArgs) -> Self
Converts to this type from the input type.