Trait piston::TouchEvent [−][src]
pub trait TouchEvent { pub fn from_touch_args(args: &TouchArgs, old_event: &Self) -> Option<Self>; pub fn touch<U, F>(&self, f: F) -> Option<U>
where
F: FnMut(&TouchArgs) -> U; pub fn touch_args(&self) -> Option<TouchArgs> { ... } }
When a touch is started, moved, ended or cancelled.
Required methods
pub fn from_touch_args(args: &TouchArgs, old_event: &Self) -> Option<Self>
[src]
Creates a touch event.
Preserves time stamp from original input event, if any.
pub fn touch<U, F>(&self, f: F) -> Option<U> where
F: FnMut(&TouchArgs) -> U,
[src]
F: FnMut(&TouchArgs) -> U,
Calls closure if this is a touch event.
Provided methods
pub fn touch_args(&self) -> Option<TouchArgs>
[src]
Returns touch arguments.