OH_NativeXComponent_TouchPoint

Struct OH_NativeXComponent_TouchPoint 

Source
#[repr(C)]
pub struct OH_NativeXComponent_TouchPoint { pub id: i32, pub screenX: f32, pub screenY: f32, pub x: f32, pub y: f32, pub type_: OH_NativeXComponent_TouchEventType, pub size: f64, pub force: f32, pub timeStamp: i64, pub isPressed: bool, }
Expand description

Represents the touch point information of touch event.

Available since API-level: 8

Version: 1.0

Fields§

§id: i32

Unique identifier of a finger.

§screenX: f32

X coordinate of the touch point relative to the left edge of the screen.

§screenY: f32

Y coordinate of the touch point relative to the upper edge of the screen.

§x: f32

X coordinate of the touch point relative to the left edge of the element to touch.

§y: f32

Y coordinate of the touch point relative to the upper edge of the element to touch.

§type_: OH_NativeXComponent_TouchEventType

Touch type of the touch event.

§size: f64

Contact area between the finger pad and the screen.

§force: f32

Pressure of the current touch event.

§timeStamp: i64

Timestamp of the current touch event.

§isPressed: bool

Whether the current point is pressed.

Trait Implementations§

Source§

impl Clone for OH_NativeXComponent_TouchPoint

Source§

fn clone(&self) -> OH_NativeXComponent_TouchPoint

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OH_NativeXComponent_TouchPoint

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for OH_NativeXComponent_TouchPoint

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.