1# Native XComponent 2 3 4## Overview 5 6Describes 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 [Native XComponent](../../ui/napi-xcomponent-guidelines.md). 7 8> **NOTE** 9> 10> The APIs of this module are supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version. 11 12## Summary 13 14 15### Files 16 17| Name | Description | 18| ---------------------------------------- | ---------------------------------------- | 19| [native_interface_xcomponent.h](native__interface__xcomponent_8h.md) | Declares the APIs for accessing **NativeXComponent**.<br>**File to include**: <ace/xcomponent/native_interface_xcomponent.h><br>**Library**: libace_ndk.z.so| 20| [native_xcomponent_key_event.h](native__xcomponent__key__event_8h.md) | Declares the enums used to access **NativeXComponent** key events.<br>**File to include**: <ace/xcomponent/native_xcomponent_key_event.h><br>**Library**: libace_ndk.z.so| 21 22 23### Structs 24 25| Name | Description | 26| ---------------------------------------- | --------------------- | 27| [OH_NativeXComponent_TouchPoint](_o_h___native_x_component___touch_point.md) | Describes the touch point of the touch event. | 28| [OH_NativeXComponent_TouchEvent](_o_h___native_x_component___touch_event.md) | Describes the touch event. | 29| [OH_NativeXComponent_MouseEvent](_o_h___native_x_component___mouse_event.md) | Describes the mouse event. | 30| [OH_NativeXComponent_Callback](_o_h___native_x_component___callback.md) | Registers callbacks for the surface lifecycle and touch event.| 31| [OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component___mouse_event___callback.md) | Registers callbacks for the mouse event. | 32| [OH_NativeXComponent_ExpectedRateRange](_o_h___native_x_component___expected_rate_range.md) | Defines the expected frame rate range. | 33 34 35### Types 36 37| Name | Description | 38| ---------------------------------------- | ------------------------------------ | 39| [OH_NativeXComponent](#oh_nativexcomponent) | Provides an encapsulated **OH_NativeXComponent** instance. | 40| [OH_NativeXComponent_Callback](#oh_nativexcomponent_callback) | Registers callbacks for the surface lifecycle and touch event. | 41| [OH_NativeXComponent_MouseEvent_Callback](#oh_nativexcomponent_mouseevent_callback) | Registers callbacks for the mouse event. | 42| [OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent) | Provides an encapsulated **OH_NativeXComponent_KeyEvent** instance.| 43 44 45### Enums 46 47| Name | Description | 48| ---------------------------------------- | ---------- | 49| { OH_NATIVEXCOMPONENT_RESULT_SUCCESS = 0, OH_NATIVEXCOMPONENT_RESULT_FAILED = -1, OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER = -2 } | Enumerates the API access states.| 50| [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. | 51| [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. | 52| [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. | 53| [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. | 54| [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. | 55| [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. | 56| [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. | 57 58 59### Functions 60 61| Name | Description | 62| ---------------------------------------- | -------------------------------------- | 63| [OH_NativeXComponent_GetXComponentId](#oh_nativexcomponent_getxcomponentid) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, char \*id, uint64_t \*size) | Obtains the ID of the ArkUI XComponent. | 64| [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. | 65| [OH_NativeXComponent_GetXComponentOffset](#oh_nativexcomponent_getxcomponentoffset) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, const void \*window, double \*x, double \*y) | Obtains the offset of the surface held by the XComponent relative to the upper left corner of its parent component.| 66| [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. | 67| [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. | 68| [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. | 69| [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. | 70| [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. | 71| [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. | 72| [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. | 73| [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. | 74| [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. | 75| [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. | 76| [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. | 77| [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. | 78| [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. | 79| [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. | 80| [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. | 81| [OH_NativeXComponent_GetKeyEventTimeStamp](#oh_nativexcomponent_getkeyeventtimestamp) ([OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent) \*keyEvent, int64_t \*timeStamp) | Obtains the timestamp of the specified key event. | 82| [OH_NativeXComponent_SetExpectedFrameRateRange](#oh_nativexcomponent_setexpectedframeraterange) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, [OH_NativeXComponent_ExpectedRateRange](_o_h___native_x_component___expected_rate_range.md) \*range) | Sets the expected frame rate range. | 83| [OH_NativeXComponent_RegisterOnFrameCallback](#oh_nativexcomponent_registeronframecallback) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, void(\*callback)([OH_NativeXComponent](#oh_nativexcomponent) \*component, uint64_t timestamp, uint64_t targetTimestamp)) | Registers the display update callback for this **OH_NativeXComponent** instance and enables the callback for each frame.| 84| [OH_NativeXComponent_UnregisterOnFrameCallback](#oh_nativexcomponent_unregisteronframecallback) ([OH_NativeXComponent](#oh_nativexcomponent) \*component) | Deregisters the display update callback for this **OH_NativeXComponent** instance and disables the callback for each frame.| 85| int32_t [OH_NativeXComponent_AttachNativeRootNode](#oh_nativexcomponent_attachnativerootnode) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, [ArkUI_NodeHandle](_ark_u_i___native_module.md#arkui_nodehandle) root) | Attaches the UI component created through the native API of ArkUI to this **OH_NativeXComponent** instance. | 86| int32_t [OH_NativeXComponent_DetachNativeRootNode](#oh_nativexcomponent_detachnativerootnode) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, [ArkUI_NodeHandle](_ark_u_i___native_module.md#arkui_nodehandle) root) | Detaches the native component of ArkUI from this **OH_NativeXComponent** instance. | 87| int32_t [OH_NativeXComponent_RegisterUIInputEventCallback](#oh_nativexcomponent_registeruiinputeventcallback) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, void(\*callback)([OH_NativeXComponent](#oh_nativexcomponent) \*component, [ArkUI_UIInputEvent](_ark_u_i___event_module.md#arkui_uiinputevent) \*event, [ArkUI_UIInputEvent_Type](_ark_u_i___event_module.md#arkui_uiinputevent_type) type), [ArkUI_UIInputEvent_Type](_ark_u_i___event_module.md#arkui_uiinputevent_type) type) | Registers a UI input event callback for an **OH_NativeXComponent** instance and enables the callback to be invoked when a UI input event is received. | 88| int32_t [OH_NativeXComponent_RegisterOnTouchInterceptCallback](#oh_nativexcomponent_registerontouchinterceptcallback) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, [HitTestMode](_ark_u_i___native_module.md#arkui_hittestmode)(\*callback)([OH_NativeXComponent](#oh_nativexcomponent) \*component, [ArkUI_UIInputEvent](_ark_u_i___event_module.md#arkui_uiinputevent) \*event)) | Registers a custom event intercept callback for an **OH_NativeXComponent** and enables the callback during the hit test. | 89| int32_t [OH_NativeXComponent_SetNeedSoftKeyboard](#oh_nativexcomponent_setneedsoftkeyboard) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, bool isNeedSoftKeyboard) | Sets whether the soft keyboard is required for an **OH_NativeXComponent** instance. | 90| int32_t [OH_NativeXComponent_RegisterSurfaceShowCallback](#oh_nativexcomponent_registersurfaceshowcallback) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, void(\*callback)([OH_NativeXComponent](#oh_nativexcomponent) \*component, void \*window)) | Registers a surface display callback for an **OH_NativeXComponent** instance. The callback is invoked whenever the application is switched to the foreground.| 91| int32_t [OH_NativeXComponent_RegisterSurfaceHideCallback](#oh_nativexcomponent_registersurfacehidecallback) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, void(\*callback)([OH_NativeXComponent](#oh_nativexcomponent) \*component, void \*window)) | Registers a surface hiding callback for an **OH_NativeXComponent** instance. The callback is invoked whenever the application is switched to the background.| 92| int32_t [OH_NativeXComponent_GetTouchEventSourceType](#oh_nativexcomponent_gettoucheventsourcetype) ([OH_NativeXComponent](#oh_nativexcomponent) \*component, int32_t pointId, [OH_NativeXComponent_EventSourceType](#oh_nativexcomponent_eventsourcetype) \*sourceType) | Obtains the touch event source type of an **OH_NativeXComponent** instance. | 93| [OH_NativeXComponent](#oh_nativexcomponent) \* [OH_NativeXComponent_GetNativeXComponent](#oh_nativexcomponent_getnativexcomponent) ([ArkUI_NodeHandle](_ark_u_i___native_module.md#arkui_nodehandle) node) | Obtains the pointer to an **OH_NativeXComponent** instance based on the specified component instance created by the native API. | 94| int32_t OH_NativeXComponent_GetNativeAccessibilityProvider(OH_NativeXComponent* component, ArkUI_AccessibilityProvider** handle); | | 95 96### Variables 97 98| Name | Description | 99| ---------------------------------------- | ------------------------------ | 100| **OH_XCOMPONENT_ID_LEN_MAX** = 128 | Maximum length of the ArkUI XComponent ID. | 101| **OH_MAX_TOUCH_POINTS_NUMBER** = 10 | Maximum number of identifiable touch points in a touch event. | 102| [OH_NativeXComponent_TouchPoint::id](#id-12) = 0 | Unique identifier of the finger. | 103| [OH_NativeXComponent_TouchPoint::screenX](#screenx-13) = 0.0 | X coordinate of the touch point relative to the upper left corner of the application window where the XComponent is located.| 104| [OH_NativeXComponent_TouchPoint::screenY](#screeny-13) = 0.0 | Y coordinate of the touch point relative to the upper left corner of the application window where the XComponent is located.| 105| [OH_NativeXComponent_TouchPoint::x](#x-13) = 0.0 | X coordinate of the touch point relative to the left edge of the XComponent. | 106| [OH_NativeXComponent_TouchPoint::y](#y-13) = 0.0 | Y coordinate of the touch point relative to the upper edge of the XComponent. | 107| [OH_NativeXComponent_TouchPoint::type](#type-12) = OH_NativeXComponent_TouchEventType::OH_NATIVEXCOMPONENT_UNKNOWN | Touch type of the touch event. | 108| [OH_NativeXComponent_TouchPoint::size](#size-12) = 0.0 | Contact area between the finger pad and the screen. | 109| [OH_NativeXComponent_TouchPoint::force](#force-12) = 0.0 | Pressure of the touch event. | 110| [OH_NativeXComponent_TouchPoint::timeStamp](#timestamp-12) = 0 | Timestamp of the touch point. | 111| [OH_NativeXComponent_TouchPoint::isPressed](#ispressed) = false | Whether the current point is pressed. | 112| [OH_NativeXComponent_TouchEvent::id](#id-22) = 0 | Unique identifier of the finger. | 113| [OH_NativeXComponent_TouchEvent::screenX](#screenx-23) = 0.0 | X coordinate of the touch point relative to the left edge of the screen. | 114| [OH_NativeXComponent_TouchEvent::screenY](#screeny-23) = 0.0 | Y coordinate of the touch point relative to the upper edge of the screen. | 115| [OH_NativeXComponent_TouchEvent::x](#x-23) = 0.0 | X coordinate of the touch point relative to the left edge of the XComponent. | 116| [OH_NativeXComponent_TouchEvent::y](#y-23) = 0.0 | Y coordinate of the touch point relative to the upper edge of the XComponent. | 117| [OH_NativeXComponent_TouchEvent::type](#type-22) = OH_NativeXComponent_TouchEventType::OH_NATIVEXCOMPONENT_UNKNOWN | Touch type of the touch event. | 118| [OH_NativeXComponent_TouchEvent::size](#size-22) = 0.0 | Contact area between the finger pad and the screen. | 119| [OH_NativeXComponent_TouchEvent::force](#force-22) = 0.0 | Pressure of the touch event. | 120| [OH_NativeXComponent_TouchEvent::deviceId](#deviceid) = 0 | ID of the device where the current touch event is triggered. | 121| [OH_NativeXComponent_TouchEvent::timeStamp](#timestamp-22) = 0 | Timestamp of the touch event. | 122| [OH_NativeXComponent_TouchEvent::touchPoints](#touchpoints) [OH_MAX_TOUCH_POINTS_NUMBER] | Array of the touch points. | 123| [OH_NativeXComponent_TouchEvent::numPoints](#numpoints) = 0 | Number of current touch points. | 124| [OH_NativeXComponent_MouseEvent::x](#x-33) = 0.0 | X coordinate of the clicked point relative to the upper left corner of the component. | 125| [OH_NativeXComponent_MouseEvent::y](#y-33)= 0.0 | Y coordinate of the clicked point relative to the upper left corner of the component. | 126| [OH_NativeXComponent_MouseEvent::screenX](#screenx-33)= 0.0 | X coordinate of the clicked point relative to the upper left corner of the screen. | 127| [OH_NativeXComponent_MouseEvent::screenY](#screeny-33)= 0.0 | Y coordinate of the clicked point relative to the upper left corner of the screen. | 128| [OH_NativeXComponent_MouseEvent::timestamp](#timestamp)= 0 | Timestamp of the mouse event. | 129| [OH_NativeXComponent_MouseEvent::action](#action)= [OH_NativeXComponent_MouseEventAction::OH_NATIVEXCOMPONENT_MOUSE_NONE](#oh_nativexcomponent_mouseeventaction) | Action of the mouse event. | 130| [OH_NativeXComponent_MouseEvent::button](#button)= [OH_NativeXComponent_MouseEventButton::OH_NATIVEXCOMPONENT_NONE_BUTTON](#oh_nativexcomponent_mouseeventbutton) | Enumerates the mouse event buttons. | 131| [OH_NativeXComponent_Callback::OnSurfaceCreated](#onsurfacecreated) | Invoked when a surface is created. | 132| [OH_NativeXComponent_Callback::OnSurfaceChanged](#onsurfacechanged) | Invoked when the surface changes. | 133| [OH_NativeXComponent_Callback::OnSurfaceDestroyed](#onsurfacedestroyed) | Invoked when the surface is destroyed. | 134| [OH_NativeXComponent_Callback::DispatchTouchEvent](#dispatchtouchevent) | Invoked when a touch event is triggered. | 135| [OH_NativeXComponent_MouseEvent_Callback::DispatchMouseEvent](#dispatchmouseevent) | Invoked when a mouse event is triggered. | 136| [OH_NativeXComponent_MouseEvent_Callback::DispatchHoverEvent](#dispatchhoverevent) | Invoked when a hover event is triggered. | 137 138 139## Type Description 140 141 142### OH_NativeXComponent 143 144``` 145typedef struct OH_NativeXComponent OH_NativeXComponent 146``` 147 148**Description** 149 150Provides an encapsulated **OH_NativeXComponent** instance. 151 152**Since** 153 1548 155 156 157### OH_NativeXComponent_Callback 158 159``` 160typedef struct OH_NativeXComponent_Callback OH_NativeXComponent_Callback 161``` 162 163**Description** 164 165Registers callbacks for the surface lifecycle and touch event. 166 167**Since** 168 1698 170 171 172### OH_NativeXComponent_KeyEvent 173 174``` 175typedef struct OH_NativeXComponent_KeyEvent OH_NativeXComponent_KeyEvent 176``` 177 178**Description** 179 180Provides an encapsulated **OH_NativeXComponent_KeyEvent** instance. 181 182**Since** 183 18410 185 186 187### OH_NativeXComponent_MouseEvent_Callback 188 189``` 190typedef struct OH_NativeXComponent_MouseEvent_Callback OH_NativeXComponent_MouseEvent_Callback 191``` 192 193**Description** 194 195Registers callbacks for the mouse event. 196 197**Since** 198 1999 200 201 202## Enum Description 203 204 205### anonymous enum 206 207``` 208anonymous enum 209``` 210 211**Description** 212 213Enumerates the API access states. 214 215| Value | Description | 216| ---------------------------------------- | ----- | 217| OH_NATIVEXCOMPONENT_RESULT_SUCCESS | Success.| 218| OH_NATIVEXCOMPONENT_RESULT_FAILED | Failure.| 219| OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER | Invalid parameter.| 220 221**Since** 222 2238 224 225 226### OH_NativeXComponent_EventSourceType 227 228``` 229enum OH_NativeXComponent_EventSourceType 230``` 231 232**Description** 233 234Enumerates the touch event source types. 235 236| Value | Description | 237| ------------------------------------------- | ------------------------------------------------------ | 238| OH_NATIVEXCOMPONENT_SOURCE_TYPE_UNKNOWN | Unknown source type. | 239| OH_NATIVEXCOMPONENT_SOURCE_TYPE_MOUSE | Source that generates a mouse multi-click event. | 240| OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHSCREEN | Source that generates a touchscreen multi-touch event. | 241| OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHPAD | Source that generates a touchpad multi-touch event. | 242| OH_NATIVEXCOMPONENT_SOURCE_TYPE_JOYSTICK | Source that generates a joystick multi-touch event. | 243| OH_NATIVEXCOMPONENT_SOURCE_TYPE_KEYBOARD<sup>10+</sup> | Source that generates a key event. | 244 245**Since** 246 2479 248 249 250### OH_NativeXComponent_KeyAction 251 252``` 253enum OH_NativeXComponent_KeyAction 254``` 255 256**Description** 257 258Enumerates the key event actions. 259 260| Value | Description | 261| -------------------------------------- | -------- | 262| OH_NATIVEXCOMPONENT_KEY_ACTION_UNKNOWN | Unknown key event action.| 263| OH_NATIVEXCOMPONENT_KEY_ACTION_DOWN | Button press. | 264| OH_NATIVEXCOMPONENT_KEY_ACTION_UP | Button release. | 265 266**Since** 267 26810 269 270 271### OH_NativeXComponent_KeyCode 272 273``` 274enum OH_NativeXComponent_KeyCode 275``` 276 277**Description** 278 279Enumerates the mouse event key codes. 280 281| Value | Description | 282| ---------------------------- | --------------------------- | 283| KEY_UNKNOWN | Unknown key. | 284| KEY_FN | Function (Fn) key. | 285| KEY_HOME | Function (Home) key. | 286| KEY_BACK | Back key. | 287| KEY_MEDIA_PLAY_PAUSE | Multimedia key - play/pause. | 288| KEY_MEDIA_STOP | Multimedia key - stop. | 289| KEY_MEDIA_NEXT | Multimedia key - next song. | 290| KEY_MEDIA_PREVIOUS | Multimedia key - previous song. | 291| KEY_MEDIA_REWIND | Multimedia key - rewind. | 292| KEY_MEDIA_FAST_FORWARD | Multimedia key - fast-forward. | 293| KEY_VOLUME_UP | Volume Up key. | 294| KEY_VOLUME_DOWN | Volume Down key. | 295| KEY_POWER | Power key. | 296| KEY_CAMERA | Camera key. | 297| KEY_VOLUME_MUTE | Speaker Mute key. | 298| KEY_MUTE | Microphone Mute key. | 299| KEY_BRIGHTNESS_UP | Brightness key - turn up. | 300| KEY_BRIGHTNESS_DOWN | Brightness key - turn down. | 301| KEY_0 | Key **0**. | 302| KEY_1 | Key **1**. | 303| KEY_2 | Key **2**. | 304| KEY_3 | Key **3**. | 305| KEY_4 | Key **4**. | 306| KEY_5 | Key **5**. | 307| KEY_6 | Key **6**. | 308| KEY_7 | Key **7**. | 309| KEY_8 | Key **8**. | 310| KEY_9 | Key **9**. | 311| KEY_STAR | Key **\***. | 312| KEY_POUND | Key **\#**. | 313| KEY_DPAD_UP | Navigation key - up. | 314| KEY_DPAD_DOWN | Navigation key - down. | 315| KEY_DPAD_LEFT | Navigation key - left. | 316| KEY_DPAD_RIGHT | Navigation key - right. | 317| KEY_DPAD_CENTER | Navigation key - OK. | 318| KEY_A | Key **A**. | 319| KEY_B | Key **B**. | 320| KEY_C | Key **C**. | 321| KEY_D | Key **D**. | 322| KEY_E | Key **E**. | 323| KEY_F | Key **F**. | 324| KEY_G | Key **G**. | 325| KEY_H | Key **H**. | 326| KEY_I | Key **I**. | 327| KEY_J | Key **J**. | 328| KEY_K | Key **K**. | 329| KEY_L | Key **L**. | 330| KEY_M | Key **M**. | 331| KEY_N | Key **N**. | 332| KEY_O | Key **O**. | 333| KEY_P | Key **P**. | 334| KEY_Q | Key **Q**. | 335| KEY_R | Key **R**. | 336| KEY_S | Key **S**. | 337| KEY_T | Key **T**. | 338| KEY_U | Key **U**. | 339| KEY_V | Key **V**. | 340| KEY_W | Key **W**. | 341| KEY_X | Key **X**. | 342| KEY_Y | Key **Y**. | 343| KEY_Z | Key **Z**. | 344| KEY_COMMA | Key **,**. | 345| KEY_PERIOD | Key **.**. | 346| KEY_ALT_LEFT | Left Alt key. | 347| KEY_ALT_RIGHT | Right Alt key. | 348| KEY_SHIFT_LEFT | Left Shift key. | 349| KEY_SHIFT_RIGHT | Right Shift key. | 350| KEY_TAB | Tab key. | 351| KEY_SPACE | Space key. | 352| KEY_SYM | Symbol key. | 353| KEY_EXPLORER | Explorer key, which is used to start the explorer application. | 354| KEY_ENVELOPE | Email key, which is used to start the email application. | 355| KEY_ENTER | Enter key. | 356| KEY_DEL | Delete key. | 357| KEY_GRAVE | Key **`**. | 358| KEY_MINUS | Key **-**. | 359| KEY_EQUALS | Key **=**. | 360| KEY_LEFT_BRACKET | Key **[**. | 361| KEY_RIGHT_BRACKET | Key **]**. | 362| KEY_BACKSLASH | Key **\**. | 363| KEY_SEMICOLON | Key **;**. | 364| KEY_APOSTROPHE | Key **'**. | 365| KEY_SLASH | Key **/**. | 366| KEY_AT | Key **\@**. | 367| KEY_PLUS | Key **+**. | 368| KEY_MENU | Menu key. | 369| KEY_PAGE_UP | Page Up key. | 370| KEY_PAGE_DOWN | Page Down key. | 371| KEY_ESCAPE | ESC key. | 372| KEY_FORWARD_DEL | Delete key. | 373| KEY_CTRL_LEFT | Left Ctrl key. | 374| KEY_CTRL_RIGHT | Right Ctrl key. | 375| KEY_CAPS_LOCK | Caps Lock key. | 376| KEY_SCROLL_LOCK | Scroll Lock key. | 377| KEY_META_LEFT | Left Meta key. | 378| KEY_META_RIGHT | Right Meta key. | 379| KEY_FUNCTION | Function key. | 380| KEY_SYSRQ | System Request/Print Screen key. | 381| KEY_BREAK | Break/Pause key. | 382| KEY_MOVE_HOME | Move to Home key. | 383| KEY_MOVE_END | Move to End key. | 384| KEY_INSERT | Insert key. | 385| KEY_FORWARD | Forward key. | 386| KEY_MEDIA_PLAY | Multimedia key - play. | 387| KEY_MEDIA_PAUSE | Multimedia key - pause. | 388| KEY_MEDIA_CLOSE | Multimedia key - close. | 389| KEY_MEDIA_EJECT | Multimedia key - eject. | 390| KEY_MEDIA_RECORD | Multimedia key - record. | 391| KEY_F1 | F1 key. | 392| KEY_F2 | F2 key. | 393| KEY_F3 | F3 key. | 394| KEY_F4 | F4 key. | 395| KEY_F5 | F5 key. | 396| KEY_F6 | F6 key. | 397| KEY_F7 | F7 key. | 398| KEY_F8 | F8 key. | 399| KEY_F9 | F9 key. | 400| KEY_F10 | F10 key. | 401| KEY_F11 | F11 key. | 402| KEY_F12 | F12 key. | 403| KEY_NUM_LOCK | Number Lock key. | 404| KEY_NUMPAD_0 | Key **0** on numeric keypad. | 405| KEY_NUMPAD_1 | Key **1** on numeric keypad. | 406| KEY_NUMPAD_2 | Key **2** on numeric keypad. | 407| KEY_NUMPAD_3 | Key **3** on numeric keypad. | 408| KEY_NUMPAD_4 | Key **4** on numeric keypad. | 409| KEY_NUMPAD_5 | Key **5** on numeric keypad. | 410| KEY_NUMPAD_6 | Key **6** on numeric keypad. | 411| KEY_NUMPAD_7 | Key **7** on numeric keypad. | 412| KEY_NUMPAD_8 | Key **8** on numeric keypad. | 413| KEY_NUMPAD_9 | Key **9** on numeric keypad. | 414| KEY_NUMPAD_DIVIDE | Key **/** on numeric keypad. | 415| KEY_NUMPAD_MULTIPLY | Key ***** on numeric keypad. | 416| KEY_NUMPAD_SUBTRACT | Key **-** on numeric keypad. | 417| KEY_NUMPAD_ADD | Key **+** on numeric keypad. | 418| KEY_NUMPAD_DOT | Key **.** on numeric keypad. | 419| KEY_NUMPAD_COMMA | Key **,** on numeric keypad. | 420| KEY_NUMPAD_ENTER | Enter key on numeric keypad. | 421| KEY_NUMPAD_EQUALS | Key **=** on numeric keypad. | 422| KEY_NUMPAD_LEFT_PAREN | Key **(** on numeric keypad. | 423| KEY_NUMPAD_RIGHT_PAREN | Key **)** on numeric keypad. | 424| KEY_VIRTUAL_MULTITASK | Multi-task key. | 425| KEY_SLEEP | Sleep key. | 426| KEY_ZENKAKU_HANKAKU | Zenkaku/Hankaku key. | 427| KEY_102ND | 102nd key. | 428| KEY_RO | Ro key. | 429| KEY_KATAKANA | Katakana key. | 430| KEY_HIRAGANA | Hiragana key. | 431| KEY_HENKAN | Henkan key. | 432| KEY_KATAKANA_HIRAGANA | Katakana/Hiragana key. | 433| KEY_MUHENKAN | Muhenkan key. | 434| KEY_LINEFEED | Linefeed key. | 435| KEY_MACRO | Macro key. | 436| KEY_NUMPAD_PLUSMINUS | Plus/Minus key on the numeric keypad. | 437| KEY_SCALE | Scale key. | 438| KEY_HANGUEL | Hanguel key. | 439| KEY_HANJA | Hanja key. | 440| KEY_YEN | Yen key. | 441| KEY_STOP | Stop key. | 442| KEY_AGAIN | Again key. | 443| KEY_PROPS | Props key. | 444| KEY_UNDO | Undo key. | 445| KEY_COPY | Copy key. | 446| KEY_OPEN | Open key. | 447| KEY_PASTE | Paste key. | 448| KEY_FIND | Find key. | 449| KEY_CUT | Cut key. | 450| KEY_HELP | Help key. | 451| KEY_CALC | Calc key, which is used to start the calculator application. | 452| KEY_FILE | File key. | 453| KEY_BOOKMARKS | Bookmarks key. | 454| KEY_NEXT | Next key. | 455| KEY_PLAYPAUSE | Play/Pause key. | 456| KEY_PREVIOUS | Previous key. | 457| KEY_STOPCD | Stop CD key. | 458| KEY_CONFIG | Config key. | 459| KEY_REFRESH | Refresh key. | 460| KEY_EXIT | Exit key. | 461| KEY_EDIT | Edit key. | 462| KEY_SCROLLUP | Scroll Up key. | 463| KEY_SCROLLDOWN | Scroll Down key. | 464| KEY_NEW | New key. | 465| KEY_REDO | Redo key. | 466| KEY_CLOSE | Close key. | 467| KEY_PLAY | Play key. | 468| KEY_BASSBOOST | Bass Boost key. | 469| KEY_PRINT | Print key. | 470| KEY_CHAT | Chat key. | 471| KEY_FINANCE | Finance key. | 472| KEY_CANCEL | Cancel key. | 473| KEY_KBDILLUM_TOGGLE | Keyboard Illumination Toggle key. | 474| KEY_KBDILLUM_DOWN | Keyboard Illumination Up key. | 475| KEY_KBDILLUM_UP | Keyboard Illumination Down key. | 476| KEY_SEND | Send key. | 477| KEY_REPLY | Reply key. | 478| KEY_FORWARDMAIL | Forward Mail key. | 479| KEY_SAVE | Save key. | 480| KEY_DOCUMENTS | Documents key. | 481| KEY_VIDEO_NEXT | Next Video key. | 482| KEY_VIDEO_PREV | Previous Video key. | 483| KEY_BRIGHTNESS_CYCLE | Brightness Cycle key. | 484| KEY_BRIGHTNESS_ZERO | Brightness Zero key. | 485| KEY_DISPLAY_OFF | Display Off Key. | 486| KEY_BTN_MISC | Misc Button key. | 487| KEY_GOTO | Goto key. | 488| KEY_INFO | Info key. | 489| KEY_PROGRAM | Program key. | 490| KEY_PVR | PVR key. | 491| KEY_SUBTITLE | Subtitle key. | 492| KEY_FULL_SCREEN | Full Screen key. | 493| KEY_KEYBOARD | Keyboard. | 494| KEY_ASPECT_RATIO | Aspect Ratio key. | 495| KEY_PC | Port Control key. | 496| KEY_TV | TV key. | 497| KEY_TV2 | TV key 2. | 498| KEY_VCR | VCR key. | 499| KEY_VCR2 | VCR key 2. | 500| KEY_SAT | SAT key. | 501| KEY_CD | CD key. | 502| KEY_TAPE | Tape key. | 503| KEY_TUNER | Tuner key. | 504| KEY_PLAYER | Player key. | 505| KEY_DVD | DVD key. | 506| KEY_AUDIO | Audio key. | 507| KEY_VIDEO | Video key. | 508| KEY_MEMO | Memo key. | 509| KEY_CALENDAR | Calendar key. | 510| KEY_RED | Red indicator. | 511| KEY_GREEN | Green indicator. | 512| KEY_YELLOW | Yellow indicator. | 513| KEY_BLUE | Blue indicator. | 514| KEY_CHANNELUP | Channel Up key. | 515| KEY_CHANNELDOWN | Channel Down key. | 516| KEY_LAST | Last key. | 517| KEY_RESTART | Restart key. | 518| KEY_SLOW | Slow key. | 519| KEY_SHUFFLE | Shuffle key. | 520| KEY_VIDEOPHONE | Videophone key. | 521| KEY_GAMES | Games key. | 522| KEY_ZOOMIN | Zoom in key. | 523| KEY_ZOOMOUT | Zoom out key. | 524| KEY_ZOOMRESET | Zoom Reset key. | 525| KEY_WORDPROCESSOR | Word Processor key. | 526| KEY_EDITOR | Editor key. | 527| KEY_SPREADSHEET | Spreadsheet key. | 528| KEY_GRAPHICSEDITOR | Graphics Editor key. | 529| KEY_PRESENTATION | Presentation key. | 530| KEY_DATABASE | Database key. | 531| KEY_NEWS | News key. | 532| KEY_VOICEMAIL | Voicemail key. | 533| KEY_ADDRESSBOOK | Address book key. | 534| KEY_MESSENGER | Messenger key. | 535| KEY_BRIGHTNESS_TOGGLE | Brightness Toggle key. | 536| KEY_SPELLCHECK | Spell Check key. | 537| KEY_COFFEE | Coffee key, which is used to launch screen lock or screen saver. | 538| KEY_MEDIA_REPEAT | Media Repeat key. | 539| KEY_IMAGES | Images key. | 540| KEY_BUTTONCONFIG | Button Configuration key. | 541| KEY_TASKMANAGER | Task Manager key. | 542| KEY_JOURNAL | Log key. | 543| KEY_CONTROLPANEL | Control Panel key. | 544| KEY_APPSELECT | App Select key. | 545| KEY_SCREENSAVER | Screen Saver key. | 546| KEY_ASSISTANT | Assistant key. | 547| KEY_KBD_LAYOUT_NEXT | Next Keyboard Layout key. | 548| KEY_BRIGHTNESS_MIN | Min Brightness key. | 549| KEY_BRIGHTNESS_MAX | Max Brightness key. | 550| KEY_KBDINPUTASSIST_PREV | Keyboard Input-assisted Previous key. | 551| KEY_KBDINPUTASSIST_NEXT | Keyboard Input-assisted Next key. | 552| KEY_KBDINPUTASSIST_PREVGROUP | Keyboard Input-assisted Previous key. | 553| KEY_KBDINPUTASSIST_NEXTGROUP | Keyboard Input-assisted Next key. | 554| KEY_KBDINPUTASSIST_ACCEPT | Keyboard Input-assisted Accept key. | 555| KEY_KBDINPUTASSIST_CANCEL | Keyboard Input-assisted Cancel key. | 556| KEY_FRONT | Front key, which is used to launch the windshield defogger. | 557| KEY_SETUP | Setup key. | 558| KEY_WAKEUP | Wakeup key. | 559| KEY_SENDFILE | Send File key. | 560| KEY_DELETEFILE | Delete File key. | 561| KEY_XFER | XFER key, which is used to start file transfer. | 562| KEY_PROG1 | Program key 1. | 563| KEY_PROG2 | Program key 2. | 564| KEY_MSDOS | MS-DOS key. | 565| KEY_SCREENLOCK | Screen Lock key. | 566| KEY_DIRECTION_ROTATE_DISPLAY | Directional Rotation Display key. | 567| KEY_CYCLEWINDOWS | Windows Cycle key. | 568| KEY_COMPUTER | Keys. | 569| KEY_EJECTCLOSECD | Eject CD key. | 570| KEY_ISO | ISO key. | 571| KEY_MOVE | Move key. | 572| KEY_F13 | F13 key. | 573| KEY_F14 | F14 key. | 574| KEY_F15 | F15 key. | 575| KEY_F16 | F16 key. | 576| KEY_F17 | F17 key. | 577| KEY_F18 | F18 key. | 578| KEY_F19 | F19 key. | 579| KEY_F20 | F20 key. | 580| KEY_F21 | F21 key. | 581| KEY_F22 | F22 key. | 582| KEY_F23 | F23 key. | 583| KEY_F24 | F24 key. | 584| KEY_PROG3 | Program key 3. | 585| KEY_PROG4 | Program key 4. | 586| KEY_DASHBOARD | Dashboard. | 587| KEY_SUSPEND | Suspend key. | 588| KEY_HP | HP key. | 589| KEY_SOUND | Sound key. | 590| KEY_QUESTION | Question key. | 591| KEY_CONNECT | Connect key. | 592| KEY_SPORT | Sport key. | 593| KEY_SHOP | Shop key. | 594| KEY_ALTERASE | Alternate key. | 595| KEY_SWITCHVIDEOMODE | Switch Video Mode key (monitor, LCD, and TV, etc.).| 596| KEY_BATTERY | Battery key. | 597| KEY_BLUETOOTH | Bluetooth key. | 598| KEY_WLAN | WLAN key. | 599| KEY_UWB | Ultra-wideband key. | 600| KEY_WWAN_WIMAX | WWAN WiMAX key. | 601| KEY_RFKILL | RF Kill key. | 602| KEY_CHANNEL | Channel key. | 603| KEY_BTN_0 | Button 0. | 604| KEY_BTN_1 | Button 1. | 605| KEY_BTN_2 | Button 2. | 606| KEY_BTN_3 | Button 3. | 607| KEY_BTN_4 | Button 4. | 608| KEY_BTN_5 | Button 5. | 609| KEY_BTN_6 | Button 6. | 610| KEY_BTN_7 | Button 7. | 611| KEY_BTN_8 | Button 8. | 612| KEY_BTN_9 | Button 9. | 613 614**Since** 615 61610 617 618 619### OH_NativeXComponent_MouseEventAction 620 621``` 622enum OH_NativeXComponent_MouseEventAction 623``` 624 625**Description** 626 627Enumerates the mouse event actions. 628 629| Value | Description | 630| --------------------------------- | ---------------- | 631| OH_NATIVEXCOMPONENT_MOUSE_NONE | Invalid mouse event. | 632| OH_NATIVEXCOMPONENT_MOUSE_PRESS | Mouse button press. | 633| OH_NATIVEXCOMPONENT_MOUSE_RELEASE | Mouse button release. | 634| OH_NATIVEXCOMPONENT_MOUSE_MOVE | Mouse movement.| 635 636**Since** 637 6389 639 640 641### OH_NativeXComponent_MouseEventButton 642 643``` 644enum OH_NativeXComponent_MouseEventButton 645``` 646 647**Description** 648 649Enumerates the mouse event buttons. 650 651| Value | Description | 652| ---------------------------------- | ----------------- | 653| OH_NATIVEXCOMPONENT_NONE_BUTTON | No button. | 654| OH_NATIVEXCOMPONENT_LEFT_BUTTON | Left mouse button. | 655| OH_NATIVEXCOMPONENT_RIGHT_BUTTON | Right mouse button. | 656| OH_NATIVEXCOMPONENT_MIDDLE_BUTTON | Middle mouse button. | 657| OH_NATIVEXCOMPONENT_BACK_BUTTON | Back button on the left of the mouse.| 658| OH_NATIVEXCOMPONENT_FORWARD_BUTTON | Forward key on the left of the mouse.| 659 660**Since** 661 6629 663 664 665### OH_NativeXComponent_TouchEventType 666 667``` 668enum OH_NativeXComponent_TouchEventType 669``` 670 671**Description** 672 673Enumerates the touch event types. 674 675| Value | Description | 676| --------------------------- | --------------------- | 677| OH_NATIVEXCOMPONENT_DOWN | The touch event is triggered when a finger is pressed. | 678| OH_NATIVEXCOMPONENT_UP | The touch event is triggered when a finger is lifted. | 679| OH_NATIVEXCOMPONENT_MOVE | The touch event is triggered when a finger is moved on the screen.| 680| OH_NATIVEXCOMPONENT_CANCEL | The event is triggered when a touch event is canceled. | 681| OH_NATIVEXCOMPONENT_UNKNOWN | Invalid touch type. | 682 683**Since** 684 6858 686 687 688### OH_NativeXComponent_TouchPointToolType 689 690``` 691enum OH_NativeXComponent_TouchPointToolType 692``` 693 694**Description** 695 696Enumerates the touch point tool types. 697 698| Value | Description | 699| -------------------------------------- | -------- | 700| OH_NATIVEXCOMPONENT_TOOL_TYPE_UNKNOWN | Unknown tool type.| 701| OH_NATIVEXCOMPONENT_TOOL_TYPE_FINGER | Finger. | 702| OH_NATIVEXCOMPONENT_TOOL_TYPE_PEN | Stylus. | 703| OH_NATIVEXCOMPONENT_TOOL_TYPE_RUBBER | Rubber. | 704| OH_NATIVEXCOMPONENT_TOOL_TYPE_BRUSH | Brush. | 705| OH_NATIVEXCOMPONENT_TOOL_TYPE_PENCIL | Pencil. | 706| OH_NATIVEXCOMPONENT_TOOL_TYPE_AIRBRUSH | Air brush. | 707| OH_NATIVEXCOMPONENT_TOOL_TYPE_MOUSE | Mouse. | 708| OH_NATIVEXCOMPONENT_TOOL_TYPE_LENS | Lens. | 709 710**Since** 711 7129 713 714 715## Function Description 716 717### OH_NativeXComponent_AttachNativeRootNode() 718 719``` 720int32_t OH_NativeXComponent_AttachNativeRootNode (OH_NativeXComponent * component, ArkUI_NodeHandle root ) 721``` 722**Description** 723 724Attaches the UI component created through the native API of ArkUI to this **OH_NativeXComponent** instance. 725 726**Since**: 12 727 728**Parameters** 729 730| Name| Description| 731| -------- | -------- | 732| component | Pointer to the **OH_NativeXComponent** instance. | 733| root | Pointer to the component instance created through the native API. | 734 735**Returns** 736 737**0**: success 738 739**401**: parameter error 740 741 742### OH_NativeXComponent_DetachNativeRootNode() 743 744``` 745int32_t OH_NativeXComponent_DetachNativeRootNode (OH_NativeXComponent * component, ArkUI_NodeHandle root ) 746``` 747**Description** 748 749Detaches the native component of ArkUI from this **OH_NativeXComponent** instance. 750 751**Since**: 12 752 753**Parameters** 754 755| Name| Description| 756| -------- | -------- | 757| component | Pointer to the **OH_NativeXComponent** instance. | 758| root | Pointer to the component instance created through the native API. | 759 760**Returns** 761 762**0**: success 763 764**401**: parameter error 765 766 767 768### OH_NativeXComponent_GetKeyEvent() 769 770``` 771int32_t OH_NativeXComponent_GetKeyEvent (OH_NativeXComponent * component, OH_NativeXComponent_KeyEvent ** keyEvent ) 772``` 773 774**Description** 775 776Obtains the key event scheduled by ArkUI XComponent. 777 778**Parameters** 779 780| Name | Description | 781| --------- | ----------------------------- | 782| component | Pointer to the **OH_NativeXComponent** instance.| 783| keyEvent | Pointer to the current key event. | 784 785**Returns** 786 787Returns the status code of the execution. 788 789**Since** 790 79110 792 793 794### OH_NativeXComponent_GetKeyEventAction() 795 796``` 797int32_t OH_NativeXComponent_GetKeyEventAction (OH_NativeXComponent_KeyEvent * keyEvent, OH_NativeXComponent_KeyAction * action ) 798``` 799 800**Description** 801 802Obtains the action of the specified key event. 803 804**Parameters** 805 806| Name | Description | 807| -------- | -------------------------------------- | 808| keyEvent | Pointer to the **OH_NativeXComponent_KeyEvent** instance.| 809| action | Pointer to the key event action. | 810 811**Returns** 812 813Returns the status code of the execution. 814 815**Since** 816 81710 818 819 820### OH_NativeXComponent_GetKeyEventCode() 821 822``` 823int32_t OH_NativeXComponent_GetKeyEventCode (OH_NativeXComponent_KeyEvent * keyEvent, OH_NativeXComponent_KeyCode * code ) 824``` 825 826**Description** 827 828Obtains the key code of the specified key event. 829 830**Parameters** 831 832| Name | Description | 833| -------- | -------------------------------------- | 834| keyEvent | Pointer to the **OH_NativeXComponent_KeyEvent** instance.| 835| code | Pointer to the key code of the key event. | 836 837**Returns** 838 839Returns the status code of the execution. 840 841**Since** 842 84310 844 845 846### OH_NativeXComponent_GetKeyEventDeviceId() 847 848``` 849int32_t OH_NativeXComponent_GetKeyEventDeviceId (OH_NativeXComponent_KeyEvent * keyEvent, int64_t * deviceId ) 850``` 851 852**Description** 853 854Obtains the device ID of the specified key event. 855 856**Parameters** 857 858| Name | Description | 859| -------- | -------------------------------------- | 860| keyEvent | Pointer to the **OH_NativeXComponent_KeyEvent** instance.| 861| deviceId | Pointer to the device ID of the key event. | 862 863**Returns** 864 865Returns the status code of the execution. 866 867**Since** 868 86910 870 871 872### OH_NativeXComponent_GetKeyEventSourceType() 873 874``` 875int32_t OH_NativeXComponent_GetKeyEventSourceType (OH_NativeXComponent_KeyEvent * keyEvent, OH_NativeXComponent_EventSourceType * sourceType ) 876``` 877 878**Description** 879 880Obtains the source type of the specified key event. 881 882**Parameters** 883 884| Name | Description | 885| ---------- | -------------------------------------- | 886| keyEvent | Pointer to the **OH_NativeXComponent_KeyEvent** instance.| 887| sourceType | Pointer to the source type of the key event. | 888 889**Returns** 890 891Returns the status code of the execution. 892 893**Since** 894 89510 896 897 898### OH_NativeXComponent_GetKeyEventTimeStamp() 899 900``` 901int32_t OH_NativeXComponent_GetKeyEventTimeStamp (OH_NativeXComponent_KeyEvent * keyEvent, int64_t * timeStamp ) 902``` 903 904**Description** 905 906Obtains the timestamp of the specified key event. 907 908**Parameters** 909 910| Name | Description | 911| --------- | -------------------------------------- | 912| keyEvent | Pointer to the **OH_NativeXComponent_KeyEvent** instance.| 913| timeStamp | Pointer to the timestamp of the key event. | 914 915**Returns** 916 917Returns the status code of the execution. 918 919**Since** 920 92110 922 923 924### OH_NativeXComponent_GetMouseEvent() 925 926``` 927int32_t OH_NativeXComponent_GetMouseEvent (OH_NativeXComponent * component, const void * window, OH_NativeXComponent_MouseEvent * mouseEvent ) 928``` 929 930**Description** 931 932Obtains the mouse event scheduled by ArkUI XComponent. 933 934**Parameters** 935 936| Name | Description | 937| ---------- | ----------------------------- | 938| component | Pointer to the **OH_NativeXComponent** instance.| 939| window | Handle to the **NativeWindow** instance. | 940| mouseEvent | Pointer to the current mouse event. | 941 942**Returns** 943 944Returns the status code of the execution. 945 946**Since** 947 9489 949 950### OH_NativeXComponent_GetNativeXComponent() 951 952``` 953OH_NativeXComponent* OH_NativeXComponent_GetNativeXComponent (ArkUI_NodeHandle node) 954``` 955**Description** 956 957Obtains the pointer to an **OH_NativeXComponent** instance based on the specified component instance created by the native API. 958 959**Since**: 12 960 961**Parameters** 962 963| Name| Description| 964| -------- | -------- | 965| node | Pointer to the component instance created through the native API. | 966 967**Returns** 968 969Pointer to the **OH_NativeXComponent** instance. 970 971 972### OH_NativeXComponent_GetTouchEvent() 973 974``` 975int32_t OH_NativeXComponent_GetTouchEvent (OH_NativeXComponent * component, const void * window, OH_NativeXComponent_TouchEvent * touchEvent ) 976``` 977 978**Description** 979 980Obtains the touch event scheduled by the ArkUI XComponent. 981 982**Parameters** 983 984| Name | Description | 985| ---------- | ----------------------------- | 986| component | Pointer to the **OH_NativeXComponent** instance.| 987| window | Handle to the **NativeWindow** instance. | 988| touchEvent | Pointer to the current touch event. | 989 990**Returns** 991 992Returns the status code of the execution. 993 994**Since** 995 9968 997 998 999### OH_NativeXComponent_GetTouchPointTiltX() 1000 1001``` 1002int32_t OH_NativeXComponent_GetTouchPointTiltX (OH_NativeXComponent * component, uint32_t pointIndex, float * tiltX ) 1003``` 1004 1005**Description** 1006 1007Obtains the angle between the Y-Z plane of the ArkUI XComponent touch point and the x-axis. 1008 1009**Parameters** 1010 1011| Name | Description | 1012| ---------- | ----------------------------- | 1013| component | Pointer to the **OH_NativeXComponent** instance.| 1014| pointIndex | Pointer to the index of the touch point. | 1015| tiltX | Pointer to the angle between the Y-Z plane of the touch point and the x-axis. | 1016 1017**Returns** 1018 1019Returns the status code of the execution. 1020 1021**Since** 1022 10239 1024 1025 1026### OH_NativeXComponent_GetTouchPointTiltY() 1027 1028``` 1029int32_t OH_NativeXComponent_GetTouchPointTiltY (OH_NativeXComponent * component, uint32_t pointIndex, float * tiltY ) 1030``` 1031 1032**Description** 1033 1034Obtains the angle between the X-Z plane of the ArkUI XComponent touch point and the y-axis. 1035 1036**Parameters** 1037 1038| Name | Description | 1039| ---------- | ----------------------------- | 1040| component | Pointer to the **OH_NativeXComponent** instance.| 1041| pointIndex | Pointer to the index of the touch point. | 1042| tiltY | Pointer to the angle between the X-Z plane of the touch point and the y-axis. | 1043 1044**Returns** 1045 1046Returns the status code of the execution. 1047 1048**Since** 1049 10509 1051 1052 1053### OH_NativeXComponent_GetTouchPointWindowX() 1054 1055``` 1056int32_t OH_NativeXComponent_GetTouchPointWindowX(OH_NativeXComponent * component, uint32_t pointIndex, float * windowX ) 1057``` 1058 1059**Description** 1060 1061Obtains the X coordinate of the touch point relative to the upper left corner of the application window where the ArkUI XComponent is located. 1062 1063**Parameters** 1064 1065| Name | Description | 1066| ---------- | ----------------------------- | 1067| component | Pointer to the **OH_NativeXComponent** instance. | 1068| pointIndex | Pointer to the index of the touch point. | 1069| windowX | Pointer to the X coordinate of the touch point relative to the upper left corner of the application window. | 1070 1071**Returns** 1072 1073Returns the status code of the execution. 1074 1075**Since** 1076 107712 1078 1079 1080### OH_NativeXComponent_GetTouchPointWindowY() 1081 1082``` 1083int32_t OH_NativeXComponent_GetTouchPointWindowY(OH_NativeXComponent * component, uint32_t pointIndex, float * windowY ) 1084``` 1085 1086**Description** 1087 1088Obtains the Y coordinate of the touch point relative to the upper left corner of the application window where the ArkUI XComponent is located. 1089 1090**Parameters** 1091 1092| Name | Description | 1093| ---------- | ----------------------------- | 1094| component | Pointer to the **OH_NativeXComponent** instance. | 1095| pointIndex | Pointer to the index of the touch point. | 1096| windowY | Pointer to the Y coordinate of the touch point relative to the upper left corner of the application window. | 1097 1098**Returns** 1099 1100Returns the status code of the execution. 1101 1102**Since** 1103 110412 1105 1106 1107### OH_NativeXComponent_GetTouchPointDisplayX() 1108 1109``` 1110int32_t OH_NativeXComponent_GetTouchPointDisplayX(OH_NativeXComponent * component, uint32_t pointIndex, float * displayX ) 1111``` 1112 1113**Description** 1114 1115Obtains the X coordinate of the touch point relative to the upper left corner of the screen where the ArkUI XComponent is located. 1116 1117**Parameters** 1118 1119| Name | Description | 1120| ---------- | ----------------------------- | 1121| component | Pointer to the **OH_NativeXComponent** instance. | 1122| pointIndex | Pointer to the index of the touch point. | 1123| displayX | Pointer to the X coordinate of the touch point relative to the upper left corner of the screen. | 1124 1125**Returns** 1126 1127Returns the status code of the execution. 1128 1129**Since** 1130 113112 1132 1133 1134### OH_NativeXComponent_GetTouchPointDisplayY() 1135 1136``` 1137int32_t OH_NativeXComponent_GetTouchPointDisplayY(OH_NativeXComponent * component, uint32_t pointIndex, float * displayY ) 1138``` 1139 1140**Description** 1141 1142Obtains the Y coordinate of the touch point relative to the upper left corner of the screen where the ArkUI XComponent is located. 1143 1144**Parameters** 1145 1146| Name | Description | 1147| ---------- | ----------------------------- | 1148| component | Pointer to the **OH_NativeXComponent** instance. | 1149| pointIndex | Pointer to the index of the touch point. | 1150| displayY | Pointer to the Y coordinate of the touch point relative to the upper left corner of the screen. | 1151 1152**Returns** 1153 1154Returns the status code of the execution. 1155 1156**Since** 1157 115812 1159 1160 1161### OH_NativeXComponent_GetTouchPointToolType() 1162 1163``` 1164int32_t OH_NativeXComponent_GetTouchPointToolType (OH_NativeXComponent * component, uint32_t pointIndex, OH_NativeXComponent_TouchPointToolType * toolType ) 1165``` 1166 1167**Description** 1168 1169Obtains the ArkUI XComponent touch point tool type. 1170 1171**Parameters** 1172 1173| Name | Description | 1174| ---------- | ----------------------------- | 1175| component | Pointer to the **OH_NativeXComponent** instance.| 1176| pointIndex | Pointer to the index of the touch point. | 1177| toolType | Pointer to the tool type. | 1178 1179**Returns** 1180 1181Returns the status code of the execution. 1182 1183**Since** 1184 11859 1186 1187 1188### OH_NativeXComponent_GetXComponentId() 1189 1190``` 1191int32_t OH_NativeXComponent_GetXComponentId (OH_NativeXComponent * component, char * id, uint64_t * size ) 1192``` 1193 1194**Description** 1195 1196Obtains the ID of ArkUI XComponent. 1197 1198**Parameters** 1199 1200| Name | Description | 1201| --------- | ------------------------------------------------------------ | 1202| component | Pointer to the **OH_NativeXComponent** instance. | 1203| 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].| 1204| size | Pointer to the ID length, which is used to receive the ID length information. | 1205 1206**Returns** 1207 1208Returns the status code of the execution. 1209 1210**Since** 1211 12128 1213 1214 1215### OH_NativeXComponent_GetXComponentOffset() 1216 1217``` 1218int32_t OH_NativeXComponent_GetXComponentOffset (OH_NativeXComponent * component, const void * window, double * x, double * y ) 1219``` 1220 1221**Description** 1222 1223Obtains the offset of the surface held by the XComponent relative to the upper left corner of its parent component. 1224 1225**Parameters** 1226 1227| Name | Description | 1228| --------- | ----------------------------- | 1229| component | Pointer to the **OH_NativeXComponent** instance.| 1230| window | Handle to the **NativeWindow** instance. | 1231| x | Pointer to the X coordinate of the current surface relative to the upper left corner of the XComponent's parent component. | 1232| y | Pointer to the Y coordinate of the current surface relative to the upper left corner of the XComponent's parent component. | 1233 1234**Returns** 1235 1236Returns the status code of the execution. 1237 1238**Since** 1239 12408 1241 1242 1243### OH_NativeXComponent_GetXComponentSize() 1244 1245``` 1246int32_t OH_NativeXComponent_GetXComponentSize (OH_NativeXComponent * component, const void * window, uint64_t * width, uint64_t * height ) 1247``` 1248 1249**Description** 1250 1251Obtains the size of the surface held by the ArkUI XComponent. 1252 1253**Parameters** 1254 1255| Name | Description | 1256| --------- | ----------------------------- | 1257| component | Pointer to the **OH_NativeXComponent** instance.| 1258| window | Handle to the **NativeWindow** instance. | 1259| width | Pointer to the width of the current surface. | 1260| height | Pointer to the height of the current surface. | 1261 1262**Returns** 1263 1264Returns the status code of the execution. 1265 1266**Since** 1267 12688 1269 1270 1271### OH_NativeXComponent_RegisterBlurEventCallback() 1272 1273``` 1274int32_t OH_NativeXComponent_RegisterBlurEventCallback (OH_NativeXComponent * component, void(*callback)(OH_NativeXComponent *component, void *window)) 1275``` 1276 1277**Description** 1278 1279Registers the focus loss event callback for this **OH_NativeXComponent** instance. 1280 1281**Parameters** 1282 1283| Name | Description | 1284| --------- | ----------------------------- | 1285| component | Pointer to the **OH_NativeXComponent** instance.| 1286| callback | Pointer to the focus loss event callback. | 1287 1288**Returns** 1289 1290Returns the status code of the execution. 1291 1292**Since** 1293 129410 1295 1296 1297### OH_NativeXComponent_RegisterCallback() 1298 1299``` 1300int32_t OH_NativeXComponent_RegisterCallback (OH_NativeXComponent * component, OH_NativeXComponent_Callback * callback ) 1301``` 1302 1303**Description** 1304 1305Registers a callback for this **OH_NativeXComponent** instance. 1306 1307**Parameters** 1308 1309| Name | Description | 1310| --------- | ----------------------------- | 1311| component | Pointer to the **OH_NativeXComponent** instance.| 1312| callback | Pointer to the surface lifecycle and touch event callback. | 1313 1314**Returns** 1315 1316Returns the status code of the execution. 1317 1318**Since** 1319 13208 1321 1322 1323### OH_NativeXComponent_RegisterFocusEventCallback() 1324 1325``` 1326int32_t OH_NativeXComponent_RegisterFocusEventCallback (OH_NativeXComponent * component, void(*callback)(OH_NativeXComponent *component, void *window)) 1327``` 1328 1329**Description** 1330 1331Registers the focus obtaining event callback for this **OH_NativeXComponent** instance. 1332 1333**Parameters** 1334 1335| Name | Description | 1336| --------- | ----------------------------- | 1337| component | Pointer to the **OH_NativeXComponent** instance.| 1338| callback | Pointer to the focus obtaining event callback. | 1339 1340**Returns** 1341 1342Returns the status code of the execution. 1343 1344**Since** 1345 134610 1347 1348 1349### OH_NativeXComponent_RegisterKeyEventCallback() 1350 1351``` 1352int32_t OH_NativeXComponent_RegisterKeyEventCallback (OH_NativeXComponent * component, void(*callback)(OH_NativeXComponent *component, void *window)) 1353``` 1354 1355**Description** 1356 1357Registers the key event callback for this **OH_NativeXComponent** instance. 1358 1359**Parameters** 1360 1361| Name | Description | 1362| --------- | ----------------------------- | 1363| component | Pointer to the **OH_NativeXComponent** instance.| 1364| callback | Pointer to the key event callback. | 1365 1366**Returns** 1367 1368Returns the status code of the execution. 1369 1370**Since** 1371 137210 1373 1374 1375### OH_NativeXComponent_RegisterMouseEventCallback() 1376 1377``` 1378int32_t OH_NativeXComponent_RegisterMouseEventCallback (OH_NativeXComponent * component, OH_NativeXComponent_MouseEvent_Callback * callback ) 1379``` 1380 1381**Description** 1382 1383Registers the mouse event callback for this **OH_NativeXComponent** instance. 1384 1385**Parameters** 1386 1387| Name | Description | 1388| --------- | ----------------------------- | 1389| component | Pointer to the **OH_NativeXComponent** instance.| 1390| callback | Pointer to the mouse event callback. | 1391 1392**Returns** 1393 1394Returns the status code of the execution. 1395 1396**Since** 1397 13989 1399 1400### OH_NativeXComponent_RegisterOnFrameCallback() 1401 1402``` 1403int32_t OH_NativeXComponent_RegisterOnFrameCallback (OH_NativeXComponent* component, void (*callback)(OH_NativeXComponent *component, uint64_t timestamp, uint64_t targetTimestamp)) 1404``` 1405**Description** 1406 1407Registers the display update callback for this **OH_NativeXComponent** instance and enables the callback for each frame. 1408 1409**Parameters** 1410 1411| Name| Description| 1412| -------- | -------- | 1413| component | Pointer to the **OH_NativeXComponent** instance. | 1414| callback | Pointer to the display update callback. | 1415 1416**Returns** 1417 1418Returns the status code of the execution. 1419 1420**Since** 1421 142211 1423 1424### OH_NativeXComponent_RegisterOnTouchInterceptCallback() 1425 1426``` 1427int32_t OH_NativeXComponent_RegisterOnTouchInterceptCallback (OH_NativeXComponent * component, HitTestMode(*callback)(OH_NativeXComponent *component, ArkUI_UIInputEvent *event)) 1428``` 1429**Description** 1430 1431Registers a custom event intercept callback for an **OH_NativeXComponent** and enables the callback during the hit test. 1432 1433**Since**: 12 1434 1435**Parameters** 1436 1437| Name| Description| 1438| -------- | -------- | 1439| component | Pointer to the **OH_NativeXComponent** instance. | 1440| callback | Pointer to the custom event intercept callback. | 1441 1442**Returns** 1443 1444Returns **0** if the operation is successful; returns **401** if a parameter error occurs. 1445 1446### OH_NativeXComponent_RegisterUIInputEventCallback() 1447 1448``` 1449int32_t OH_NativeXComponent_RegisterUIInputEventCallback (OH_NativeXComponent * component, void(*callback)(OH_NativeXComponent *component, ArkUI_UIInputEvent *event, ArkUI_UIInputEvent_Type type), ArkUI_UIInputEvent_Type type ) 1450``` 1451**Description** 1452 1453Registers a UI input event callback for an **OH_NativeXComponent** instance and enables the callback to be invoked when a UI input event is received. 1454 1455**Since**: 12 1456 1457**Parameters** 1458 1459| Name| Description| 1460| -------- | -------- | 1461| component | Pointer to the **OH_NativeXComponent** instance. | 1462| callback | Pointer to the UI input event callback. | 1463| type | Type of the current UI input event. | 1464 1465**Returns** 1466 1467Returns the status code of the execution. 1468 1469### OH_NativeXComponent_SetExpectedFrameRateRange() 1470 1471``` 1472int32_t OH_NativeXComponent_SetExpectedFrameRateRange (OH_NativeXComponent * component, OH_NativeXComponent_ExpectedRateRange * range ) 1473``` 1474**Description** 1475 1476Sets the expected frame rate range. 1477 1478**Parameters** 1479 1480| Name| Description| 1481| -------- | -------- | 1482| component | Pointer to the **OH_NativeXComponent** instance. | 1483| range | Pointer to the expected frame rate range.| 1484 1485**Returns** 1486 1487Returns the status code of the execution. 1488 1489**Since** 1490 149111 1492 1493 1494### OH_NativeXComponent_UnregisterOnFrameCallback() 1495 1496``` 1497int32_t OH_NativeXComponent_UnregisterOnFrameCallback (OH_NativeXComponent * component) 1498``` 1499**Description** 1500 1501Deregisters the display update callback for this **OH_NativeXComponent** instance and disables the callback for each frame. 1502 1503**Parameters** 1504 1505| Name| Description| 1506| -------- | -------- | 1507| component | Pointer to the **OH_NativeXComponent** instance. | 1508 1509**Returns** 1510 1511Returns the status code of the execution. 1512 1513**Since** 1514 151511 1516 1517### OH_NativeXComponent_SetNeedSoftKeyboard() 1518 1519``` 1520int32_t OH_NativeXComponent_SetNeedSoftKeyboard(OH_NativeXComponent* component, bool isNeedSoftKeyboard) 1521``` 1522 1523**Description** 1524 1525Sets whether the soft keyboard is required for an **OH_NativeXComponent** instance. 1526 1527**Parameters** 1528 1529| Name | Description | 1530| ------------------ | --------------------------------------------- | 1531| component | Pointer to the **OH_NativeXComponent** instance. | 1532| isNeedSoftKeyboard | Whether the soft keyboard is required for the **OH_NativeXComponent** instance.| 1533 1534**Returns** 1535 1536Returns the status code of the execution. 1537 1538**Since** 1539 154012 1541 1542### OH_NativeXComponent_RegisterSurfaceShowCallback() 1543 1544``` 1545int32_t OH_NativeXComponent_RegisterSurfaceShowCallback (OH_NativeXComponent * component, void(*callback)(OH_NativeXComponent *component, void *window)) 1546``` 1547 1548**Description** 1549 1550Registers a surface display callback for an **OH_NativeXComponent** instance. The callback is invoked whenever the application is switched to the foreground. 1551 1552**Parameters** 1553 1554| Name | Description | 1555| --------- | ----------------------------- | 1556| component | Pointer to the **OH_NativeXComponent** instance.| 1557| callback | Pointer to the surface display callback. | 1558 1559**Returns** 1560 1561Returns the status code of the execution. 1562 1563**Since** 1564 156512 1566 1567### OH_NativeXComponent_RegisterSurfaceHideCallback() 1568 1569``` 1570int32_t OH_NativeXComponent_RegisterSurfaceHideCallback (OH_NativeXComponent * component, void(*callback)(OH_NativeXComponent *component, void *window)) 1571``` 1572 1573**Description** 1574 1575Registers a surface hiding callback for an **OH_NativeXComponent** instance. The callback is invoked whenever the application is switched to the background. 1576 1577**Parameters** 1578 1579| Name | Description | 1580| --------- | ----------------------------- | 1581| component | Pointer to the **OH_NativeXComponent** instance.| 1582| callback | Pointer to the surface hiding callback. | 1583 1584**Returns** 1585 1586Returns the status code of the execution. 1587 1588**Since** 1589 159012 1591 1592### OH_NativeXComponent_GetTouchEventSourceType() 1593 1594``` 1595int32_t OH_NativeXComponent_GetTouchEventSourceType (OH_NativeXComponent* component, int32_t pointId, OH_NativeXComponent_EventSourceType* sourceType); 1596``` 1597 1598**Description** 1599 1600Obtains the touch event source type of an **OH_NativeXComponent** instance. 1601 1602**Parameters** 1603 1604| Name | Description | 1605| --------- | ----------------------------- | 1606| component | Pointer to the **OH_NativeXComponent** instance.| 1607| pointId | ID of the touch point.<br>**NOTE**<br>The touch event source type can be correctly returned only when the ID passed in is the ID of the touch point that triggers the touch event. Otherwise, **OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER** is returned.| 1608| sourceType | Pointer to the touch event source type.| 1609 1610**Returns** 1611 1612Returns **OH_NATIVEXCOMPONENT_RESULT_SUCCESS** if the operation is successful. 1613 1614Returns **OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER** if a parameter error occurs. 1615 1616Returns **OH_NATIVEXCOMPONENT_RESULT_FAILED** if any other error occurs. 1617 1618**Since** 1619 162012 1621 1622### OH_NativeXComponent_GetNativeAccessibilityProvider() 1623 1624``` 1625int32_t OH_NativeXComponent_GetNativeAccessibilityProvider( 1626 OH_NativeXComponent* component, ArkUI_AccessibilityProvider** handle); 1627``` 1628 1629**Description** 1630 1631Obtains the accessibility provider handle for an ArkUI XComponent. 1632 1633**Parameters** 1634 1635| Name | Description | 1636| --------- | --------------------------------------- | 1637| component | Pointer to the **OH_NativeXComponent** instance.| 1638| handle | Pointer to the accessibility provider handle. | 1639 1640**Returns** 1641 1642Returns **OH_NATIVEXCOMPONENT_RESULT_SUCCESS** if the operation is successful. 1643 1644Returns **OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER** if a parameter error occurs. 1645 1646Returns **OH_NATIVEXCOMPONENT_RESULT_FAILED** if any other error occurs. 1647 1648**Since** 1649 165013 1651 1652 1653 1654<!-- --> 1655 1656## Variable Description 1657 1658 1659### OH_XCOMPONENT_ID_LEN_MAX 1660 1661``` 1662const uint32_t OH_XCOMPONENT_ID_LEN_MAX = 128 1663``` 1664 1665 1666**Description** 1667 1668 1669Maximum length of the ArkUI XComponent ID. 1670 1671 1672**Since** 1673 1674 16758 1676 1677 1678### OH_MAX_TOUCH_POINTS_NUMBER 1679 1680``` 1681const uint32_t OH_MAX_TOUCH_POINTS_NUMBER = 10 1682``` 1683 1684**Description** 1685 1686Maximum number of identifiable touch points in a touch event. 1687 1688**Since** 1689 16908 1691 1692 1693### action 1694 1695``` 1696OH_NativeXComponent_MouseEventAction OH_NativeXComponent_MouseEvent::action 1697``` 1698 1699**Description** 1700 1701Action of the mouse event. 1702 1703**Since** 1704 17058 1706 1707 1708### button 1709 1710``` 1711OH_NativeXComponent_MouseEventButton OH_NativeXComponent_MouseEvent::button 1712``` 1713 1714**Description** 1715 1716Mouse event button. 1717 1718**Since** 1719 17208 1721 1722 1723### deviceId 1724 1725``` 1726int64_t OH_NativeXComponent_TouchEvent::deviceId = 0 1727``` 1728 1729**Description** 1730 1731ID of the device where the current touch event is triggered. 1732 1733**Since** 1734 17358 1736 1737 1738### DispatchHoverEvent 1739 1740``` 1741void(* OH_NativeXComponent_MouseEvent_Callback::DispatchHoverEvent) (OH_NativeXComponent *component, bool isHover) 1742``` 1743 1744**Description** 1745 1746Invoked when a hover event is triggered. 1747 1748**Since** 1749 17508 1751 1752 1753### DispatchMouseEvent 1754 1755``` 1756void(* OH_NativeXComponent_MouseEvent_Callback::DispatchMouseEvent) (OH_NativeXComponent *component, void *window) 1757``` 1758 1759**Description** 1760 1761Invoked when a mouse event is triggered. 1762 1763**Since** 1764 17658 1766 1767 1768### DispatchTouchEvent 1769 1770``` 1771void(* OH_NativeXComponent_Callback::DispatchTouchEvent) (OH_NativeXComponent *component, void *window) 1772``` 1773 1774**Description** 1775 1776Invoked when a touch event is triggered. 1777 1778**Since** 1779 17808 1781 1782 1783### force [1/2] 1784 1785``` 1786float OH_NativeXComponent_TouchPoint::force = 0.0 1787``` 1788 1789**Description** 1790 1791Pressure of the touch event. 1792 1793**Since** 1794 17958 1796 1797 1798### force [2/2] 1799 1800``` 1801float OH_NativeXComponent_TouchEvent::force = 0.0 1802``` 1803 1804**Description** 1805 1806Pressure of the touch event. 1807 1808**Since** 1809 18108 1811 1812 1813### id [1/2] 1814 1815``` 1816int32_t OH_NativeXComponent_TouchPoint::id = 0 1817``` 1818 1819**Description** 1820 1821Unique identifier of the finger. 1822 1823**Since** 1824 18258 1826 1827 1828### id [2/2] 1829 1830``` 1831int32_t OH_NativeXComponent_TouchEvent::id = 0 1832``` 1833 1834**Description** 1835 1836Unique identifier of the finger. 1837 1838**Since** 1839 18408 1841 1842 1843### isPressed 1844 1845``` 1846bool OH_NativeXComponent_TouchPoint::isPressed = false 1847``` 1848 1849**Description** 1850 1851Whether the current point is pressed. 1852 1853**Since** 1854 18558 1856 1857 1858### numPoints 1859 1860``` 1861uint32_t OH_NativeXComponent_TouchEvent::numPoints = 0 1862``` 1863 1864**Description** 1865 1866Number of current touch points. 1867 1868**Since** 1869 18708 1871 1872 1873### OnSurfaceChanged 1874 1875``` 1876void(* OH_NativeXComponent_Callback::OnSurfaceChanged) (OH_NativeXComponent *component, void *window) 1877``` 1878 1879**Description** 1880 1881Invoked when the surface changes. 1882 1883**Since** 1884 18858 1886 1887 1888### OnSurfaceCreated 1889 1890``` 1891void(* OH_NativeXComponent_Callback::OnSurfaceCreated) (OH_NativeXComponent *component, void *window) 1892``` 1893 1894**Description** 1895 1896Invoked when a surface is created. 1897 1898**Since** 1899 19008 1901 1902 1903### OnSurfaceDestroyed 1904 1905``` 1906void(* OH_NativeXComponent_Callback::OnSurfaceDestroyed) (OH_NativeXComponent *component, void *window) 1907``` 1908 1909**Description** 1910 1911Invoked when the surface is destroyed. 1912 1913**Since** 1914 19158 1916 1917 1918### screenX [1/3] 1919 1920``` 1921float OH_NativeXComponent_TouchPoint::screenX = 0.0 1922``` 1923 1924**Description** 1925 1926X coordinate of the touch point relative to the upper left corner of the application window where the XComponent is located. 1927 1928**Since** 1929 19308 1931 1932 1933### screenX [2/3] 1934 1935``` 1936float OH_NativeXComponent_TouchEvent::screenX = 0.0 1937``` 1938 1939**Description** 1940 1941X coordinate of the touch point relative to the upper left corner of the application window where the XComponent is located. 1942 1943**Since** 1944 19458 1946 1947 1948### screenX [3/3] 1949 1950``` 1951float OH_NativeXComponent_MouseEvent::screenX 1952``` 1953 1954**Description** 1955 1956X coordinate of the click point relative to the upper left corner of the application screen where the XComponent is located. 1957 1958**Since** 1959 19608 1961 1962 1963### screenY [1/3] 1964 1965``` 1966float OH_NativeXComponent_TouchPoint::screenY = 0.0 1967``` 1968 1969**Description** 1970 1971Y coordinate of the touch point relative to the upper left corner of the application window where the XComponent is located. 1972 1973**Since** 1974 19758 1976 1977 1978### screenY [2/3] 1979 1980``` 1981float OH_NativeXComponent_TouchEvent::screenY = 0.0 1982``` 1983 1984**Description** 1985 1986Y coordinate of the touch point relative to the upper left corner of the application window where the XComponent is located. 1987 1988**Since** 1989 19908 1991 1992 1993### screenY [3/3] 1994 1995``` 1996float OH_NativeXComponent_MouseEvent::screenY 1997``` 1998 1999**Description** 2000 2001Y coordinate of the click point relative to the upper left corner of the application window where the XComponent is located. 2002 2003**Since** 2004 20058 2006 2007 2008### size [1/2] 2009 2010``` 2011double OH_NativeXComponent_TouchPoint::size = 0.0 2012``` 2013 2014**Description** 2015 2016Contact area between the finger pad and the screen. 2017 2018**Since** 2019 20208 2021 2022 2023### size [2/2] 2024 2025``` 2026double OH_NativeXComponent_TouchEvent::size = 0.0 2027``` 2028 2029**Description** 2030 2031Contact area between the finger pad and the screen. 2032 2033**Since** 2034 20358 2036 2037 2038### timeStamp [1/2] 2039 2040``` 2041long long OH_NativeXComponent_TouchPoint::timeStamp = 0 2042``` 2043 2044**Description** 2045 2046Timestamp of the touch point. 2047 2048**Since** 2049 20508 2051 2052 2053### timeStamp [2/2] 2054 2055``` 2056long long OH_NativeXComponent_TouchEvent::timeStamp = 0 2057``` 2058 2059**Description** 2060 2061Timestamp of the touch point. 2062 2063**Since** 2064 20658 2066 2067 2068### timestamp 2069 2070``` 2071int64_t OH_NativeXComponent_MouseEvent::timestamp 2072``` 2073 2074**Description** 2075 2076Timestamp of the mouse event. 2077 2078**Since** 2079 20808 2081 2082 2083### touchPoints 2084 2085``` 2086OH_NativeXComponent_TouchPoint OH_NativeXComponent_TouchEvent::touchPoints[OH_MAX_TOUCH_POINTS_NUMBER] 2087``` 2088 2089**Description** 2090 2091Array of the touch points. 2092 2093**Since** 2094 20958 2096 2097 2098### type [1/2] 2099 2100``` 2101OH_NativeXComponent_TouchEventType OH_NativeXComponent_TouchPoint::type = OH_NativeXComponent_TouchEventType::OH_NATIVEXCOMPONENT_UNKNOWN 2102``` 2103 2104**Description** 2105 2106Touch type of the touch point. 2107 2108**Since** 2109 21108 2111 2112 2113### type [2/2] 2114 2115``` 2116OH_NativeXComponent_TouchEventType OH_NativeXComponent_TouchEvent::type = OH_NativeXComponent_TouchEventType::OH_NATIVEXCOMPONENT_UNKNOWN 2117``` 2118 2119**Description** 2120 2121Touch type of the touch point. 2122 2123**Since** 2124 21258 2126 2127 2128### x [1/3] 2129 2130``` 2131float OH_NativeXComponent_TouchPoint::x = 0.0 2132``` 2133 2134**Description** 2135 2136X coordinate of the touch point relative to the left edge of the XComponent. 2137 2138**Since** 2139 21408 2141 2142 2143### x [2/3] 2144 2145``` 2146float OH_NativeXComponent_TouchEvent::x = 0.0 2147``` 2148 2149**Description** 2150 2151X coordinate of the touch point relative to the left edge of the XComponent. 2152 2153**Since** 2154 21558 2156 2157 2158### x [3/3] 2159 2160``` 2161float OH_NativeXComponent_MouseEvent::x 2162``` 2163 2164**Description** 2165 2166X coordinate of the clicked point relative to the upper left corner of the component. 2167 2168**Since** 2169 21708 2171 2172 2173### y [1/3] 2174 2175``` 2176float OH_NativeXComponent_TouchPoint::y = 0.0 2177``` 2178 2179**Description** 2180 2181Y coordinate of the touch point relative to the upper edge of the XComponent. 2182 2183**Since** 2184 21858 2186 2187 2188### y [2/3] 2189 2190``` 2191float OH_NativeXComponent_TouchEvent::y = 0.0 2192``` 2193 2194**Description** 2195 2196Y coordinate of the touch point relative to the upper edge of the XComponent. 2197 2198**Since** 2199 22008 2201 2202 2203### y [3/3] 2204 2205``` 2206float OH_NativeXComponent_MouseEvent::y 2207``` 2208 2209**Description** 2210 2211Y coordinate of the clicked point relative to the upper left corner of the component. 2212 2213**Since** 2214 22158 2216 2217### expected 2218 2219``` 2220int32_t OH_NativeXComponent_ExpectedRateRange::expected 2221``` 2222**Description** 2223 2224Expected frame rate range. 2225 2226**Since** 2227 222811 2229 2230### max 2231 2232``` 2233int32_t OH_NativeXComponent_ExpectedRateRange::max 2234``` 2235**Description** 2236 2237Maximum value of the expected frame rate range. 2238 2239**Since** 2240 224111 2242 2243 2244### min 2245 2246``` 2247int32_t OH_NativeXComponent_ExpectedRateRange::min 2248``` 2249**Description** 2250 2251Minimum value of the expected frame rate range. 2252 2253**Since** 2254 225511 2256