pub enum PointerEvent {
Down {
button: Option<PointerButton>,
pointer: PointerInfo,
state: PointerState,
},
Up {
button: Option<PointerButton>,
pointer: PointerInfo,
state: PointerState,
},
Move(PointerUpdate),
Cancel(PointerInfo),
Enter(PointerInfo),
Leave(PointerInfo),
Scroll {
pointer: PointerInfo,
delta: ScrollDelta,
state: PointerState,
},
}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
A PointerButton was pressed.
Fields
The PointerButton that was pressed..
pointer: PointerInfoIdentity of the pointer.
state: PointerStateThe state of the pointer (i.e. position, pressure, etc.).
Up
A PointerButton was released.
Fields
The PointerButton that was released.
pointer: PointerInfoIdentity of the pointer.
state: PointerStateThe state of the pointer (i.e. position, pressure, etc.).
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
A scroll was requested at the pointer location.
Usually this is caused by a mouse wheel or a touchpad.
Fields
pointer: PointerInfoIdentity of the pointer.
delta: ScrollDeltaThe delta of the scroll.
state: PointerStateThe state of the pointer (i.e. position, pressure, etc.).
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