#[repr(C)]pub enum PointerSource {
Unknown = 0,
Mouse = 1,
Touchpad = 2,
Trackball = 3,
Trackpoint = 4,
Touchscreen = 5,
Pen = 6,
Eraser = 7,
}Expand description
What kind of device produced a pointer event.
The same discriminator the web calls PointerEvent.pointerType, GTK calls
GdkInputSource and Qt calls QInputDevice::DeviceType. Azul splits Mouse,
Touch and Pen into separate FILTERS, which is a stronger guarantee than a
runtime tag — but it cannot express the distinctions WITHIN the pointer
family, and those matter:
- A touchpad and a mouse both arrive as a synthesized pointer. Telling them apart is what lets an app know a pinch gesture is possible at all, and whether “scroll” means a wheel detent or a continuous drag.
- A trackball and a trackpoint have their own acceleration and scroll semantics, which is why GTK and Android name them separately.
- A pen reported through the pointer path (a stylus acting as a mouse, the Wayland tablet bridge) is not a finger and not a mouse.
Variants§
Unknown = 0
The platform did not say.
Mouse = 1
A mouse.
Touchpad = 2
An indirect touch surface — a laptop trackpad or a Magic Trackpad.
Trackball = 3
A trackball.
Trackpoint = 4
A pointing stick (ThinkPad nub).
Touchscreen = 5
A direct touch surface reporting through the pointer path.
Pen = 6
A stylus tip.
Eraser = 7
The inverted end of a stylus.
Trait Implementations§
Source§impl Clone for PointerSource
impl Clone for PointerSource
Source§fn clone(&self) -> PointerSource
fn clone(&self) -> PointerSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PointerSource
Source§impl Debug for PointerSource
impl Debug for PointerSource
impl Eq for PointerSource
Source§impl Hash for PointerSource
impl Hash for PointerSource
Source§impl Ord for PointerSource
impl Ord for PointerSource
Source§fn cmp(&self, other: &PointerSource) -> Ordering
fn cmp(&self, other: &PointerSource) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for PointerSource
impl PartialEq for PointerSource
Source§impl PartialOrd for PointerSource
impl PartialOrd for PointerSource
impl StructuralPartialEq for PointerSource
Auto Trait Implementations§
impl Freeze for PointerSource
impl RefUnwindSafe for PointerSource
impl Send for PointerSource
impl Sync for PointerSource
impl Unpin for PointerSource
impl UnsafeUnpin for PointerSource
impl UnwindSafe for PointerSource
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