#[repr(C, u8)]pub enum NativeGestureEvent {
DoubleClick,
LongPress(DetectedLongPress),
Swipe(GestureDirection),
Pinch(DetectedPinch),
Rotation(DetectedRotation),
}Expand description
Gesture detected by a platform-native recognizer.
Platform backends construct one of these in their gesture-recognizer
callbacks (iOS UIKit, Android GestureDetector, macOS
NSGestureRecognizer) and hand it to
GestureAndDragManager::inject_native_gesture. The in-process
detect_* methods then return the native result, sidestepping their
fallback heuristics. On platforms with poor native gesture support
(X11 / Wayland touch, headless), backends never inject and the
in-process detector remains authoritative.
Variants§
DoubleClick
Single tap / double-click detected natively.
LongPress(DetectedLongPress)
Long-press detected natively (iOS UILongPressGestureRecognizer,
Android GestureDetector.OnGestureListener::onLongPress).
Swipe(GestureDirection)
Swipe detected natively (iOS UISwipeGestureRecognizer,
Android GestureDetector.OnGestureListener::onFling).
Pinch(DetectedPinch)
Pinch detected natively (iOS UIPinchGestureRecognizer,
Android ScaleGestureDetector, macOS magnification gesture).
Rotation(DetectedRotation)
Rotation detected natively (iOS UIRotationGestureRecognizer,
macOS rotation gesture).
Trait Implementations§
Source§impl Clone for NativeGestureEvent
impl Clone for NativeGestureEvent
Source§fn clone(&self) -> NativeGestureEvent
fn clone(&self) -> NativeGestureEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NativeGestureEvent
impl Debug for NativeGestureEvent
Source§impl PartialEq for NativeGestureEvent
impl PartialEq for NativeGestureEvent
Source§fn eq(&self, other: &NativeGestureEvent) -> bool
fn eq(&self, other: &NativeGestureEvent) -> bool
self and other values to be equal, and is used by ==.impl Copy for NativeGestureEvent
impl StructuralPartialEq for NativeGestureEvent
Auto Trait Implementations§
impl Freeze for NativeGestureEvent
impl RefUnwindSafe for NativeGestureEvent
impl Send for NativeGestureEvent
impl Sync for NativeGestureEvent
impl Unpin for NativeGestureEvent
impl UnsafeUnpin for NativeGestureEvent
impl UnwindSafe for NativeGestureEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more