未验证 提交 a2ec4b16 编写于 作者: O openharmony_ci 提交者: Gitee

!21337 native xcomponent文档

Merge pull request !21337 from LiAn/master
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
声明用于访问Native XComponent的API。 声明用于访问Native XComponent的API。
**起始版本** **起始版本:**
8 8
**相关模块** **相关模块:**
[Native XComponent](_o_h___native_x_component.md) [Native XComponent](_o_h___native_x_component.md)
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
### 结构体 ### 结构体
| 结构体名称 | 描述 | | 名称 | 描述 |
| -------- | -------- | | -------- | -------- |
| [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) | 触摸事件。 |
...@@ -30,39 +30,54 @@ ...@@ -30,39 +30,54 @@
### 类型定义 ### 类型定义
| 类型定义名称 | 描述 | | 名称 | 描述 |
| -------- | -------- | | -------- | -------- |
| [OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) | 提供封装的OH_NativeXComponent实例。 | | [OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) | 提供封装的OH_NativeXComponent实例。 |
| [OH_NativeXComponent_Callback](_o_h___native_x_component.md#oh_nativexcomponent_callback) | 注册surface生命周期和触摸事件回调。 | | [OH_NativeXComponent_Callback](_o_h___native_x_component.md#oh_nativexcomponent_callback) | 注册surface生命周期和触摸事件回调。 |
| [OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component.md#oh_nativexcomponent_mouseevent_callback) | 注册鼠标事件的回调。 | | [OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component.md#oh_nativexcomponent_mouseevent_callback) | 注册鼠标事件的回调。 |
| [OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent) | 提供封装的OH_NativeXComponent_KeyEvent实例。 |
### 枚举 ### 枚举
| 枚举名称 | 描述 | | 枚举名称 | 描述 |
| -------- | -------- | | -------- | -------- |
| { OH_NATIVEXCOMPONENT_RESULT_SUCCESS = 0, <br/>OH_NATIVEXCOMPONENT_RESULT_FAILED = -1, <br/>OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER = -2} | [枚举](_o_h___native_x_component.md#anonymous-enum)API访问状态。 | | {&nbsp;OH_NATIVEXCOMPONENT_RESULT_SUCCESS&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_RESULT_FAILED&nbsp;=&nbsp;-1,&nbsp;OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER&nbsp;=&nbsp;-2&nbsp;} | 枚举API访问状态。 |
| [OH_NativeXComponent_TouchEventType](_o_h___native_x_component.md#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](_o_h___native_x_component.md#oh_nativexcomponent_toucheventtype)&nbsp;{<br/>OH_NATIVEXCOMPONENT_DOWN&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_UP,&nbsp;OH_NATIVEXCOMPONENT_MOVE,&nbsp;OH_NATIVEXCOMPONENT_CANCEL,<br/>OH_NATIVEXCOMPONENT_UNKNOWN<br/>} | 触摸事件类型。 |
| [OH_NativeXComponent_MouseEventAction](_o_h___native_x_component.md#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_TouchPointToolType](_o_h___native_x_component.md#oh_nativexcomponent_touchpointtooltype)&nbsp;{<br/>OH_NATIVEXCOMPONENT_TOOL_TYPE_UNKNOWN&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_FINGER,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_PEN,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_RUBBER,<br/>OH_NATIVEXCOMPONENT_TOOL_TYPE_BRUSH,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_PENCIL,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_AIRBRUSH,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_MOUSE,<br/>OH_NATIVEXCOMPONENT_TOOL_TYPE_LENS<br/>} | 触摸点工具类型。 |
| [OH_NativeXComponent_MouseEventButton](_o_h___native_x_component.md#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_EventSourceType](_o_h___native_x_component.md#oh_nativexcomponent_eventsourcetype)&nbsp;{<br/>OH_NATIVEXCOMPONENT_SOURCE_TYPE_UNKNOWN&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_SOURCE_TYPE_MOUSE,&nbsp;OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHSCREEN,&nbsp;OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHPAD,<br/>OH_NATIVEXCOMPONENT_SOURCE_TYPE_JOYSTICK,&nbsp;OH_NATIVEXCOMPONENT_SOURCE_TYPE_KEYBOARD<br/>} | 触摸事件源类型。 |
| [OH_NativeXComponent_MouseEventAction](_o_h___native_x_component.md#oh_nativexcomponent_mouseeventaction)&nbsp;{&nbsp;OH_NATIVEXCOMPONENT_MOUSE_NONE&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_MOUSE_PRESS,&nbsp;OH_NATIVEXCOMPONENT_MOUSE_RELEASE,&nbsp;OH_NATIVEXCOMPONENT_MOUSE_MOVE&nbsp;} | 鼠标事件动作。 |
| [OH_NativeXComponent_MouseEventButton](_o_h___native_x_component.md#oh_nativexcomponent_mouseeventbutton)&nbsp;{<br/>OH_NATIVEXCOMPONENT_NONE_BUTTON&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_LEFT_BUTTON&nbsp;=&nbsp;0x01,&nbsp;OH_NATIVEXCOMPONENT_RIGHT_BUTTON&nbsp;=&nbsp;0x02,&nbsp;OH_NATIVEXCOMPONENT_MIDDLE_BUTTON&nbsp;=&nbsp;0x04,<br/>OH_NATIVEXCOMPONENT_BACK_BUTTON&nbsp;=&nbsp;0x08,&nbsp;OH_NATIVEXCOMPONENT_FORWARD_BUTTON&nbsp;=&nbsp;0x10<br/>} | 鼠标事件按键。 |
### 函数 ### 函数
| 函数名称 | 描述 | | 名称 | 描述 |
| -------- | -------- | | -------- | -------- |
| [OH_NativeXComponent_GetXComponentId](_o_h___native_x_component.md#oh_nativexcomponent_getxcomponentid) ([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) \*component, char \*id, uint64_t \*size) | 获取ArkUI XComponent的id。 | | [OH_NativeXComponent_GetXComponentId](_o_h___native_x_component.md#oh_nativexcomponent_getxcomponentid)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;char&nbsp;\*id,&nbsp;uint64_t&nbsp;\*size) | 获取ArkUI&nbsp;XComponent的id。 |
| [OH_NativeXComponent_GetXComponentSize](_o_h___native_x_component.md#oh_nativexcomponent_getxcomponentsize) ([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) \*component, const void \*window, uint64_t \*width, uint64_t \*height) | 获取ArkUI XComponent持有的surface的大小。 | | [OH_NativeXComponent_GetXComponentSize](_o_h___native_x_component.md#oh_nativexcomponent_getxcomponentsize)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;const&nbsp;void&nbsp;\*window,&nbsp;uint64_t&nbsp;\*width,&nbsp;uint64_t&nbsp;\*height) | 获取ArkUI&nbsp;XComponent持有的surface的大小。 |
| [OH_NativeXComponent_GetXComponentOffset](_o_h___native_x_component.md#oh_nativexcomponent_getxcomponentoffset) ([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) \*component, const void \*window, double \*x, double \*y) | 获取ArkUI XComponent组件相对屏幕左上顶点的偏移量。 | | [OH_NativeXComponent_GetXComponentOffset](_o_h___native_x_component.md#oh_nativexcomponent_getxcomponentoffset)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;const&nbsp;void&nbsp;\*window,&nbsp;double&nbsp;\*x,&nbsp;double&nbsp;\*y) | 获取ArkUI&nbsp;XComponent组件相对屏幕左上顶点的偏移量。 |
| [OH_NativeXComponent_GetTouchEvent](_o_h___native_x_component.md#oh_nativexcomponent_gettouchevent) ([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) \*component, const void \*window, [OH_NativeXComponent_TouchEvent](_o_h___native_x_component___touch_event.md) \*touchEvent) | 获取ArkUI XComponent调度的触摸事件。 | | [OH_NativeXComponent_GetTouchEvent](_o_h___native_x_component.md#oh_nativexcomponent_gettouchevent)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;const&nbsp;void&nbsp;\*window,&nbsp;[OH_NativeXComponent_TouchEvent](_o_h___native_x_component___touch_event.md)&nbsp;\*touchEvent) | 获取ArkUI&nbsp;XComponent调度的触摸事件。 |
| [OH_NativeXComponent_GetMouseEvent](_o_h___native_x_component.md#oh_nativexcomponent_getmouseevent) ([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) \*component, const void \*window, [OH_NativeXComponent_MouseEvent](_o_h___native_x_component___mouse_event.md) \*mouseEvent) | 获取ArkUI XComponent调度的鼠标事件 | | [OH_NativeXComponent_GetTouchPointToolType](_o_h___native_x_component.md#oh_nativexcomponent_gettouchpointtooltype)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;uint32_t&nbsp;pointIndex,&nbsp;[OH_NativeXComponent_TouchPointToolType](_o_h___native_x_component.md#oh_nativexcomponent_touchpointtooltype)&nbsp;\*toolType) | 获取ArkUI&nbsp;XComponent触摸点工具类型。 |
| [OH_NativeXComponent_RegisterCallback](_o_h___native_x_component.md#oh_nativexcomponent_registercallback) ([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) \*component, [OH_NativeXComponent_Callback](_o_h___native_x_component___callback.md) \*callback) | 为此OH_NativeXComponent实例注册回调。 | | [OH_NativeXComponent_GetTouchPointTiltX](_o_h___native_x_component.md#oh_nativexcomponent_gettouchpointtiltx)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;uint32_t&nbsp;pointIndex,&nbsp;float&nbsp;\*tiltX) | 获取ArkUI&nbsp;XComponent触摸点倾斜与X轴角度。 |
| [OH_NativeXComponent_RegisterMouseEventCallback](_o_h___native_x_component.md#oh_nativexcomponent_registermouseeventcallback) ([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) \*component, [OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component___mouse_event___callback.md) \*callback) | 为此OH_NativeXComponent实例注册鼠标事件回调。 | | [OH_NativeXComponent_GetTouchPointTiltY](_o_h___native_x_component.md#oh_nativexcomponent_gettouchpointtilty)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;uint32_t&nbsp;pointIndex,&nbsp;float&nbsp;\*tiltY) | 获取ArkUI&nbsp;XComponent触摸点倾斜与Y轴角度。 |
| [OH_NativeXComponent_GetMouseEvent](_o_h___native_x_component.md#oh_nativexcomponent_getmouseevent)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;const&nbsp;void&nbsp;\*window,&nbsp;[OH_NativeXComponent_MouseEvent](_o_h___native_x_component___mouse_event.md)&nbsp;\*mouseEvent) | 获取ArkUI&nbsp;XComponent调度的鼠标事件。 |
| [OH_NativeXComponent_RegisterCallback](_o_h___native_x_component.md#oh_nativexcomponent_registercallback)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;[OH_NativeXComponent_Callback](_o_h___native_x_component___callback.md)&nbsp;\*callback) | 为此OH_NativeXComponent实例注册回调。 |
| [OH_NativeXComponent_RegisterMouseEventCallback](_o_h___native_x_component.md#oh_nativexcomponent_registermouseeventcallback)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;[OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component___mouse_event___callback.md)&nbsp;\*callback) | 为此OH_NativeXComponent实例注册鼠标事件回调。 |
| [OH_NativeXComponent_RegisterFocusEventCallback](_o_h___native_x_component.md#oh_nativexcomponent_registerfocuseventcallback)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;void(\*callback)([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;void&nbsp;\*window)) | 为此OH_NativeXComponent实例注册获焦事件回调。 |
| [OH_NativeXComponent_RegisterKeyEventCallback](_o_h___native_x_component.md#oh_nativexcomponent_registerkeyeventcallback)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;void(\*callback)([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;void&nbsp;\*window)) | 为此OH_NativeXComponent实例注册按键事件回调。 |
| [OH_NativeXComponent_RegisterBlurEventCallback](_o_h___native_x_component.md#oh_nativexcomponent_registerblureventcallback)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;void(\*callback)([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;void&nbsp;\*window)) | 为此OH_NativeXComponent实例注册失焦事件回调。 |
| [OH_NativeXComponent_GetKeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_getkeyevent)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;[OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent)&nbsp;\*\*keyEvent) | 获取ArkUI&nbsp;XComponent调度的按键事件。 |
| [OH_NativeXComponent_GetKeyEventAction](_o_h___native_x_component.md#oh_nativexcomponent_getkeyeventaction)&nbsp;([OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent)&nbsp;\*keyEvent,&nbsp;[OH_NativeXComponent_KeyAction](_o_h___native_x_component.md#oh_nativexcomponent_keyaction)&nbsp;\*action) | 获取传入按键事件的动作。 |
| [OH_NativeXComponent_GetKeyEventCode](_o_h___native_x_component.md#oh_nativexcomponent_getkeyeventcode)&nbsp;([OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent)&nbsp;\*keyEvent,&nbsp;[OH_NativeXComponent_KeyCode](_o_h___native_x_component.md#oh_nativexcomponent_keycode)&nbsp;\*code) | 获取传入按键事件的按键码。 |
| [OH_NativeXComponent_GetKeyEventSourceType](_o_h___native_x_component.md#oh_nativexcomponent_getkeyeventsourcetype)&nbsp;([OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent)&nbsp;\*keyEvent,&nbsp;[OH_NativeXComponent_EventSourceType](_o_h___native_x_component.md#oh_nativexcomponent_eventsourcetype)&nbsp;\*sourceType) | 获取传入按键事件的事件源类型。 |
| [OH_NativeXComponent_GetKeyEventDeviceId](_o_h___native_x_component.md#oh_nativexcomponent_getkeyeventdeviceid)&nbsp;([OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent)&nbsp;\*keyEvent,&nbsp;int64_t&nbsp;\*deviceId) | 获取传入按键事件的设备id。 |
| [OH_NativeXComponent_GetKeyEventTimeStamp](_o_h___native_x_component.md#oh_nativexcomponent_getkeyeventtimestamp)&nbsp;([OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent)&nbsp;\*keyEvent,&nbsp;int64_t&nbsp;\*timeStamp) | 获取传入按键事件的时间戳。 |
### 变量 ### 变量
| 变量名称 | 描述 | | 名称 | 描述 |
| -------- | -------- | | -------- | -------- |
| **OH_XCOMPONENT_ID_LEN_MAX** = 128 | ArkUI XComponent的id的最大长度。 | | **OH_XCOMPONENT_ID_LEN_MAX**&nbsp;=&nbsp;128 | const&nbsp;uint32_t |
| **OH_MAX_TOUCH_POINTS_NUMBER** = 10 | 触摸事件中的可识别的触摸点个数最大值。 | | **OH_MAX_TOUCH_POINTS_NUMBER**&nbsp;=&nbsp;10 | const&nbsp;uint32_t |
# native_xcomponent_key_event.h
## 概述
声明用于访问Native XComponent键盘事件所使用到的枚举类型。
**起始版本:**
10
**相关模块:**
[Native XComponent](_o_h___native_x_component.md)
## 汇总
### 枚举
| 名称 | 描述 |
| -------- | -------- |
| [OH_NativeXComponent_KeyCode](_o_h___native_x_component.md#oh_nativexcomponent_keycode)&nbsp;{<br/>KEY_UNKN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EY_EXPLORER&nbsp;=&nbsp;2052,&nbsp;KEY_ENVELOPE&nbsp;=&nbsp;2053,<br/>KEY_ENTER&nbsp;=&nbsp;2054,&nbsp;KEY_DEL&nbsp;=&nbsp;2055,&nbsp;KEY_GRAVE&nbsp;=&nbsp;2056,&nbsp;KEY_MINUS&nbsp;=&nbsp;2057,<br/>KEY_EQUALS&nbsp;=&nbsp;2058,&nbsp;KEY_LEFT_BRACKET&nbsp;=&nbsp;2059,&nbsp;KEY_RIGHT_BRACKET&nbsp;=&nbsp;2060,&nbsp;KEY_BACKSLASH&nbsp;=&nbsp;2061,<br/>KEY_SEMICOLON&nbsp;=&nbsp;2062,&nbsp;KEY_APOSTROPHE&nbsp;=&nbsp;2063,&nbsp;KEY_SLASH&nbsp;=&nbsp;2064,&nbsp;KEY_AT&nbsp;=&nbsp;2065,<br/>KEY_PLUS&nbsp;=&nbsp;2066,&nbsp;KEY_MENU&nbsp;=&nbsp;2067,&nbsp;KEY_PAGE_UP&nbsp;=&nbsp;2068,&nbsp;KEY_PAGE_DOWN&nbsp;=&nbsp;2069,<br/>KEY_ESCAPE&nbsp;=&nbsp;2070,&nbsp;KEY_FORWARD_DEL&nbsp;=&nbsp;2071,&nbsp;KEY_CTRL_LEFT&nbsp;=&nbsp;2072,&nbsp;KEY_CTRL_RIGHT&nbsp;=&nbsp;2073,<br/>KEY_CAPS_LOCK&nbsp;=&nbsp;2074,&nbsp;KEY_SCROLL_LOCK&nbsp;=&nbsp;2075,&nbsp;KEY_META_LEFT&nbsp;=&nbsp;2076,&nbsp;KEY_META_RIGHT&nbsp;=&nbsp;2077,<br/>KEY_FUNCTION&nbsp;=&nbsp;2078,&nbsp;KEY_SYSRQ&nbsp;=&nbsp;2079,&nbsp;KEY_BREAK&nbsp;=&nbsp;2080,&nbsp;KEY_MOVE_HOME&nbsp;=&nbsp;2081,<br/>KEY_MOVE_END&nbsp;=&nbsp;2082,&nbsp;KEY_INSERT&nbsp;=&nbsp;2083,&nbsp;KEY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bsp;KEY_CHANNELUP&nbsp;=&nbsp;2690,<br/>KEY_CHANNELDOWN&nbsp;=&nbsp;2691,&nbsp;KEY_LAST&nbsp;=&nbsp;2692,&nbsp;KEY_RESTART&nbsp;=&nbsp;2693,&nbsp;KEY_SLOW&nbsp;=&nbsp;2694,<br/>KEY_SHUFFLE&nbsp;=&nbsp;2695,&nbsp;KEY_VIDEOPHONE&nbsp;=&nbsp;2696,&nbsp;KEY_GAMES&nbsp;=&nbsp;2697,&nbsp;KEY_ZOOMIN&nbsp;=&nbsp;2698,<br/>KEY_ZOOMOUT&nbsp;=&nbsp;2699,&nbsp;KEY_ZOOMRESET&nbsp;=&nbsp;2700,&nbsp;KEY_WORDPROCESSOR&nbsp;=&nbsp;2701,&nbsp;KEY_EDITOR&nbsp;=&nbsp;2702,<br/>KEY_SPREADSHEET&nbsp;=&nbsp;2703,&nbsp;KEY_GRAPHICSEDITOR&nbsp;=&nbsp;2704,&nbsp;KEY_PRESENTATION&nbsp;=&nbsp;2705,&nbsp;KEY_DATABASE&nbsp;=&nbsp;2706,<br/>KEY_NEWS&nbsp;=&nbsp;2707,&nbsp;KEY_VOICEMAIL&nbsp;=&nbsp;2708,&nbsp;KEY_ADDRESSBOOK&nbsp;=&nbsp;2709,&nbsp;KEY_MESSENGER&nbsp;=&nbsp;2710,<br/>KEY_BRIGHTNESS_TOGGLE&nbsp;=&nbsp;2711,&nbsp;KEY_SPELLCHECK&nbsp;=&nbsp;2712,&nbsp;KEY_COFFEE&nbsp;=&nbsp;2713,&nbsp;KEY_MEDIA_REPEAT&nbsp;=&nbsp;2714,<br/>KEY_IMAGES&nbsp;=&nbsp;2715,&nbsp;KEY_BUTTONCONFIG&nbsp;=&nbsp;2716,&nbsp;KEY_TASKMANAGER&nbsp;=&nbsp;2717,&nbsp;KEY_JOURNAL&nbsp;=&nbsp;2718,<br/>KEY_CONTROLPANEL&nbsp;=&nbsp;2719,&nbsp;KEY_APPSELECT&nbsp;=&nbsp;2720,&nbsp;KEY_SCREENSAVER&nbsp;=&nbsp;2721,&nbsp;KEY_ASSISTANT&nbsp;=&nbsp;2722,<br/>KEY_KBD_LAYOUT_NEXT&nbsp;=&nbsp;2723,&nbsp;KEY_BRIGHTNESS_MIN&nbsp;=&nbsp;2724,&nbsp;KEY_BRIGHTNESS_MAX&nbsp;=&nbsp;2725,&nbsp;KEY_KBDINPUTASSIST_PREV&nbsp;=&nbsp;2726,<br/>KEY_KBDINPUTASSIST_NEXT&nbsp;=&nbsp;2727,&nbsp;KEY_KBDINPUTASSIST_PREVGROUP&nbsp;=&nbsp;2728,&nbsp;KEY_KBDINPUTASSIST_NEXTGROUP&nbsp;=&nbsp;2729,&nbsp;KEY_KBDINPUTASSIST_ACCEPT&nbsp;=&nbsp;2730,<br/>KEY_KBDINPUTASSIST_CANCEL&nbsp;=&nbsp;2731,&nbsp;KEY_FRONT&nbsp;=&nbsp;2800,&nbsp;KEY_SETUP&nbsp;=&nbsp;2801,&nbsp;KEY_WAKEUP&nbsp;=&nbsp;2802,<br/>KEY_SENDFILE&nbsp;=&nbsp;2803,&nbsp;KEY_DELETEFILE&nbsp;=&nbsp;2804,&nbsp;KEY_XFER&nbsp;=&nbsp;2805,&nbsp;KEY_PROG1&nbsp;=&nbsp;2806,<br/>KEY_PROG2&nbsp;=&nbsp;2807,&nbsp;KEY_MSDOS&nbsp;=&nbsp;2808,&nbsp;KEY_SCREENLOCK&nbsp;=&nbsp;2809,&nbsp;KEY_DIRECTION_ROTATE_DISPLAY&nbsp;=&nbsp;2810,<br/>KEY_CYCLEWINDOWS&nbsp;=&nbsp;2811,&nbsp;KEY_COMPUTER&nbsp;=&nbsp;2812,&nbsp;KEY_EJECTCLOSECD&nbsp;=&nbsp;2813,&nbsp;KEY_ISO&nbsp;=&nbsp;2814,<br/>KEY_MOVE&nbsp;=&nbsp;2815,&nbsp;KEY_F13&nbsp;=&nbsp;2816,&nbsp;KEY_F14&nbsp;=&nbsp;2817,&nbsp;KEY_F15&nbsp;=&nbsp;2818,<br/>KEY_F16&nbsp;=&nbsp;2819,&nbsp;KEY_F17&nbsp;=&nbsp;2820,&nbsp;KEY_F18&nbsp;=&nbsp;2821,&nbsp;KEY_F19&nbsp;=&nbsp;2822,<br/>KEY_F20&nbsp;=&nbsp;2823,&nbsp;KEY_F21&nbsp;=&nbsp;2824,&nbsp;KEY_F22&nbsp;=&nbsp;2825,&nbsp;KEY_F23&nbsp;=&nbsp;2826,<br/>KEY_F24&nbsp;=&nbsp;2827,&nbsp;KEY_PROG3&nbsp;=&nbsp;2828,&nbsp;KEY_PROG4&nbsp;=&nbsp;2829,&nbsp;KEY_DASHBOARD&nbsp;=&nbsp;2830,<br/>KEY_SUSPEND&nbsp;=&nbsp;2831,&nbsp;KEY_HP&nbsp;=&nbsp;2832,&nbsp;KEY_SOUND&nbsp;=&nbsp;2833,&nbsp;KEY_QUESTION&nbsp;=&nbsp;2834,<br/>KEY_CONNECT&nbsp;=&nbsp;2836,&nbsp;KEY_SPORT&nbsp;=&nbsp;2837,&nbsp;KEY_SHOP&nbsp;=&nbsp;2838,&nbsp;KEY_ALTERASE&nbsp;=&nbsp;2839,<br/>KEY_SWITCHVIDEOMODE&nbsp;=&nbsp;2841,&nbsp;KEY_BATTERY&nbsp;=&nbsp;2842,&nbsp;KEY_BLUETOOTH&nbsp;=&nbsp;2843,&nbsp;KEY_WLAN&nbsp;=&nbsp;2844,<br/>KEY_UWB&nbsp;=&nbsp;2845,&nbsp;KEY_WWAN_WIMAX&nbsp;=&nbsp;2846,&nbsp;KEY_RFKILL&nbsp;=&nbsp;2847,&nbsp;KEY_CHANNEL&nbsp;=&nbsp;3001,<br/>KEY_BTN_0&nbsp;=&nbsp;3100,&nbsp;KEY_BTN_1&nbsp;=&nbsp;3101,&nbsp;KEY_BTN_2&nbsp;=&nbsp;3102,&nbsp;KEY_BTN_3&nbsp;=&nbsp;3103,<br/>KEY_BTN_4&nbsp;=&nbsp;3104,&nbsp;KEY_BTN_5&nbsp;=&nbsp;3105,&nbsp;KEY_BTN_6&nbsp;=&nbsp;3106,&nbsp;KEY_BTN_7&nbsp;=&nbsp;3107,<br/>KEY_BTN_8&nbsp;=&nbsp;3108,&nbsp;KEY_BTN_9&nbsp;=&nbsp;3109<br/>} | 按键事件的键码。 |
| [OH_NativeXComponent_KeyAction](_o_h___native_x_component.md#oh_nativexcomponent_keyaction)&nbsp;{&nbsp;OH_NATIVEXCOMPONENT_KEY_ACTION_UNKNOWN&nbsp;=&nbsp;-1,&nbsp;OH_NATIVEXCOMPONENT_KEY_ACTION_DOWN&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_KEY_ACTION_UP&nbsp;} | 按键事件动作。 |
...@@ -23,7 +23,7 @@ Image支持加载存档图、多媒体像素图两种类型。 ...@@ -23,7 +23,7 @@ Image支持加载存档图、多媒体像素图两种类型。
### 存档图类型数据源 ### 存档图类型数据源
存档图类型的数据源可以分为本地资源、网络资源、Resource资源、媒体库datashare资源和base64。 存档图类型的数据源可以分为本地资源、网络资源、Resource资源、媒体库资源和base64。
- 本地资源 - 本地资源
...@@ -48,7 +48,7 @@ Image支持加载存档图、多媒体像素图两种类型。 ...@@ -48,7 +48,7 @@ Image支持加载存档图、多媒体像素图两种类型。
使用资源格式可以跨包/跨模块引入图片,resources文件夹下的图片都可以通过$r资源接口读 取到并转换到Resource格式。 使用资源格式可以跨包/跨模块引入图片,resources文件夹下的图片都可以通过$r资源接口读 取到并转换到Resource格式。
**图1** resouces   **图1** resources  
![image-resource](figures/image-resource.jpg) ![image-resource](figures/image-resource.jpg)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册