Enum input::Input [] [src]

pub enum Input {
    Press(Button),
    Release(Button),
    Move(Motion),
    Text(String),
    Resize(u32, u32),
    Focus(bool),
    Cursor(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.

Cursor

Window gained or lost cursor.

Trait Implementations

impl GenericEvent for Input

fn event_id(&self) -> EventId

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

fn from_args(event_id: EventId, any: &Any, _old_event: &Self) -> Option<Self>

impl From<Motion> for Input

fn from(motion: Motion) -> Self

Derived Implementations

impl Debug for Input

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

impl PartialEq for Input

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

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

impl Encodable for Input

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

impl Decodable for Input

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

impl Clone for Input

fn clone(&self) -> Input

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