pub enum PointerKind {
Touch,
Mouse,
Stylus,
}Expand description
The kind of device behind a pointer (docs/gestures.md “Input kind”): what
day::primary_pointer() tracks and a Touch carries.
Variants§
Touch
A finger on a touch screen.
Mouse
A mouse or a trackpad: a pointer that hovers.
Stylus
A stylus or pencil.
Implementations§
Source§impl PointerKind
impl PointerKind
Sourcepub fn platform_default() -> PointerKind
pub fn platform_default() -> PointerKind
The kind a platform’s users reach for first, before any input arrives: touch on a
phone or tablet OS, a mouse elsewhere. Toolkit::primary_pointer starts from it.
Sourcepub fn hovers(self) -> bool
pub fn hovers(self) -> bool
Whether this pointer hovers (a mouse, a trackpad, or a stylus that reports proximity).
Sourcepub fn name(self) -> &'static str
pub fn name(self) -> &'static str
The name a backend’s wire and a dayscript step spell this kind with.
Sourcepub fn from_name(name: &str) -> Option<PointerKind>
pub fn from_name(name: &str) -> Option<PointerKind>
The kind name spells (PointerKind::name), or None.
Trait Implementations§
Source§impl Clone for PointerKind
impl Clone for PointerKind
impl Copy for PointerKind
Source§impl Debug for PointerKind
impl Debug for PointerKind
Source§impl Default for PointerKind
impl Default for PointerKind
impl Eq for PointerKind
Source§impl Hash for PointerKind
impl Hash for PointerKind
Source§impl PartialEq for PointerKind
impl PartialEq for PointerKind
impl StructuralPartialEq for PointerKind
Auto Trait Implementations§
impl Forget for PointerKind
impl Freeze for PointerKind
impl Move for PointerKind
impl RefUnwindSafe for PointerKind
impl Send for PointerKind
impl Sync for PointerKind
impl Unpin for PointerKind
impl UnsafeUnpin for PointerKind
impl UnwindSafe for PointerKind
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