pub enum PointerDeviceKind {
Touch,
Mouse,
Stylus,
InvertedStylus,
Trackpad,
Unknown,
}Expand description
The kind of pointer device.
Variants§
Touch
A touch-based pointer device.
The most common case is a touch screen.
When the user is operating with a trackpad on iOS, clicking will also
dispatch events with kind Touch if
UIApplicationSupportsIndirectInputEvents is not present in Info.plist
or returns NO.
See also:
Mouse
A mouse-based pointer device.
The most common case is a mouse on the desktop or Web.
When the user is operating with a trackpad on iOS, moving the pointing
cursor will also dispatch events with kind Mouse, and clicking will
dispatch events with kind Mouse if
UIApplicationSupportsIndirectInputEvents is not present in Info.plist
or returns NO.
See also:
Stylus
A pointer device with a stylus.
InvertedStylus
A pointer device with a stylus that has been inverted.
Trackpad
Gestures from a trackpad.
A trackpad here is defined as a touch-based pointer device with an indirect surface (the user operates the screen by touching something that is not the screen).
When the user makes zoom, pan, scroll or rotate gestures with a physical
trackpad, supporting platforms dispatch events with kind Trackpad.
Events with kind Trackpad can only have a PointerChange of Add,
Remove, and pan-zoom related values.
Some platforms don’t support (or don’t fully support) trackpad
gestures, and might convert trackpad gestures into fake pointer events
that simulate dragging. These events typically have kind Touch or
Mouse instead of Trackpad. This includes (but is not limited to) Web,
and iOS when UIApplicationSupportsIndirectInputEvents isn’t present in
Info.plist or returns NO.
Moving the pointing cursor or clicking with a trackpad typically triggers
Touch or Mouse events, but never triggers Trackpad events.
See also:
Unknown
An unknown pointer device.
Trait Implementations§
Source§impl Clone for PointerDeviceKind
impl Clone for PointerDeviceKind
Source§fn clone(&self) -> PointerDeviceKind
fn clone(&self) -> PointerDeviceKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PointerDeviceKind
Source§impl Debug for PointerDeviceKind
impl Debug for PointerDeviceKind
impl Eq for PointerDeviceKind
Source§impl Hash for PointerDeviceKind
impl Hash for PointerDeviceKind
Source§impl PartialEq for PointerDeviceKind
impl PartialEq for PointerDeviceKind
impl StructuralPartialEq for PointerDeviceKind
Auto Trait Implementations§
impl Freeze for PointerDeviceKind
impl RefUnwindSafe for PointerDeviceKind
impl Send for PointerDeviceKind
impl Sync for PointerDeviceKind
impl Unpin for PointerDeviceKind
impl UnsafeUnpin for PointerDeviceKind
impl UnwindSafe for PointerDeviceKind
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.