[][src]Trait piston_window::TouchEvent

pub trait TouchEvent {
    fn from_touch_args(args: &TouchArgs, old_event: &Self) -> Option<Self>;
fn touch<U, F>(&self, f: F) -> Option<U>
    where
        F: FnMut(&TouchArgs) -> U
; fn touch_args(&self) -> Option<TouchArgs> { ... } }

When a touch is started, moved, ended or cancelled.

Required methods

fn from_touch_args(args: &TouchArgs, old_event: &Self) -> Option<Self>

Creates a touch event.

fn touch<U, F>(&self, f: F) -> Option<U> where
    F: FnMut(&TouchArgs) -> U, 

Calls closure if this is a touch event.

Loading content...

Provided methods

fn touch_args(&self) -> Option<TouchArgs>

Returns touch arguments.

Loading content...

Implementors

impl TouchEvent for Event[src]

fn touch_args(&self) -> Option<TouchArgs>[src]

Loading content...