Enum piston::input::Input []

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

Models input events.

Variants

Press(Button)

Pressed a button.

Release(Button)

Released a button.

Move(Motion)

Moved mouse cursor.

Text(String)

Text (usually from keyboard).

Resize(u32u32)

Window got resized.

Focus(bool)

Window gained or lost focus.

Cursor(bool)

Window gained or lost cursor.

Trait Implementations

impl GenericEvent for Input

fn event_id(&self) -> EventId

The id of this event.

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

Calls closure with arguments

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

Converts from arguments to Self

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

impl From<Motion> for Input

fn from(motion: Motion) -> Input