提交 97b5be62 编写于 作者: L LiAn

fixed c2166c99 from https://gitee.com/HelloCrease/docs/pulls/13429

update zh-cn/application-dev/reference/native-apis/_o_h___native_x_component.md.
Signed-off-by: NLiAn <lian15@huawei.com>
Signed-off-by: NLiAn <lian15@huawei.com>
上级 1409755c
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
描述ArkUI XComponent持有的surface和触摸事件,该事件可用于EGL/OpenGLES和媒体数据输入,并显示在ArkUI XComponent上。 描述ArkUI XComponent持有的surface和触摸事件,该事件可用于EGL/OpenGLES和媒体数据输入,并显示在ArkUI XComponent上。
**自从:** **自从:**
...@@ -15,95 +14,95 @@ ...@@ -15,95 +14,95 @@
### 文件 ### 文件
| 文件名称 | 描述 | | 文件名称 | 描述 |
| -------- | -------- | | ------------------------------------------------------------ | ------------------------------------ |
| [native_interface_xcomponent.h](native__interface__xcomponent_8h.md) | 声明用于访问Native XComponent的API。 | | [native_interface_xcomponent.h](native__interface__xcomponent_8h.md) | 声明用于访问Native XComponent的API。 |
### 结构体 ### 结构体
| 结构体名称 | 描述 | | 结构体名称 | 描述 |
| -------- | -------- | | ------------------------------------------------------------ | ----------------------------------- |
| [OH_NativeXComponent_TouchPoint](_o_h___native_x_component___touch_point.md) | 触摸事件中触摸点的信息。 | | [OH_NativeXComponent_TouchPoint](_o_h___native_x_component___touch_point.md) | 触摸事件中触摸点的信息。 |
| [OH_NativeXComponent_TouchEvent](_o_h___native_x_component___touch_event.md) | 触摸事件。 | | [OH_NativeXComponent_TouchEvent](_o_h___native_x_component___touch_event.md) | 触摸事件。 |
| [OH_NativeXComponent_MouseEvent](_o_h___native_x_component___mouse_event.md) | 鼠标事件。 | | [OH_NativeXComponent_MouseEvent](_o_h___native_x_component___mouse_event.md) | 鼠标事件。 |
| [OH_NativeXComponent_Callback](_o_h___native_x_component___callback.md) | 注册surface生命周期和触摸事件回调。 | | [OH_NativeXComponent_Callback](_o_h___native_x_component___callback.md) | 注册surface生命周期和触摸事件回调。 |
| [OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component___mouse_event___callback.md) | 注册鼠标事件的回调。 | | [OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component___mouse_event___callback.md) | 注册鼠标事件的回调。 |
### 类型定义 ### 类型定义
| 类型定义名称 | 描述 | | 类型定义名称 | 描述 |
| -------- | -------- | | ------------------------------------------------------------ | ----------------------------------- |
| [OH_NativeXComponent](#oh_nativexcomponent) | 提供封装的OH_NativeXComponent实例。 | | [OH_NativeXComponent](#oh_nativexcomponent) | 提供封装的OH_NativeXComponent实例。 |
| [OH_NativeXComponent_Callback](#oh_nativexcomponent_callback) | 注册surface生命周期和触摸事件回调。 | | [OH_NativeXComponent_Callback](#oh_nativexcomponent_callback) | 注册surface生命周期和触摸事件回调。 |
| [OH_NativeXComponent_MouseEvent_Callback](#oh_nativexcomponent_mouseevent_callback) | 注册鼠标事件的回调。 | | [OH_NativeXComponent_MouseEvent_Callback](#oh_nativexcomponent_mouseevent_callback) | 注册鼠标事件的回调。 |
### 枚举 ### 枚举
| 枚举名称 | 描述 | | 枚举名称 | 描述 |
| -------- | -------- | | ------------------------------------------------------------ | ------------------------------------ |
| {OH_NATIVEXCOMPONENT_RESULT_SUCCESS = 0, <br>OH_NATIVEXCOMPONENT_RESULT_FAILED = -1, <br/>OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER = -2, <br/>OHOS_IMAGE_RESULT_SUCCESS = 0, <br/>OHOS_IMAGE_RESULT_BAD_PARAMETER = -1 } | [枚举](#anonymous-enum)API访问状态。 | | {OH_NATIVEXCOMPONENT_RESULT_SUCCESS = 0, <br>OH_NATIVEXCOMPONENT_RESULT_FAILED = -1, <br/>OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER = -2 } | [枚举](#anonymous-enum)API访问状态。 |
| [OH_NativeXComponent_TouchEventType](#oh_nativexcomponent_toucheventtype) { <br/>OH_NATIVEXCOMPONENT_DOWN = 0, <br/>OH_NATIVEXCOMPONENT_UP, <br/>OH_NATIVEXCOMPONENT_MOVE, <br/>OH_NATIVEXCOMPONENT_CANCEL,<br/>OH_NATIVEXCOMPONENT_UNKNOWN } | 触摸事件类型。 | | [OH_NativeXComponent_TouchEventType](#oh_nativexcomponent_toucheventtype) { <br/>OH_NATIVEXCOMPONENT_DOWN = 0, <br/>OH_NATIVEXCOMPONENT_UP, <br/>OH_NATIVEXCOMPONENT_MOVE, <br/>OH_NATIVEXCOMPONENT_CANCEL,<br/>OH_NATIVEXCOMPONENT_UNKNOWN } | 触摸事件类型。 |
| [OH_NativeXComponent_MouseEventAction](#oh_nativexcomponent_mouseeventaction) { <br/>OH_NATIVEXCOMPONENT_MOUSE_NONE = 0, <br/>OH_NATIVEXCOMPONENT_MOUSE_PRESS, <br/>OH_NATIVEXCOMPONENT_MOUSE_RELEASE, <br/>OH_NATIVEXCOMPONENT_MOUSE_MOVE } | 鼠标事件动作。 | | [OH_NativeXComponent_MouseEventAction](#oh_nativexcomponent_mouseeventaction) { <br/>OH_NATIVEXCOMPONENT_MOUSE_NONE = 0, <br/>OH_NATIVEXCOMPONENT_MOUSE_PRESS, <br/>OH_NATIVEXCOMPONENT_MOUSE_RELEASE, <br/>OH_NATIVEXCOMPONENT_MOUSE_MOVE } | 鼠标事件动作。 |
| [OH_NativeXComponent_MouseEventButton](#oh_nativexcomponent_mouseeventbutton) { <br/>OH_NATIVEXCOMPONENT_NONE_BUTTON = 0, <br/>OH_NATIVEXCOMPONENT_LEFT_BUTTON = 0x01, <br/>OH_NATIVEXCOMPONENT_RIGHT_BUTTON = 0x02, <br/>OH_NATIVEXCOMPONENT_MIDDLE_BUTTON = 0x04, <br/>OH_NATIVEXCOMPONENT_BACK_BUTTON = 0x08, <br/>OH_NATIVEXCOMPONENT_FORWARD_BUTTON = 0x10 } | 鼠标事件按键。 | | [OH_NativeXComponent_MouseEventButton](#oh_nativexcomponent_mouseeventbutton) { <br/>OH_NATIVEXCOMPONENT_NONE_BUTTON = 0, <br/>OH_NATIVEXCOMPONENT_LEFT_BUTTON = 0x01, <br/>OH_NATIVEXCOMPONENT_RIGHT_BUTTON = 0x02, <br/>OH_NATIVEXCOMPONENT_MIDDLE_BUTTON = 0x04, <br/>OH_NATIVEXCOMPONENT_BACK_BUTTON = 0x08, <br/>OH_NATIVEXCOMPONENT_FORWARD_BUTTON = 0x10 } | 鼠标事件按键。 |
### 函数 ### 函数
| 函数名称 | 描述 | | 函数名称 | 描述 |
| -------- | -------- | | ------------------------------------------------------------ | -------------------------------------------------- |
| [OH_NativeXComponent_GetXComponentId](#oh_nativexcomponent_getxcomponentid) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, char \*id, uint64_t \*size) | 获取ArkUI XComponent的id。 | | [OH_NativeXComponent_GetXComponentId](#oh_nativexcomponent_getxcomponentid) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, char \*id, uint64_t \*size) | 获取ArkUI XComponent的id。 |
| [OH_NativeXComponent_GetXComponentSize](#oh_nativexcomponent_getxcomponentsize) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, const void \*window, uint64_t \*width, uint64_t \*height) | 获取ArkUI XComponent持有的surface的大小。 | | [OH_NativeXComponent_GetXComponentSize](#oh_nativexcomponent_getxcomponentsize) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, const void \*window, uint64_t \*width, uint64_t \*height) | 获取ArkUI XComponent持有的surface的大小。 |
| [OH_NativeXComponent_GetXComponentOffset](#oh_nativexcomponent_getxcomponentoffset) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, const void \*window, double \*x, double \*y) | 获取ArkUI XComponent组件相对屏幕左上顶点的偏移量。 | | [OH_NativeXComponent_GetXComponentOffset](#oh_nativexcomponent_getxcomponentoffset) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, const void \*window, double \*x, double \*y) | 获取ArkUI XComponent组件相对屏幕左上顶点的偏移量。 |
| [OH_NativeXComponent_GetTouchEvent](#oh_nativexcomponent_gettouchevent) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, const void \*window, [OH_NativeXComponent_TouchEvent](_o_h___native_x_component___touch_event.md) \*touchEvent) | 获取ArkUI XComponent调度的触摸事件。 | | [OH_NativeXComponent_GetTouchEvent](#oh_nativexcomponent_gettouchevent) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, const void \*window, [OH_NativeXComponent_TouchEvent](_o_h___native_x_component___touch_event.md) \*touchEvent) | 获取ArkUI XComponent调度的触摸事件。 |
| [OH_NativeXComponent_GetMouseEvent](#oh_nativexcomponent_getmouseevent) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, const void \*window, [OH_NativeXComponent_MouseEvent](_o_h___native_x_component___mouse_event.md) \*mouseEvent) | 获取ArkUI XComponent调度的鼠标事件 | | [OH_NativeXComponent_GetMouseEvent](#oh_nativexcomponent_getmouseevent) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, const void \*window, [OH_NativeXComponent_MouseEvent](_o_h___native_x_component___mouse_event.md) \*mouseEvent) | 获取ArkUI XComponent调度的鼠标事件 |
| [OH_NativeXComponent_RegisterCallback](#oh_nativexcomponent_registercallback) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, [OH_NativeXComponent_Callback](_o_h___native_x_component___callback.md) \*callback) | 为此OH_NativeXComponent实例注册回调。 | | [OH_NativeXComponent_RegisterCallback](#oh_nativexcomponent_registercallback) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, [OH_NativeXComponent_Callback](_o_h___native_x_component___callback.md) \*callback) | 为此OH_NativeXComponent实例注册回调。 |
| [OH_NativeXComponent_RegisterMouseEventCallback](#oh_nativexcomponent_registermouseeventcallback) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, [OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component___mouse_event___callback.md) \*callback) | 为此OH_NativeXComponent实例注册鼠标事件回调。 | | [OH_NativeXComponent_RegisterMouseEventCallback](#oh_nativexcomponent_registermouseeventcallback) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, [OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component___mouse_event___callback.md) \*callback) | 为此OH_NativeXComponent实例注册鼠标事件回调。 |
### 变量 ### 变量
| 变量名称 | 描述 | | 变量名称 | 描述 |
| -------- | -------- | | ------------------------------------------------------------ | ----------------------------------------- |
| [OH_XCOMPONENT_ID_LEN_MAX](#oh_xcomponent_id_len_max) = 128 | ArkUI XComponent的id最大长度。 | | [OH_XCOMPONENT_ID_LEN_MAX](#oh_xcomponent_id_len_max) = 128 | ArkUI XComponent的id最大长度。 |
| [OH_MAX_TOUCH_POINTS_NUMBER](#oh_max_touch_points_number) = 10 | 触摸事件中的可识别的触摸点个数最大值。 | | [OH_MAX_TOUCH_POINTS_NUMBER](#oh_max_touch_points_number) = 10 | 触摸事件中的可识别的触摸点个数最大值。 |
| [OH_NativeXComponent_TouchPoint::id](#id-12) = 0 | 手指的唯一标识符。 | | [OH_NativeXComponent_TouchPoint::id](#id-12) = 0 | 手指的唯一标识符。 |
| [OH_NativeXComponent_TouchPoint::screenX](#screenx-13) = 0.0 | 触摸点相对于屏幕左边缘的x坐标。 | | [OH_NativeXComponent_TouchPoint::screenX](#screenx-13) = 0.0 | 触摸点相对于屏幕左边缘的x坐标。 |
| [OH_NativeXComponent_TouchPoint::screenY](#screeny-13) = 0.0 | 触摸点相对于屏幕上边缘的y坐标。 | | [OH_NativeXComponent_TouchPoint::screenY](#screeny-13) = 0.0 | 触摸点相对于屏幕上边缘的y坐标。 |
| [OH_NativeXComponent_TouchPoint::x](#x-13) = 0.0 | 触摸点相对于XComponent组件左边缘的x坐标。 | | [OH_NativeXComponent_TouchPoint::x](#x-13) = 0.0 | 触摸点相对于XComponent组件左边缘的x坐标。 |
| [OH_NativeXComponent_TouchPoint::y](#y-13) = 0.0 | 触摸点相对于XComponent组件上边缘的y坐标。 | | [OH_NativeXComponent_TouchPoint::y](#y-13) = 0.0 | 触摸点相对于XComponent组件上边缘的y坐标。 |
| [OH_NativeXComponent_TouchPoint::type](#type-12) = OH_NativeXComponent_TouchEventType::OH_NATIVEXCOMPONENT_UNKNOWN | 触摸事件的触摸类型。 | | [OH_NativeXComponent_TouchPoint::type](#type-12) = OH_NativeXComponent_TouchEventType::OH_NATIVEXCOMPONENT_UNKNOWN | 触摸事件的触摸类型。 |
| [OH_NativeXComponent_TouchPoint::size](#size-12) = 0.0 | 指垫和屏幕之间的接触面积。 | | [OH_NativeXComponent_TouchPoint::size](#size-12) = 0.0 | 指垫和屏幕之间的接触面积。 |
| [OH_NativeXComponent_TouchPoint::force](#force-12) = 0.0 | 当前触摸事件的压力。 | | [OH_NativeXComponent_TouchPoint::force](#force-12) = 0.0 | 当前触摸事件的压力。 |
| [OH_NativeXComponent_TouchPoint::timeStamp](#timestamp-12) = 0 | 当前触摸事件的时间戳。 | | [OH_NativeXComponent_TouchPoint::timeStamp](#timestamp-12) = 0 | 当前触摸事件的时间戳。 |
| [OH_NativeXComponent_TouchPoint::isPressed](#ispressed) = false | 当前点是否被按下。 | | [OH_NativeXComponent_TouchPoint::isPressed](#ispressed) = false | 当前点是否被按下。 |
| [OH_NativeXComponent_TouchEvent::id](#id-22) = 0 | 手指的唯一标识符。 | | [OH_NativeXComponent_TouchEvent::id](#id-22) = 0 | 手指的唯一标识符。 |
| [OH_NativeXComponent_TouchEvent::screenX](#screenx-23) = 0.0 | 触摸点相对于屏幕左边缘的x坐标。 | | [OH_NativeXComponent_TouchEvent::screenX](#screenx-23) = 0.0 | 触摸点相对于屏幕左边缘的x坐标。 |
| [OH_NativeXComponent_TouchEvent::screenY](#screeny-23) = 0.0 | 触摸点相对于屏幕上边缘的y坐标。 | | [OH_NativeXComponent_TouchEvent::screenY](#screeny-23) = 0.0 | 触摸点相对于屏幕上边缘的y坐标。 |
| [OH_NativeXComponent_TouchEvent::x](#x-23) = 0.0 | 触摸点相对于XComponent组件左边缘的x坐标。 | | [OH_NativeXComponent_TouchEvent::x](#x-23) = 0.0 | 触摸点相对于XComponent组件左边缘的x坐标。 |
| [OH_NativeXComponent_TouchEvent::y](#y-23) = 0.0 | 触摸点相对于XComponent组件上边缘的y坐标。 | | [OH_NativeXComponent_TouchEvent::y](#y-23) = 0.0 | 触摸点相对于XComponent组件上边缘的y坐标。 |
| [OH_NativeXComponent_TouchEvent::type](#type-22) = OH_NativeXComponent_TouchEventType::OH_NATIVEXCOMPONENT_UNKNOWN | 触摸事件的触摸类型。 | | [OH_NativeXComponent_TouchEvent::type](#type-22) = OH_NativeXComponent_TouchEventType::OH_NATIVEXCOMPONENT_UNKNOWN | 触摸事件的触摸类型。 |
| [OH_NativeXComponent_TouchEvent::size](#size-22) = 0.0 | 指垫和屏幕之间的接触面积。 | | [OH_NativeXComponent_TouchEvent::size](#size-22) = 0.0 | 指垫和屏幕之间的接触面积。 |
| [OH_NativeXComponent_TouchEvent::force](#force-22) = 0.0 | 当前触摸事件的压力。 | | [OH_NativeXComponent_TouchEvent::force](#force-22) = 0.0 | 当前触摸事件的压力。 |
| [OH_NativeXComponent_TouchEvent::deviceId](#deviceid) = 0 | 产生当前触摸事件的设备的ID。 | | [OH_NativeXComponent_TouchEvent::deviceId](#deviceid) = 0 | 产生当前触摸事件的设备的ID。 |
| [OH_NativeXComponent_TouchEvent::timeStamp](#timestamp-22) = 0 | 当前触摸事件的时间戳。 | | [OH_NativeXComponent_TouchEvent::timeStamp](#timestamp-22) = 0 | 当前触摸事件的时间戳。 |
| [OH_NativeXComponent_TouchEvent::touchPoints](#touchpoints) [OH_MAX_TOUCH_POINTS_NUMBER] | 当前触摸点的数组。 | | [OH_NativeXComponent_TouchEvent::touchPoints](#touchpoints) [OH_MAX_TOUCH_POINTS_NUMBER] | 当前触摸点的数组。 |
| [OH_NativeXComponent_TouchEvent::numPoints](#numpoints) = 0 | 当前接触点的数量。 | | [OH_NativeXComponent_TouchEvent::numPoints](#numpoints) = 0 | 当前接触点的数量。 |
| [OH_NativeXComponent_MouseEvent::x](#x-33) | 点击触点相对于当前组件左上角的x轴坐标。 | | [OH_NativeXComponent_MouseEvent::x](#x-33) = 0.0 | 点击触点相对于当前组件左上角的x轴坐标。 |
| [OH_NativeXComponent_MouseEvent::y](#y-33) | 点击触点相对于当前组件左上角的y轴坐标。 | | [OH_NativeXComponent_MouseEvent::y](#y-33) = 0.0 | 点击触点相对于当前组件左上角的y轴坐标。 |
| [OH_NativeXComponent_MouseEvent::screenX](#screenx-33) | 点击触点相对于屏幕左上角的x轴坐标。 | | [OH_NativeXComponent_MouseEvent::screenX](#screenx-33) = 0.0 | 点击触点相对于屏幕左上角的x轴坐标。 |
| [OH_NativeXComponent_MouseEvent::screenY](#screeny-33) | 点击触点相对于屏幕左上角的y轴坐标。 | | [OH_NativeXComponent_MouseEvent::screenY](#screeny-33) = 0.0 | 点击触点相对于屏幕左上角的y轴坐标。 |
| [OH_NativeXComponent_MouseEvent::timestamp](#timestamp) | 当前鼠标事件的时间戳。 | | [OH_NativeXComponent_MouseEvent::timestamp](#timestamp) = 0 | 当前鼠标事件的时间戳。 |
| [OH_NativeXComponent_MouseEvent::action](#action) | 当前鼠标事件动作。 | | [OH_NativeXComponent_MouseEvent::action](#action) = [OH_NativeXComponent_MouseEventAction::OH_NATIVEXCOMPONENT_MOUSE_NONE](#oh_nativexcomponent_mouseeventaction) | 当前鼠标事件动作。 |
| [OH_NativeXComponent_MouseEvent::button](#button) | 鼠标事件按键。 | | [OH_NativeXComponent_MouseEvent::button](#button) = [OH_NativeXComponent_MouseEventButton::OH_NATIVEXCOMPONENT_NONE_BUTTON](#oh_nativexcomponent_mouseeventbutton) | 鼠标事件按键。 |
| [OH_NativeXComponent_Callback::OnSurfaceCreated](#onsurfacecreated) )([OH_NativeXComponent](#oh_nativexcomponent) \*component, void \*window) | 创建surface时调用。 | | [OH_NativeXComponent_Callback::OnSurfaceCreated](#onsurfacecreated) | 创建surface时调用。 |
| [OH_NativeXComponent_Callback::OnSurfaceChanged](#onsurfacechanged) )([OH_NativeXComponent](#oh_nativexcomponent) \*component, void \*window) | 当surface改变时调用。 | | [OH_NativeXComponent_Callback::OnSurfaceChanged](#onsurfacechanged) | 当surface改变时调用。 |
| [OH_NativeXComponent_Callback::OnSurfaceDestroyed](#onsurfacedestroyed) )([OH_NativeXComponent](#oh_nativexcomponent) \*component, void \*window) | 当surface被破坏时调用。 | | [OH_NativeXComponent_Callback::OnSurfaceDestroyed](#onsurfacedestroyed) | 当surface被销毁时调用。 |
| [OH_NativeXComponent_Callback::DispatchTouchEvent](#dispatchtouchevent) )([OH_NativeXComponent](#oh_nativexcomponent) \*component, void \*window) | 当触摸事件被触发时调用。 | | [OH_NativeXComponent_Callback::DispatchTouchEvent](#dispatchtouchevent) | 当触摸事件被触发时调用。 |
| [OH_NativeXComponent_MouseEvent_Callback::DispatchMouseEvent](#dispatchmouseevent) )([OH_NativeXComponent](#oh_nativexcomponent) \*component, void \*window) | 当鼠标事件被触发时调用。 | | [OH_NativeXComponent_MouseEvent_Callback::DispatchMouseEvent](#dispatchmouseevent) | 当鼠标事件被触发时调用。 |
| [OH_NativeXComponent_MouseEvent_Callback::DispatchHoverEvent](#dispatchhoverevent) )([OH_NativeXComponent](#oh_nativexcomponent) \*component, bool isHover) | 当悬停事件被触发时调用。 | | [OH_NativeXComponent_MouseEvent_Callback::DispatchHoverEvent](#dispatchhoverevent) | 当悬停事件被触发时调用。 |
## 详细描述 ## 详细描述
...@@ -174,13 +173,13 @@ anonymous enum ...@@ -174,13 +173,13 @@ anonymous enum
枚举API访问状态。 枚举API访问状态。
| 枚举值 | 描述 | | 枚举值 | 描述 |
| -------- | -------- | | ---------------------------------------- | ---------- |
| OH_NATIVEXCOMPONENT_RESULT_SUCCESS | 成功结果。 | | OH_NATIVEXCOMPONENT_RESULT_SUCCESS | 成功结果。 |
| OH_NATIVEXCOMPONENT_RESULT_FAILED | 失败结果。 | | OH_NATIVEXCOMPONENT_RESULT_FAILED | 失败结果。 |
| OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER | 无效参数。 | | OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER | 无效参数。 |
| OHOS_IMAGE_RESULT_SUCCESS | 成功的结果 | | OHOS_IMAGE_RESULT_SUCCESS | 成功的结果 |
| OHOS_IMAGE_RESULT_BAD_PARAMETER | 无效值 | | OHOS_IMAGE_RESULT_BAD_PARAMETER | 无效值 |
**自从:** **自从:**
...@@ -198,12 +197,12 @@ enum OH_NativeXComponent_MouseEventAction ...@@ -198,12 +197,12 @@ enum OH_NativeXComponent_MouseEventAction
鼠标事件动作. 鼠标事件动作.
| 枚举值 | 描述 | | 枚举值 | 描述 |
| -------- | -------- | | --------------------------------- | -------------------------------- |
| OH_NATIVEXCOMPONENT_MOUSE_NONE | 无效鼠标事件 。 | | OH_NATIVEXCOMPONENT_MOUSE_NONE | 无效鼠标事件 。 |
| OH_NATIVEXCOMPONENT_MOUSE_PRESS | 鼠标按键按下时触发鼠标事件。 | | OH_NATIVEXCOMPONENT_MOUSE_PRESS | 鼠标按键按下时触发鼠标事件。 |
| OH_NATIVEXCOMPONENT_MOUSE_RELEASE | 鼠标按键松开时触发鼠标事件。 | | OH_NATIVEXCOMPONENT_MOUSE_RELEASE | 鼠标按键松开时触发鼠标事件。 |
| OH_NATIVEXCOMPONENT_MOUSE_MOVE | 鼠标在屏幕上移动时触发鼠标事件。 | | OH_NATIVEXCOMPONENT_MOUSE_MOVE | 鼠标在屏幕上移动时触发鼠标事件。 |
**自从:** **自从:**
...@@ -221,13 +220,13 @@ enum OH_NativeXComponent_MouseEventButton ...@@ -221,13 +220,13 @@ enum OH_NativeXComponent_MouseEventButton
鼠标事件按键。 鼠标事件按键。
| 枚举值 | 描述 | | 枚举值 | 描述 |
| -------- | -------- | | ---------------------------------- | ---------------------------------- |
| OH_NATIVEXCOMPONENT_NONE_BUTTON | 鼠标无按键操作时触发鼠标事件。 | | OH_NATIVEXCOMPONENT_NONE_BUTTON | 鼠标无按键操作时触发鼠标事件。 |
| OH_NATIVEXCOMPONENT_LEFT_BUTTON | 按下鼠标左键时触发鼠标事件。 | | OH_NATIVEXCOMPONENT_LEFT_BUTTON | 按下鼠标左键时触发鼠标事件。 |
| OH_NATIVEXCOMPONENT_RIGHT_BUTTON | 按下鼠标右键时触发鼠标事件。 | | OH_NATIVEXCOMPONENT_RIGHT_BUTTON | 按下鼠标右键时触发鼠标事件。 |
| OH_NATIVEXCOMPONENT_MIDDLE_BUTTON | 按下鼠标中键时触发鼠标事件。 | | OH_NATIVEXCOMPONENT_MIDDLE_BUTTON | 按下鼠标中键时触发鼠标事件。 |
| OH_NATIVEXCOMPONENT_BACK_BUTTON | 按下鼠标左侧后退键时触发鼠标事件。 | | OH_NATIVEXCOMPONENT_BACK_BUTTON | 按下鼠标左侧后退键时触发鼠标事件。 |
| OH_NATIVEXCOMPONENT_FORWARD_BUTTON | 按下鼠标左侧前进键时触发鼠标事件。 | | OH_NATIVEXCOMPONENT_FORWARD_BUTTON | 按下鼠标左侧前进键时触发鼠标事件。 |
**自从:** **自从:**
...@@ -246,13 +245,13 @@ enum OH_NativeXComponent_TouchEventType ...@@ -246,13 +245,13 @@ enum OH_NativeXComponent_TouchEventType
触摸事件类型。 触摸事件类型。
| 枚举值 | 描述 | | 枚举值 | 描述 |
| -------- | -------- | | --------------------------- | ------------------------------------------ |
| OH_NATIVEXCOMPONENT_DOWN | 手指按下时触发触摸事件。 | | OH_NATIVEXCOMPONENT_DOWN | 手指按下时触发触摸事件。 |
| OH_NATIVEXCOMPONENT_UP | 手指抬起时触发触摸事件。 | | OH_NATIVEXCOMPONENT_UP | 手指抬起时触发触摸事件。 |
| OH_NATIVEXCOMPONENT_MOVE | 手指按下状态下在屏幕上移动时触发触摸事件。 | | OH_NATIVEXCOMPONENT_MOVE | 手指按下状态下在屏幕上移动时触发触摸事件。 |
| OH_NATIVEXCOMPONENT_CANCEL | 触摸事件取消时触发事件。 | | OH_NATIVEXCOMPONENT_CANCEL | 触摸事件取消时触发事件。 |
| OH_NATIVEXCOMPONENT_UNKNOWN | 无效的触摸类型。 | | OH_NATIVEXCOMPONENT_UNKNOWN | 无效的触摸类型。 |
**自从:** **自从:**
...@@ -275,11 +274,11 @@ int32_t OH_NativeXComponent_GetMouseEvent (OH_NativeXComponent * component, cons ...@@ -275,11 +274,11 @@ int32_t OH_NativeXComponent_GetMouseEvent (OH_NativeXComponent * component, cons
**参数:** **参数:**
| Name | 描述 | | Name | 描述 |
| -------- | -------- | | ---------- | --------------------------------------- |
| component | 表示指向OH_NativeXComponent实例的指针。 | | component | 表示指向OH_NativeXComponent实例的指针。 |
| window | 表示NativeWindow句柄。 | | window | 表示NativeWindow句柄。 |
| mouseEvent | 指示指向当前鼠标事件的指针。 | | mouseEvent | 指示指向当前鼠标事件的指针。 |
**返回:** **返回:**
...@@ -303,11 +302,11 @@ int32_t OH_NativeXComponent_GetTouchEvent (OH_NativeXComponent * component, cons ...@@ -303,11 +302,11 @@ int32_t OH_NativeXComponent_GetTouchEvent (OH_NativeXComponent * component, cons
**参数:** **参数:**
| Name | 描述 | | Name | 描述 |
| -------- | -------- | | ---------- | --------------------------------------- |
| component | 表示指向OH_NativeXComponent实例的指针。 | | component | 表示指向OH_NativeXComponent实例的指针。 |
| window | 表示NativeWindow句柄。 | | window | 表示NativeWindow句柄。 |
| touchEvent | 指示指向当前触摸事件的指针。 | | touchEvent | 指示指向当前触摸事件的指针。 |
**返回:** **返回:**
...@@ -331,11 +330,11 @@ int32_t OH_NativeXComponent_GetXComponentId (OH_NativeXComponent * component, ch ...@@ -331,11 +330,11 @@ int32_t OH_NativeXComponent_GetXComponentId (OH_NativeXComponent * component, ch
**参数:** **参数:**
| Name | 描述 | | Name | 描述 |
| -------- | -------- | | --------- | ------------------------------------------------------------ |
| component | 表示指向OH_NativeXComponent实例的指针。 | | component | 表示指向OH_NativeXComponent实例的指针。 |
| id | 指示用于保存此OH_NativeXComponent实例的ID的字符缓冲区。 请注意,空终止符将附加到字符缓冲区,因此字符缓冲区的大小应至少比真实id长度大一个单位。 建议字符缓冲区的大小为[OH_XCOMPONENT_ID_LEN_MAX + 1]。 | | id | 指示用于保存此OH_NativeXComponent实例的ID的字符缓冲区。 请注意,空终止符将附加到字符缓冲区,因此字符缓冲区的大小应至少比真实id长度大一个单位。 建议字符缓冲区的大小为[OH_XCOMPONENT_ID_LEN_MAX + 1]。 |
| size | 指示指向id长度的指针。 | | size | 指示指向id长度的指针。 |
**返回:** **返回:**
...@@ -359,12 +358,12 @@ int32_t OH_NativeXComponent_GetXComponentOffset (OH_NativeXComponent * component ...@@ -359,12 +358,12 @@ int32_t OH_NativeXComponent_GetXComponentOffset (OH_NativeXComponent * component
**参数:** **参数:**
| Name | 描述 | | Name | 描述 |
| -------- | -------- | | --------- | --------------------------------------- |
| component | 表示指向OH_NativeXComponent实例的指针。 | | component | 表示指向OH_NativeXComponent实例的指针。 |
| window | 表示NativeWindow句柄。 | | window | 表示NativeWindow句柄。 |
| x | 指示指向当前surface的x坐标的指针。 | | x | 指示指向当前surface的x坐标的指针。 |
| y | 指示指向当前surface的y坐标的指针。 | | y | 指示指向当前surface的y坐标的指针。 |
**返回:** **返回:**
...@@ -388,12 +387,12 @@ int32_t OH_NativeXComponent_GetXComponentSize (OH_NativeXComponent * component, ...@@ -388,12 +387,12 @@ int32_t OH_NativeXComponent_GetXComponentSize (OH_NativeXComponent * component,
**参数:** **参数:**
| Name | 描述 | | Name | 描述 |
| -------- | -------- | | --------- | --------------------------------------- |
| component | 表示指向OH_NativeXComponent实例的指针。 | | component | 表示指向OH_NativeXComponent实例的指针。 |
| window | 表示NativeWindow句柄。 | | window | 表示NativeWindow句柄。 |
| width | 指示指向当前surface宽度的指针。 | | width | 指示指向当前surface宽度的指针。 |
| height | 指示指向当前surface高度的指针。 | | height | 指示指向当前surface高度的指针。 |
**返回:** **返回:**
...@@ -417,10 +416,10 @@ int32_t OH_NativeXComponent_RegisterCallback (OH_NativeXComponent * component, O ...@@ -417,10 +416,10 @@ int32_t OH_NativeXComponent_RegisterCallback (OH_NativeXComponent * component, O
**参数:** **参数:**
| Name | 描述 | | Name | 描述 |
| -------- | -------- | | --------- | --------------------------------------------- |
| component | 表示指向OH_NativeXComponent实例的指针。 | | component | 表示指向OH_NativeXComponent实例的指针。 |
| callback | 指示指向surface生命周期和触摸事件回调的指针。 | | callback | 指示指向surface生命周期和触摸事件回调的指针。 |
**返回:** **返回:**
...@@ -444,10 +443,10 @@ int32_t OH_NativeXComponent_RegisterMouseEventCallback (OH_NativeXComponent * co ...@@ -444,10 +443,10 @@ int32_t OH_NativeXComponent_RegisterMouseEventCallback (OH_NativeXComponent * co
**参数:** **参数:**
| Name | 描述 | | Name | 描述 |
| -------- | -------- | | --------- | --------------------------------------- |
| component | 表示指向OH_NativeXComponent实例的指针。 | | component | 表示指向OH_NativeXComponent实例的指针。 |
| callback | 指示指向鼠标事件回调的指针。 | | callback | 指示指向鼠标事件回调的指针。 |
**返回:** **返回:**
...@@ -726,7 +725,7 @@ void(* OH_NativeXComponent_Callback::OnSurfaceDestroyed) (OH_NativeXComponent *c ...@@ -726,7 +725,7 @@ void(* OH_NativeXComponent_Callback::OnSurfaceDestroyed) (OH_NativeXComponent *c
**描述:** **描述:**
当surface被破坏时调用。 当surface被销毁时调用。
**自从:** **自从:**
...@@ -1050,4 +1049,4 @@ float OH_NativeXComponent_MouseEvent::y ...@@ -1050,4 +1049,4 @@ float OH_NativeXComponent_MouseEvent::y
**自从:** **自从:**
8 8
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册