pub struct PointerEvent {
pub event_time: u64,
pub device_id: u32,
pub pointer_id: u32,
pub type_: PointerEventType,
pub phase: PointerEventPhase,
pub x: f32,
pub y: f32,
pub radius_major: f32,
pub radius_minor: f32,
pub buttons: u32,
}Expand description
Pointers represent raw data about the user’s interaction with the screen.
The state transitions should be as follows: ADD (-> HOVER) -> DOWN -> MOVE -> UP (-> HOVER) -> REMOVE
At any point after the initial ADD, a transition to CANCEL is also possible.
Fields§
§event_time: u64§device_id: u32§pointer_id: u32§type_: PointerEventType§phase: PointerEventPhase§x: f32§y: f32§radius_major: f32§radius_minor: f32Trait Implementations§
Source§impl Clone for PointerEvent
impl Clone for PointerEvent
Source§fn clone(&self) -> PointerEvent
fn clone(&self) -> PointerEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PointerEvent
Source§impl Debug for PointerEvent
impl Debug for PointerEvent
Source§impl<___E> Encode<PointerEvent, ___E> for PointerEventwhere
___E: InternalHandleEncoder + ?Sized,
impl<___E> Encode<PointerEvent, ___E> for PointerEventwhere
___E: InternalHandleEncoder + ?Sized,
Source§fn encode(
self,
encoder_: &mut ___E,
out_: &mut MaybeUninit<PointerEvent>,
_: (),
) -> Result<(), EncodeError>
fn encode( self, encoder_: &mut ___E, out_: &mut MaybeUninit<PointerEvent>, _: (), ) -> Result<(), EncodeError>
Encodes this value into an encoder and output.
§const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
Source§impl<'a, ___E> Encode<PointerEvent, ___E> for &'a PointerEventwhere
___E: InternalHandleEncoder + ?Sized,
impl<'a, ___E> Encode<PointerEvent, ___E> for &'a PointerEventwhere
___E: InternalHandleEncoder + ?Sized,
Source§fn encode(
self,
encoder_: &mut ___E,
out_: &mut MaybeUninit<PointerEvent>,
_: (),
) -> Result<(), EncodeError>
fn encode( self, encoder_: &mut ___E, out_: &mut MaybeUninit<PointerEvent>, _: (), ) -> Result<(), EncodeError>
Encodes this value into an encoder and output.
§const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
Source§impl<___E> EncodeOption<Box<'static, PointerEvent>, ___E> for PointerEvent
impl<___E> EncodeOption<Box<'static, PointerEvent>, ___E> for PointerEvent
Source§fn encode_option(
this: Option<Self>,
encoder: &mut ___E,
out: &mut MaybeUninit<Box<'static, PointerEvent>>,
_: (),
) -> Result<(), EncodeError>
fn encode_option( this: Option<Self>, encoder: &mut ___E, out: &mut MaybeUninit<Box<'static, PointerEvent>>, _: (), ) -> Result<(), EncodeError>
Encodes this optional value into an encoder and output.
Source§impl<'a, ___E> EncodeOption<Box<'static, PointerEvent>, ___E> for &'a PointerEvent
impl<'a, ___E> EncodeOption<Box<'static, PointerEvent>, ___E> for &'a PointerEvent
Source§fn encode_option(
this: Option<Self>,
encoder: &mut ___E,
out: &mut MaybeUninit<Box<'static, PointerEvent>>,
_: (),
) -> Result<(), EncodeError>
fn encode_option( this: Option<Self>, encoder: &mut ___E, out: &mut MaybeUninit<Box<'static, PointerEvent>>, _: (), ) -> Result<(), EncodeError>
Encodes this optional value into an encoder and output.
Source§impl FromWire<PointerEvent> for PointerEvent
impl FromWire<PointerEvent> for PointerEvent
Source§fn from_wire(wire: PointerEvent) -> Self
fn from_wire(wire: PointerEvent) -> Self
Converts the given owned value to this type.
§const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
Source§impl FromWireRef<PointerEvent> for PointerEvent
impl FromWireRef<PointerEvent> for PointerEvent
Source§fn from_wire_ref(wire: &PointerEvent) -> Self
fn from_wire_ref(wire: &PointerEvent) -> Self
Converts the given reference to this type.
Source§impl PartialEq for PointerEvent
impl PartialEq for PointerEvent
Source§impl PartialOrd for PointerEvent
impl PartialOrd for PointerEvent
impl StructuralPartialEq for PointerEvent
Auto Trait Implementations§
impl Freeze for PointerEvent
impl RefUnwindSafe for PointerEvent
impl Send for PointerEvent
impl Sync for PointerEvent
impl Unpin for PointerEvent
impl UnsafeUnpin for PointerEvent
impl UnwindSafe for PointerEvent
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, W> FromWireOption<Box<'_, W>> for Twhere
T: FromWire<W>,
impl<T, W> FromWireOption<Box<'_, W>> for Twhere
T: FromWire<W>,
§fn from_wire_option(wire: Box<'_, W>) -> Option<T>
fn from_wire_option(wire: Box<'_, W>) -> Option<T>
Converts the given owned value to an option of this type.
§impl<T, W> FromWireOptionRef<Box<'_, W>> for Twhere
T: FromWireRef<W>,
impl<T, W> FromWireOptionRef<Box<'_, W>> for Twhere
T: FromWireRef<W>,
§fn from_wire_option_ref(wire: &Box<'_, W>) -> Option<T>
fn from_wire_option_ref(wire: &Box<'_, W>) -> Option<T>
Converts the given reference to an option of this type.
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]