Trait piston::CursorEvent
source · pub trait CursorEvent: Sized {
// Required methods
fn from_cursor(cursor: bool, old_event: &Self) -> Option<Self>;
fn cursor<U, F>(&self, f: F) -> Option<U>
where F: FnMut(bool) -> U;
// Provided method
fn cursor_args(&self) -> Option<bool> { ... }
}
Expand description
When window gets or loses cursor.
Required Methods§
sourcefn from_cursor(cursor: bool, old_event: &Self) -> Option<Self>
fn from_cursor(cursor: bool, old_event: &Self) -> Option<Self>
Creates a cursor event.
Preserves time stamp from original input event, if any.
Provided Methods§
sourcefn cursor_args(&self) -> Option<bool>
fn cursor_args(&self) -> Option<bool>
Returns cursor arguments.
Object Safety§
This trait is not object safe.