#[non_exhaustive]pub struct PointerEvent {
pub kind: PointerKind,
pub position: Point,
pub modifiers: Modifiers,
pub time: Duration,
pub clicks: u8,
}Expand description
A pointer event.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.kind: PointerKindWhat happened.
position: PointWhere, in physical pixels from the window’s top-left corner.
modifiers: ModifiersModifier keys held.
time: DurationWhen, from any fixed start: presses close in time and place count as one multi-click.
clicks: u8For a press: 1, or 2 for a double click, 3 for a triple click… Set by the
Ui.
Implementations§
Source§impl PointerEvent
impl PointerEvent
Sourcepub fn new(kind: PointerKind, position: Point) -> Self
pub fn new(kind: PointerKind, position: Point) -> Self
kind at position, without modifiers, at time zero.
Sourcepub fn with_modifiers(self, modifiers: Modifiers) -> Self
pub fn with_modifiers(self, modifiers: Modifiers) -> Self
The event with modifiers held.
Trait Implementations§
Source§impl Clone for PointerEvent
impl Clone for PointerEvent
impl Copy for PointerEvent
Source§impl Debug for PointerEvent
impl Debug for PointerEvent
Source§impl PartialEq for PointerEvent
impl PartialEq for PointerEvent
impl StructuralPartialEq for PointerEvent
Auto Trait Implementations§
impl Freeze for PointerEvent
impl RefUnwindSafe for PointerEvent
impl Send for PointerEvent
impl Sync for PointerEvent
impl Unpin for PointerEvent
impl UnsafeUnpin for PointerEvent
impl UnwindSafe for PointerEvent
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