#[repr(C)]pub struct TouchInteractionId {
pub device_id: u32,
pub pointer_id: u32,
pub interaction_id: u32,
}
Expand description
A unique identifier for a “interaction” of touch events in an event stream. Touch events are observed as a succession of interactions, as fingers engage and disengage with the display.
A finite sequence of pointer events that follows the EventPhase
state
machine, starting from the initial state ADD, is called an interaction.
A closed (or past) interaction is one where it has reached the terminal
state (REMOVE or CANCEL); an open (or current) interaction is one where it
has not.
For a given device pointer, a stream of events is observed as a succession of zero or more closed interactions (the past history of user engagement), followed by at most one open interaction (the current user engagement).
Because we need to group pointer events by their interaction, touch event carries an interaction id that is unique in that pointer stream. This common reference makes it possible to operate on a closed interaction, as well as an open interaction.
Also see EventPhase
for a discussion on event streams by mice.
Fields§
§device_id: u32
An identifier for the pointer device that issues touch event streams. A device may own multiple pointers, each with its own |pointer_id|.
pointer_id: u32
An identifier of the pointer that issued this event. It is unique only to a specific |device_id|. Each (device_id, pointer_id) pair issues at most one open interaction at a time.
interaction_id: u32
An identifier of the interaction. It is unique only to a specific (device_id, pointer_id) pair.
Trait Implementations§
Source§impl Clone for TouchInteractionId
impl Clone for TouchInteractionId
Source§fn clone(&self) -> TouchInteractionId
fn clone(&self) -> TouchInteractionId
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for TouchInteractionId
impl Debug for TouchInteractionId
Source§impl<D: ResourceDialect> Decode<TouchInteractionId, D> for TouchInteractionId
impl<D: ResourceDialect> Decode<TouchInteractionId, D> for TouchInteractionId
Source§impl<D: ResourceDialect> Encode<TouchInteractionId, D> for &TouchInteractionId
impl<D: ResourceDialect> Encode<TouchInteractionId, D> for &TouchInteractionId
Source§impl<D: ResourceDialect, T0: Encode<u32, D>, T1: Encode<u32, D>, T2: Encode<u32, D>> Encode<TouchInteractionId, D> for (T0, T1, T2)
impl<D: ResourceDialect, T0: Encode<u32, D>, T1: Encode<u32, D>, T2: Encode<u32, D>> Encode<TouchInteractionId, D> for (T0, T1, T2)
Source§impl Hash for TouchInteractionId
impl Hash for TouchInteractionId
Source§impl Ord for TouchInteractionId
impl Ord for TouchInteractionId
Source§fn cmp(&self, other: &TouchInteractionId) -> Ordering
fn cmp(&self, other: &TouchInteractionId) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for TouchInteractionId
impl PartialEq for TouchInteractionId
Source§impl PartialOrd for TouchInteractionId
impl PartialOrd for TouchInteractionId
Source§impl TypeMarker for TouchInteractionId
impl TypeMarker for TouchInteractionId
Source§type Owned = TouchInteractionId
type Owned = TouchInteractionId
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
.Source§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 moreSource§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 TouchInteractionId
impl ValueTypeMarker for TouchInteractionId
Source§type Borrowed<'a> = &'a TouchInteractionId
type Borrowed<'a> = &'a TouchInteractionId
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Copy for TouchInteractionId
impl Eq for TouchInteractionId
impl Persistable for TouchInteractionId
impl StructuralPartialEq for TouchInteractionId
Auto Trait Implementations§
impl Freeze for TouchInteractionId
impl RefUnwindSafe for TouchInteractionId
impl Send for TouchInteractionId
impl Sync for TouchInteractionId
impl Unpin for TouchInteractionId
impl UnwindSafe for TouchInteractionId
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
)