Struct fidl_fuchsia_ui_input::PointerEvent
source · pub struct PointerEvent {
pub event_time: u64,
pub device_id: u32,
pub pointer_id: u32,
pub type_: PointerEventType,
pub phase: PointerEventPhase,
pub x: f32,
pub y: f32,
pub radius_major: f32,
pub radius_minor: f32,
pub buttons: u32,
}
Expand description
Pointers represent raw data about the user’s interaction with the screen.
The state transitions should be as follows: ADD (-> HOVER) -> DOWN -> MOVE -> UP (-> HOVER) -> REMOVE
At any point after the initial ADD, a transition to CANCEL is also possible.
Fields§
§event_time: u64
Time the event was delivered. The time is in nanoseconds and corresponds to the monotonic time as determined by the zx_clock_get_monotonic syscall.
device_id: u32
§pointer_id: u32
§type_: PointerEventType
§phase: PointerEventPhase
§x: f32
x
and y
are in the coordinate system of the View.
y: f32
§radius_major: f32
§radius_minor: f32
Currently pressed buttons as defined the kButton constants such as
kMousePrimaryButton
Trait Implementations§
source§impl Clone for PointerEvent
impl Clone for PointerEvent
source§fn clone(&self) -> PointerEvent
fn clone(&self) -> PointerEvent
Returns a copy 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 moresource§impl Debug for PointerEvent
impl Debug for PointerEvent
source§impl Decode<PointerEvent> for PointerEvent
impl Decode<PointerEvent> for PointerEvent
source§impl Encode<PointerEvent> for &PointerEvent
impl Encode<PointerEvent> for &PointerEvent
source§impl<T0: Encode<u64>, T1: Encode<u32>, T2: Encode<u32>, T3: Encode<PointerEventType>, T4: Encode<PointerEventPhase>, T5: Encode<f32>, T6: Encode<f32>, T7: Encode<f32>, T8: Encode<f32>, T9: Encode<u32>> Encode<PointerEvent> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)
impl<T0: Encode<u64>, T1: Encode<u32>, T2: Encode<u32>, T3: Encode<PointerEventType>, T4: Encode<PointerEventPhase>, T5: Encode<f32>, T6: Encode<f32>, T7: Encode<f32>, T8: Encode<f32>, T9: Encode<u32>> Encode<PointerEvent> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)
source§impl PartialEq<PointerEvent> for PointerEvent
impl PartialEq<PointerEvent> for PointerEvent
source§fn eq(&self, other: &PointerEvent) -> bool
fn eq(&self, other: &PointerEvent) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<PointerEvent> for PointerEvent
impl PartialOrd<PointerEvent> for PointerEvent
source§fn partial_cmp(&self, other: &PointerEvent) -> Option<Ordering>
fn partial_cmp(&self, other: &PointerEvent) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TypeMarker for PointerEvent
impl TypeMarker for PointerEvent
§type Owned = PointerEvent
type Owned = PointerEvent
The owned Rust type which this FIDL type decodes into.
source§fn inline_align(context: Context) -> usize
fn inline_align(context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
source§fn inline_size(context: Context) -> usize
fn inline_size(context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.source§impl ValueTypeMarker for PointerEvent
impl ValueTypeMarker for PointerEvent
§type Borrowed<'a> = &'a <PointerEvent as TypeMarker>::Owned
type Borrowed<'a> = &'a <PointerEvent as TypeMarker>::Owned
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more