Struct MouseEvent
pub struct MouseEvent {
pub timestamp: Option<i64>,
pub view_parameters: Option<ViewParameters>,
pub device_info: Option<MouseDeviceInfo>,
pub pointer_sample: Option<MousePointerSample>,
pub stream_info: Option<MouseEventStreamInfo>,
pub trace_flow_id: Option<u64>,
/* private fields */
}
Expand description
The self-sufficient, self-consistent collection of pointer-related data, sent from server to client.
Fields§
§timestamp: Option<i64>
The time this event was observed. Required.
view_parameters: Option<ViewParameters>
The parameters of the associated view and viewport, sufficient to correctly interpret the position, orientation, magnitude, and inter-event distance of pointer events dispatched to a view.
- It is issued on connection and on change.
device_info: Option<MouseDeviceInfo>
A description of the mouse device, sufficient to correctly interpret the capabilities and usage intent of the device.
- It is issued once per device.
pointer_sample: Option<MousePointerSample>
A description of each sampled data point in a mouse event stream.
Issuance policy. There are two dispatch modes, “hover” and “latched”. Hover mode is default, and the stream is dispatched in fragments to the visible client that each mouse event hovers above. Latched mode directs the stream to a single client (regardless of view boundary) until unlatched. Latched mode is typically toggled when the user presses the primary mouse button, but is ultimately a product-specific policy.
stream_info: Option<MouseEventStreamInfo>
The signal for view entry/exit in hover mode.
- It is issued on hover entry into a view, and hover exit from a view.
trace_flow_id: Option<u64>
An identifier to correlate this event’s send/receive occurrence across component boundaries or abstraction layers.
Trait Implementations§
§impl Clone for MouseEvent
impl Clone for MouseEvent
§fn clone(&self) -> MouseEvent
fn clone(&self) -> MouseEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for MouseEvent
impl Debug for MouseEvent
§impl<D> Decode<MouseEvent, D> for MouseEventwhere
D: ResourceDialect,
impl<D> Decode<MouseEvent, D> for MouseEventwhere
D: ResourceDialect,
§fn new_empty() -> MouseEvent
fn new_empty() -> MouseEvent
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl Default for MouseEvent
impl Default for MouseEvent
§fn default() -> MouseEvent
fn default() -> MouseEvent
§impl<D> Encode<MouseEvent, D> for &MouseEventwhere
D: ResourceDialect,
impl<D> Encode<MouseEvent, D> for &MouseEventwhere
D: ResourceDialect,
§impl PartialEq for MouseEvent
impl PartialEq for MouseEvent
§impl TypeMarker for MouseEvent
impl TypeMarker for MouseEvent
§type Owned = MouseEvent
type Owned = MouseEvent
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
§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.§impl ValueTypeMarker for MouseEvent
impl ValueTypeMarker for MouseEvent
§type Borrowed<'a> = &'a MouseEvent
type Borrowed<'a> = &'a MouseEvent
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<MouseEvent as TypeMarker>::Owned,
) -> <MouseEvent as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<MouseEvent as TypeMarker>::Owned, ) -> <MouseEvent as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.