pub enum PointerEvent {
Down(PointerButtonEvent),
Up(PointerButtonEvent),
Move(PointerUpdate),
Cancel(PointerInfo),
Enter(PointerInfo),
Leave(PointerInfo),
Scroll(PointerScrollEvent),
Gesture(PointerGestureEvent),
}Expand description
A standard PointerEvent.
This is intentionally limited to standard pointer events, and it is expected that applications and frameworks that support more event types will use this as a base and add what they need in a conversion.
Variants§
Down(PointerButtonEvent)
A PointerButton was pressed.
Up(PointerButtonEvent)
A PointerButton was released.
Move(PointerUpdate)
Pointer moved.
Cancel(PointerInfo)
Pointer motion was cancelled.
Usually this is a touch which was taken over somewhere else. You should try to undo the effect of the gesture when you receive this.
Enter(PointerInfo)
Pointer entered the area that receives this event.
Leave(PointerInfo)
Pointer left the area that receives these events.
Scroll(PointerScrollEvent)
A scroll was requested at the pointer location.
Usually this is caused by a mouse wheel or a touchpad.
Gesture(PointerGestureEvent)
Gesture at pointer.
Implementations§
Source§impl PointerEvent
impl PointerEvent
Sourcepub fn is_primary_pointer(&self) -> bool
pub fn is_primary_pointer(&self) -> bool
Returns true if this event is for the primary pointer.
Trait Implementations§
Source§impl Clone for PointerEvent
impl Clone for PointerEvent
Source§fn clone(&self) -> PointerEvent
fn clone(&self) -> PointerEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PointerEvent
impl RefUnwindSafe for PointerEvent
impl Send for PointerEvent
impl Sync for PointerEvent
impl Unpin 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