pub struct PointerSample {
pub pointer_id: Option<u32>,
pub phase: Option<EventPhase>,
pub position_in_viewport: Option<[f32; 2]>,
pub scroll_v: Option<i64>,
pub scroll_h: Option<i64>,
pub pressed_buttons: Option<Vec<u8>>,
pub relative_motion: Option<[f32; 2]>,
pub scroll_v_physical_pixel: Option<f64>,
pub scroll_h_physical_pixel: Option<f64>,
pub is_precision_scroll: Option<bool>,
/* private fields */
}
Expand description
A description of each sampled data point for a pointer device.
Fields§
§pointer_id: Option<u32>
An identifier of the pointer that issued this event. It is unique only to a specific pointer device.
phase: Option<EventPhase>
The state of this event in the pointer event stream’s state machine.
position_in_viewport: Option<[f32; 2]>
The position of this event, in the viewport’s coordinate system.
scroll_v: Option<i64>
Relative vertical scrolling displacement by detent.
scroll_h: Option<i64>
Relative horizontal scrolling displacement by detent.
Identifiers of currently pressed buttons.
relative_motion: Option<[f32; 2]>
The movement of a mouse, independent of the viewport’s coordinate system.
scroll_v_physical_pixel: Option<f64>
Recommended vertical scrolling displacement by physical pixel, it is computed with accelerator, detent / mm to pixel ratio, etc.
scroll_h_physical_pixel: Option<f64>
Recommended horizontal scrolling displacement by physical pixel, it is computed with accelerator, detent / mm to pixel ratio, etc.
is_precision_scroll: Option<bool>
Indicated if the scroll event is from a precision scroll device (HI_RES mouse or touchpad). Clients may want to play interpolation animations on non precision scroll device for smooth scrolling.
Trait Implementations§
Source§impl Clone for PointerSample
impl Clone for PointerSample
Source§fn clone(&self) -> PointerSample
fn clone(&self) -> PointerSample
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for PointerSample
impl Debug for PointerSample
Source§impl<D: ResourceDialect> Decode<PointerSample, D> for PointerSample
impl<D: ResourceDialect> Decode<PointerSample, D> for PointerSample
Source§impl Default for PointerSample
impl Default for PointerSample
Source§fn default() -> PointerSample
fn default() -> PointerSample
Source§impl<D: ResourceDialect> Encode<PointerSample, D> for &PointerSample
impl<D: ResourceDialect> Encode<PointerSample, D> for &PointerSample
Source§impl PartialEq for PointerSample
impl PartialEq for PointerSample
Source§impl TypeMarker for PointerSample
impl TypeMarker for PointerSample
Source§type Owned = PointerSample
type Owned = PointerSample
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
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
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 PointerSample
impl ValueTypeMarker for PointerSample
Source§type Borrowed<'a> = &'a PointerSample
type Borrowed<'a> = &'a PointerSample
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Persistable for PointerSample
impl StructuralPartialEq for PointerSample
Auto Trait Implementations§
impl Freeze for PointerSample
impl RefUnwindSafe for PointerSample
impl Send for PointerSample
impl Sync for PointerSample
impl Unpin for PointerSample
impl UnwindSafe for PointerSample
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)