Enum piston::input::Input [−] [src]

pub enum Input {
    Press(Button),
    Release(Button),
    Move(Motion),
    Text(String),
    Resize(u32, u32),
    Focus(bool),
}

Models input events.

Variants

Press

Pressed a button.

Release

Released a button.

Move

Moved mouse cursor.

Text

Text (usually from keyboard).

Resize

Window got resized.

Focus

Window gained or lost focus.

Trait Implementations

impl GenericEvent for Input

fn event_id(&self) -> EventId

fn with_args<F, U>(&'a self, f: F) -> U where F: FnMut(&Any + 'static) -> U

fn from_args(event_id: EventId, any: &Any + 'static, _old_event: &Input) -> Option<Input>

Derived Implementations

impl Debug for Input

fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>

impl PartialEq<Input> for Input

fn eq(&self, __arg_0: &Input) -> bool

fn ne(&self, __arg_0: &Input) -> bool

impl Encodable for Input

fn encode<__S>(&self, __arg_0: &mut __S) -> Result<(), __S::Error> where __S: Encoder

impl Decodable for Input

fn decode<__D>(__arg_0: &mut __D) -> Result<Input, __D::Error> where __D: Decoder

impl Clone for Input

fn clone(&self) -> Input