pub struct PointerPayload {}Expand description
Pointer coordinates and target bounds carried by ArkUI input events.
Fields§
§source: PointerSource§action: PointerActionNative touch phase. Click/drag events that do not expose a touch phase
use PointerAction::Unknown.
timestamp_nanos: u64Monotonic platform event timestamp in nanoseconds, or zero when the native event does not expose one.
pointer_id: i32Stable native contact identifier for the current pointer.
Pressed mouse/stylus buttons represented as a platform bit mask.
pressure: f32Contact pressure in the platform-normalized range when available.
x: f32Pointer x relative to the event target.
y: f32Pointer y relative to the event target.
window_x: f32Pointer x relative to the window.
window_y: f32Pointer y relative to the window.
target_x: f32Event target x relative to the window/global display.
target_y: f32Event target y relative to the window/global display.
target_width: f32Event target width.
target_height: f32Event target height.
Implementations§
Source§impl PointerPayload
impl PointerPayload
pub fn has_target_bounds(self) -> bool
pub fn has_window_position(self) -> bool
Trait Implementations§
Source§impl Clone for PointerPayload
impl Clone for PointerPayload
impl Copy for PointerPayload
Source§impl Debug for PointerPayload
impl Debug for PointerPayload
Source§impl Default for PointerPayload
impl Default for PointerPayload
Source§impl From<MousePayload> for PointerPayload
impl From<MousePayload> for PointerPayload
Source§fn from(mouse: MousePayload) -> Self
fn from(mouse: MousePayload) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PointerPayload
impl PartialEq for PointerPayload
impl StructuralPartialEq for PointerPayload
Auto Trait Implementations§
impl Freeze for PointerPayload
impl RefUnwindSafe for PointerPayload
impl Send for PointerPayload
impl Sync for PointerPayload
impl Unpin for PointerPayload
impl UnsafeUnpin for PointerPayload
impl UnwindSafe for PointerPayload
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,
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> ⓘ
Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.