pub enum PointerEvent {
Move {
pointer_id: PointerId,
position: Point,
buttons: MouseButtons,
modifiers: Modifiers,
pointer_type: PointerType,
},
Down {
pointer_id: PointerId,
position: Point,
button: MouseButton,
modifiers: Modifiers,
click_count: u8,
pointer_type: PointerType,
},
Up {
pointer_id: PointerId,
position: Point,
button: MouseButton,
modifiers: Modifiers,
is_click: bool,
click_count: u8,
pointer_type: PointerType,
},
Wheel {
pointer_id: PointerId,
position: Point,
delta: Point,
modifiers: Modifiers,
pointer_type: PointerType,
},
PinchGesture {
pointer_id: PointerId,
position: Point,
delta: f32,
modifiers: Modifiers,
pointer_type: PointerType,
},
}Variants§
Move
Down
Fields
click_count: u8Consecutive click count for this button (1 = single click, 2 = double click, …).
This count is provided by the platform runner and only increments for “true clicks” (press + release without exceeding a small drag threshold).
pointer_type: PointerTypeUp
Fields
is_click: boolWhether this pointer-up completes a “true click” (press + release without exceeding the runner’s click slop threshold).
This signal is computed by the platform runner and is intentionally separate from
click_count: click_count can remain stable even when a press turns into a drag.
click_count: u8Consecutive click count for this button (1 = single click, 2 = double click, …).
See PointerEvent::Down.click_count for the normalization rules.
pointer_type: PointerTypeWheel
Fields
pointer_type: PointerTypePinchGesture
Two-finger pinch gesture, typically produced by touchpads (and some touch platforms).
delta is positive for magnification (zoom in) and negative for shrinking (zoom out).
This value may be NaN depending on the platform backend; callers should guard accordingly.
Trait Implementations§
Source§impl Clone for PointerEvent
impl Clone for PointerEvent
Source§fn clone(&self) -> PointerEvent
fn clone(&self) -> PointerEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more