pub struct GestureRecognizer { /* private fields */ }Expand description
Stateful multi-touch gesture recognizer.
Feed it TouchContact events via process and
it returns zero or more InputEvents that can be forwarded to
MapState::handle_input.
Implementations§
Source§impl GestureRecognizer
impl GestureRecognizer
Sourcepub fn finger_count(&self) -> usize
pub fn finger_count(&self) -> usize
Number of fingers currently tracked.
Sourcepub fn process(&mut self, contact: TouchContact) -> Vec<InputEvent>
pub fn process(&mut self, contact: TouchContact) -> Vec<InputEvent>
Process a single touch contact and return any resulting input events.
Typically returns 0–3 events (pan, zoom, rotate may fire simultaneously from a single two-finger move).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GestureRecognizer
impl RefUnwindSafe for GestureRecognizer
impl Send for GestureRecognizer
impl Sync for GestureRecognizer
impl Unpin for GestureRecognizer
impl UnsafeUnpin for GestureRecognizer
impl UnwindSafe for GestureRecognizer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more