#[repr(u32)]
pub enum PointerEventPhase {
Add,
Hover,
Down,
Move,
Up,
Remove,
Cancel,
}
Variants§
Add
The device has started tracking the pointer.
For example, the pointer might be hovering above the device, having not yet made contact with the surface of the device.
Hover
The pointer has moved with respect to the device while not in contact with the device.
Down
The pointer has made contact with the device.
For MOUSE
devices, this is triggered when the primary button is pressed
down to emulate a touch on the screen.
Move
The pointer has moved with respect to the device while in contact with the device.
Up
The pointer has stopped making contact with the device.
For MOUSE
devices, this is triggered when the primary button is
released.
Remove
The device is no longer tracking the pointer.
For example, the pointer might have drifted out of the device’s hover detection range or might have been disconnected from the system entirely.
Cancel
The input from the pointer is no longer directed towards this receiver.
Implementations§
source§impl PointerEventPhase
impl PointerEventPhase
pub fn from_primitive(prim: u32) -> Option<Self>
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
is_unknown
Trait Implementations§
source§impl Clone for PointerEventPhase
impl Clone for PointerEventPhase
source§fn clone(&self) -> PointerEventPhase
fn clone(&self) -> PointerEventPhase
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PointerEventPhase
impl Debug for PointerEventPhase
source§impl Decodable for PointerEventPhase
impl Decodable for PointerEventPhase
source§fn decode(
&mut self,
decoder: &mut Decoder<'_>,
offset: usize
) -> Result<(), Error>
fn decode( &mut self, decoder: &mut Decoder<'_>, offset: usize ) -> Result<(), Error>
self
.
Callers must ensure that offset
is a multiple of
Layout::inline_align
, and that decoder.buf
has room for reading
Layout::inline_size
bytes at offset
. Read moresource§impl Encodable for PointerEventPhase
impl Encodable for PointerEventPhase
source§fn encode(
&mut self,
encoder: &mut Encoder<'_, '_>,
offset: usize,
recursion_depth: usize
) -> Result<(), Error>
fn encode( &mut self, encoder: &mut Encoder<'_, '_>, offset: usize, recursion_depth: usize ) -> Result<(), Error>
Handle::INVALID
. Callers must ensure that offset
is a
multiple of Layout::inline_align
, and that encoder.buf
has room for
writing Layout::inline_size
bytes at offset
. Read moresource§impl Hash for PointerEventPhase
impl Hash for PointerEventPhase
source§impl Layout for PointerEventPhase
impl Layout for PointerEventPhase
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 supports_simple_copy() -> boolwhere
Self: Sized,
fn supports_simple_copy() -> boolwhere Self: Sized,
source§impl Ord for PointerEventPhase
impl Ord for PointerEventPhase
source§fn cmp(&self, other: &PointerEventPhase) -> Ordering
fn cmp(&self, other: &PointerEventPhase) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<PointerEventPhase> for PointerEventPhase
impl PartialEq<PointerEventPhase> for PointerEventPhase
source§fn eq(&self, other: &PointerEventPhase) -> bool
fn eq(&self, other: &PointerEventPhase) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<PointerEventPhase> for PointerEventPhase
impl PartialOrd<PointerEventPhase> for PointerEventPhase
source§fn partial_cmp(&self, other: &PointerEventPhase) -> Option<Ordering>
fn partial_cmp(&self, other: &PointerEventPhase) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Copy for PointerEventPhase
impl Eq for PointerEventPhase
impl StructuralEq for PointerEventPhase
impl StructuralPartialEq for PointerEventPhase
Auto Trait Implementations§
impl RefUnwindSafe for PointerEventPhase
impl Send for PointerEventPhase
impl Sync for PointerEventPhase
impl Unpin for PointerEventPhase
impl UnwindSafe for PointerEventPhase
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> LayoutObject for Twhere
T: Layout,
impl<T> LayoutObject for Twhere T: Layout,
§fn inline_align(&self, context: &Context) -> usize
fn inline_align(&self, context: &Context) -> usize
Layout::inline_align
.§fn inline_size(&self, context: &Context) -> usize
fn inline_size(&self, context: &Context) -> usize
Layout::inline_size
.