Struct pointer_fusion::PointerEvent
source · pub struct PointerEvent {Show 22 fields
pub id: i64,
pub kind: DeviceKind,
pub timestamp: Time,
pub phase: Phase,
pub device_id: u32,
pub pointer_id: Option<u32>,
pub physical_x: f32,
pub physical_y: f32,
pub physical_delta_x: f32,
pub physical_delta_y: f32,
pub logical_x: f32,
pub logical_y: f32,
pub logical_delta_x: f32,
pub logical_delta_y: f32,
pub buttons: i64,
pub signal_kind: SignalKind,
pub physical_scroll_delta_y: f64,
pub physical_scroll_delta_x: f64,
pub logical_scroll_delta_y: f64,
pub logical_scroll_delta_x: f64,
pub synthesized: bool,
pub status: Status,
}
Expand description
Information about the state of a pointer.
Fields§
§id: i64
The monotonically increasing identifier that is present only on ‘Down’ events and is 0 otherwise.
kind: DeviceKind
The kind of input device.
timestamp: Time
The timestamp when the event originated. This is monotonically increasing for the same DeviceKind. Timestamp for synthesized events is same as event synthesized from.
phase: Phase
The current Phase of pointer event.
device_id: u32
The unique device identifier.
pointer_id: Option<u32>
The identifier for the pointer that issued this event when DeviceKind is [Touch].
physical_x: f32
The x position of the device, in the viewport’s coordinate system, as reported by the raw device event.
physical_y: f32
The y position of the device, in the viewport’s coordinate system, as reported by the raw device event.
physical_delta_x: f32
The relative change in x position of the device from previous event in sequence.
physical_delta_y: f32
The relative change in y position of the device from previous event in sequence.
logical_x: f32
The x position of the device, in the view’s logical coordinate system.
logical_y: f32
The y position of the device, in the view’s logical coordinate system.
logical_delta_x: f32
The relative change in x position of the device from previous event in sequence, in the view’s logical coordinate system.
logical_delta_y: f32
The relative change in y position of the device from previous event in sequence, in the view’s logical coordinate system.
The buttons pressed on the device represented as bitflags.
signal_kind: SignalKind
The event SignalKind for scroll events.
physical_scroll_delta_y: f64
The amount of scroll in x direction, in physical pixels.
physical_scroll_delta_x: f64
The amount of scroll in y direction, in physical pixels.
logical_scroll_delta_y: f64
The amount of scroll in x direction, in logical pixels.
logical_scroll_delta_x: f64
The amount of scroll in y direction, in logical pixels.
synthesized: bool
Set if this PointerEvent was synthesized for maintaining legal input sequence.
status: Status
The status of pointer if it has entered or exited the viewport. None for touch source.
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