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

!21813 翻译完成 20432+21337+21348:native xcomponent文档

Merge pull request !21813 from ester.zhou/TR-20432
......@@ -48,6 +48,7 @@
- [native_buffer.h](native__buffer_8h.md)
- [native_image.h](native__image_8h.md)
- [native_interface_xcomponent.h](native__interface__xcomponent_8h.md)
- [native_xcomponent_key_event.h](native__xcomponent__key__event_8h.md)
- [native_vsync.h](native__vsync_8h.md)
- [raw_dir.h](raw__dir_8h.md)
- [raw_file_manager.h](raw__file__manager_8h.md)
......
......@@ -3,105 +3,119 @@
## Overview
Describes the surface and touch event held by the ArkUI XComponent, which can be used for the EGL/OpenGL ES and media data input and displayed on the ArkUI XComponent.
Describes the surface and touch event held by the ArkUI XComponent, which can be used for the EGL/OpenGL ES and media data input and displayed on the ArkUI XComponent. For details, see [XComponent Development](../../napi/xcomponent-guidelines.md)
**Since**
**Since:**
8
## Summary
### Files
| Name | Description |
| -------- | -------- |
| [native_interface_xcomponent.h](native__interface__xcomponent_8h.md) | Declare the APIs used to access the native XComponent.<br>File to Include: <ace/xcomponent/native_interface_xcomponent.h> |
| ---------------------------------------- | ---------------------------------------- |
| [native_interface_xcomponent.h](native__interface__xcomponent_8h.md) | Declares the APIs for accessing **NativeXComponent**.<br>File to include: &lt;ace/xcomponent/native_interface_xcomponent.h&gt; |
| [native_xcomponent_key_event.h](native__xcomponent__key__event_8h.md) | Declares the enums used to access **NativeXComponent** key events.<br>File to include: &lt;ace/xcomponent/native_xcomponent_key_event.h&gt; |
### Structs
| Name | Description |
| -------- | -------- |
| ---------------------------------------- | --------------------- |
| [OH_NativeXComponent_TouchPoint](_o_h___native_x_component___touch_point.md) | Describes the touch point of the touch event. |
| [OH_NativeXComponent_TouchEvent](_o_h___native_x_component___touch_event.md) | Describes the touch event. |
| [OH_NativeXComponent_MouseEvent](_o_h___native_x_component___mouse_event.md) | Describes the mouse event. |
| [OH_NativeXComponent_Callback](_o_h___native_x_component___callback.md) | Registers a callback for the surface lifecycle and touch event. |
| [OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component___mouse_event___callback.md) | Registers a callback for the mouse event. |
| [OH_NativeXComponent_Callback](_o_h___native_x_component___callback.md) | Registers callbacks for the surface lifecycle and touch event.|
| [OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component___mouse_event___callback.md) | Registers callbacks for the mouse event. |
### Types
| Name | Description |
| -------- | -------- |
| [OH_NativeXComponent](#oh_nativexcomponent) | Provides an encapsulated OH_NativeXComponent instance. |
| [OH_NativeXComponent_Callback](#oh_nativexcomponent_callback) | Registers a callback for the surface lifecycle and touch event. |
| [OH_NativeXComponent_MouseEvent_Callback](#oh_nativexcomponent_mouseevent_callback) | Registers a callback for the mouse event. |
| ---------------------------------------- | ------------------------------------ |
| [OH_NativeXComponent](#oh_nativexcomponent) | Provides an encapsulated **OH_NativeXComponent** instance. |
| [OH_NativeXComponent_Callback](#oh_nativexcomponent_callback) | Registers callbacks for the surface lifecycle and touch event. |
| [OH_NativeXComponent_MouseEvent_Callback](#oh_nativexcomponent_mouseevent_callback) | Registers callbacks for the mouse event. |
| [OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent) | Provides an encapsulated **OH_NativeXComponent_KeyEvent** instance.|
### Enums
| Name | Description |
| -------- | -------- |
| {OH_NATIVEXCOMPONENT_RESULT_SUCCESS = 0, <br>OH_NATIVEXCOMPONENT_RESULT_FAILED = -1, <br/>OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER = -2 } | [Enumerates](#anonymous-enum) the API access states. |
| [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 } | Enumerates the touch event types. |
| [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 } | Enumerates the contact point tool types. |
| [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} | Enumerates the source types of the touch event. |
| [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 } | Enumerates the mouse event actions. |
| [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 } | Enumerates the mouse event buttons. |
| ---------------------------------------- | ---------- |
| { OH_NATIVEXCOMPONENT_RESULT_SUCCESS = 0, OH_NATIVEXCOMPONENT_RESULT_FAILED = -1, OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER = -2 } | Enumerates the API access states.|
| [OH_NativeXComponent_TouchEventType](#oh_nativexcomponent_toucheventtype) {<br>OH_NATIVEXCOMPONENT_DOWN = 0, OH_NATIVEXCOMPONENT_UP, OH_NATIVEXCOMPONENT_MOVE, OH_NATIVEXCOMPONENT_CANCEL,<br>OH_NATIVEXCOMPONENT_UNKNOWN<br>} | Enumerates the touch event types. |
| [OH_NativeXComponent_TouchPointToolType](#oh_nativexcomponent_touchpointtooltype) {<br>OH_NATIVEXCOMPONENT_TOOL_TYPE_UNKNOWN = 0, OH_NATIVEXCOMPONENT_TOOL_TYPE_FINGER, OH_NATIVEXCOMPONENT_TOOL_TYPE_PEN, OH_NATIVEXCOMPONENT_TOOL_TYPE_RUBBER,<br>OH_NATIVEXCOMPONENT_TOOL_TYPE_BRUSH, OH_NATIVEXCOMPONENT_TOOL_TYPE_PENCIL, OH_NATIVEXCOMPONENT_TOOL_TYPE_AIRBRUSH, OH_NATIVEXCOMPONENT_TOOL_TYPE_MOUSE,<br>OH_NATIVEXCOMPONENT_TOOL_TYPE_LENS<br>} | Enumerates the touch point tool types. |
| [OH_NativeXComponent_EventSourceType](#oh_nativexcomponent_eventsourcetype) {<br>OH_NATIVEXCOMPONENT_SOURCE_TYPE_UNKNOWN = 0, OH_NATIVEXCOMPONENT_SOURCE_TYPE_MOUSE, OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHSCREEN, OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHPAD,<br>OH_NATIVEXCOMPONENT_SOURCE_TYPE_JOYSTICK, OH_NATIVEXCOMPONENT_SOURCE_TYPE_KEYBOARD<br>} | Enumerates the touch event source types. |
| [OH_NativeXComponent_MouseEventAction](#oh_nativexcomponent_mouseeventaction) { OH_NATIVEXCOMPONENT_MOUSE_NONE = 0, OH_NATIVEXCOMPONENT_MOUSE_PRESS, OH_NATIVEXCOMPONENT_MOUSE_RELEASE, OH_NATIVEXCOMPONENT_MOUSE_MOVE } | Enumerates the mouse event actions. |
| [OH_NativeXComponent_MouseEventButton](#oh_nativexcomponent_mouseeventbutton) {<br>OH_NATIVEXCOMPONENT_NONE_BUTTON = 0, OH_NATIVEXCOMPONENT_LEFT_BUTTON = 0x01, OH_NATIVEXCOMPONENT_RIGHT_BUTTON = 0x02, OH_NATIVEXCOMPONENT_MIDDLE_BUTTON = 0x04,<br>OH_NATIVEXCOMPONENT_BACK_BUTTON = 0x08, OH_NATIVEXCOMPONENT_FORWARD_BUTTON = 0x10<br>} | Enumerates the mouse event buttons. |
| [OH_NativeXComponent_KeyCode](#oh_nativexcomponent_keycode) {<br>KEY_UNKNOWN = -1, KEY_FN = 0, KEY_HOME = 1, KEY_BACK = 2,KEY_MEDIA_PLAY_PAUSE = 10, KEY_MEDIA_STOP = 11, KEY_MEDIA_NEXT = 12, KEY_MEDIA_PREVIOUS = 13,<br>KEY_MEDIA_REWIND = 14, KEY_MEDIA_FAST_FORWARD = 15, KEY_VOLUME_UP = 16, KEY_VOLUME_DOWN = 17,<br>KEY_POWER = 18, KEY_CAMERA = 19, KEY_VOLUME_MUTE = 22, KEY_MUTE = 23,KEY_BRIGHTNESS_UP = 40, KEY_BRIGHTNESS_DOWN = 41, KEY_0 = 2000, KEY_1 = 2001,<br>KEY_2 = 2002, KEY_3 = 2003, KEY_4 = 2004, KEY_5 = 2005,<br>KEY_6 = 2006, KEY_7 = 2007, KEY_8 = 2008, KEY_9 = 2009,<br>KEY_STAR = 2010, KEY_POUND = 2011, KEY_DPAD_UP = 2012, KEY_DPAD_DOWN = 2013,KEY_DPAD_LEFT = 2014, KEY_DPAD_RIGHT = 2015, KEY_DPAD_CENTER = 2016,<br>KEY_A = 2017,<br>KEY_B = 2018, KEY_C = 2019, KEY_D = 2020, KEY_E = 2021,<br>KEY_F = 2022, KEY_G = 2023, KEY_H = 2024, KEY_I = 2025,<br>KEY_J = 2026, KEY_K = 2027, KEY_L = 2028, KEY_M = 2029,<br>KEY_N = 2030, KEY_O = 2031, KEY_P = 2032, KEY_Q = 2033,<br>KEY_R = 2034, KEY_S = 2035, KEY_T = 2036, KEY_U = 2037,<br>KEY_V = 2038, KEY_W = 2039, KEY_X = 2040, KEY_Y = 2041,<br>KEY_Z = 2042, KEY_COMMA = 2043, KEY_PERIOD = 2044, KEY_ALT_LEFT = 2045,<br>KEY_ALT_RIGHT = 2046, KEY_SHIFT_LEFT = 2047, KEY_SHIFT_RIGHT = 2048, KEY_TAB = 2049,<br>KEY_SPACE = 2050, KEY_SYM = 2051, KEY_EXPLORER = 2052, KEY_ENVELOPE = 2053,<br>KEY_ENTER = 2054, KEY_DEL = 2055, KEY_GRAVE = 2056, KEY_MINUS = 2057,<br>KEY_EQUALS = 2058, KEY_LEFT_BRACKET = 2059, KEY_RIGHT_BRACKET = 2060, KEY_BACKSLASH = 2061,<br>KEY_SEMICOLON = 2062, KEY_APOSTROPHE = 2063, KEY_SLASH = 2064, KEY_AT = 2065,<br>KEY_PLUS = 2066, KEY_MENU = 2067, KEY_PAGE_UP = 2068, KEY_PAGE_DOWN = 2069,<br>KEY_ESCAPE = 2070, KEY_FORWARD_DEL = 2071, KEY_CTRL_LEFT = 2072, KEY_CTRL_RIGHT = 2073,<br>KEY_CAPS_LOCK = 2074, KEY_SCROLL_LOCK = 2075, KEY_META_LEFT = 2076, KEY_META_RIGHT = 2077,<br>KEY_FUNCTION = 2078, KEY_SYSRQ = 2079, KEY_BREAK = 2080, KEY_MOVE_HOME = 2081,<br>KEY_MOVE_END = 2082, KEY_INSERT = 2083, KEY_FORWARD = 2084, KEY_MEDIA_PLAY = 2085,<br>KEY_MEDIA_PAUSE = 2086, KEY_MEDIA_CLOSE = 2087, KEY_MEDIA_EJECT = 2088, KEY_MEDIA_RECORD = 2089,<br>KEY_F1 = 2090, KEY_F2 = 2091, KEY_F3 = 2092, KEY_F4 = 2093,<br>KEY_F5 = 2094, KEY_F6 = 2095, KEY_F7 = 2096, KEY_F8 = 2097,<br>KEY_F9 = 2098, KEY_F10 = 2099, KEY_F11 = 2100, KEY_F12 = 2101,<br>KEY_NUM_LOCK = 2102, KEY_NUMPAD_0 = 2103, KEY_NUMPAD_1 = 2104, KEY_NUMPAD_2 = 2105,<br>KEY_NUMPAD_3 = 2106, KEY_NUMPAD_4 = 2107, KEY_NUMPAD_5 = 2108, KEY_NUMPAD_6 = 2109,<br>KEY_NUMPAD_7 = 2110, KEY_NUMPAD_8 = 2111, KEY_NUMPAD_9 = 2112, KEY_NUMPAD_DIVIDE = 2113,<br>KEY_NUMPAD_MULTIPLY = 2114, KEY_NUMPAD_SUBTRACT = 2115, KEY_NUMPAD_ADD = 2116, KEY_NUMPAD_DOT = 2117,<br>KEY_NUMPAD_COMMA = 2118, KEY_NUMPAD_ENTER = 2119, KEY_NUMPAD_EQUALS = 2120, KEY_NUMPAD_LEFT_PAREN = 2121,<br>KEY_NUMPAD_RIGHT_PAREN = 2122, KEY_VIRTUAL_MULTITASK = 2210, KEY_SLEEP = 2600, KEY_ZENKAKU_HANKAKU = 2601,<br>KEY_102ND = 2602, KEY_RO = 2603, KEY_KATAKANA = 2604, KEY_HIRAGANA = 2605,<br>KEY_HENKAN = 2606, KEY_KATAKANA_HIRAGANA = 2607, KEY_MUHENKAN = 2608, KEY_LINEFEED = 2609,<br>KEY_MACRO = 2610, KEY_NUMPAD_PLUSMINUS = 2611, KEY_SCALE = 2612, KEY_HANGUEL = 2613,<br>KEY_HANJA = 2614, KEY_YEN = 2615, KEY_STOP = 2616, KEY_AGAIN = 2617,<br>KEY_PROPS = 2618, KEY_UNDO = 2619, KEY_COPY = 2620, KEY_OPEN = 2621,<br>KEY_PASTE = 2622, KEY_FIND = 2623, KEY_CUT = 2624, KEY_HELP = 2625,<br>KEY_CALC = 2626, KEY_FILE = 2627, KEY_BOOKMARKS = 2628, KEY_NEXT = 2629,<br>KEY_PLAYPAUSE = 2630, KEY_PREVIOUS = 2631, KEY_STOPCD = 2632, KEY_CONFIG = 2634,<br>KEY_REFRESH = 2635, KEY_EXIT = 2636, KEY_EDIT = 2637, KEY_SCROLLUP = 2638,<br>KEY_SCROLLDOWN = 2639, KEY_NEW = 2640, KEY_REDO = 2641, KEY_CLOSE = 2642,<br>KEY_PLAY = 2643, KEY_BASSBOOST = 2644, KEY_PRINT = 2645, KEY_CHAT = 2646,<br>KEY_FINANCE = 2647, KEY_CANCEL = 2648, KEY_KBDILLUM_TOGGLE = 2649, KEY_KBDILLUM_DOWN = 2650,<br>KEY_KBDILLUM_UP = 2651, KEY_SEND = 2652, KEY_REPLY = 2653, KEY_FORWARDMAIL = 2654,<br>KEY_SAVE = 2655, KEY_DOCUMENTS = 2656, KEY_VIDEO_NEXT = 2657, KEY_VIDEO_PREV = 2658,<br>KEY_BRIGHTNESS_CYCLE = 2659, KEY_BRIGHTNESS_ZERO = 2660, KEY_DISPLAY_OFF = 2661, KEY_BTN_MISC = 2662,<br>KEY_GOTO = 2663, KEY_INFO = 2664, KEY_PROGRAM = 2665, KEY_PVR = 2666,<br>KEY_SUBTITLE = 2667, KEY_FULL_SCREEN = 2668, KEY_KEYBOARD = 2669, KEY_ASPECT_RATIO = 2670,<br>KEY_PC = 2671, KEY_TV = 2672, KEY_TV2 = 2673, KEY_VCR = 2674,<br>KEY_VCR2 = 2675, KEY_SAT = 2676, KEY_CD = 2677, KEY_TAPE = 2678,<br>KEY_TUNER = 2679, KEY_PLAYER = 2680, KEY_DVD = 2681, KEY_AUDIO = 2682,<br>KEY_VIDEO = 2683, KEY_MEMO = 2684, KEY_CALENDAR = 2685, KEY_RED = 2686,<br>KEY_GREEN = 2687, KEY_YELLOW = 2688, KEY_BLUE = 2689, KEY_CHANNELUP = 2690,<br>KEY_CHANNELDOWN = 2691, KEY_LAST = 2692, KEY_RESTART = 2693, KEY_SLOW = 2694,<br>KEY_SHUFFLE = 2695, KEY_VIDEOPHONE = 2696, KEY_GAMES = 2697, KEY_ZOOMIN = 2698,<br>KEY_ZOOMOUT = 2699, KEY_ZOOMRESET = 2700, KEY_WORDPROCESSOR = 2701, KEY_EDITOR = 2702,<br>KEY_SPREADSHEET = 2703, KEY_GRAPHICSEDITOR = 2704, KEY_PRESENTATION = 2705, KEY_DATABASE = 2706,<br>KEY_NEWS = 2707, KEY_VOICEMAIL = 2708, KEY_ADDRESSBOOK = 2709, KEY_MESSENGER = 2710,<br>KEY_BRIGHTNESS_TOGGLE = 2711, KEY_SPELLCHECK = 2712, KEY_COFFEE = 2713, KEY_MEDIA_REPEAT = 2714,<br>KEY_IMAGES = 2715, KEY_BUTTONCONFIG = 2716, KEY_TASKMANAGER = 2717, KEY_JOURNAL = 2718,<br>KEY_CONTROLPANEL = 2719, KEY_APPSELECT = 2720, KEY_SCREENSAVER = 2721, KEY_ASSISTANT = 2722,<br>KEY_KBD_LAYOUT_NEXT = 2723, KEY_BRIGHTNESS_MIN = 2724, KEY_BRIGHTNESS_MAX = 2725, KEY_KBDINPUTASSIST_PREV = 2726,<br>KEY_KBDINPUTASSIST_NEXT = 2727, KEY_KBDINPUTASSIST_PREVGROUP = 2728, KEY_KBDINPUTASSIST_NEXTGROUP = 2729, KEY_KBDINPUTASSIST_ACCEPT = 2730,<br>KEY_KBDINPUTASSIST_CANCEL = 2731, KEY_FRONT = 2800, KEY_SETUP = 2801, KEY_WAKEUP = 2802,<br>KEY_SENDFILE = 2803, KEY_DELETEFILE = 2804, KEY_XFER = 2805, KEY_PROG1 = 2806,<br>KEY_PROG2 = 2807, KEY_MSDOS = 2808, KEY_SCREENLOCK = 2809, KEY_DIRECTION_ROTATE_DISPLAY = 2810,<br>KEY_CYCLEWINDOWS = 2811, KEY_COMPUTER = 2812, KEY_EJECTCLOSECD = 2813, KEY_ISO = 2814,<br>KEY_MOVE = 2815, KEY_F13 = 2816, KEY_F14 = 2817, KEY_F15 = 2818,<br>KEY_F16 = 2819, KEY_F17 = 2820, KEY_F18 = 2821, KEY_F19 = 2822,<br>KEY_F20 = 2823, KEY_F21 = 2824, KEY_F22 = 2825, KEY_F23 = 2826,<br>KEY_F24 = 2827, KEY_PROG3 = 2828, KEY_PROG4 = 2829, KEY_DASHBOARD = 2830,<br>KEY_SUSPEND = 2831, KEY_HP = 2832, KEY_SOUND = 2833, KEY_QUESTION = 2834,<br>KEY_CONNECT = 2836, KEY_SPORT = 2837, KEY_SHOP = 2838, KEY_ALTERASE = 2839,<br>KEY_SWITCHVIDEOMODE = 2841, KEY_BATTERY = 2842, KEY_BLUETOOTH = 2843, KEY_WLAN = 2844,<br>KEY_UWB = 2845, KEY_WWAN_WIMAX = 2846, KEY_RFKILL = 2847, KEY_CHANNEL = 3001,<br>KEY_BTN_0 = 3100, KEY_BTN_1 = 3101, KEY_BTN_2 = 3102, KEY_BTN_3 = 3103,<br>KEY_BTN_4 = 3104, KEY_BTN_5 = 3105, KEY_BTN_6 = 3106, KEY_BTN_7 = 3107,<br>KEY_BTN_8 = 3108, KEY_BTN_9 = 3109<br>} | Enumerates the mouse event key codes. |
| [OH_NativeXComponent_KeyAction](#oh_nativexcomponent_keyaction) { OH_NATIVEXCOMPONENT_KEY_ACTION_UNKNOWN = -1, OH_NATIVEXCOMPONENT_KEY_ACTION_DOWN = 0, OH_NATIVEXCOMPONENT_KEY_ACTION_UP } | Enumerates the key event actions. |
### Functions
| Name | Description |
| -------- | -------- |
| ---------------------------------------- | -------------------------------------- |
| [OH_NativeXComponent_GetXComponentId](#oh_nativexcomponent_getxcomponentid) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, char \*id, uint64_t \*size) | Obtains the ID of the ArkUI XComponent. |
| [OH_NativeXComponent_GetXComponentSize](#oh_nativexcomponent_getxcomponentsize) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, const void \*window, uint64_t \*width, uint64_t \*height) | Obtains the size of the surface held by the ArkUI XComponent. |
| [OH_NativeXComponent_GetXComponentOffset](#oh_nativexcomponent_getxcomponentoffset) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, const void \*window, double \*x, double \*y) | Obtains the offset of the ArkUI XComponent relative to the upper left vertex of the screen. |
| [OH_NativeXComponent_GetXComponentOffset](#oh_nativexcomponent_getxcomponentoffset) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, const void \*window, double \*x, double \*y) | Obtains the offset of the ArkUI XComponent relative to the upper left vertex of the screen.|
| [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) | Obtains the touch event scheduled by the ArkUI XComponent. |
| [OH_NativeXComponent_GetTouchPointToolType](#oh_nativexcomponent_gettouchpointtooltype) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, uint32_t pointIndex, [OH_NativeXComponent_TouchPointToolType](#oh_nativexcomponent_touchpointtooltype) \*toolType) | Obtains the ArkUI XComponent touch point tool type. |
| [OH_NativeXComponent_GetTouchPointTiltX](#oh_nativexcomponent_gettouchpointtiltx) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, uint32_t pointIndex, float \*tiltX) | Obtains the angle between the tilt of the ArkUI XComponent touch point and the x-axis. |
| [OH_NativeXComponent_GetTouchPointTiltY](#oh_nativexcomponent_gettouchpointtilty) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, uint32_t pointIndex, float \*tiltY) | Obtains the angle between the tilt of the ArkUI XComponent touch point and the y-axis. |
| [OH_NativeXComponent_GetTouchPointTiltX](#oh_nativexcomponent_gettouchpointtiltx) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, uint32_t pointIndex, float \*tiltX) | Obtains the angle between the Y-Z plane of the ArkUI XComponent touch point and the x-axis. |
| [OH_NativeXComponent_GetTouchPointTiltY](#oh_nativexcomponent_gettouchpointtilty) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, uint32_t pointIndex, float \*tiltY) | Obtains the angle between the X-Z plane of the ArkUI XComponent touch point and the y-axis. |
| [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) | Obtains the mouse event scheduled by ArkUI XComponent. |
| [OH_NativeXComponent_RegisterCallback](#oh_nativexcomponent_registercallback) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, [OH_NativeXComponent_Callback](_o_h___native_x_component___callback.md) \*callback) | Registers a callback for this **OH_NativeXComponent** instance. |
| [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) | Registers a mouse event callback for this **OH_NativeXComponent** instance. |
| [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) | Registers the mouse event callback for this **OH_NativeXComponent** instance. |
| [OH_NativeXComponent_RegisterFocusEventCallback](#oh_nativexcomponent_registerfocuseventcallback) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, void(\*callback)([OH_NativeXComponent](#oh_nativexcomponent) \*component, void \*window)) | Registers the focus obtaining event callback for this **OH_NativeXComponent** instance. |
| [OH_NativeXComponent_RegisterKeyEventCallback](#oh_nativexcomponent_registerkeyeventcallback) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, void(\*callback)([OH_NativeXComponent](#oh_nativexcomponent) \*component, void \*window)) | Registers the key event callback for this **OH_NativeXComponent** instance. |
| [OH_NativeXComponent_RegisterBlurEventCallback](#oh_nativexcomponent_registerblureventcallback) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, void(\*callback)([OH_NativeXComponent](#oh_nativexcomponent) \*component, void \*window)) | Registers the focus loss event callback for this **OH_NativeXComponent** instance. |
| [OH_NativeXComponent_GetKeyEvent](#oh_nativexcomponent_getkeyevent) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, [OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent) \*\*keyEvent) | Obtains the key event scheduled by the ArkUI XComponent. |
| [OH_NativeXComponent_GetKeyEventAction](#oh_nativexcomponent_getkeyeventaction) ([OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent) \*keyEvent, [OH_NativeXComponent_KeyAction](#oh_nativexcomponent_keyaction) \*action) | Obtains the action of the specified key event. |
| [OH_NativeXComponent_GetKeyEventCode](#oh_nativexcomponent_getkeyeventcode) ([OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent) \*keyEvent, [OH_NativeXComponent_KeyCode](#oh_nativexcomponent_keycode) \*code) | Obtains the key code of the specified key event. |
| [OH_NativeXComponent_GetKeyEventSourceType](#oh_nativexcomponent_getkeyeventsourcetype) ([OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent) \*keyEvent, [OH_NativeXComponent_EventSourceType](#oh_nativexcomponent_eventsourcetype) \*sourceType) | Obtains the source type of the specified key event. |
| [OH_NativeXComponent_GetKeyEventDeviceId](#oh_nativexcomponent_getkeyeventdeviceid) ([OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent) \*keyEvent, int64_t \*deviceId) | Obtains the device ID of the specified key event. |
| [OH_NativeXComponent_GetKeyEventTimeStamp](#oh_nativexcomponent_getkeyeventtimestamp) ([OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent) \*keyEvent, int64_t \*timeStamp) | Obtains the timestamp of the specified key event. |
### Variables
| Name | Description |
| -------- | -------- |
| [OH_XCOMPONENT_ID_LEN_MAX](#oh_xcomponent_id_len_max) = 128 | Maximum length of an ArkUI XComponent ID. |
| [OH_MAX_TOUCH_POINTS_NUMBER](#oh_max_touch_points_number) = 10 | Maximum number of identifiable touch points in a touch event. |
| ---------------------------------------- | ------------------------------ |
| **OH_XCOMPONENT_ID_LEN_MAX** = 128 | Maximum length of the ArkUI XComponent ID. |
| **OH_MAX_TOUCH_POINTS_NUMBER** = 10 | Maximum number of identifiable touch points in a touch event. |
| [OH_NativeXComponent_TouchPoint::id](#id-12) = 0 | Unique identifier of the finger. |
| [OH_NativeXComponent_TouchPoint::screenX](#screenx-13) = 0.0 | X coordinate of the touch point relative to the left edge of the screen. |
| [OH_NativeXComponent_TouchPoint::screenY](#screeny-13) = 0.0 | Y coordinate of the touch point relative to the left edge of the screen. |
| [OH_NativeXComponent_TouchPoint::screenX](#screenx-13) = 0.0 | X coordinate of the touch point relative to the left edge of the application window where the XComponent is located.|
| [OH_NativeXComponent_TouchPoint::screenY](#screeny-13) = 0.0 | Y coordinate of the touch point relative to the left edge of the application window where the XComponent is located.|
| [OH_NativeXComponent_TouchPoint::x](#x-13) = 0.0 | X coordinate of the touch point relative to the left edge of the XComponent. |
| [OH_NativeXComponent_TouchPoint::y](#y-13) = 0.0 | Y coordinate of the touch point relative to the upper edge of the XComponent. |
| [OH_NativeXComponent_TouchPoint::type](#type-12) = OH_NativeXComponent_TouchEventType::OH_NATIVEXCOMPONENT_UNKNOWN | Touch type of the touch event. |
| [OH_NativeXComponent_TouchPoint::size](#size-12) = 0.0 | Contact area between the finger pad and the screen. |
| [OH_NativeXComponent_TouchPoint::force](#force-12) = 0.0 | Pressure of the current touch event. |
| [OH_NativeXComponent_TouchPoint::timeStamp](#timestamp-12) = 0 | Timestamp of the current touch event. |
| [OH_NativeXComponent_TouchPoint::force](#force-12) = 0.0 | Pressure of the touch event. |
| [OH_NativeXComponent_TouchPoint::timeStamp](#timestamp-12) = 0 | Timestamp of the touch point. |
| [OH_NativeXComponent_TouchPoint::isPressed](#ispressed) = false | Whether the current point is pressed. |
| [OH_NativeXComponent_TouchEvent::id](#id-22) = 0 | Unique identifier of the finger. |
| [OH_NativeXComponent_TouchEvent::screenX](#screenx-23) = 0.0 | X coordinate of the touch point relative to the left edge of the screen. |
| [OH_NativeXComponent_TouchEvent::screenY](#screeny-23) = 0.0 | Y coordinate of the touch point relative to the left edge of the screen. |
| [OH_NativeXComponent_TouchEvent::screenY](#screeny-23) = 0.0 | Y coordinate of the touch point relative to the upper edge of the screen. |
| [OH_NativeXComponent_TouchEvent::x](#x-23) = 0.0 | X coordinate of the touch point relative to the left edge of the XComponent. |
| [OH_NativeXComponent_TouchEvent::y](#y-23) = 0.0 | Y coordinate of the touch point relative to the upper edge of the XComponent. |
| [OH_NativeXComponent_TouchEvent::type](#type-22) = OH_NativeXComponent_TouchEventType::OH_NATIVEXCOMPONENT_UNKNOWN | Touch type of the touch event. |
| [OH_NativeXComponent_TouchEvent::size](#size-22) = 0.0 | Contact area between the finger pad and the screen. |
| [OH_NativeXComponent_TouchEvent::force](#force-22) = 0.0 | Pressure of the current touch event. |
| [OH_NativeXComponent_TouchEvent::force](#force-22) = 0.0 | Pressure of the touch event. |
| [OH_NativeXComponent_TouchEvent::deviceId](#deviceid) = 0 | ID of the device where the current touch event is triggered. |
| [OH_NativeXComponent_TouchEvent::timeStamp](#timestamp-22) = 0 | Timestamp of the current touch event. |
| [OH_NativeXComponent_TouchEvent::touchPoints](#touchpoints) [OH_MAX_TOUCH_POINTS_NUMBER] | Array of the current touch points. |
| [OH_NativeXComponent_TouchEvent::timeStamp](#timestamp-22) = 0 | Timestamp of the touch event. |
| [OH_NativeXComponent_TouchEvent::touchPoints](#touchpoints) [OH_MAX_TOUCH_POINTS_NUMBER] | Array of the touch points. |
| [OH_NativeXComponent_TouchEvent::numPoints](#numpoints) = 0 | Number of current touch points. |
| [OH_NativeXComponent_MouseEvent::x](#x-33) = 0.0 | X coordinate of the clicked point relative to the upper left corner of the component. |
| [OH_NativeXComponent_MouseEvent::y](#y-33) = 0.0 | Y coordinate of the clicked point relative to the upper left corner of the component. |
| [OH_NativeXComponent_MouseEvent::screenX](#screenx-33) = 0.0 | X coordinate of the clicked point relative to the upper left corner of the screen. |
| [OH_NativeXComponent_MouseEvent::screenY](#screeny-33) = 0.0 | Y coordinate of the clicked point relative to the upper left corner of the screen. |
| [OH_NativeXComponent_MouseEvent::timestamp](#timestamp) = 0 | Timestamp of the current mouse event. |
| [OH_NativeXComponent_MouseEvent::action](#action) = [OH_NativeXComponent_MouseEventAction::OH_NATIVEXCOMPONENT_MOUSE_NONE](#oh_nativexcomponent_mouseeventaction) | Current mouse event action. |
| [OH_NativeXComponent_MouseEvent::button](#button) = [OH_NativeXComponent_MouseEventButton::OH_NATIVEXCOMPONENT_NONE_BUTTON](#oh_nativexcomponent_mouseeventbutton) | Mouse event button |
| [OH_NativeXComponent_MouseEvent::y](#y-33)= 0.0 | Y coordinate of the clicked point relative to the upper left corner of the component. |
| [OH_NativeXComponent_MouseEvent::screenX](#screenx-33)= 0.0 | X coordinate of the clicked point relative to the upper left corner of the screen. |
| [OH_NativeXComponent_MouseEvent::screenY](#screeny-33)= 0.0 | Y coordinate of the clicked point relative to the upper left corner of the screen. |
| [OH_NativeXComponent_MouseEvent::timestamp](#timestamp)= 0 | Timestamp of the mouse event. |
| [OH_NativeXComponent_MouseEvent::action](#action)= [OH_NativeXComponent_MouseEventAction::OH_NATIVEXCOMPONENT_MOUSE_NONE](#oh_nativexcomponent_mouseeventaction) | Action of the mouse event. |
| [OH_NativeXComponent_MouseEvent::button](#button)= [OH_NativeXComponent_MouseEventButton::OH_NATIVEXCOMPONENT_NONE_BUTTON](#oh_nativexcomponent_mouseeventbutton) | Enumerates the mouse event buttons. |
| [OH_NativeXComponent_Callback::OnSurfaceCreated](#onsurfacecreated) | Invoked when a surface is created. |
| [OH_NativeXComponent_Callback::OnSurfaceChanged](#onsurfacechanged) | Invoked when the surface changes. |
| [OH_NativeXComponent_Callback::OnSurfaceDestroyed](#onsurfacedestroyed) | Invoked when the surface is destroyed. |
......@@ -112,8 +126,8 @@ Describes the surface and touch event held by the ArkUI XComponent, which can be
## Type Description
### OH_NativeXComponent
### OH_NativeXComponent
```
typedef struct OH_NativeXComponent OH_NativeXComponent
......@@ -121,31 +135,44 @@ typedef struct OH_NativeXComponent OH_NativeXComponent
**Description**
Provides an encapsulated OH_NativeXComponent instance.
Provides an encapsulated **OH_NativeXComponent** instance.
**Since:**
**Since**
8
### OH_NativeXComponent_Callback
```
typedef struct OH_NativeXComponent_Callback OH_NativeXComponent_Callback
```
**Description**
Registers a callback for the surface lifecycle and touch event.
Registers callbacks for the surface lifecycle and touch event.
**Since:**
**Since**
8
### OH_NativeXComponent_MouseEvent_Callback
### OH_NativeXComponent_KeyEvent
```
typedef struct OH_NativeXComponent_KeyEvent OH_NativeXComponent_KeyEvent
```
**Description**
Provides an encapsulated **OH_NativeXComponent_KeyEvent** instance.
**Since**
10
### OH_NativeXComponent_MouseEvent_Callback
```
typedef struct OH_NativeXComponent_MouseEvent_Callback OH_NativeXComponent_MouseEvent_Callback
......@@ -153,17 +180,17 @@ typedef struct OH_NativeXComponent_MouseEvent_Callback OH_NativeXComponent_Mouse
**Description**
Registers a callback for the mouse event.
Registers callbacks for the mouse event.
**Since:**
**Since**
9
## Enum Description
### anonymous enum
### anonymous enum
```
anonymous enum
......@@ -173,20 +200,18 @@ anonymous enum
Enumerates the API access states.
| Name | Description |
| ---------------------------------------- | ---------- |
| OH_NATIVEXCOMPONENT_RESULT_SUCCESS | Success result. |
| OH_NATIVEXCOMPONENT_RESULT_FAILED | Failure. |
| OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER | Invalid parameter. |
| Value | Description |
| ---------------------------------------- | ----- |
| OH_NATIVEXCOMPONENT_RESULT_SUCCESS | Success.|
| OH_NATIVEXCOMPONENT_RESULT_FAILED | Failure.|
| OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER | Invalid parameter.|
**Since:**
**Since**
8
### OH_NativeXComponent_EventSourceType
OH_NativeXComponent_EventSourceType
### OH_NativeXComponent_EventSourceType
```
enum OH_NativeXComponent_EventSourceType
......@@ -194,22 +219,392 @@ enum OH_NativeXComponent_EventSourceType
**Description**
Enumerates the source types of the touch event.
Enumerates the touch event source types.
| Name | Description |
| -------- | -------- |
| Value | Description |
| ---------------------------------------- | ------------------- |
| OH_NATIVEXCOMPONENT_SOURCE_TYPE_UNKNOWN | Unknown source type. |
| OH_NATIVEXCOMPONENT_SOURCE_TYPE_MOUSE | Source that generates a mouse multi-touch event. |
| OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHSCREEN | Source that generates a touchscreen multi-touch event. |
| OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHPAD | Source that generates a touchpad multi-touch event. |
| OH_NATIVEXCOMPONENT_SOURCE_TYPE_JOYSTICK | Source that generates a joystick multi-touch event. |
| OH_NATIVEXCOMPONENT_SOURCE_TYPE_MOUSE | Source that generates a mouse multi-click event. |
| OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHSCREEN | Source that generates a touchscreen multi-touch event.|
| OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHPAD | Source that generates a touchpad multi-touch event.|
| OH_NATIVEXCOMPONENT_SOURCE_TYPE_JOYSTICK | Source that generates a joystick multi-touch event.|
| OH_NATIVEXCOMPONENT_SOURCE_TYPE_KEYBOARD | Source that generates a key event. |
**Since:**
**Since**
9
### OH_NativeXComponent_MouseEventAction
### OH_NativeXComponent_KeyAction
```
enum OH_NativeXComponent_KeyAction
```
**Description**
Enumerates the key event actions.
| Value | Description |
| -------------------------------------- | -------- |
| OH_NATIVEXCOMPONENT_KEY_ACTION_UNKNOWN | Unknown key event action.|
| OH_NATIVEXCOMPONENT_KEY_ACTION_DOWN | Button press. |
| OH_NATIVEXCOMPONENT_KEY_ACTION_UP | Button release. |
**Since**
10
### OH_NativeXComponent_KeyCode
```
enum OH_NativeXComponent_KeyCode
```
**Description**
Enumerates the mouse event key codes.
| Value | Description |
| ---------------------------- | --------------------------- |
| KEY_UNKNOWN | Unknown key. |
| KEY_FN | Function (Fn) key. |
| KEY_HOME | Function (Home) key. |
| KEY_BACK | Back key. |
| KEY_MEDIA_PLAY_PAUSE | Multimedia key - play/pause. |
| KEY_MEDIA_STOP | Multimedia key - stop. |
| KEY_MEDIA_NEXT | Multimedia key - next song. |
| KEY_MEDIA_PREVIOUS | Multimedia key - previous song. |
| KEY_MEDIA_REWIND | Multimedia key - rewind. |
| KEY_MEDIA_FAST_FORWARD | Multimedia key - fast-forward. |
| KEY_VOLUME_UP | Volume Up key. |
| KEY_VOLUME_DOWN | Volume Down key. |
| KEY_POWER | Power key. |
| KEY_CAMERA | Camera key. |
| KEY_VOLUME_MUTE | Speaker Mute key. |
| KEY_MUTE | Microphone Mute key. |
| KEY_BRIGHTNESS_UP | Brightness key - turn up. |
| KEY_BRIGHTNESS_DOWN | Brightness key - turn down. |
| KEY_0 | Key **0**. |
| KEY_1 | Key **1**. |
| KEY_2 | Key **2**. |
| KEY_3 | Key **3**. |
| KEY_4 | Key **4**. |
| KEY_5 | Key **5**. |
| KEY_6 | Key **6**. |
| KEY_7 | Key **7**. |
| KEY_8 | Key **8**. |
| KEY_9 | Key **9**. |
| KEY_STAR | Key **\***. |
| KEY_POUND | Key **\#**. |
| KEY_DPAD_UP | Navigation key - up. |
| KEY_DPAD_DOWN | Navigation key - down. |
| KEY_DPAD_LEFT | Navigation key - left. |
| KEY_DPAD_RIGHT | Navigation key - right. |
| KEY_DPAD_CENTER | Navigation key - OK. |
| KEY_A | Key **A**. |
| KEY_B | Key **B**. |
| KEY_C | Key **C**. |
| KEY_D | Key **D**. |
| KEY_E | Key **E**. |
| KEY_F | Key **F**. |
| KEY_G | Key **G**. |
| KEY_H | Key **H**. |
| KEY_I | Key **I**. |
| KEY_J | Key **J**. |
| KEY_K | Key **K**. |
| KEY_L | Key **L**. |
| KEY_M | Key **M**. |
| KEY_N | Key **N**. |
| KEY_O | Key **O**. |
| KEY_P | Key **P**. |
| KEY_Q | Key **Q**. |
| KEY_R | Key **R**. |
| KEY_S | Key **S**. |
| KEY_T | Key **T**. |
| KEY_U | Key **U**. |
| KEY_V | Key **V**. |
| KEY_W | Key **W**. |
| KEY_X | Key **X**. |
| KEY_Y | Key **Y**. |
| KEY_Z | Key **Z**. |
| KEY_COMMA | Key **,**. |
| KEY_PERIOD | Key **.**. |
| KEY_ALT_LEFT | Left Alt key. |
| KEY_ALT_RIGHT | Right Alt key. |
| KEY_SHIFT_LEFT | Left Shift key. |
| KEY_SHIFT_RIGHT | Right Shift key. |
| KEY_TAB | Tab key. |
| KEY_SPACE | Space key. |
| KEY_SYM | Symbol key. |
| KEY_EXPLORER | Explorer key, which is used to start the explorer application. |
| KEY_ENVELOPE | Email key, which is used to start the email application. |
| KEY_ENTER | Enter key. |
| KEY_DEL | Delete key. |
| KEY_GRAVE | Key **`**. |
| KEY_MINUS | Key **-**. |
| KEY_EQUALS | Key **=**. |
| KEY_LEFT_BRACKET | Key **[**. |
| KEY_RIGHT_BRACKET | Key **]**. |
| KEY_BACKSLASH | Key **\**. |
| KEY_SEMICOLON | Key **;**. |
| KEY_APOSTROPHE | Key **'**. |
| KEY_SLASH | Key **/**. |
| KEY_AT | Key **\@**. |
| KEY_PLUS | Key **+**. |
| KEY_MENU | Menu key. |
| KEY_PAGE_UP | Page Up key. |
| KEY_PAGE_DOWN | Page Down key. |
| KEY_ESCAPE | ESC key. |
| KEY_FORWARD_DEL | Delete key. |
| KEY_CTRL_LEFT | Left Ctrl key. |
| KEY_CTRL_RIGHT | Right Ctrl key. |
| KEY_CAPS_LOCK | Caps Lock key. |
| KEY_SCROLL_LOCK | Scroll Lock key. |
| KEY_META_LEFT | Left Meta key. |
| KEY_META_RIGHT | Right Meta key. |
| KEY_FUNCTION | Function key. |
| KEY_SYSRQ | System Request/Print Screen key. |
| KEY_BREAK | Break/Pause key. |
| KEY_MOVE_HOME | Move to Home key. |
| KEY_MOVE_END | Move to End key. |
| KEY_INSERT | Insert key. |
| KEY_FORWARD | Forward key. |
| KEY_MEDIA_PLAY | Multimedia key - play. |
| KEY_MEDIA_PAUSE | Multimedia key - pause. |
| KEY_MEDIA_CLOSE | Multimedia key - close. |
| KEY_MEDIA_EJECT | Multimedia key - eject. |
| KEY_MEDIA_RECORD | Multimedia key - record. |
| KEY_F1 | F1 key. |
| KEY_F2 | F2 key. |
| KEY_F3 | F3 key. |
| KEY_F4 | F4 key. |
| KEY_F5 | F5 key. |
| KEY_F6 | F6 key. |
| KEY_F7 | F7 key. |
| KEY_F8 | F8 key. |
| KEY_F9 | F9 key. |
| KEY_F10 | F10 key. |
| KEY_F11 | F11 key. |
| KEY_F12 | F12 key. |
| KEY_NUM_LOCK | Number Lock key. |
| KEY_NUMPAD_0 | Key **0** on numeric keypad. |
| KEY_NUMPAD_1 | Key **1** on numeric keypad. |
| KEY_NUMPAD_2 | Key **2** on numeric keypad. |
| KEY_NUMPAD_3 | Key **3** on numeric keypad. |
| KEY_NUMPAD_4 | Key **4** on numeric keypad. |
| KEY_NUMPAD_5 | Key **5** on numeric keypad. |
| KEY_NUMPAD_6 | Key **6** on numeric keypad. |
| KEY_NUMPAD_7 | Key **7** on numeric keypad. |
| KEY_NUMPAD_8 | Key **8** on numeric keypad. |
| KEY_NUMPAD_9 | Key **9** on numeric keypad. |
| KEY_NUMPAD_DIVIDE | Key **/** on numeric keypad. |
| KEY_NUMPAD_MULTIPLY | Key ***** on numeric keypad. |
| KEY_NUMPAD_SUBTRACT | Key **-** on numeric keypad. |
| KEY_NUMPAD_ADD | Key **+** on numeric keypad. |
| KEY_NUMPAD_DOT | Key **.** on numeric keypad. |
| KEY_NUMPAD_COMMA | Key **,** on numeric keypad. |
| KEY_NUMPAD_ENTER | Enter key on numeric keypad. |
| KEY_NUMPAD_EQUALS | Key **=** on numeric keypad. |
| KEY_NUMPAD_LEFT_PAREN | Key **(** on numeric keypad. |
| KEY_NUMPAD_RIGHT_PAREN | Key **)** on numeric keypad. |
| KEY_VIRTUAL_MULTITASK | Multi-task key. |
| KEY_SLEEP | Sleep key. |
| KEY_ZENKAKU_HANKAKU | Zenkaku/Hankaku key. |
| KEY_102ND | 102nd key. |
| KEY_RO | Ro key. |
| KEY_KATAKANA | Katakana key. |
| KEY_HIRAGANA | Hiragana key. |
| KEY_HENKAN | Henkan key. |
| KEY_KATAKANA_HIRAGANA | Katakana/Hiragana key. |
| KEY_MUHENKAN | Muhenkan key. |
| KEY_LINEFEED | Linefeed key. |
| KEY_MACRO | Macro key. |
| KEY_NUMPAD_PLUSMINUS | Plus/Minus key on the numeric keypad. |
| KEY_SCALE | Scale key. |
| KEY_HANGUEL | Hanguel key. |
| KEY_HANJA | Hanja key. |
| KEY_YEN | Yen key. |
| KEY_STOP | Stop key. |
| KEY_AGAIN | Again key. |
| KEY_PROPS | Props key. |
| KEY_UNDO | Undo key. |
| KEY_COPY | Copy key. |
| KEY_OPEN | Open key. |
| KEY_PASTE | Paste key. |
| KEY_FIND | Find key. |
| KEY_CUT | Cut key. |
| KEY_HELP | Help key. |
| KEY_CALC | Calc key, which is used to start the calculator application. |
| KEY_FILE | File key. |
| KEY_BOOKMARKS | Bookmarks key. |
| KEY_NEXT | Next key. |
| KEY_PLAYPAUSE | Play/Pause key. |
| KEY_PREVIOUS | Previous key. |
| KEY_STOPCD | Stop CD key. |
| KEY_CONFIG | Config key. |
| KEY_REFRESH | Refresh key. |
| KEY_EXIT | Exit key. |
| KEY_EDIT | Edit key. |
| KEY_SCROLLUP | Scroll Up key. |
| KEY_SCROLLDOWN | Scroll Down key. |
| KEY_NEW | New key. |
| KEY_REDO | Redo key. |
| KEY_CLOSE | Close key. |
| KEY_PLAY | Play key. |
| KEY_BASSBOOST | Bass Boost key. |
| KEY_PRINT | Print key. |
| KEY_CHAT | Chat key. |
| KEY_FINANCE | Finance key. |
| KEY_CANCEL | Cancel key. |
| KEY_KBDILLUM_TOGGLE | Keyboard Illumination Toggle key. |
| KEY_KBDILLUM_DOWN | Keyboard Illumination Up key. |
| KEY_KBDILLUM_UP | Keyboard Illumination Down key. |
| KEY_SEND | Send key. |
| KEY_REPLY | Reply key. |
| KEY_FORWARDMAIL | Forward Mail key. |
| KEY_SAVE | Save key. |
| KEY_DOCUMENTS | Documents key. |
| KEY_VIDEO_NEXT | Next Video key. |
| KEY_VIDEO_PREV | Previous Video key. |
| KEY_BRIGHTNESS_CYCLE | Brightness Cycle key. |
| KEY_BRIGHTNESS_ZERO | Brightness Zero key. |
| KEY_DISPLAY_OFF | Display Off Key. |
| KEY_BTN_MISC | Misc Button key. |
| KEY_GOTO | Goto key. |
| KEY_INFO | Info key. |
| KEY_PROGRAM | Program key. |
| KEY_PVR | PVR key. |
| KEY_SUBTITLE | Subtitle key. |
| KEY_FULL_SCREEN | Full Screen key. |
| KEY_KEYBOARD | Keyboard. |
| KEY_ASPECT_RATIO | Aspect Ratio key. |
| KEY_PC | Port Control key. |
| KEY_TV | TV key. |
| KEY_TV2 | TV key 2. |
| KEY_VCR | VCR key. |
| KEY_VCR2 | VCR key 2. |
| KEY_SAT | SAT key. |
| KEY_CD | CD key. |
| KEY_TAPE | Tape key. |
| KEY_TUNER | Tuner key. |
| KEY_PLAYER | Player key. |
| KEY_DVD | DVD key. |
| KEY_AUDIO | Audio key. |
| KEY_VIDEO | Video key. |
| KEY_MEMO | Memo key. |
| KEY_CALENDAR | Calendar key. |
| KEY_RED | Red indicator. |
| KEY_GREEN | Green indicator. |
| KEY_YELLOW | Yellow indicator. |
| KEY_BLUE | Blue indicator. |
| KEY_CHANNELUP | Channel Up key. |
| KEY_CHANNELDOWN | Channel Down key. |
| KEY_LAST | Last key. |
| KEY_RESTART | Restart key. |
| KEY_SLOW | Slow key. |
| KEY_SHUFFLE | Shuffle key. |
| KEY_VIDEOPHONE | Videophone key. |
| KEY_GAMES | Games key. |
| KEY_ZOOMIN | Zoom in key. |
| KEY_ZOOMOUT | Zoom out key. |
| KEY_ZOOMRESET | Zoom Reset key. |
| KEY_WORDPROCESSOR | Word Processor key. |
| KEY_EDITOR | Editor key. |
| KEY_SPREADSHEET | Spreadsheet key. |
| KEY_GRAPHICSEDITOR | Graphics Editor key. |
| KEY_PRESENTATION | Presentation key. |
| KEY_DATABASE | Database key. |
| KEY_NEWS | News key. |
| KEY_VOICEMAIL | Voicemail key. |
| KEY_ADDRESSBOOK | Address book key. |
| KEY_MESSENGER | Messenger key. |
| KEY_BRIGHTNESS_TOGGLE | Brightness Toggle key. |
| KEY_SPELLCHECK | Spell Check key. |
| KEY_COFFEE | Coffee key, which is used to launch screen lock or screen saver. |
| KEY_MEDIA_REPEAT | Media Repeat key. |
| KEY_IMAGES | Images key. |
| KEY_BUTTONCONFIG | Button Configuration key. |
| KEY_TASKMANAGER | Task Manager key. |
| KEY_JOURNAL | Log key. |
| KEY_CONTROLPANEL | Control Panel key. |
| KEY_APPSELECT | App Select key. |
| KEY_SCREENSAVER | Screen Saver key. |
| KEY_ASSISTANT | Assistant key. |
| KEY_KBD_LAYOUT_NEXT | Next Keyboard Layout key. |
| KEY_BRIGHTNESS_MIN | Min Brightness key. |
| KEY_BRIGHTNESS_MAX | Max Brightness key. |
| KEY_KBDINPUTASSIST_PREV | Keyboard Input-assisted Previous key. |
| KEY_KBDINPUTASSIST_NEXT | Keyboard Input-assisted Next key. |
| KEY_KBDINPUTASSIST_PREVGROUP | Keyboard Input-assisted Previous key. |
| KEY_KBDINPUTASSIST_NEXTGROUP | Keyboard Input-assisted Next key. |
| KEY_KBDINPUTASSIST_ACCEPT | Keyboard Input-assisted Accept key. |
| KEY_KBDINPUTASSIST_CANCEL | Keyboard Input-assisted Cancel key. |
| KEY_FRONT | Front key, which is used to launch the windshield defogger. |
| KEY_SETUP | Setup key. |
| KEY_WAKEUP | Wakeup key. |
| KEY_SENDFILE | Send File key. |
| KEY_DELETEFILE | Delete File key. |
| KEY_XFER | XFER key, which is used to start file transfer. |
| KEY_PROG1 | Program key 1. |
| KEY_PROG2 | Program key 2. |
| KEY_MSDOS | MS-DOS key. |
| KEY_SCREENLOCK | Screen Lock key. |
| KEY_DIRECTION_ROTATE_DISPLAY | Directional Rotation Display key. |
| KEY_CYCLEWINDOWS | Windows Cycle key. |
| KEY_COMPUTER | Keys. |
| KEY_EJECTCLOSECD | Eject CD key. |
| KEY_ISO | ISO key. |
| KEY_MOVE | Move key. |
| KEY_F13 | F13 key. |
| KEY_F14 | F14 key. |
| KEY_F15 | F15 key. |
| KEY_F16 | F16 key. |
| KEY_F17 | F17 key. |
| KEY_F18 | F18 key. |
| KEY_F19 | F19 key. |
| KEY_F20 | F20 key. |
| KEY_F21 | F21 key. |
| KEY_F22 | F22 key. |
| KEY_F23 | F23 key. |
| KEY_F24 | F24 key. |
| KEY_PROG3 | Program key 3. |
| KEY_PROG4 | Program key 4. |
| KEY_DASHBOARD | Dashboard. |
| KEY_SUSPEND | Suspend key. |
| KEY_HP | HP key. |
| KEY_SOUND | Sound key. |
| KEY_QUESTION | Question key. |
| KEY_CONNECT | Connect key. |
| KEY_SPORT | Sport key. |
| KEY_SHOP | Shop key. |
| KEY_ALTERASE | Alternate key. |
| KEY_SWITCHVIDEOMODE | Switch Video Mode key (monitor, LCD, and TV, etc.).|
| KEY_BATTERY | Battery key. |
| KEY_BLUETOOTH | Bluetooth key. |
| KEY_WLAN | WLAN key. |
| KEY_UWB | Ultra-wideband key. |
| KEY_WWAN_WIMAX | WWAN WiMAX key. |
| KEY_RFKILL | RF Kill key. |
| KEY_CHANNEL | Channel key. |
| KEY_BTN_0 | Button 0. |
| KEY_BTN_1 | Button 1. |
| KEY_BTN_2 | Button 2. |
| KEY_BTN_3 | Button 3. |
| KEY_BTN_4 | Button 4. |
| KEY_BTN_5 | Button 5. |
| KEY_BTN_6 | Button 6. |
| KEY_BTN_7 | Button 7. |
| KEY_BTN_8 | Button 8. |
| KEY_BTN_9 | Button 9. |
**Since**
10
### OH_NativeXComponent_MouseEventAction
```
enum OH_NativeXComponent_MouseEventAction
......@@ -219,21 +614,20 @@ enum OH_NativeXComponent_MouseEventAction
Enumerates the mouse event actions.
| Name | Description |
| --------------------------------- | -------------------------------- |
| Value | Description |
| --------------------------------- | ---------------- |
| OH_NATIVEXCOMPONENT_MOUSE_NONE | Invalid mouse event. |
| OH_NATIVEXCOMPONENT_MOUSE_PRESS | The mouse event is triggered when a mouse button is pressed. |
| OH_NATIVEXCOMPONENT_MOUSE_RELEASE | The mouse event is triggered when a mouse button is released. |
| OH_NATIVEXCOMPONENT_MOUSE_MOVE | The mouse event is triggered when the mouse moves on the screen. |
| OH_NATIVEXCOMPONENT_MOUSE_PRESS | Mouse button press. |
| OH_NATIVEXCOMPONENT_MOUSE_RELEASE | Mouse button release. |
| OH_NATIVEXCOMPONENT_MOUSE_MOVE | Mouse movement.|
**Since:**
**Since**
9
### OH_NativeXComponent_MouseEventButton
```
enum OH_NativeXComponent_MouseEventButton
```
......@@ -242,23 +636,22 @@ enum OH_NativeXComponent_MouseEventButton
Enumerates the mouse event buttons.
| Name | Description |
| ---------------------------------- | ---------------------------------- |
| OH_NATIVEXCOMPONENT_NONE_BUTTON | The mouse event is triggered when no mouse button is pressed. |
| OH_NATIVEXCOMPONENT_LEFT_BUTTON | The mouse event is triggered when the left mouse button is pressed. |
| OH_NATIVEXCOMPONENT_RIGHT_BUTTON | The mouse event is triggered when the right mouse button is pressed. |
| OH_NATIVEXCOMPONENT_MIDDLE_BUTTON | The mouse event is triggered when the middle mouse button is pressed. |
| OH_NATIVEXCOMPONENT_BACK_BUTTON | The mouse event is triggered when the back button on the left of the mouse is pressed. |
| OH_NATIVEXCOMPONENT_FORWARD_BUTTON | The mouse event is triggered when the forward button on the left of the mouse is pressed. |
| Value | Description |
| ---------------------------------- | ----------------- |
| OH_NATIVEXCOMPONENT_NONE_BUTTON | No button. |
| OH_NATIVEXCOMPONENT_LEFT_BUTTON | Left mouse button. |
| OH_NATIVEXCOMPONENT_RIGHT_BUTTON | Right mouse button. |
| OH_NATIVEXCOMPONENT_MIDDLE_BUTTON | Middle mouse button. |
| OH_NATIVEXCOMPONENT_BACK_BUTTON | Back button on the left of the mouse.|
| OH_NATIVEXCOMPONENT_FORWARD_BUTTON | Forward key on the left of the mouse.|
**Since:**
**Since**
9
### OH_NativeXComponent_TouchEventType
```
enum OH_NativeXComponent_TouchEventType
```
......@@ -267,20 +660,20 @@ enum OH_NativeXComponent_TouchEventType
Enumerates the touch event types.
| Name | Description |
| --------------------------- | ------------------------------------------ |
| Value | Description |
| --------------------------- | --------------------- |
| OH_NATIVEXCOMPONENT_DOWN | The touch event is triggered when a finger is pressed. |
| OH_NATIVEXCOMPONENT_UP | The touch event is triggered when a finger is lifted. |
| OH_NATIVEXCOMPONENT_MOVE | The touch event is triggered when a finger is pressed and moves on the screen. |
| OH_NATIVEXCOMPONENT_MOVE | The touch event is triggered when a finger is moved on the screen.|
| OH_NATIVEXCOMPONENT_CANCEL | The event is triggered when a touch event is canceled. |
| OH_NATIVEXCOMPONENT_UNKNOWN | Invalid touch type. |
**Since:**
**Since**
8
### OH_NativeXComponent_TouchPointToolType
### OH_NativeXComponent_TouchPointToolType
```
enum OH_NativeXComponent_TouchPointToolType
......@@ -288,21 +681,21 @@ enum OH_NativeXComponent_TouchPointToolType
**Description**
Enumerates the contact point tool types.
Enumerates the touch point tool types.
| Name | Description |
| -------- | -------- |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_UNKNOWN | Unknown tool type. |
| Value | Description |
| -------------------------------------- | -------- |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_UNKNOWN | Unknown tool type.|
| OH_NATIVEXCOMPONENT_TOOL_TYPE_FINGER | Finger. |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_PEN | Stylus. |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_RUBBER | Eraser. |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_RUBBER | Rubber. |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_BRUSH | Brush. |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_PENCIL | Pencil. |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_AIRBRUSH | Air brush. |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_MOUSE | Mouse. |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_LENS | Lens. |
**Since:**
**Since**
9
......@@ -310,8 +703,163 @@ Enumerates the contact point tool types.
## Function Description
### OH_NativeXComponent_GetMouseEvent()
### OH_NativeXComponent_GetKeyEvent()
```
int32_t OH_NativeXComponent_GetKeyEvent (OH_NativeXComponent * component, OH_NativeXComponent_KeyEvent ** keyEvent )
```
**Description**
Obtains the key event scheduled by ArkUI XComponent.
**Parameters**
| Name | Description |
| --------- | ----------------------------- |
| component | Pointer to the **OH_NativeXComponent** instance.|
| keyEvent | Pointer to the current key event. |
**Returns**
Returns the status code of the execution.
**Since**
10
### OH_NativeXComponent_GetKeyEventAction()
```
int32_t OH_NativeXComponent_GetKeyEventAction (OH_NativeXComponent_KeyEvent * keyEvent, OH_NativeXComponent_KeyAction * action )
```
**Description**
Obtains the action of the specified key event.
**Parameters**
| Name | Description |
| -------- | -------------------------------------- |
| keyEvent | Pointer to the **OH_NativeXComponent_KeyEvent** instance.|
| action | Pointer to the key event action. |
**Returns**
Returns the status code of the execution.
**Since**
10
### OH_NativeXComponent_GetKeyEventCode()
```
int32_t OH_NativeXComponent_GetKeyEventCode (OH_NativeXComponent_KeyEvent * keyEvent, OH_NativeXComponent_KeyCode * code )
```
**Description**
Obtains the key code of the specified key event.
**Parameters**
| Name | Description |
| -------- | -------------------------------------- |
| keyEvent | Pointer to the **OH_NativeXComponent_KeyEvent** instance.|
| code | Pointer to the key code of the key event. |
**Returns**
Returns the status code of the execution.
**Since**
10
### OH_NativeXComponent_GetKeyEventDeviceId()
```
int32_t OH_NativeXComponent_GetKeyEventDeviceId (OH_NativeXComponent_KeyEvent * keyEvent, int64_t * deviceId )
```
**Description**
Obtains the device ID of the specified key event.
**Parameters**
| Name | Description |
| -------- | -------------------------------------- |
| keyEvent | Pointer to the **OH_NativeXComponent_KeyEvent** instance.|
| deviceId | Pointer to the device ID of the key event. |
**Returns**
Returns the status code of the execution.
**Since**
10
### OH_NativeXComponent_GetKeyEventSourceType()
```
int32_t OH_NativeXComponent_GetKeyEventSourceType (OH_NativeXComponent_KeyEvent * keyEvent, OH_NativeXComponent_EventSourceType * sourceType )
```
**Description**
Obtains the source type of the specified key event.
**Parameters**
| Name | Description |
| ---------- | -------------------------------------- |
| keyEvent | Pointer to the **OH_NativeXComponent_KeyEvent** instance.|
| sourceType | Pointer to the source type of the key event. |
**Returns**
Returns the status code of the execution.
**Since**
10
### OH_NativeXComponent_GetKeyEventTimeStamp()
```
int32_t OH_NativeXComponent_GetKeyEventTimeStamp (OH_NativeXComponent_KeyEvent * keyEvent, int64_t * timeStamp )
```
**Description**
Obtains the timestamp of the specified key event.
**Parameters**
| Name | Description |
| --------- | -------------------------------------- |
| keyEvent | Pointer to the **OH_NativeXComponent_KeyEvent** instance.|
| timeStamp | Pointer to the timestamp of the key event. |
**Returns**
Returns the status code of the execution.
**Since**
10
### OH_NativeXComponent_GetMouseEvent()
```
int32_t OH_NativeXComponent_GetMouseEvent (OH_NativeXComponent * component, const void * window, OH_NativeXComponent_MouseEvent * mouseEvent )
......@@ -324,23 +872,22 @@ Obtains the mouse event scheduled by ArkUI XComponent.
**Parameters**
| Name | Description |
| ---------- | --------------------------------------- |
| component | Indicates the pointer to an **OH_NativeXComponent** instance. |
| window | Indicates the pointer to a **NativeWindow** handle. |
| mouseEvent | Indicates the pointer to the current mouse event. |
| ---------- | ----------------------------- |
| component | Pointer to the **OH_NativeXComponent** instance.|
| window | Handle to the **NativeWindow** instance. |
| mouseEvent | Pointer to the current mouse event. |
**Returns**
Returns the status code of the operation.
Returns the status code of the execution.
**Since:**
**Since**
9
### OH_NativeXComponent_GetTouchEvent()
```
int32_t OH_NativeXComponent_GetTouchEvent (OH_NativeXComponent * component, const void * window, OH_NativeXComponent_TouchEvent * touchEvent )
```
......@@ -352,21 +899,21 @@ Obtains the touch event scheduled by the ArkUI XComponent.
**Parameters**
| Name | Description |
| ---------- | --------------------------------------- |
| component | Indicates the pointer to an **OH_NativeXComponent** instance. |
| window | Indicates the pointer to a **NativeWindow** handle. |
| touchEvent | Indicates the pointer to the current touch event. |
| ---------- | ----------------------------- |
| component | Pointer to the **OH_NativeXComponent** instance.|
| window | Handle to the **NativeWindow** instance. |
| touchEvent | Pointer to the current touch event. |
**Returns**
Returns the status code of the operation.
Returns the status code of the execution.
**Since:**
**Since**
8
### OH_NativeXComponent_GetTouchPointTiltX()
### OH_NativeXComponent_GetTouchPointTiltX()
```
int32_t OH_NativeXComponent_GetTouchPointTiltX (OH_NativeXComponent * component, uint32_t pointIndex, float * tiltX )
......@@ -374,56 +921,54 @@ int32_t OH_NativeXComponent_GetTouchPointTiltX (OH_NativeXComponent * component,
**Description**
Obtains the angle between the tilt of the ArkUI XComponent touch point and the x-axis.
Obtains the angle between the Y-Z plane of the ArkUI XComponent touch point and the x-axis.
**Parameters**
| Name | Description |
| -------- | -------- |
| component | Indicates the pointer to an **OH_NativeXComponent** instance. |
| pointIndex | Indicates the index of the pointer to a touch point. |
| tiltX | Indicates the pointer to the tilt along the x-axis. |
| ---------- | ----------------------------- |
| component | Pointer to the **OH_NativeXComponent** instance.|
| pointIndex | Pointer to the index of the touch point. |
| tiltX | Pointer to the angle between the Y-Z plane of the touch point and the x-axis. |
**Returns**
Returns the status code of the operation.
Returns the status code of the execution.
**Since:**
**Since**
9
### OH_NativeXComponent_GetTouchPointTiltY()
```
int32_t OH_NativeXComponent_GetTouchPointTiltX (OH_NativeXComponent * component, uint32_t pointIndex, float * tiltY )
int32_t OH_NativeXComponent_GetTouchPointTiltY (OH_NativeXComponent * component, uint32_t pointIndex, float * tiltY )
```
**Description**
Obtains the angle between the tilt of the ArkUI XComponent touch point and the y-axis.
Obtains the angle between the X-Z plane of the ArkUI XComponent touch point and the x-axis.
**Parameters**
| Name | Description |
| -------- | -------- |
| component | Indicates the pointer to an **OH_NativeXComponent** instance. |
| pointIndex | Indicates the index of the pointer to a touch point. |
| tiltY | Indicates the pointer to the tilt along the y-axis. |
| ---------- | ----------------------------- |
| component | Pointer to the **OH_NativeXComponent** instance.|
| pointIndex | Pointer to the index of the touch point. |
| tiltY | Pointer to the angle between the X-Z plane of the touch point and the y-axis. |
**Returns**
Returns the status code of the operation.
Returns the status code of the execution.
**Since:**
**Since**
9
### OH_NativeXComponent_GetTouchPointToolType()
```
int32_t OH_NativeXComponent_GetTouchPointToolType (OH_NativeXComponent * component, uint32_t pointIndex, OH_NativeXComponent_TouchPointToolType * toolType )
```
......@@ -435,51 +980,49 @@ Obtains the ArkUI XComponent touch point tool type.
**Parameters**
| Name | Description |
| -------- | -------- |
| component | Indicates the pointer to an **OH_NativeXComponent** instance. |
| pointIndex | Indicates the index of the pointer to a touch point. |
| toolType | Indicates the pointer to the tool type. |
| ---------- | ----------------------------- |
| component | Pointer to the **OH_NativeXComponent** instance.|
| pointIndex | Pointer to the index of the touch point. |
| toolType | Pointer to the tool type. |
**Returns**
Returns the status code of the operation.
Returns the status code of the execution.
**Since:**
**Since**
9
### OH_NativeXComponent_GetXComponentId()
```
int32_t OH_NativeXComponent_GetXComponentId (OH_NativeXComponent * component, char * id, uint64_t * size )
```
**Description**
Obtains the ID of the ArkUI XComponent.
Obtain the ID of ArkUI XComponent.
**Parameters**
| Name | Description |
| --------- | ------------------------------------- |
| component | Indicates the pointer to an **OH_NativeXComponent** instance. |
| id | Indicates the pointer to the character buffer used to hold the ID of the OH_NativeXComponent instance.<br>Note that the null terminator is attached to the character buffer, so the size of the character buffer should be at least one unit greater than the length of the real ID.<br>The recommended size of the character buffer is [OH_XCOMPONENT_ID_LEN_MAX + 1]. |
| size | Indicates the pointer to the length of the ID. |
| --------- | ---------------------------------------- |
| component | Pointer to the **OH_NativeXComponent** instance. |
| id | Pointer to the character buffer for storing the ID of the **OH_NativeXComponent** instance. Note that null terminators will be attached to the character buffer, so the size of the character buffer should be at least one unit greater than the length of the real ID. The recommended size is [OH_XCOMPONENT_ID_LEN_MAX + 1].|
| size | Pointer to the length of the ID. |
**Returns**
Returns the status code of the operation.
Returns the status code of the execution.
**Since:**
**Since**
8
### OH_NativeXComponent_GetXComponentOffset()
```
int32_t OH_NativeXComponent_GetXComponentOffset (OH_NativeXComponent * component, const void * window, double * x, double * y )
```
......@@ -491,24 +1034,23 @@ Obtains the offset of the ArkUI XComponent relative to the upper left vertex of
**Parameters**
| Name | Description |
| --------- | --------------------------------------- |
| component | Indicates the pointer to an **OH_NativeXComponent** instance. |
| window | Indicates the pointer to a **NativeWindow** handle. |
| x | Indicates the pointer to the x coordinate of the current surface. |
| y | Indicates the pointer to the y coordinate of the current surface. |
| --------- | ----------------------------- |
| component | Pointer to the **OH_NativeXComponent** instance.|
| window | Handle to the **NativeWindow** instance. |
| x | Pointer to the x coordinate of the current surface. |
| y | Pointer to the y coordinate of the current surface. |
**Returns**
Returns the status code of the operation.
Returns the status code of the execution.
**Since:**
**Since**
8
### OH_NativeXComponent_GetXComponentSize()
```
int32_t OH_NativeXComponent_GetXComponentSize (OH_NativeXComponent * component, const void * window, uint64_t * width, uint64_t * height )
```
......@@ -520,23 +1062,48 @@ Obtains the size of the surface held by the ArkUI XComponent.
**Parameters**
| Name | Description |
| --------- | --------------------------------------- |
| component | Indicates the pointer to an **OH_NativeXComponent** instance. |
| window | Indicates the pointer to a **NativeWindow** handle. |
| width | Indicates the pointer to the width of the current surface. |
| height | Indicates the pointer to the height of the current surface. |
| --------- | ----------------------------- |
| component | Pointer to the **OH_NativeXComponent** instance.|
| window | Handle to the **NativeWindow** instance. |
| width | Pointer to the width of the current surface. |
| height | Pointer to the height of the current surface. |
**Returns**
Returns the status code of the operation.
Returns the status code of the execution.
**Since:**
**Since**
8
### OH_NativeXComponent_RegisterCallback()
### OH_NativeXComponent_RegisterBlurEventCallback()
```
int32_t OH_NativeXComponent_RegisterBlurEventCallback (OH_NativeXComponent * component, void(*)(OH_NativeXComponent *component, void *window) callback )
```
**Description**
Registers the focus loss event callback for this **OH_NativeXComponent** instance.
**Parameters**
| Name | Description |
| --------- | ----------------------------- |
| component | Pointer to the **OH_NativeXComponent** instance.|
| callback | Pointer to the focus loss event callback. |
**Returns**
Returns the status code of the execution.
**Since**
8
### OH_NativeXComponent_RegisterCallback()
```
int32_t OH_NativeXComponent_RegisterCallback (OH_NativeXComponent * component, OH_NativeXComponent_Callback * callback )
......@@ -549,21 +1116,72 @@ Registers a callback for this **OH_NativeXComponent** instance.
**Parameters**
| Name | Description |
| --------- | --------------------------------------------- |
| component | Indicates the pointer to an **OH_NativeXComponent** instance. |
| callback | Indicates the pointer to the surface lifecycle and touch event callback.|
| --------- | ----------------------------- |
| component | Pointer to the **OH_NativeXComponent** instance.|
| callback | Pointer to the surface lifecycle and touch event callback. |
**Returns**
Returns the status code of the operation.
Returns the status code of the execution.
**Since:**
**Since**
8
### OH_NativeXComponent_RegisterMouseEventCallback()
### OH_NativeXComponent_RegisterFocusEventCallback()
```
int32_t OH_NativeXComponent_RegisterFocusEventCallback (OH_NativeXComponent * component, void(*)(OH_NativeXComponent *component, void *window) callback )
```
**Description**
Registers the focus obtaining event callback for this **OH_NativeXComponent** instance.
**Parameters**
| Name | Description |
| --------- | ----------------------------- |
| component | Pointer to the **OH_NativeXComponent** instance.|
| callback | Pointer to the focus obtaining event callback. |
**Returns**
Returns the status code of the execution.
**Since**
10
### OH_NativeXComponent_RegisterKeyEventCallback()
```
int32_t OH_NativeXComponent_RegisterKeyEventCallback (OH_NativeXComponent * component, void(*)(OH_NativeXComponent *component, void *window) callback )
```
**Description**
Registers the key event callback for this **OH_NativeXComponent** instance.
**Parameters**
| Name | Description |
| --------- | ----------------------------- |
| component | Pointer to the **OH_NativeXComponent** instance.|
| callback | Pointer to the key event callback. |
**Returns**
Returns the status code of the execution.
**Since**
10
### OH_NativeXComponent_RegisterMouseEventCallback()
```
int32_t OH_NativeXComponent_RegisterMouseEventCallback (OH_NativeXComponent * component, OH_NativeXComponent_MouseEvent_Callback * callback )
......@@ -571,20 +1189,20 @@ int32_t OH_NativeXComponent_RegisterMouseEventCallback (OH_NativeXComponent * co
**Description**
Registers a mouse event callback for this **OH_NativeXComponent** instance.
Registers the mouse event callback for this **OH_NativeXComponent** instance.
**Parameters**
| Name | Description |
| --------- | --------------------------------------- |
| component | Indicates the pointer to an **OH_NativeXComponent** instance. |
| callback | Indicates the pointer to the mouse event callback. |
| --------- | ----------------------------- |
| component | Pointer to the **OH_NativeXComponent** instance.|
| callback | Pointer to the mouse event callback. |
**Returns**
Returns the status code of the operation.
Returns the status code of the execution.
**Since:**
**Since**
9
......@@ -594,23 +1212,25 @@ Returns the status code of the operation.
### OH_XCOMPONENT_ID_LEN_MAX
```
const uint32_t OH_XCOMPONENT_ID_LEN_MAX = 128
```
**Description**
Maximum length of an ArkUI XComponent ID.
**Since:**
Maximum length of the ArkUI XComponent ID.
**Since**
8
### OH_MAX_TOUCH_POINTS_NUMBER
```
const uint32_t OH_MAX_TOUCH_POINTS_NUMBER = 10
```
......@@ -619,46 +1239,43 @@ const uint32_t OH_MAX_TOUCH_POINTS_NUMBER = 10
Maximum number of identifiable touch points in a touch event.
**Since:**
**Since**
8
### action
```
OH_NativeXComponent_MouseEventAction OH_NativeXComponent_MouseEvent::action
```
**Description**
Current mouse event action.
Action of the mouse event.
**Since:**
**Since**
8
### button
```
OH_NativeXComponent_MouseEventButton OH_NativeXComponent_MouseEvent::button
```
**Description**
Mouse event button
Mouse event button.
**Since:**
**Since**
8
### deviceId
```
int64_t OH_NativeXComponent_TouchEvent::deviceId = 0
```
......@@ -667,14 +1284,13 @@ int64_t OH_NativeXComponent_TouchEvent::deviceId = 0
ID of the device where the current touch event is triggered.
**Since:**
**Since**
8
### DispatchHoverEvent
```
void(* OH_NativeXComponent_MouseEvent_Callback::DispatchHoverEvent) (OH_NativeXComponent *component, bool isHover)
```
......@@ -683,14 +1299,13 @@ void(* OH_NativeXComponent_MouseEvent_Callback::DispatchHoverEvent) (OH_NativeXC
Invoked when a hover event is triggered.
**Since:**
**Since**
8
### DispatchMouseEvent
```
void(* OH_NativeXComponent_MouseEvent_Callback::DispatchMouseEvent) (OH_NativeXComponent *component, void *window)
```
......@@ -699,14 +1314,13 @@ void(* OH_NativeXComponent_MouseEvent_Callback::DispatchMouseEvent) (OH_NativeXC
Invoked when a mouse event is triggered.
**Since:**
**Since**
8
### DispatchTouchEvent
```
void(* OH_NativeXComponent_Callback::DispatchTouchEvent) (OH_NativeXComponent *component, void *window)
```
......@@ -715,46 +1329,43 @@ void(* OH_NativeXComponent_Callback::DispatchTouchEvent) (OH_NativeXComponent *c
Invoked when a touch event is triggered.
**Since:**
**Since**
8
### force [1/2]
```
float OH_NativeXComponent_TouchPoint::force = 0.0
```
**Description**
Pressure of the current touch event.
Pressure of the touch event.
**Since:**
**Since**
8
### force [2/2]
```
float OH_NativeXComponent_TouchEvent::force = 0.0
```
**Description**
Pressure of the current touch event.
Pressure of the touch event.
**Since:**
**Since**
8
### id [1/2]
```
int32_t OH_NativeXComponent_TouchPoint::id = 0
```
......@@ -763,14 +1374,13 @@ int32_t OH_NativeXComponent_TouchPoint::id = 0
Unique identifier of the finger.
**Since:**
**Since**
8
### id [2/2]
```
int32_t OH_NativeXComponent_TouchEvent::id = 0
```
......@@ -779,14 +1389,13 @@ int32_t OH_NativeXComponent_TouchEvent::id = 0
Unique identifier of the finger.
**Since:**
**Since**
8
### isPressed
```
bool OH_NativeXComponent_TouchPoint::isPressed = false
```
......@@ -795,14 +1404,13 @@ bool OH_NativeXComponent_TouchPoint::isPressed = false
Whether the current point is pressed.
**Since:**
**Since**
8
### numPoints
```
uint32_t OH_NativeXComponent_TouchEvent::numPoints = 0
```
......@@ -811,14 +1419,13 @@ uint32_t OH_NativeXComponent_TouchEvent::numPoints = 0
Number of current touch points.
**Since:**
**Since**
8
### OnSurfaceChanged
```
void(* OH_NativeXComponent_Callback::OnSurfaceChanged) (OH_NativeXComponent *component, void *window)
```
......@@ -827,14 +1434,13 @@ void(* OH_NativeXComponent_Callback::OnSurfaceChanged) (OH_NativeXComponent *com
Invoked when the surface changes.
**Since:**
**Since**
8
### OnSurfaceCreated
```
void(* OH_NativeXComponent_Callback::OnSurfaceCreated) (OH_NativeXComponent *component, void *window)
```
......@@ -843,14 +1449,13 @@ void(* OH_NativeXComponent_Callback::OnSurfaceCreated) (OH_NativeXComponent *com
Invoked when a surface is created.
**Since:**
**Since**
8
### OnSurfaceDestroyed
```
void(* OH_NativeXComponent_Callback::OnSurfaceDestroyed) (OH_NativeXComponent *component, void *window)
```
......@@ -859,46 +1464,43 @@ void(* OH_NativeXComponent_Callback::OnSurfaceDestroyed) (OH_NativeXComponent *c
Invoked when the surface is destroyed.
**Since:**
**Since**
8
### screenX [1/3]
```
float OH_NativeXComponent_TouchPoint::screenX = 0.0
```
**Description**
X coordinate of the touch point relative to the upper left corner of the application window where the XComponent is located.
X coordinate of the touch point relative to the left edge of the application window where the XComponent is located.
**Since:**
**Since**
8
### screenX [2/3]
```
float OH_NativeXComponent_TouchEvent::screenX = 0.0
```
**Description**
X coordinate of the touch point relative to the upper left corner of the application window where the XComponent is located.
X coordinate of the touch point relative to the left edge of the screen.
**Since:**
**Since**
8
### screenX [3/3]
```
float OH_NativeXComponent_MouseEvent::screenX
```
......@@ -907,46 +1509,43 @@ float OH_NativeXComponent_MouseEvent::screenX
X coordinate of the clicked point relative to the upper left corner of the screen.
**Since:**
**Since**
8
### screenY [1/3]
```
float OH_NativeXComponent_TouchPoint::screenY = 0.0
```
**Description**
Y coordinate of the touch point relative to the upper left corner of the application window where the XComponent is located.
Y coordinate of the touch point relative to the left edge of the application window where the XComponent is located.
**Since:**
**Since**
8
### screenY [2/3]
```
float OH_NativeXComponent_TouchEvent::screenY = 0.0
```
**Description**
Y coordinate of the touch point relative to the upper left corner of the application window where the XComponent is located.
Y coordinate of the touch point relative to the upper edge of the screen.
**Since:**
**Since**
8
### screenY [3/3]
```
float OH_NativeXComponent_MouseEvent::screenY
```
......@@ -955,14 +1554,13 @@ float OH_NativeXComponent_MouseEvent::screenY
Y coordinate of the clicked point relative to the upper left corner of the screen.
**Since:**
**Since**
8
### size [1/2]
```
double OH_NativeXComponent_TouchPoint::size = 0.0
```
......@@ -971,14 +1569,13 @@ double OH_NativeXComponent_TouchPoint::size = 0.0
Contact area between the finger pad and the screen.
**Since:**
**Since**
8
### size [2/2]
```
double OH_NativeXComponent_TouchEvent::size = 0.0
```
......@@ -987,94 +1584,88 @@ double OH_NativeXComponent_TouchEvent::size = 0.0
Contact area between the finger pad and the screen.
**Since:**
**Since**
8
### timeStamp [1/2]
```
long long OH_NativeXComponent_TouchPoint::timeStamp = 0
```
**Description**
Timestamp of the current touch event.
Timestamp of the touch point.
**Since:**
**Since**
8
### timeStamp [2/2]
```
long long OH_NativeXComponent_TouchEvent::timeStamp = 0
```
**Description**
Timestamp of the current touch event.
Timestamp of the touch event.
**Since:**
**Since**
8
### timestamp
```
int64_t OH_NativeXComponent_MouseEvent::timestamp
```
**Description**
Timestamp of the current mouse event.
Timestamp of the mouse event.
**Since:**
**Since**
8
### touchPoints
```
OH_NativeXComponent_TouchPoint OH_NativeXComponent_TouchEvent::touchPoints[OH_MAX_TOUCH_POINTS_NUMBER]
```
**Description**
Array of the current touch points.
Array of the touch points.
**Since:**
**Since**
8
### type [1/2]
```
OH_NativeXComponent_TouchEventType OH_NativeXComponent_TouchPoint::type = OH_NativeXComponent_TouchEventType::OH_NATIVEXCOMPONENT_UNKNOWN
```
**Description**
Touch type of the touch event.
Touch type of the touch point.
**Since:**
**Since**
8
### type [2/2]
```
OH_NativeXComponent_TouchEventType OH_NativeXComponent_TouchEvent::type = OH_NativeXComponent_TouchEventType::OH_NATIVEXCOMPONENT_UNKNOWN
```
......@@ -1083,14 +1674,13 @@ OH_NativeXComponent_TouchEventType OH_NativeXComponent_TouchEvent::type = OH_Nat
Touch type of the touch event.
**Since:**
**Since**
8
### x [1/3]
```
float OH_NativeXComponent_TouchPoint::x = 0.0
```
......@@ -1099,14 +1689,13 @@ float OH_NativeXComponent_TouchPoint::x = 0.0
X coordinate of the touch point relative to the left edge of the XComponent.
**Since:**
**Since**
8
### x [2/3]
```
float OH_NativeXComponent_TouchEvent::x = 0.0
```
......@@ -1115,14 +1704,13 @@ float OH_NativeXComponent_TouchEvent::x = 0.0
X coordinate of the touch point relative to the left edge of the XComponent.
**Since:**
**Since**
8
### x [3/3]
```
float OH_NativeXComponent_MouseEvent::x
```
......@@ -1131,14 +1719,13 @@ float OH_NativeXComponent_MouseEvent::x
X coordinate of the clicked point relative to the upper left corner of the component.
**Since:**
**Since**
8
### y [1/3]
```
float OH_NativeXComponent_TouchPoint::y = 0.0
```
......@@ -1147,14 +1734,13 @@ float OH_NativeXComponent_TouchPoint::y = 0.0
Y coordinate of the touch point relative to the upper edge of the XComponent.
**Since:**
**Since**
8
### y [2/3]
```
float OH_NativeXComponent_TouchEvent::y = 0.0
```
......@@ -1163,14 +1749,13 @@ float OH_NativeXComponent_TouchEvent::y = 0.0
Y coordinate of the touch point relative to the upper edge of the XComponent.
**Since:**
**Since**
8
### y [3/3]
```
float OH_NativeXComponent_MouseEvent::y
```
......@@ -1179,6 +1764,6 @@ float OH_NativeXComponent_MouseEvent::y
Y coordinate of the clicked point relative to the upper left corner of the component.
**Since:**
**Since**
8
......@@ -3,7 +3,7 @@
## Overview
Registers a callback for the surface lifecycle and touch event.
Registers callbacks for the surface lifecycle and touch event.
**Since:**
8
......
......@@ -3,7 +3,7 @@
## Overview
Registers a callback for the mouse event.
Registers callbacks for the mouse event.
**Since:**
9
......
......@@ -3,13 +3,13 @@
## Overview
Declares the APIs used to access the native XComponent.
Declares the APIs for accessing **NativeXComponent**.
**Since:**
**Since**
8
**Related Modules:**
**Related Modules**
[Native XComponent](_o_h___native_x_component.md)
......@@ -20,49 +20,64 @@ Declares the APIs used to access the native XComponent.
### Structs
| Name | Description |
| -------- | -------- |
| ---------------------------------------- | --------------------- |
| [OH_NativeXComponent_TouchPoint](_o_h___native_x_component___touch_point.md) | Describes the touch point of the touch event. |
| [OH_NativeXComponent_TouchEvent](_o_h___native_x_component___touch_event.md) | Describes the touch event. |
| [OH_NativeXComponent_MouseEvent](_o_h___native_x_component___mouse_event.md) | Describes the mouse event.|
| [OH_NativeXComponent_Callback](_o_h___native_x_component___callback.md) | Registers a callback for the surface lifecycle and touch event. |
| [OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component___mouse_event___callback.md) | Registers a callback for the mouse event. |
| [OH_NativeXComponent_MouseEvent](_o_h___native_x_component___mouse_event.md) | Describes the mouse event. |
| [OH_NativeXComponent_Callback](_o_h___native_x_component___callback.md) | Registers callbacks for the surface lifecycle and touch event.|
| [OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component___mouse_event___callback.md) | Registers callbacks for the mouse event. |
### Types
| Name | Description |
| -------- | -------- |
| [OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) | Provides an encapsulated OH_NativeXComponent instance. |
| [OH_NativeXComponent_Callback](_o_h___native_x_component.md#oh_nativexcomponent_callback) | Registers a callback for the surface lifecycle and touch event. |
| [OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component.md#oh_nativexcomponent_mouseevent_callback) | Registers a callback for the mouse event. |
| ---------------------------------------- | ------------------------------------ |
| [OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) | Provides an encapsulated **OH_NativeXComponent** instance. |
| [OH_NativeXComponent_Callback](_o_h___native_x_component.md#oh_nativexcomponent_callback) | Registers callbacks for the surface lifecycle and touch event. |
| [OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component.md#oh_nativexcomponent_mouseevent_callback) | Registers callbacks for the mouse event. |
| [OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent) | Provides an encapsulated **OH_NativeXComponent_KeyEvent** instance.|
### Enums
| Name | Description |
| -------- | -------- |
| { OH_NATIVEXCOMPONENT_RESULT_SUCCESS = 0, <br/>OH_NATIVEXCOMPONENT_RESULT_FAILED = -1, <br/>OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER = -2} | [Enumerates](_o_h___native_x_component.md#anonymous-enum) the API access states. |
| [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 } | Enumerates the touch event types. |
| [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 } | Enumerates the mouse event actions. |
| [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 } | Enumerates the mouse event buttons. |
| ---------------------------------------- | ---------- |
| { OH_NATIVEXCOMPONENT_RESULT_SUCCESS = 0, OH_NATIVEXCOMPONENT_RESULT_FAILED = -1, OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER = -2 } | Enumerates the API access states.|
| [OH_NativeXComponent_TouchEventType](_o_h___native_x_component.md#oh_nativexcomponent_toucheventtype) {<br>OH_NATIVEXCOMPONENT_DOWN = 0, OH_NATIVEXCOMPONENT_UP, OH_NATIVEXCOMPONENT_MOVE, OH_NATIVEXCOMPONENT_CANCEL,<br>OH_NATIVEXCOMPONENT_UNKNOWN<br>} | Enumerates the touch event types. |
| [OH_NativeXComponent_TouchPointToolType](_o_h___native_x_component.md#oh_nativexcomponent_touchpointtooltype) {<br>OH_NATIVEXCOMPONENT_TOOL_TYPE_UNKNOWN = 0, OH_NATIVEXCOMPONENT_TOOL_TYPE_FINGER, OH_NATIVEXCOMPONENT_TOOL_TYPE_PEN, OH_NATIVEXCOMPONENT_TOOL_TYPE_RUBBER,<br>OH_NATIVEXCOMPONENT_TOOL_TYPE_BRUSH, OH_NATIVEXCOMPONENT_TOOL_TYPE_PENCIL, OH_NATIVEXCOMPONENT_TOOL_TYPE_AIRBRUSH, OH_NATIVEXCOMPONENT_TOOL_TYPE_MOUSE,<br>OH_NATIVEXCOMPONENT_TOOL_TYPE_LENS<br>} | Enumerates the touch point tool types. |
| [OH_NativeXComponent_EventSourceType](_o_h___native_x_component.md#oh_nativexcomponent_eventsourcetype) {<br>OH_NATIVEXCOMPONENT_SOURCE_TYPE_UNKNOWN = 0, OH_NATIVEXCOMPONENT_SOURCE_TYPE_MOUSE, OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHSCREEN, OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHPAD,<br>OH_NATIVEXCOMPONENT_SOURCE_TYPE_JOYSTICK, OH_NATIVEXCOMPONENT_SOURCE_TYPE_KEYBOARD<br>} | Enumerates the touch event source types. |
| [OH_NativeXComponent_MouseEventAction](_o_h___native_x_component.md#oh_nativexcomponent_mouseeventaction) { OH_NATIVEXCOMPONENT_MOUSE_NONE = 0, OH_NATIVEXCOMPONENT_MOUSE_PRESS, OH_NATIVEXCOMPONENT_MOUSE_RELEASE, OH_NATIVEXCOMPONENT_MOUSE_MOVE } | Enumerates the mouse event actions. |
| [OH_NativeXComponent_MouseEventButton](_o_h___native_x_component.md#oh_nativexcomponent_mouseeventbutton) {<br>OH_NATIVEXCOMPONENT_NONE_BUTTON = 0, OH_NATIVEXCOMPONENT_LEFT_BUTTON = 0x01, OH_NATIVEXCOMPONENT_RIGHT_BUTTON = 0x02, OH_NATIVEXCOMPONENT_MIDDLE_BUTTON = 0x04,<br>OH_NATIVEXCOMPONENT_BACK_BUTTON = 0x08, OH_NATIVEXCOMPONENT_FORWARD_BUTTON = 0x10<br>} | Enumerates the mouse event buttons. |
### Functions
| Name | Description |
| -------- | -------- |
| ---------------------------------------- | -------------------------------------- |
| [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) | Obtains the ID of the ArkUI XComponent. |
| [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) | Obtains the size of the surface held by the ArkUI XComponent. |
| [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) | Obtains the offset of the ArkUI XComponent relative to the upper left vertex of the screen. |
| [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) | Obtains the offset of the ArkUI XComponent relative to the upper left vertex of the screen.|
| [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) | Obtains the touch event scheduled by the ArkUI XComponent. |
| [OH_NativeXComponent_GetTouchPointToolType](_o_h___native_x_component.md#oh_nativexcomponent_gettouchpointtooltype) ([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) \*component, uint32_t pointIndex, [OH_NativeXComponent_TouchPointToolType](_o_h___native_x_component.md#oh_nativexcomponent_touchpointtooltype) \*toolType) | Obtains the ArkUI XComponent touch point tool type. |
| [OH_NativeXComponent_GetTouchPointTiltX](_o_h___native_x_component.md#oh_nativexcomponent_gettouchpointtiltx) ([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) \*component, uint32_t pointIndex, float \*tiltX) | Obtains the angle between the Y-Z plane of the ArkUI XComponent touch point and the x-axis. |
| [OH_NativeXComponent_GetTouchPointTiltY](_o_h___native_x_component.md#oh_nativexcomponent_gettouchpointtilty) ([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) \*component, uint32_t pointIndex, float \*tiltY) | Obtains the angle between the Y-Z plane of the ArkUI XComponent touch point and the y-axis. |
| [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) | Obtains the mouse event scheduled by ArkUI 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) | Registers a callback for this **OH_NativeXComponent** instance. |
| [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) | Registers a mouse event callback for this **OH_NativeXComponent** instance. |
| [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) | Registers the mouse event callback for this **OH_NativeXComponent** instance. |
| [OH_NativeXComponent_RegisterFocusEventCallback](_o_h___native_x_component.md#oh_nativexcomponent_registerfocuseventcallback) ([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) \*component, void(\*callback)([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) \*component, void \*window)) | Registers the focus obtaining event callback for this **OH_NativeXComponent** instance. |
| [OH_NativeXComponent_RegisterKeyEventCallback](_o_h___native_x_component.md#oh_nativexcomponent_registerkeyeventcallback) ([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) \*component, void(\*callback)([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) \*component, void \*window)) | Registers the key event callback for this **OH_NativeXComponent** instance. |
| [OH_NativeXComponent_RegisterBlurEventCallback](_o_h___native_x_component.md#oh_nativexcomponent_registerblureventcallback) ([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) \*component, void(\*callback)([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) \*component, void \*window)) | Registers the focus loss event callback for this **OH_NativeXComponent** instance. |
| [OH_NativeXComponent_GetKeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_getkeyevent) ([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) \*component, [OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent) \*\*keyEvent) | Obtains the key event scheduled by the ArkUI XComponent. |
| [OH_NativeXComponent_GetKeyEventAction](_o_h___native_x_component.md#oh_nativexcomponent_getkeyeventaction) ([OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent) \*keyEvent, [OH_NativeXComponent_KeyAction](_o_h___native_x_component.md#oh_nativexcomponent_keyaction) \*action) | Obtains the action of the specified key event. |
| [OH_NativeXComponent_GetKeyEventCode](_o_h___native_x_component.md#oh_nativexcomponent_getkeyeventcode) ([OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent) \*keyEvent, [OH_NativeXComponent_KeyCode](_o_h___native_x_component.md#oh_nativexcomponent_keycode) \*code) | Obtains the key code of the specified key event. |
| [OH_NativeXComponent_GetKeyEventSourceType](_o_h___native_x_component.md#oh_nativexcomponent_getkeyeventsourcetype) ([OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent) \*keyEvent, [OH_NativeXComponent_EventSourceType](_o_h___native_x_component.md#oh_nativexcomponent_eventsourcetype) \*sourceType) | Obtains the source type of the specified key event. |
| [OH_NativeXComponent_GetKeyEventDeviceId](_o_h___native_x_component.md#oh_nativexcomponent_getkeyeventdeviceid) ([OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent) \*keyEvent, int64_t \*deviceId) | Obtains the device ID of the specified key event. |
| [OH_NativeXComponent_GetKeyEventTimeStamp](_o_h___native_x_component.md#oh_nativexcomponent_getkeyeventtimestamp) ([OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent) \*keyEvent, int64_t \*timeStamp) | Obtains the timestamp of the specified key event. |
### Variables
| Name | Description |
| -------- | -------- |
| **OH_XCOMPONENT_ID_LEN_MAX** = 128 | Maximum length of an ArkUI XComponent ID. |
| ---------------------------------------- | ------------------------- |
| **OH_XCOMPONENT_ID_LEN_MAX** = 128 | Maximum length of the ArkUI XComponent ID.|
| **OH_MAX_TOUCH_POINTS_NUMBER** = 10 | Maximum number of identifiable touch points in a touch event. |
# native_xcomponent_key_event.h
## Overview
Declares the enums used for accessing **NativeXComponent** key events.
**Since**
10
**Related Modules**
[Native XComponent](_o_h___native_x_component.md)
## Summary
### Enums
| Name| Description|
| -------- | -------- |
| [OH_NativeXComponent_KeyCode](_o_h___native_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M&nbsp;=&nbsp;2051,&nbsp;KEY_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;=&n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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>} | Enumerates the mouse event key codes.|
| [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;} | Enumerates the key event actions.|
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册