openharmony 鸿蒙 capi-oh-nativexcomponent-native-xcomponent-oh-nativexcomponent-touchevent

2026-08-25 浏览 (1)

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

NameDescription
int32_t idUnique identifier of the finger.
float screenXX coordinate of the touch point relative to the upper left corner of the application window where the XComponent is located.
float screenYY coordinate of the touch point relative to the upper left corner of the application window where the XComponent is located.
float xX coordinate of the touch point relative to the left edge of the XComponent.
float yY coordinate of the touch point relative to the upper edge of the XComponent.
OH_NativeXComponent_TouchEventType typeTouch type of the touch event.
double sizeContact area between the finger pad and the screen.
float forcePressure of the touch event.
int64_t deviceIdID of the device where the current touch event is triggered.
int64_t timeStampTimestamp 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 numPointsNumber 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

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/GBWu4GA4