pub struct MousePointerSample {
pub device_id: Option<u32>,
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 in a mouse event stream.
MousePointerSample
may bundle multiple state changes into one event.
For example, if user scrolls mouse wheel and presses the left buttton
down at the same time, client may receive scroll and button state changes
together in 1 event, or receive button change and scroll change in
separate events.
Fields§
§device_id: Option<u32>
An identifier for the mouse device that issues a mouse event stream. Required.
position_in_viewport: Option<[f32; 2]>
The position of this event, in the viewport’s coordinate system. Required.
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 relative movement performed, 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 MousePointerSample
impl Clone for MousePointerSample
Source§fn clone(&self) -> MousePointerSample
fn clone(&self) -> MousePointerSample
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MousePointerSample
impl Debug for MousePointerSample
Source§impl<D: ResourceDialect> Decode<MousePointerSample, D> for MousePointerSample
impl<D: ResourceDialect> Decode<MousePointerSample, D> for MousePointerSample
Source§impl Default for MousePointerSample
impl Default for MousePointerSample
Source§fn default() -> MousePointerSample
fn default() -> MousePointerSample
Source§impl<D: ResourceDialect> Encode<MousePointerSample, D> for &MousePointerSample
impl<D: ResourceDialect> Encode<MousePointerSample, D> for &MousePointerSample
Source§impl PartialEq for MousePointerSample
impl PartialEq for MousePointerSample
Source§impl TypeMarker for MousePointerSample
impl TypeMarker for MousePointerSample
Source§type Owned = MousePointerSample
type Owned = MousePointerSample
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 MousePointerSample
impl ValueTypeMarker for MousePointerSample
Source§type Borrowed<'a> = &'a MousePointerSample
type Borrowed<'a> = &'a MousePointerSample
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Persistable for MousePointerSample
impl StructuralPartialEq for MousePointerSample
Auto Trait Implementations§
impl Freeze for MousePointerSample
impl RefUnwindSafe for MousePointerSample
impl Send for MousePointerSample
impl Sync for MousePointerSample
impl Unpin for MousePointerSample
impl UnwindSafe for MousePointerSample
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
)