pub enum RawPointerEvent {
Down {
position: Point,
button: PointerButton,
modifiers: Modifiers,
pointer: PointerInfo,
time: EventTime,
},
Move {
position: Point,
pointer: PointerInfo,
time: EventTime,
},
Up {
position: Point,
button: PointerButton,
modifiers: Modifiers,
pointer: PointerInfo,
time: EventTime,
},
Cancel {
position: Point,
pointer: PointerInfo,
reason: CancelReason,
time: EventTime,
},
}Expand description
Raw pointer events fed into gesture recognizers.
Every variant carries the PointerInfo that produced it and the
EventTime the backend stamped it with, so a recognizer never has to ask
which contact this is or when it happened — the two questions a
per-contact, clock-free recognizer cannot answer for itself.
Variants§
Down
Move
Up
Cancel
The interaction was revoked rather than completed — the window lost
focus, a modal opened over it, the OS took the pointer. Distinct from
Up on purpose: an Up means the user finished, a Cancel means the
system interrupted, and conflating them is how a drag ends up “dropped”
wherever the pointer happened to be.
Implementations§
Trait Implementations§
Source§impl Clone for RawPointerEvent
impl Clone for RawPointerEvent
Source§fn clone(&self) -> RawPointerEvent
fn clone(&self) -> RawPointerEvent
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 RawPointerEvent
Auto Trait Implementations§
impl Freeze for RawPointerEvent
impl RefUnwindSafe for RawPointerEvent
impl Send for RawPointerEvent
impl Sync for RawPointerEvent
impl Unpin for RawPointerEvent
impl UnsafeUnpin for RawPointerEvent
impl UnwindSafe for RawPointerEvent
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