Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
5540e611
D
Docs
项目概览
OpenHarmony
/
Docs
大约 1 年 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
5540e611
编写于
2月 14, 2023
作者:
Z
zengyawen
提交者:
Gitee
2月 14, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update zh-cn/application-dev/reference/native-apis/_o_h___native_x_component.md.
Signed-off-by:
N
zengyawen
<
zengyawen1@huawei.com
>
上级
f8e4a831
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
139 addition
and
0 deletion
+139
-0
zh-cn/application-dev/reference/native-apis/_o_h___native_x_component.md
...on-dev/reference/native-apis/_o_h___native_x_component.md
+139
-0
未找到文件。
zh-cn/application-dev/reference/native-apis/_o_h___native_x_component.md
浏览文件 @
5540e611
...
@@ -45,6 +45,8 @@
...
@@ -45,6 +45,8 @@
| ------------------------------------------------------------ | ------------------------------------ |
| ------------------------------------------------------------ | ------------------------------------ |
| {OH_NATIVEXCOMPONENT_RESULT_SUCCESS = 0,
<br>
OH_NATIVEXCOMPONENT_RESULT_FAILED = -1,
<br/>
OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER = -2 } |
[
枚举
](
#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_TouchPointToolType
](
#oh_nativexcomponent_touchpointtooltype
)
{
<br/>
OH_NATIVEXCOMPONENT_TOOL_TYPE_UNKNOWN = 0,
<br/>
OH_NATIVEXCOMPONENT_TOOL_TYPE_FINGER,
<br/>
OH_NATIVEXCOMPONENT_TOOL_TYPE_PEN,
<br/>
OH_NATIVEXCOMPONENT_TOOL_TYPE_RUBBER,
<br/>
OH_NATIVEXCOMPONENT_TOOL_TYPE_BRUSH,
<br/>
OH_NATIVEXCOMPONENT_TOOL_TYPE_PENCIL,
<br/>
OH_NATIVEXCOMPONENT_TOOL_TYPE_AIRBRUSH,
<br/>
OH_NATIVEXCOMPONENT_TOOL_TYPE_MOUSE,
<br/>
OH_NATIVEXCOMPONENT_TOOL_TYPE_LENS } | 触摸点工具类型。 |
|
[
OH_NativeXComponent_EventSourceType
](
#oh_nativexcomponent_eventsourcetype
)
{
<br/>
OH_NATIVEXCOMPONENT_SOURCE_TYPE_UNKNOWN = 0,
<br/>
OH_NATIVEXCOMPONENT_SOURCE_TYPE_MOUSE, OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHSCREEN,
<br/>
OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHPAD,
<br/>
OH_NATIVEXCOMPONENT_SOURCE_TYPE_JOYSTICK} | 触摸事件源类型。 |
|
[
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 } | 鼠标事件按键。 |
...
@@ -57,6 +59,9 @@
...
@@ -57,6 +59,9 @@
|
[
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_GetTouchPointToolType
](
#oh_nativexcomponent_gettouchpointtooltype
)
(
[OH_NativeXComponent](#oh_nativexcomponent
)
\*
component, uint32_t pointIndex,
[
OH_NativeXComponent_TouchPointToolType
](
#oh_nativexcomponent_touchpointtooltype
)
\*
toolType) | 获取ArkUI XComponent触摸点工具类型。 |
|
[
OH_NativeXComponent_GetTouchPointTiltX
](
#oh_nativexcomponent_gettouchpointtiltx
)
(
[OH_NativeXComponent](#oh_nativexcomponent
)
\*
component, uint32_t pointIndex, float
\*
tiltX) | 获取ArkUI XComponent触摸点倾斜与X轴角度。 |
|
[
OH_NativeXComponent_GetTouchPointTiltY
](
#oh_nativexcomponent_gettouchpointtilty
)
(
[OH_NativeXComponent](#oh_nativexcomponent
)
\*
component, uint32_t pointIndex, float
\*
tiltY) | 获取ArkUI XComponent触摸点倾斜与Y轴角度。 |
|
[
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实例注册鼠标事件回调。 |
...
@@ -183,6 +188,30 @@ anonymous enum
...
@@ -183,6 +188,30 @@ anonymous enum
8
8
### OH_NativeXComponent_EventSourceType
OH_NativeXComponent_EventSourceType
```
enum OH_NativeXComponent_EventSourceType
```
**描述:**
触摸事件源类型。
| 枚举值 | 描述 |
| -------- | -------- |
| OH_NATIVEXCOMPONENT_SOURCE_TYPE_UNKNOWN | 未知的输入源类型。 |
| OH_NATIVEXCOMPONENT_SOURCE_TYPE_MOUSE | 表示输入源生成鼠标多点触摸事件。 |
| OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHSCREEN | 表示输入源生成一个触摸屏多点触摸事件。 |
| OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHPAD | 表示输入源生成一个触摸板多点触摸事件。 |
| OH_NATIVEXCOMPONENT_SOURCE_TYPE_JOYSTICK | 表示输入源生成一个操纵杆多点触摸事件。 |
**起始版本:**
9
### OH_NativeXComponent_MouseEventAction
### OH_NativeXComponent_MouseEventAction
...
@@ -255,6 +284,33 @@ enum OH_NativeXComponent_TouchEventType
...
@@ -255,6 +284,33 @@ enum OH_NativeXComponent_TouchEventType
8
8
### OH_NativeXComponent_TouchPointToolType
```
enum OH_NativeXComponent_TouchPointToolType
```
**描述:**
触摸点工具类型
| 枚举值 | 描述 |
| -------- | -------- |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_UNKNOWN | 无效的工具类型。 |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_FINGER | 表示用手指。 |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_PEN | 表示用触笔。 |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_RUBBER | 表示用橡皮擦。 |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_BRUSH | 表示用画笔。 |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_PENCIL | 表示用铅笔。 |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_AIRBRUSH | 表示用气笔。 |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_MOUSE | 表示用鼠标。 |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_LENS | 表示用晶状体。 |
**起始版本:**
9
## 函数说明
## 函数说明
...
@@ -314,6 +370,89 @@ int32_t OH_NativeXComponent_GetTouchEvent (OH_NativeXComponent * component, cons
...
@@ -314,6 +370,89 @@ int32_t OH_NativeXComponent_GetTouchEvent (OH_NativeXComponent * component, cons
8
8
### OH_NativeXComponent_GetTouchPointTiltX()
```
int32_t OH_NativeXComponent_GetTouchPointTiltX (OH_NativeXComponent * component, uint32_t pointIndex, float * tiltX )
```
**描述:**
获取ArkUI XComponent触摸点倾斜与X轴角度。
**参数:**
| Name | 描述 |
| -------- | -------- |
| component | 表示指向OH_NativeXComponent实例的指针。 |
| pointIndex | 表示触摸点的指针索引。 |
| tiltX | 表示指向X倾斜度的指针。 |
**返回:**
返回执行的状态代码。
**起始版本:**
9
### OH_NativeXComponent_GetTouchPointTiltY()
```
int32_t OH_NativeXComponent_GetTouchPointTiltX (OH_NativeXComponent * component, uint32_t pointIndex, float * tiltY )
```
**描述:**
获取ArkUI XComponent触摸点倾斜与Y轴角度。
**参数:**
| Name | 描述 |
| -------- | -------- |
| component | 表示指向OH_NativeXComponent实例的指针。 |
| pointIndex | 表示触摸点的指针索引。 |
| tiltX | 表示指向Y倾斜度的指针。 |
**返回:**
返回执行的状态代码。
**起始版本:**
9
### OH_NativeXComponent_GetTouchPointToolType()
```
int32_t OH_NativeXComponent_GetTouchPointToolType (OH_NativeXComponent * component, uint32_t pointIndex, OH_NativeXComponent_TouchPointToolType * toolType )
```
**描述:**
获取ArkUI XComponent触摸点工具类型。
**参数:**
| Name | 描述 |
| -------- | -------- |
| component | 表示指向OH_NativeXComponent实例的指针。 |
| pointIndex | 表示触摸点的指针索引。 |
| toolType | 表示指向工具类型的指针。 |
**返回:**
返回执行的状态代码。
**起始版本:**
9
### OH_NativeXComponent_GetXComponentId()
### OH_NativeXComponent_GetXComponentId()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录