OH_NativeXComponent_TouchEvent
typedef struct {...} OH_NativeXComponent_TouchEvent
Overview
Defines the touch event.
Since: 8
Related module: OH_NativeXComponent Native XComponent
Header file: native_interface_xcomponent.h
Summary
Member Variables
| Name | Description |
|---|---|
| int32_t id | Unique identifier of the finger. |
| float screenX | X coordinate of the touch point relative to the upper left corner of the application window where the XComponent is located. |
| float screenY | Y coordinate of the touch point relative to the upper left corner of the application window where the XComponent is located. |
| float x | X coordinate of the touch point relative to the left edge of the XComponent. |
| float y | Y coordinate of the touch point relative to the upper edge of the XComponent. |
| OH_NativeXComponent_TouchEventType type | Touch type of the touch event. |
| double size | Contact area between the finger pad and the screen. |
| float force | Pressure of the touch event. |
| int64_t deviceId | ID of the device where the current touch event is triggered. |
| int64_t timeStamp | Timestamp of the touch point. It is interval between the time when the event is triggered and the time when the system starts, in nanoseconds. |
| OH_NativeXComponent_TouchPoint touchPoints[OH_NATIVE_XCOMPONENT_MAX_TOUCH_POINTS_NUMBER] | Array of the touch points. |
| uint32_t numPoints | Number of current touch points. The value 1 indicates single-finger touch, while a value greater than 1 indicates multi-finger touch. |
你可能感兴趣的鸿蒙文章
openharmony 鸿蒙 arkts-apis-uicontext-contextmenucontroller
openharmony 鸿蒙 errorcode-canvas
openharmony 鸿蒙 capi-oh-nativexcomponent-native-xcomponent-oh-nativexcomponent
openharmony 鸿蒙 errorcode-bindSheet
openharmony 鸿蒙 js-apis-arkui-uiExtension-sys
openharmony 鸿蒙 capi-arkui-accessibility-arkui-accessibilityeventinfo
openharmony 鸿蒙 capi-arkui-rendernodeutils
openharmony 鸿蒙 js-apis-arkui-node
openharmony 鸿蒙 capi-native-node-h
openharmony 鸿蒙 capi-arkui-nativemodule-arkui-listitemswipeactionitem