#[repr(C)]pub struct OH_NativeXComponent_TouchEvent {
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 deviceId: i64,
pub timeStamp: i64,
pub touchPoints: [OH_NativeXComponent_TouchPoint; 10],
pub numPoints: u32,
}Expand description
Represents the touch event.
Available since API-level: 8
Version: 1.0
Fields§
§id: i32Unique identifier of a finger.
screenX: f32X coordinate of the touch point relative to the left edge of the screen.
screenY: f32Y coordinate of the touch point relative to the upper edge of the screen.
x: f32X coordinate of the touch point relative to the left edge of the element to touch.
y: f32Y coordinate of the touch point relative to the upper edge of the element to touch.
type_: OH_NativeXComponent_TouchEventTypeTouch type of the touch event.
size: f64Contact area between the finger pad and the screen.
force: f32Pressure of the current touch event.
deviceId: i64ID of the device where the current touch event is generated.
timeStamp: i64Timestamp of the current touch event.
touchPoints: [OH_NativeXComponent_TouchPoint; 10]Array of the current touch points.
numPoints: u32Number of current touch points.
Trait Implementations§
Source§impl Clone for OH_NativeXComponent_TouchEvent
impl Clone for OH_NativeXComponent_TouchEvent
Source§fn clone(&self) -> OH_NativeXComponent_TouchEvent
fn clone(&self) -> OH_NativeXComponent_TouchEvent
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for OH_NativeXComponent_TouchEvent
Auto Trait Implementations§
impl Freeze for OH_NativeXComponent_TouchEvent
impl RefUnwindSafe for OH_NativeXComponent_TouchEvent
impl Send for OH_NativeXComponent_TouchEvent
impl Sync for OH_NativeXComponent_TouchEvent
impl Unpin for OH_NativeXComponent_TouchEvent
impl UnwindSafe for OH_NativeXComponent_TouchEvent
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)