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

!21348 native 文档 again

Merge pull request !21348 from LiAn/master
......@@ -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)
......
......@@ -15,112 +15,113 @@
### 文件
| 名称 | 描述 |
| -------- | -------- |
| 名称 | 描述 |
| ---------------------------------------- | ---------------------------------------- |
| [native_interface_xcomponent.h](native__interface__xcomponent_8h.md) | 声明用于访问Native&nbsp;XComponent的API。<br/>引用文件:&lt;ace/xcomponent/native_interface_xcomponent.h&gt; |
| [native_xcomponent_key_event.h](native__xcomponent__key__event_8h.md) | 声明用于访问Native&nbsp;XComponent键盘事件所使用到的枚举类型。<br/>引用文件:&lt;ace/xcomponent/native_xcomponent_key_event.h&gt; |
### 结构体
| 名称 | 描述 |
| -------- | -------- |
| [OH_NativeXComponent_TouchPoint](_o_h___native_x_component___touch_point.md) | 触摸事件中触摸点的信息。 |
| [OH_NativeXComponent_TouchEvent](_o_h___native_x_component___touch_event.md) | 触摸事件。 |
| [OH_NativeXComponent_MouseEvent](_o_h___native_x_component___mouse_event.md) | 鼠标事件。 |
| 名称 | 描述 |
| ---------------------------------------- | --------------------- |
| [OH_NativeXComponent_TouchPoint](_o_h___native_x_component___touch_point.md) | 触摸事件中触摸点的信息。 |
| [OH_NativeXComponent_TouchEvent](_o_h___native_x_component___touch_event.md) | 触摸事件。 |
| [OH_NativeXComponent_MouseEvent](_o_h___native_x_component___mouse_event.md) | 鼠标事件。 |
| [OH_NativeXComponent_Callback](_o_h___native_x_component___callback.md) | 注册surface生命周期和触摸事件回调。 |
| [OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component___mouse_event___callback.md) | 注册鼠标事件的回调。 |
| [OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component___mouse_event___callback.md) | 注册鼠标事件的回调。 |
### 类型定义
| 名称 | 描述 |
| -------- | -------- |
| [OH_NativeXComponent](#oh_nativexcomponent) | 提供封装的OH_NativeXComponent实例。 |
| [OH_NativeXComponent_Callback](#oh_nativexcomponent_callback) | 注册surface生命周期和触摸事件回调。 |
| [OH_NativeXComponent_MouseEvent_Callback](#oh_nativexcomponent_mouseevent_callback) | 注册鼠标事件的回调。 |
| 名称 | 描述 |
| ---------------------------------------- | ------------------------------------ |
| [OH_NativeXComponent](#oh_nativexcomponent) | 提供封装的OH_NativeXComponent实例。 |
| [OH_NativeXComponent_Callback](#oh_nativexcomponent_callback) | 注册surface生命周期和触摸事件回调。 |
| [OH_NativeXComponent_MouseEvent_Callback](#oh_nativexcomponent_mouseevent_callback) | 注册鼠标事件的回调。 |
| [OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent) | 提供封装的OH_NativeXComponent_KeyEvent实例。 |
### 枚举
| 名称 | 描述 |
| -------- | -------- |
| 名称 | 描述 |
| ---------------------------------------- | ---------- |
| {&nbsp;OH_NATIVEXCOMPONENT_RESULT_SUCCESS&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_RESULT_FAILED&nbsp;=&nbsp;-1,&nbsp;OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER&nbsp;=&nbsp;-2&nbsp;} | 枚举API访问状态。 |
| [OH_NativeXComponent_TouchEventType](#oh_nativexcomponent_toucheventtype)&nbsp;{<br/>OH_NATIVEXCOMPONENT_DOWN&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_UP,&nbsp;OH_NATIVEXCOMPONENT_MOVE,&nbsp;OH_NATIVEXCOMPONENT_CANCEL,<br/>OH_NATIVEXCOMPONENT_UNKNOWN<br/>} | 触摸事件类型。 |
| [OH_NativeXComponent_TouchPointToolType](#oh_nativexcomponent_touchpointtooltype)&nbsp;{<br/>OH_NATIVEXCOMPONENT_TOOL_TYPE_UNKNOWN&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_FINGER,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_PEN,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_RUBBER,<br/>OH_NATIVEXCOMPONENT_TOOL_TYPE_BRUSH,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_PENCIL,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_AIRBRUSH,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_MOUSE,<br/>OH_NATIVEXCOMPONENT_TOOL_TYPE_LENS<br/>} | 触摸点工具类型。 |
| [OH_NativeXComponent_EventSourceType](#oh_nativexcomponent_eventsourcetype)&nbsp;{<br/>OH_NATIVEXCOMPONENT_SOURCE_TYPE_UNKNOWN&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_SOURCE_TYPE_MOUSE,&nbsp;OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHSCREEN,&nbsp;OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHPAD,<br/>OH_NATIVEXCOMPONENT_SOURCE_TYPE_JOYSTICK,&nbsp;OH_NATIVEXCOMPONENT_SOURCE_TYPE_KEYBOARD<br/>} | 触摸事件源类型。 |
| [OH_NativeXComponent_MouseEventAction](#oh_nativexcomponent_mouseeventaction)&nbsp;{&nbsp;OH_NATIVEXCOMPONENT_MOUSE_NONE&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_MOUSE_PRESS,&nbsp;OH_NATIVEXCOMPONENT_MOUSE_RELEASE,&nbsp;OH_NATIVEXCOMPONENT_MOUSE_MOVE&nbsp;} | 鼠标事件动作。 |
| [OH_NativeXComponent_MouseEventButton](#oh_nativexcomponent_mouseeventbutton)&nbsp;{<br/>OH_NATIVEXCOMPONENT_NONE_BUTTON&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_LEFT_BUTTON&nbsp;=&nbsp;0x01,&nbsp;OH_NATIVEXCOMPONENT_RIGHT_BUTTON&nbsp;=&nbsp;0x02,&nbsp;OH_NATIVEXCOMPONENT_MIDDLE_BUTTON&nbsp;=&nbsp;0x04,<br/>OH_NATIVEXCOMPONENT_BACK_BUTTON&nbsp;=&nbsp;0x08,&nbsp;OH_NATIVEXCOMPONENT_FORWARD_BUTTON&nbsp;=&nbsp;0x10<br/>} | 鼠标事件按键。 |
| [OH_NativeXComponent_KeyAction](#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;} | 按键事件动作。 |
| [OH_NativeXComponent_TouchEventType](#oh_nativexcomponent_toucheventtype)&nbsp;{<br/>OH_NATIVEXCOMPONENT_DOWN&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_UP,&nbsp;OH_NATIVEXCOMPONENT_MOVE,&nbsp;OH_NATIVEXCOMPONENT_CANCEL,<br/>OH_NATIVEXCOMPONENT_UNKNOWN<br/>} | 触摸事件类型。 |
| [OH_NativeXComponent_TouchPointToolType](#oh_nativexcomponent_touchpointtooltype)&nbsp;{<br/>OH_NATIVEXCOMPONENT_TOOL_TYPE_UNKNOWN&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_FINGER,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_PEN,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_RUBBER,<br/>OH_NATIVEXCOMPONENT_TOOL_TYPE_BRUSH,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_PENCIL,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_AIRBRUSH,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_MOUSE,<br/>OH_NATIVEXCOMPONENT_TOOL_TYPE_LENS<br/>} | 触摸点工具类型。 |
| [OH_NativeXComponent_EventSourceType](#oh_nativexcomponent_eventsourcetype)&nbsp;{<br/>OH_NATIVEXCOMPONENT_SOURCE_TYPE_UNKNOWN&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_SOURCE_TYPE_MOUSE,&nbsp;OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHSCREEN,&nbsp;OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHPAD,<br/>OH_NATIVEXCOMPONENT_SOURCE_TYPE_JOYSTICK,&nbsp;OH_NATIVEXCOMPONENT_SOURCE_TYPE_KEYBOARD<br/>} | 触摸事件源类型。 |
| [OH_NativeXComponent_MouseEventAction](#oh_nativexcomponent_mouseeventaction)&nbsp;{&nbsp;OH_NATIVEXCOMPONENT_MOUSE_NONE&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_MOUSE_PRESS,&nbsp;OH_NATIVEXCOMPONENT_MOUSE_RELEASE,&nbsp;OH_NATIVEXCOMPONENT_MOUSE_MOVE&nbsp;} | 鼠标事件动作。 |
| [OH_NativeXComponent_MouseEventButton](#oh_nativexcomponent_mouseeventbutton)&nbsp;{<br/>OH_NATIVEXCOMPONENT_NONE_BUTTON&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_LEFT_BUTTON&nbsp;=&nbsp;0x01,&nbsp;OH_NATIVEXCOMPONENT_RIGHT_BUTTON&nbsp;=&nbsp;0x02,&nbsp;OH_NATIVEXCOMPONENT_MIDDLE_BUTTON&nbsp;=&nbsp;0x04,<br/>OH_NATIVEXCOMPONENT_BACK_BUTTON&nbsp;=&nbsp;0x08,&nbsp;OH_NATIVEXCOMPONENT_FORWARD_BUTTON&nbsp;=&nbsp;0x10<br/>} | 鼠标事件按键。 |
| [OH_NativeXComponent_KeyCode](#oh_nativexcomponent_keycode)&nbsp;{<br/>KEY_UNKNOWN&nbsp;=&nbsp;-1,&nbsp;KEY_FN&nbsp;=&nbsp;0,&nbsp;KEY_HOME&nbsp;=&nbsp;1,&nbsp;KEY_BACK&nbsp;=&nbsp;2,KEY_MEDIA_PLAY_PAUSE&nbsp;=&nbsp;10,&nbsp;KEY_MEDIA_STOP&nbsp;=&nbsp;11,&nbsp;KEY_MEDIA_NEXT&nbsp;=&nbsp;12,&nbsp;KEY_MEDIA_PREVIOUS&nbsp;=&nbsp;13,<br/>KEY_MEDIA_REWIND&nbsp;=&nbsp;14,&nbsp;KEY_MEDIA_FAST_FORWARD&nbsp;=&nbsp;15,&nbsp;KEY_VOLUME_UP&nbsp;=&nbsp;16,&nbsp;KEY_VOLUME_DOWN&nbsp;=&nbsp;17,<br/>KEY_POWER&nbsp;=&nbsp;18,&nbsp;KEY_CAMERA&nbsp;=&nbsp;19,&nbsp;KEY_VOLUME_MUTE&nbsp;=&nbsp;22,&nbsp;KEY_MUTE&nbsp;=&nbsp;23,KEY_BRIGHTNESS_UP&nbsp;=&nbsp;40,&nbsp;KEY_BRIGHTNESS_DOWN&nbsp;=&nbsp;41,&nbsp;KEY_0&nbsp;=&nbsp;2000,&nbsp;KEY_1&nbsp;=&nbsp;2001,<br/>KEY_2&nbsp;=&nbsp;2002,&nbsp;KEY_3&nbsp;=&nbsp;2003,&nbsp;KEY_4&nbsp;=&nbsp;2004,&nbsp;KEY_5&nbsp;=&nbsp;2005,<br/>KEY_6&nbsp;=&nbsp;2006,&nbsp;KEY_7&nbsp;=&nbsp;2007,&nbsp;KEY_8&nbsp;=&nbsp;2008,&nbsp;KEY_9&nbsp;=&nbsp;2009,<br/>KEY_STAR&nbsp;=&nbsp;2010,&nbsp;KEY_POUND&nbsp;=&nbsp;2011,&nbsp;KEY_DPAD_UP&nbsp;=&nbsp;2012,&nbsp;KEY_DPAD_DOWN&nbsp;=&nbsp;2013,KEY_DPAD_LEFT&nbsp;=&nbsp;2014,&nbsp;KEY_DPAD_RIGHT&nbsp;=&nbsp;2015,&nbsp;KEY_DPAD_CENTER&nbsp;=&nbsp;2016,<br/>KEY_A&nbsp;=&nbsp;2017,<br/>KEY_B&nbsp;=&nbsp;2018,&nbsp;KEY_C&nbsp;=&nbsp;2019,&nbsp;KEY_D&nbsp;=&nbsp;2020,&nbsp;KEY_E&nbsp;=&nbsp;2021,<br/>KEY_F&nbsp;=&nbsp;2022,&nbsp;KEY_G&nbsp;=&nbsp;2023,&nbsp;KEY_H&nbsp;=&nbsp;2024,&nbsp;KEY_I&nbsp;=&nbsp;2025,<br/>KEY_J&nbsp;=&nbsp;2026,&nbsp;KEY_K&nbsp;=&nbsp;2027,&nbsp;KEY_L&nbsp;=&nbsp;2028,&nbsp;KEY_M&nbsp;=&nbsp;2029,<br/>KEY_N&nbsp;=&nbsp;2030,&nbsp;KEY_O&nbsp;=&nbsp;2031,&nbsp;KEY_P&nbsp;=&nbsp;2032,&nbsp;KEY_Q&nbsp;=&nbsp;2033,<br/>KEY_R&nbsp;=&nbsp;2034,&nbsp;KEY_S&nbsp;=&nbsp;2035,&nbsp;KEY_T&nbsp;=&nbsp;2036,&nbsp;KEY_U&nbsp;=&nbsp;2037,<br/>KEY_V&nbsp;=&nbsp;2038,&nbsp;KEY_W&nbsp;=&nbsp;2039,&nbsp;KEY_X&nbsp;=&nbsp;2040,&nbsp;KEY_Y&nbsp;=&nbsp;2041,<br/>KEY_Z&nbsp;=&nbsp;2042,&nbsp;KEY_COMMA&nbsp;=&nbsp;2043,&nbsp;KEY_PERIOD&nbsp;=&nbsp;2044,&nbsp;KEY_ALT_LEFT&nbsp;=&nbsp;2045,<br/>KEY_ALT_RIGHT&nbsp;=&nbsp;2046,&nbsp;KEY_SHIFT_LEFT&nbsp;=&nbsp;2047,&nbsp;KEY_SHIFT_RIGHT&nbsp;=&nbsp;2048,&nbsp;KEY_TAB&nbsp;=&nbsp;2049,<br/>KEY_SPACE&nbsp;=&nbsp;2050,&nbsp;KEY_SYM&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;=&nbsp;2083,&nbsp;KEY_FORWARD&nbsp;=&nbsp;2084,&nbsp;KEY_MEDIA_PLAY&nbsp;=&nbsp;2085,<br/>KEY_MEDIA_PAUSE&nbsp;=&nbsp;2086,&nbsp;KEY_MEDIA_CLOSE&nbsp;=&nbsp;2087,&nbsp;KEY_MEDIA_EJECT&nbsp;=&nbsp;2088,&nbsp;KEY_MEDIA_RECORD&nbsp;=&nbsp;2089,<br/>KEY_F1&nbsp;=&nbsp;2090,&nbsp;KEY_F2&nbsp;=&nbsp;2091,&nbsp;KEY_F3&nbsp;=&nbsp;2092,&nbsp;KEY_F4&nbsp;=&nbsp;2093,<br/>KEY_F5&nbsp;=&nbsp;2094,&nbsp;KEY_F6&nbsp;=&nbsp;2095,&nbsp;KEY_F7&nbsp;=&nbsp;2096,&nbsp;KEY_F8&nbsp;=&nbsp;2097,<br/>KEY_F9&nbsp;=&nbsp;2098,&nbsp;KEY_F10&nbsp;=&nbsp;2099,&nbsp;KEY_F11&nbsp;=&nbsp;2100,&nbsp;KEY_F12&nbsp;=&nbsp;2101,<br/>KEY_NUM_LOCK&nbsp;=&nbsp;2102,&nbsp;KEY_NUMPAD_0&nbsp;=&nbsp;2103,&nbsp;KEY_NUMPAD_1&nbsp;=&nbsp;2104,&nbsp;KEY_NUMPAD_2&nbsp;=&nbsp;2105,<br/>KEY_NUMPAD_3&nbsp;=&nbsp;2106,&nbsp;KEY_NUMPAD_4&nbsp;=&nbsp;2107,&nbsp;KEY_NUMPAD_5&nbsp;=&nbsp;2108,&nbsp;KEY_NUMPAD_6&nbsp;=&nbsp;2109,<br/>KEY_NUMPAD_7&nbsp;=&nbsp;2110,&nbsp;KEY_NUMPAD_8&nbsp;=&nbsp;2111,&nbsp;KEY_NUMPAD_9&nbsp;=&nbsp;2112,&nbsp;KEY_NUMPAD_DIVIDE&nbsp;=&nbsp;2113,<br/>KEY_NUMPAD_MULTIPLY&nbsp;=&nbsp;2114,&nbsp;KEY_NUMPAD_SUBTRACT&nbsp;=&nbsp;2115,&nbsp;KEY_NUMPAD_ADD&nbsp;=&nbsp;2116,&nbsp;KEY_NUMPAD_DOT&nbsp;=&nbsp;2117,<br/>KEY_NUMPAD_COMMA&nbsp;=&nbsp;2118,&nbsp;KEY_NUMPAD_ENTER&nbsp;=&nbsp;2119,&nbsp;KEY_NUMPAD_EQUALS&nbsp;=&nbsp;2120,&nbsp;KEY_NUMPAD_LEFT_PAREN&nbsp;=&nbsp;2121,<br/>KEY_NUMPAD_RIGHT_PAREN&nbsp;=&nbsp;2122,&nbsp;KEY_VIRTUAL_MULTITASK&nbsp;=&nbsp;2210,&nbsp;KEY_SLEEP&nbsp;=&nbsp;2600,&nbsp;KEY_ZENKAKU_HANKAKU&nbsp;=&nbsp;2601,<br/>KEY_102ND&nbsp;=&nbsp;2602,&nbsp;KEY_RO&nbsp;=&nbsp;2603,&nbsp;KEY_KATAKANA&nbsp;=&nbsp;2604,&nbsp;KEY_HIRAGANA&nbsp;=&nbsp;2605,<br/>KEY_HENKAN&nbsp;=&nbsp;2606,&nbsp;KEY_KATAKANA_HIRAGANA&nbsp;=&nbsp;2607,&nbsp;KEY_MUHENKAN&nbsp;=&nbsp;2608,&nbsp;KEY_LINEFEED&nbsp;=&nbsp;2609,<br/>KEY_MACRO&nbsp;=&nbsp;2610,&nbsp;KEY_NUMPAD_PLUSMINUS&nbsp;=&nbsp;2611,&nbsp;KEY_SCALE&nbsp;=&nbsp;2612,&nbsp;KEY_HANGUEL&nbsp;=&nbsp;2613,<br/>KEY_HANJA&nbsp;=&nbsp;2614,&nbsp;KEY_YEN&nbsp;=&nbsp;2615,&nbsp;KEY_STOP&nbsp;=&nbsp;2616,&nbsp;KEY_AGAIN&nbsp;=&nbsp;2617,<br/>KEY_PROPS&nbsp;=&nbsp;2618,&nbsp;KEY_UNDO&nbsp;=&nbsp;2619,&nbsp;KEY_COPY&nbsp;=&nbsp;2620,&nbsp;KEY_OPEN&nbsp;=&nbsp;2621,<br/>KEY_PASTE&nbsp;=&nbsp;2622,&nbsp;KEY_FIND&nbsp;=&nbsp;2623,&nbsp;KEY_CUT&nbsp;=&nbsp;2624,&nbsp;KEY_HELP&nbsp;=&nbsp;2625,<br/>KEY_CALC&nbsp;=&nbsp;2626,&nbsp;KEY_FILE&nbsp;=&nbsp;2627,&nbsp;KEY_BOOKMARKS&nbsp;=&nbsp;2628,&nbsp;KEY_NEXT&nbsp;=&nbsp;2629,<br/>KEY_PLAYPAUSE&nbsp;=&nbsp;2630,&nbsp;KEY_PREVIOUS&nbsp;=&nbsp;2631,&nbsp;KEY_STOPCD&nbsp;=&nbsp;2632,&nbsp;KEY_CONFIG&nbsp;=&nbsp;2634,<br/>KEY_REFRESH&nbsp;=&nbsp;2635,&nbsp;KEY_EXIT&nbsp;=&nbsp;2636,&nbsp;KEY_EDIT&nbsp;=&nbsp;2637,&nbsp;KEY_SCROLLUP&nbsp;=&nbsp;2638,<br/>KEY_SCROLLDOWN&nbsp;=&nbsp;2639,&nbsp;KEY_NEW&nbsp;=&nbsp;2640,&nbsp;KEY_REDO&nbsp;=&nbsp;2641,&nbsp;KEY_CLOSE&nbsp;=&nbsp;2642,<br/>KEY_PLAY&nbsp;=&nbsp;2643,&nbsp;KEY_BASSBOOST&nbsp;=&nbsp;2644,&nbsp;KEY_PRINT&nbsp;=&nbsp;2645,&nbsp;KEY_CHAT&nbsp;=&nbsp;2646,<br/>KEY_FINANCE&nbsp;=&nbsp;2647,&nbsp;KEY_CANCEL&nbsp;=&nbsp;2648,&nbsp;KEY_KBDILLUM_TOGGLE&nbsp;=&nbsp;2649,&nbsp;KEY_KBDILLUM_DOWN&nbsp;=&nbsp;2650,<br/>KEY_KBDILLUM_UP&nbsp;=&nbsp;2651,&nbsp;KEY_SEND&nbsp;=&nbsp;2652,&nbsp;KEY_REPLY&nbsp;=&nbsp;2653,&nbsp;KEY_FORWARDMAIL&nbsp;=&nbsp;2654,<br/>KEY_SAVE&nbsp;=&nbsp;2655,&nbsp;KEY_DOCUMENTS&nbsp;=&nbsp;2656,&nbsp;KEY_VIDEO_NEXT&nbsp;=&nbsp;2657,&nbsp;KEY_VIDEO_PREV&nbsp;=&nbsp;2658,<br/>KEY_BRIGHTNESS_CYCLE&nbsp;=&nbsp;2659,&nbsp;KEY_BRIGHTNESS_ZERO&nbsp;=&nbsp;2660,&nbsp;KEY_DISPLAY_OFF&nbsp;=&nbsp;2661,&nbsp;KEY_BTN_MISC&nbsp;=&nbsp;2662,<br/>KEY_GOTO&nbsp;=&nbsp;2663,&nbsp;KEY_INFO&nbsp;=&nbsp;2664,&nbsp;KEY_PROGRAM&nbsp;=&nbsp;2665,&nbsp;KEY_PVR&nbsp;=&nbsp;2666,<br/>KEY_SUBTITLE&nbsp;=&nbsp;2667,&nbsp;KEY_FULL_SCREEN&nbsp;=&nbsp;2668,&nbsp;KEY_KEYBOARD&nbsp;=&nbsp;2669,&nbsp;KEY_ASPECT_RATIO&nbsp;=&nbsp;2670,<br/>KEY_PC&nbsp;=&nbsp;2671,&nbsp;KEY_TV&nbsp;=&nbsp;2672,&nbsp;KEY_TV2&nbsp;=&nbsp;2673,&nbsp;KEY_VCR&nbsp;=&nbsp;2674,<br/>KEY_VCR2&nbsp;=&nbsp;2675,&nbsp;KEY_SAT&nbsp;=&nbsp;2676,&nbsp;KEY_CD&nbsp;=&nbsp;2677,&nbsp;KEY_TAPE&nbsp;=&nbsp;2678,<br/>KEY_TUNER&nbsp;=&nbsp;2679,&nbsp;KEY_PLAYER&nbsp;=&nbsp;2680,&nbsp;KEY_DVD&nbsp;=&nbsp;2681,&nbsp;KEY_AUDIO&nbsp;=&nbsp;2682,<br/>KEY_VIDEO&nbsp;=&nbsp;2683,&nbsp;KEY_MEMO&nbsp;=&nbsp;2684,&nbsp;KEY_CALENDAR&nbsp;=&nbsp;2685,&nbsp;KEY_RED&nbsp;=&nbsp;2686,<br/>KEY_GREEN&nbsp;=&nbsp;2687,&nbsp;KEY_YELLOW&nbsp;=&nbsp;2688,&nbsp;KEY_BLUE&nbsp;=&nbsp;2689,&nbsp;KEY_CHANNELUP&nbsp;=&nbsp;2690,<br/>KEY_CHANNELDOWN&nbsp;=&nbsp;2691,&nbsp;KEY_LAST&nbsp;=&nbsp;2692,&nbsp;KEY_RESTART&nbsp;=&nbsp;2693,&nbsp;KEY_SLOW&nbsp;=&nbsp;2694,<br/>KEY_SHUFFLE&nbsp;=&nbsp;2695,&nbsp;KEY_VIDEOPHONE&nbsp;=&nbsp;2696,&nbsp;KEY_GAMES&nbsp;=&nbsp;2697,&nbsp;KEY_ZOOMIN&nbsp;=&nbsp;2698,<br/>KEY_ZOOMOUT&nbsp;=&nbsp;2699,&nbsp;KEY_ZOOMRESET&nbsp;=&nbsp;2700,&nbsp;KEY_WORDPROCESSOR&nbsp;=&nbsp;2701,&nbsp;KEY_EDITOR&nbsp;=&nbsp;2702,<br/>KEY_SPREADSHEET&nbsp;=&nbsp;2703,&nbsp;KEY_GRAPHICSEDITOR&nbsp;=&nbsp;2704,&nbsp;KEY_PRESENTATION&nbsp;=&nbsp;2705,&nbsp;KEY_DATABASE&nbsp;=&nbsp;2706,<br/>KEY_NEWS&nbsp;=&nbsp;2707,&nbsp;KEY_VOICEMAIL&nbsp;=&nbsp;2708,&nbsp;KEY_ADDRESSBOOK&nbsp;=&nbsp;2709,&nbsp;KEY_MESSENGER&nbsp;=&nbsp;2710,<br/>KEY_BRIGHTNESS_TOGGLE&nbsp;=&nbsp;2711,&nbsp;KEY_SPELLCHECK&nbsp;=&nbsp;2712,&nbsp;KEY_COFFEE&nbsp;=&nbsp;2713,&nbsp;KEY_MEDIA_REPEAT&nbsp;=&nbsp;2714,<br/>KEY_IMAGES&nbsp;=&nbsp;2715,&nbsp;KEY_BUTTONCONFIG&nbsp;=&nbsp;2716,&nbsp;KEY_TASKMANAGER&nbsp;=&nbsp;2717,&nbsp;KEY_JOURNAL&nbsp;=&nbsp;2718,<br/>KEY_CONTROLPANEL&nbsp;=&nbsp;2719,&nbsp;KEY_APPSELECT&nbsp;=&nbsp;2720,&nbsp;KEY_SCREENSAVER&nbsp;=&nbsp;2721,&nbsp;KEY_ASSISTANT&nbsp;=&nbsp;2722,<br/>KEY_KBD_LAYOUT_NEXT&nbsp;=&nbsp;2723,&nbsp;KEY_BRIGHTNESS_MIN&nbsp;=&nbsp;2724,&nbsp;KEY_BRIGHTNESS_MAX&nbsp;=&nbsp;2725,&nbsp;KEY_KBDINPUTASSIST_PREV&nbsp;=&nbsp;2726,<br/>KEY_KBDINPUTASSIST_NEXT&nbsp;=&nbsp;2727,&nbsp;KEY_KBDINPUTASSIST_PREVGROUP&nbsp;=&nbsp;2728,&nbsp;KEY_KBDINPUTASSIST_NEXTGROUP&nbsp;=&nbsp;2729,&nbsp;KEY_KBDINPUTASSIST_ACCEPT&nbsp;=&nbsp;2730,<br/>KEY_KBDINPUTASSIST_CANCEL&nbsp;=&nbsp;2731,&nbsp;KEY_FRONT&nbsp;=&nbsp;2800,&nbsp;KEY_SETUP&nbsp;=&nbsp;2801,&nbsp;KEY_WAKEUP&nbsp;=&nbsp;2802,<br/>KEY_SENDFILE&nbsp;=&nbsp;2803,&nbsp;KEY_DELETEFILE&nbsp;=&nbsp;2804,&nbsp;KEY_XFER&nbsp;=&nbsp;2805,&nbsp;KEY_PROG1&nbsp;=&nbsp;2806,<br/>KEY_PROG2&nbsp;=&nbsp;2807,&nbsp;KEY_MSDOS&nbsp;=&nbsp;2808,&nbsp;KEY_SCREENLOCK&nbsp;=&nbsp;2809,&nbsp;KEY_DIRECTION_ROTATE_DISPLAY&nbsp;=&nbsp;2810,<br/>KEY_CYCLEWINDOWS&nbsp;=&nbsp;2811,&nbsp;KEY_COMPUTER&nbsp;=&nbsp;2812,&nbsp;KEY_EJECTCLOSECD&nbsp;=&nbsp;2813,&nbsp;KEY_ISO&nbsp;=&nbsp;2814,<br/>KEY_MOVE&nbsp;=&nbsp;2815,&nbsp;KEY_F13&nbsp;=&nbsp;2816,&nbsp;KEY_F14&nbsp;=&nbsp;2817,&nbsp;KEY_F15&nbsp;=&nbsp;2818,<br/>KEY_F16&nbsp;=&nbsp;2819,&nbsp;KEY_F17&nbsp;=&nbsp;2820,&nbsp;KEY_F18&nbsp;=&nbsp;2821,&nbsp;KEY_F19&nbsp;=&nbsp;2822,<br/>KEY_F20&nbsp;=&nbsp;2823,&nbsp;KEY_F21&nbsp;=&nbsp;2824,&nbsp;KEY_F22&nbsp;=&nbsp;2825,&nbsp;KEY_F23&nbsp;=&nbsp;2826,<br/>KEY_F24&nbsp;=&nbsp;2827,&nbsp;KEY_PROG3&nbsp;=&nbsp;2828,&nbsp;KEY_PROG4&nbsp;=&nbsp;2829,&nbsp;KEY_DASHBOARD&nbsp;=&nbsp;2830,<br/>KEY_SUSPEND&nbsp;=&nbsp;2831,&nbsp;KEY_HP&nbsp;=&nbsp;2832,&nbsp;KEY_SOUND&nbsp;=&nbsp;2833,&nbsp;KEY_QUESTION&nbsp;=&nbsp;2834,<br/>KEY_CONNECT&nbsp;=&nbsp;2836,&nbsp;KEY_SPORT&nbsp;=&nbsp;2837,&nbsp;KEY_SHOP&nbsp;=&nbsp;2838,&nbsp;KEY_ALTERASE&nbsp;=&nbsp;2839,<br/>KEY_SWITCHVIDEOMODE&nbsp;=&nbsp;2841,&nbsp;KEY_BATTERY&nbsp;=&nbsp;2842,&nbsp;KEY_BLUETOOTH&nbsp;=&nbsp;2843,&nbsp;KEY_WLAN&nbsp;=&nbsp;2844,<br/>KEY_UWB&nbsp;=&nbsp;2845,&nbsp;KEY_WWAN_WIMAX&nbsp;=&nbsp;2846,&nbsp;KEY_RFKILL&nbsp;=&nbsp;2847,&nbsp;KEY_CHANNEL&nbsp;=&nbsp;3001,<br/>KEY_BTN_0&nbsp;=&nbsp;3100,&nbsp;KEY_BTN_1&nbsp;=&nbsp;3101,&nbsp;KEY_BTN_2&nbsp;=&nbsp;3102,&nbsp;KEY_BTN_3&nbsp;=&nbsp;3103,<br/>KEY_BTN_4&nbsp;=&nbsp;3104,&nbsp;KEY_BTN_5&nbsp;=&nbsp;3105,&nbsp;KEY_BTN_6&nbsp;=&nbsp;3106,&nbsp;KEY_BTN_7&nbsp;=&nbsp;3107,<br/>KEY_BTN_8&nbsp;=&nbsp;3108,&nbsp;KEY_BTN_9&nbsp;=&nbsp;3109<br/>} | 按键事件的键码。 |
| [OH_NativeXComponent_KeyAction](#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;} | 按键事件动作。 |
### 函数
| 名称 | 描述 |
| -------- | -------- |
| [OH_NativeXComponent_GetXComponentId](#oh_nativexcomponent_getxcomponentid)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;char&nbsp;\*id,&nbsp;uint64_t&nbsp;\*size) | 获取ArkUI&nbsp;XComponent的id。 |
| [OH_NativeXComponent_GetXComponentSize](#oh_nativexcomponent_getxcomponentsize)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;const&nbsp;void&nbsp;\*window,&nbsp;uint64_t&nbsp;\*width,&nbsp;uint64_t&nbsp;\*height) | 获取ArkUI&nbsp;XComponent持有的surface的大小。 |
| 名称 | 描述 |
| ---------------------------------------- | -------------------------------------- |
| [OH_NativeXComponent_GetXComponentId](#oh_nativexcomponent_getxcomponentid)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;char&nbsp;\*id,&nbsp;uint64_t&nbsp;\*size) | 获取ArkUI&nbsp;XComponent的id。 |
| [OH_NativeXComponent_GetXComponentSize](#oh_nativexcomponent_getxcomponentsize)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;const&nbsp;void&nbsp;\*window,&nbsp;uint64_t&nbsp;\*width,&nbsp;uint64_t&nbsp;\*height) | 获取ArkUI&nbsp;XComponent持有的surface的大小。 |
| [OH_NativeXComponent_GetXComponentOffset](#oh_nativexcomponent_getxcomponentoffset)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;const&nbsp;void&nbsp;\*window,&nbsp;double&nbsp;\*x,&nbsp;double&nbsp;\*y) | 获取ArkUI&nbsp;XComponent组件相对屏幕左上顶点的偏移量。 |
| [OH_NativeXComponent_GetTouchEvent](#oh_nativexcomponent_gettouchevent)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;const&nbsp;void&nbsp;\*window,&nbsp;[OH_NativeXComponent_TouchEvent](_o_h___native_x_component___touch_event.md)&nbsp;\*touchEvent) | 获取ArkUI&nbsp;XComponent调度的触摸事件。 |
| [OH_NativeXComponent_GetTouchPointToolType](#oh_nativexcomponent_gettouchpointtooltype)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;uint32_t&nbsp;pointIndex,&nbsp;[OH_NativeXComponent_TouchPointToolType](#oh_nativexcomponent_touchpointtooltype)&nbsp;\*toolType) | 获取ArkUI&nbsp;XComponent触摸点工具类型。 |
| [OH_NativeXComponent_GetTouchPointTiltX](#oh_nativexcomponent_gettouchpointtiltx)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;uint32_t&nbsp;pointIndex,&nbsp;float&nbsp;\*tiltX) | 获取ArkUI&nbsp;XComponent触摸点倾斜与X轴角度。 |
| [OH_NativeXComponent_GetTouchPointTiltY](#oh_nativexcomponent_gettouchpointtilty)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;uint32_t&nbsp;pointIndex,&nbsp;float&nbsp;\*tiltY) | 获取ArkUI&nbsp;XComponent触摸点倾斜与Y轴角度。 |
| [OH_NativeXComponent_GetMouseEvent](#oh_nativexcomponent_getmouseevent)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;const&nbsp;void&nbsp;\*window,&nbsp;[OH_NativeXComponent_MouseEvent](_o_h___native_x_component___mouse_event.md)&nbsp;\*mouseEvent) | 获取ArkUI&nbsp;XComponent调度的鼠标事件。 |
| [OH_NativeXComponent_RegisterCallback](#oh_nativexcomponent_registercallback)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;[OH_NativeXComponent_Callback](_o_h___native_x_component___callback.md)&nbsp;\*callback) | 为此OH_NativeXComponent实例注册回调。 |
| [OH_NativeXComponent_RegisterMouseEventCallback](#oh_nativexcomponent_registermouseeventcallback)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;[OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component___mouse_event___callback.md)&nbsp;\*callback) | 为此OH_NativeXComponent实例注册鼠标事件回调。 |
| [OH_NativeXComponent_RegisterFocusEventCallback](#oh_nativexcomponent_registerfocuseventcallback)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;void(\*callback)([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;void&nbsp;\*window)) | 为此OH_NativeXComponent实例注册获焦事件回调。 |
| [OH_NativeXComponent_RegisterKeyEventCallback](#oh_nativexcomponent_registerkeyeventcallback)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;void(\*callback)([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;void&nbsp;\*window)) | 为此OH_NativeXComponent实例注册按键事件回调。 |
| [OH_NativeXComponent_RegisterBlurEventCallback](#oh_nativexcomponent_registerblureventcallback)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;void(\*callback)([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;void&nbsp;\*window)) | 为此OH_NativeXComponent实例注册失焦事件回调。 |
| [OH_NativeXComponent_GetKeyEvent](#oh_nativexcomponent_getkeyevent)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;[OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent)&nbsp;\*\*keyEvent) | 获取ArkUI&nbsp;XComponent调度的按键事件。 |
| [OH_NativeXComponent_GetKeyEventAction](#oh_nativexcomponent_getkeyeventaction)&nbsp;([OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent)&nbsp;\*keyEvent,&nbsp;[OH_NativeXComponent_KeyAction](#oh_nativexcomponent_keyaction)&nbsp;\*action) | 获取传入按键事件的动作。 |
| [OH_NativeXComponent_GetKeyEventCode](#oh_nativexcomponent_getkeyeventcode)&nbsp;([OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent)&nbsp;\*keyEvent,&nbsp;[OH_NativeXComponent_KeyCode](#oh_nativexcomponent_keycode)&nbsp;\*code) | 获取传入按键事件的按键码。 |
| [OH_NativeXComponent_GetKeyEventSourceType](#oh_nativexcomponent_getkeyeventsourcetype)&nbsp;([OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent)&nbsp;\*keyEvent,&nbsp;[OH_NativeXComponent_EventSourceType](#oh_nativexcomponent_eventsourcetype)&nbsp;\*sourceType) | 获取传入按键事件的事件源类型。 |
| [OH_NativeXComponent_GetKeyEventDeviceId](#oh_nativexcomponent_getkeyeventdeviceid)&nbsp;([OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent)&nbsp;\*keyEvent,&nbsp;int64_t&nbsp;\*deviceId) | 获取传入按键事件的设备id。 |
| [OH_NativeXComponent_GetKeyEventTimeStamp](#oh_nativexcomponent_getkeyeventtimestamp)&nbsp;([OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent)&nbsp;\*keyEvent,&nbsp;int64_t&nbsp;\*timeStamp) | 获取传入按键事件的时间戳。 |
| [OH_NativeXComponent_GetTouchEvent](#oh_nativexcomponent_gettouchevent)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;const&nbsp;void&nbsp;\*window,&nbsp;[OH_NativeXComponent_TouchEvent](_o_h___native_x_component___touch_event.md)&nbsp;\*touchEvent) | 获取ArkUI&nbsp;XComponent调度的触摸事件。 |
| [OH_NativeXComponent_GetTouchPointToolType](#oh_nativexcomponent_gettouchpointtooltype)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;uint32_t&nbsp;pointIndex,&nbsp;[OH_NativeXComponent_TouchPointToolType](#oh_nativexcomponent_touchpointtooltype)&nbsp;\*toolType) | 获取ArkUI&nbsp;XComponent触摸点工具类型。 |
| [OH_NativeXComponent_GetTouchPointTiltX](#oh_nativexcomponent_gettouchpointtiltx)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;uint32_t&nbsp;pointIndex,&nbsp;float&nbsp;\*tiltX) | 获取ArkUI&nbsp;XComponent触摸点倾斜与X轴角度。 |
| [OH_NativeXComponent_GetTouchPointTiltY](#oh_nativexcomponent_gettouchpointtilty)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;uint32_t&nbsp;pointIndex,&nbsp;float&nbsp;\*tiltY) | 获取ArkUI&nbsp;XComponent触摸点倾斜与Y轴角度。 |
| [OH_NativeXComponent_GetMouseEvent](#oh_nativexcomponent_getmouseevent)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;const&nbsp;void&nbsp;\*window,&nbsp;[OH_NativeXComponent_MouseEvent](_o_h___native_x_component___mouse_event.md)&nbsp;\*mouseEvent) | 获取ArkUI&nbsp;XComponent调度的鼠标事件。 |
| [OH_NativeXComponent_RegisterCallback](#oh_nativexcomponent_registercallback)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;[OH_NativeXComponent_Callback](_o_h___native_x_component___callback.md)&nbsp;\*callback) | 为此OH_NativeXComponent实例注册回调。 |
| [OH_NativeXComponent_RegisterMouseEventCallback](#oh_nativexcomponent_registermouseeventcallback)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;[OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component___mouse_event___callback.md)&nbsp;\*callback) | 为此OH_NativeXComponent实例注册鼠标事件回调。 |
| [OH_NativeXComponent_RegisterFocusEventCallback](#oh_nativexcomponent_registerfocuseventcallback)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;void(\*callback)([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;void&nbsp;\*window)) | 为此OH_NativeXComponent实例注册获焦事件回调。 |
| [OH_NativeXComponent_RegisterKeyEventCallback](#oh_nativexcomponent_registerkeyeventcallback)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;void(\*callback)([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;void&nbsp;\*window)) | 为此OH_NativeXComponent实例注册按键事件回调。 |
| [OH_NativeXComponent_RegisterBlurEventCallback](#oh_nativexcomponent_registerblureventcallback)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;void(\*callback)([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;void&nbsp;\*window)) | 为此OH_NativeXComponent实例注册失焦事件回调。 |
| [OH_NativeXComponent_GetKeyEvent](#oh_nativexcomponent_getkeyevent)&nbsp;([OH_NativeXComponent](#oh_nativexcomponent)&nbsp;\*component,&nbsp;[OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent)&nbsp;\*\*keyEvent) | 获取ArkUI&nbsp;XComponent调度的按键事件。 |
| [OH_NativeXComponent_GetKeyEventAction](#oh_nativexcomponent_getkeyeventaction)&nbsp;([OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent)&nbsp;\*keyEvent,&nbsp;[OH_NativeXComponent_KeyAction](#oh_nativexcomponent_keyaction)&nbsp;\*action) | 获取传入按键事件的动作。 |
| [OH_NativeXComponent_GetKeyEventCode](#oh_nativexcomponent_getkeyeventcode)&nbsp;([OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent)&nbsp;\*keyEvent,&nbsp;[OH_NativeXComponent_KeyCode](#oh_nativexcomponent_keycode)&nbsp;\*code) | 获取传入按键事件的按键码。 |
| [OH_NativeXComponent_GetKeyEventSourceType](#oh_nativexcomponent_getkeyeventsourcetype)&nbsp;([OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent)&nbsp;\*keyEvent,&nbsp;[OH_NativeXComponent_EventSourceType](#oh_nativexcomponent_eventsourcetype)&nbsp;\*sourceType) | 获取传入按键事件的事件源类型。 |
| [OH_NativeXComponent_GetKeyEventDeviceId](#oh_nativexcomponent_getkeyeventdeviceid)&nbsp;([OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent)&nbsp;\*keyEvent,&nbsp;int64_t&nbsp;\*deviceId) | 获取传入按键事件的设备id。 |
| [OH_NativeXComponent_GetKeyEventTimeStamp](#oh_nativexcomponent_getkeyeventtimestamp)&nbsp;([OH_NativeXComponent_KeyEvent](#oh_nativexcomponent_keyevent)&nbsp;\*keyEvent,&nbsp;int64_t&nbsp;\*timeStamp) | 获取传入按键事件的时间戳。 |
### 变量
| 名称 | 描述 |
| -------- | -------- |
| **OH_XCOMPONENT_ID_LEN_MAX**&nbsp;=&nbsp;128 | ArkUI&nbsp;XComponent的id最大长度。 |
| **OH_MAX_TOUCH_POINTS_NUMBER**&nbsp;=&nbsp;10 | 触摸事件中的可识别的触摸点个数最大值。 |
| [OH_NativeXComponent_TouchPoint::id](#id-12)&nbsp;=&nbsp;0 | 手指的唯一标识符。 |
| 名称 | 描述 |
| ---------------------------------------- | ------------------------------ |
| **OH_XCOMPONENT_ID_LEN_MAX**&nbsp;=&nbsp;128 | ArkUI&nbsp;XComponent的id最大长度。 |
| **OH_MAX_TOUCH_POINTS_NUMBER**&nbsp;=&nbsp;10 | 触摸事件中的可识别的触摸点个数最大值。 |
| [OH_NativeXComponent_TouchPoint::id](#id-12)&nbsp;=&nbsp;0 | 手指的唯一标识符。 |
| [OH_NativeXComponent_TouchPoint::screenX](#screenx-13)&nbsp;=&nbsp;0.0 | 触摸点相对于XComponent所在应用窗口左上角的x坐标。 |
| [OH_NativeXComponent_TouchPoint::screenY](#screeny-13)&nbsp;=&nbsp;0.0 | 触摸点相对于XComponent所在应用窗口左上角的y坐标。 |
| [OH_NativeXComponent_TouchPoint::x](#x-13)&nbsp;=&nbsp;0.0 | 触摸点相对于XComponent组件左边缘的x坐标。 |
| [OH_NativeXComponent_TouchPoint::y](#y-13)&nbsp;=&nbsp;0.0 | 触摸点相对于XComponent组件上边缘的y坐标。 |
| [OH_NativeXComponent_TouchPoint::type](#type-12)&nbsp;=&nbsp;OH_NativeXComponent_TouchEventType::OH_NATIVEXCOMPONENT_UNKNOWN | 触摸事件的触摸类型。 |
| [OH_NativeXComponent_TouchPoint::size](#size-12)&nbsp;=&nbsp;0.0 | 指垫和屏幕之间的接触面积。 |
| [OH_NativeXComponent_TouchPoint::force](#force-12)&nbsp;=&nbsp;0.0 | 当前触摸事件的压力。 |
| [OH_NativeXComponent_TouchPoint::timeStamp](#timestamp-12)&nbsp;=&nbsp;0 | 当前触摸事件的时间戳。 |
| [OH_NativeXComponent_TouchPoint::isPressed](#ispressed)&nbsp;=&nbsp;false | 当前点是否被按下。 |
| [OH_NativeXComponent_TouchEvent::id](#id-22)&nbsp;=&nbsp;0 | 手指的唯一标识符。 |
| [OH_NativeXComponent_TouchEvent::screenX](#screenx-23)&nbsp;=&nbsp;0.0 | 触摸点相对于屏幕左边缘的x坐标。 |
| [OH_NativeXComponent_TouchEvent::screenY](#screeny-23)&nbsp;=&nbsp;0.0 | 触摸点相对于屏幕上边缘的y坐标。 |
| [OH_NativeXComponent_TouchEvent::x](#x-23)&nbsp;=&nbsp;0.0 | 触摸点相对于XComponent组件左边缘的x坐标。 |
| [OH_NativeXComponent_TouchEvent::y](#y-23)&nbsp;=&nbsp;0.0 | 触摸点相对于XComponent组件上边缘的y坐标。 |
| [OH_NativeXComponent_TouchEvent::type](#type-22)&nbsp;=&nbsp;OH_NativeXComponent_TouchEventType::OH_NATIVEXCOMPONENT_UNKNOWN | 触摸事件的触摸类型。 |
| [OH_NativeXComponent_TouchEvent::size](#size-22)&nbsp;=&nbsp;0.0 | 指垫和屏幕之间的接触面积。 |
| [OH_NativeXComponent_TouchEvent::force](#force-22)&nbsp;=&nbsp;0.0 | 当前触摸事件的压力。 |
| [OH_NativeXComponent_TouchEvent::deviceId](#deviceid)&nbsp;=&nbsp;0 | 产生当前触摸事件的设备的ID。 |
| [OH_NativeXComponent_TouchEvent::timeStamp](#timestamp-22)&nbsp;=&nbsp;0 | 当前触摸事件的时间戳。 |
| [OH_NativeXComponent_TouchEvent::touchPoints](#touchpoints)&nbsp;[OH_MAX_TOUCH_POINTS_NUMBER] | 当前触摸点的数组。 |
| [OH_NativeXComponent_TouchEvent::numPoints](#numpoints)&nbsp;=&nbsp;0 | 当前接触点的数量。 |
| [OH_NativeXComponent_MouseEvent::x](#x-33)&nbsp;=&nbsp;0.0 | 点击触点相对于当前组件左上角的x轴坐标。 |
| [OH_NativeXComponent_MouseEvent::y](#y-33)=&nbsp;0.0 | 点击触点相对于当前组件左上角的y轴坐标。 |
| [OH_NativeXComponent_MouseEvent::screenX](#screenx-33)=&nbsp;0.0 | 点击触点相对于屏幕左上角的x轴坐标。 |
| [OH_NativeXComponent_MouseEvent::screenY](#screeny-33)=&nbsp;0.0 | 点击触点相对于屏幕左上角的y轴坐标。 |
| [OH_NativeXComponent_MouseEvent::timestamp](#timestamp)=&nbsp;0 | 当前鼠标事件的时间戳。 |
| [OH_NativeXComponent_MouseEvent::action](#action)=&nbsp;[OH_NativeXComponent_MouseEventAction::OH_NATIVEXCOMPONENT_MOUSE_NONE](#oh_nativexcomponent_mouseeventaction) | 当前鼠标事件动作。 |
| [OH_NativeXComponent_MouseEvent::button](#button)=&nbsp;[OH_NativeXComponent_MouseEventButton::OH_NATIVEXCOMPONENT_NONE_BUTTON](#oh_nativexcomponent_mouseeventbutton) | 鼠标事件按键。 |
| [OH_NativeXComponent_Callback::OnSurfaceCreated](#onsurfacecreated) | 创建surface时调用。 |
| [OH_NativeXComponent_Callback::OnSurfaceChanged](#onsurfacechanged) | 当surface改变时调用。 |
| [OH_NativeXComponent_Callback::OnSurfaceDestroyed](#onsurfacedestroyed) | 当surface被销毁时调用。 |
| [OH_NativeXComponent_Callback::DispatchTouchEvent](#dispatchtouchevent) | 当触摸事件被触发时调用。 |
| [OH_NativeXComponent_MouseEvent_Callback::DispatchMouseEvent](#dispatchmouseevent) | 当鼠标事件被触发时调用。 |
| [OH_NativeXComponent_MouseEvent_Callback::DispatchHoverEvent](#dispatchhoverevent) | 当悬停事件被触发时调用。 |
| [OH_NativeXComponent_TouchPoint::x](#x-13)&nbsp;=&nbsp;0.0 | 触摸点相对于XComponent组件左边缘的x坐标。 |
| [OH_NativeXComponent_TouchPoint::y](#y-13)&nbsp;=&nbsp;0.0 | 触摸点相对于XComponent组件上边缘的y坐标。 |
| [OH_NativeXComponent_TouchPoint::type](#type-12)&nbsp;=&nbsp;OH_NativeXComponent_TouchEventType::OH_NATIVEXCOMPONENT_UNKNOWN | 触摸事件的触摸类型。 |
| [OH_NativeXComponent_TouchPoint::size](#size-12)&nbsp;=&nbsp;0.0 | 指垫和屏幕之间的接触面积。 |
| [OH_NativeXComponent_TouchPoint::force](#force-12)&nbsp;=&nbsp;0.0 | 当前触摸事件的压力。 |
| [OH_NativeXComponent_TouchPoint::timeStamp](#timestamp-12)&nbsp;=&nbsp;0 | 当前触摸事件的时间戳。 |
| [OH_NativeXComponent_TouchPoint::isPressed](#ispressed)&nbsp;=&nbsp;false | 当前点是否被按下。 |
| [OH_NativeXComponent_TouchEvent::id](#id-22)&nbsp;=&nbsp;0 | 手指的唯一标识符。 |
| [OH_NativeXComponent_TouchEvent::screenX](#screenx-23)&nbsp;=&nbsp;0.0 | 触摸点相对于屏幕左边缘的x坐标。 |
| [OH_NativeXComponent_TouchEvent::screenY](#screeny-23)&nbsp;=&nbsp;0.0 | 触摸点相对于屏幕上边缘的y坐标。 |
| [OH_NativeXComponent_TouchEvent::x](#x-23)&nbsp;=&nbsp;0.0 | 触摸点相对于XComponent组件左边缘的x坐标。 |
| [OH_NativeXComponent_TouchEvent::y](#y-23)&nbsp;=&nbsp;0.0 | 触摸点相对于XComponent组件上边缘的y坐标。 |
| [OH_NativeXComponent_TouchEvent::type](#type-22)&nbsp;=&nbsp;OH_NativeXComponent_TouchEventType::OH_NATIVEXCOMPONENT_UNKNOWN | 触摸事件的触摸类型。 |
| [OH_NativeXComponent_TouchEvent::size](#size-22)&nbsp;=&nbsp;0.0 | 指垫和屏幕之间的接触面积。 |
| [OH_NativeXComponent_TouchEvent::force](#force-22)&nbsp;=&nbsp;0.0 | 当前触摸事件的压力。 |
| [OH_NativeXComponent_TouchEvent::deviceId](#deviceid)&nbsp;=&nbsp;0 | 产生当前触摸事件的设备的ID。 |
| [OH_NativeXComponent_TouchEvent::timeStamp](#timestamp-22)&nbsp;=&nbsp;0 | 当前触摸事件的时间戳。 |
| [OH_NativeXComponent_TouchEvent::touchPoints](#touchpoints)&nbsp;[OH_MAX_TOUCH_POINTS_NUMBER] | 当前触摸点的数组。 |
| [OH_NativeXComponent_TouchEvent::numPoints](#numpoints)&nbsp;=&nbsp;0 | 当前接触点的数量。 |
| [OH_NativeXComponent_MouseEvent::x](#x-33)&nbsp;=&nbsp;0.0 | 点击触点相对于当前组件左上角的x轴坐标。 |
| [OH_NativeXComponent_MouseEvent::y](#y-33)=&nbsp;0.0 | 点击触点相对于当前组件左上角的y轴坐标。 |
| [OH_NativeXComponent_MouseEvent::screenX](#screenx-33)=&nbsp;0.0 | 点击触点相对于屏幕左上角的x轴坐标。 |
| [OH_NativeXComponent_MouseEvent::screenY](#screeny-33)=&nbsp;0.0 | 点击触点相对于屏幕左上角的y轴坐标。 |
| [OH_NativeXComponent_MouseEvent::timestamp](#timestamp)=&nbsp;0 | 当前鼠标事件的时间戳。 |
| [OH_NativeXComponent_MouseEvent::action](#action)=&nbsp;[OH_NativeXComponent_MouseEventAction::OH_NATIVEXCOMPONENT_MOUSE_NONE](#oh_nativexcomponent_mouseeventaction) | 当前鼠标事件动作。 |
| [OH_NativeXComponent_MouseEvent::button](#button)=&nbsp;[OH_NativeXComponent_MouseEventButton::OH_NATIVEXCOMPONENT_NONE_BUTTON](#oh_nativexcomponent_mouseeventbutton) | 鼠标事件按键。 |
| [OH_NativeXComponent_Callback::OnSurfaceCreated](#onsurfacecreated) | 创建surface时调用。 |
| [OH_NativeXComponent_Callback::OnSurfaceChanged](#onsurfacechanged) | 当surface改变时调用。 |
| [OH_NativeXComponent_Callback::OnSurfaceDestroyed](#onsurfacedestroyed) | 当surface被销毁时调用。 |
| [OH_NativeXComponent_Callback::DispatchTouchEvent](#dispatchtouchevent) | 当触摸事件被触发时调用。 |
| [OH_NativeXComponent_MouseEvent_Callback::DispatchMouseEvent](#dispatchmouseevent) | 当鼠标事件被触发时调用。 |
| [OH_NativeXComponent_MouseEvent_Callback::DispatchHoverEvent](#dispatchhoverevent) | 当悬停事件被触发时调用。 |
## 类型定义说明
......@@ -199,10 +200,10 @@ anonymous enum
枚举API访问状态。
| 枚举值 | 描述 |
| -------- | -------- |
| OH_NATIVEXCOMPONENT_RESULT_SUCCESS | 成功结果。 |
| OH_NATIVEXCOMPONENT_RESULT_FAILED | 失败结果。 |
| 枚举值 | 描述 |
| ---------------------------------------- | ----- |
| OH_NATIVEXCOMPONENT_RESULT_SUCCESS | 成功结果。 |
| OH_NATIVEXCOMPONENT_RESULT_FAILED | 失败结果。 |
| OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER | 无效参数。 |
**起始版本:**
......@@ -220,14 +221,14 @@ enum OH_NativeXComponent_EventSourceType
触摸事件源类型。
| 枚举值 | 描述 |
| -------- | -------- |
| OH_NATIVEXCOMPONENT_SOURCE_TYPE_UNKNOWN | 未知的输入源类型。 |
| OH_NATIVEXCOMPONENT_SOURCE_TYPE_MOUSE | 表示输入源生成鼠标多点触摸事件。 |
| 枚举值 | 描述 |
| ---------------------------------------- | ------------------- |
| OH_NATIVEXCOMPONENT_SOURCE_TYPE_UNKNOWN | 未知的输入源类型。 |
| OH_NATIVEXCOMPONENT_SOURCE_TYPE_MOUSE | 表示输入源生成鼠标多点触摸事件。 |
| OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHSCREEN | 表示输入源生成一个触摸屏多点触摸事件。 |
| OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHPAD | 表示输入源生成一个触摸板多点触摸事件。 |
| OH_NATIVEXCOMPONENT_SOURCE_TYPE_JOYSTICK | 表示输入源生成一个操纵杆多点触摸事件。 |
| OH_NATIVEXCOMPONENT_SOURCE_TYPE_KEYBOARD | 表示输入源生成一个键盘事件。 |
| OH_NATIVEXCOMPONENT_SOURCE_TYPE_KEYBOARD | 表示输入源生成一个键盘事件。 |
**起始版本:**
......@@ -244,11 +245,11 @@ enum OH_NativeXComponent_KeyAction
按键事件动作。
| 枚举值 | 描述 |
| -------- | -------- |
| 枚举值 | 描述 |
| -------------------------------------- | -------- |
| OH_NATIVEXCOMPONENT_KEY_ACTION_UNKNOWN | 未知的按键动作。 |
| OH_NATIVEXCOMPONENT_KEY_ACTION_DOWN | 按键按下动作。 |
| OH_NATIVEXCOMPONENT_KEY_ACTION_UP | 按键抬起动作。 |
| OH_NATIVEXCOMPONENT_KEY_ACTION_DOWN | 按键按下动作。 |
| OH_NATIVEXCOMPONENT_KEY_ACTION_UP | 按键抬起动作。 |
**起始版本:**
......@@ -265,338 +266,338 @@ enum OH_NativeXComponent_KeyCode
按键事件的键码。
| 枚举值 | 描述 |
| -------- | -------- |
| KEY_UNKNOWN | 未知按键 |
| KEY_FN | 功能(Fn)键 |
| KEY_HOME | 功能(Home)键 |
| KEY_BACK | 返回键 |
| KEY_MEDIA_PLAY_PAUSE | 多媒体键&nbsp;播放/暂停 |
| KEY_MEDIA_STOP | 多媒体键&nbsp;停止 |
| KEY_MEDIA_NEXT | 多媒体键&nbsp;下一首 |
| KEY_MEDIA_PREVIOUS | 多媒体键&nbsp;上一首 |
| KEY_MEDIA_REWIND | 多媒体键&nbsp;快退 |
| KEY_MEDIA_FAST_FORWARD | 多媒体键&nbsp;快进 |
| KEY_VOLUME_UP | 音量增加键 |
| KEY_VOLUME_DOWN | 音量减小键 |
| KEY_POWER | 电源键 |
| KEY_CAMERA | 拍照键 |
| KEY_VOLUME_MUTE | 扬声器静音键 |
| KEY_MUTE | 话筒静音键 |
| KEY_BRIGHTNESS_UP | 亮度调节按键&nbsp;调亮 |
| KEY_BRIGHTNESS_DOWN | 亮度调节按键&nbsp;调暗 |
| KEY_0 | 按键'0' |
| KEY_1 | 按键'1' |
| KEY_2 | 按键'2' |
| KEY_3 | 按键'3' |
| KEY_4 | 按键'4' |
| KEY_5 | 按键'5' |
| KEY_6 | 按键'6' |
| KEY_7 | 按键'7' |
| KEY_8 | 按键'8' |
| KEY_9 | 按键'9' |
| KEY_STAR | 按键'\*' |
| KEY_POUND | 按键'\#' |
| KEY_DPAD_UP | 导航键&nbsp;向上 |
| KEY_DPAD_DOWN | 导航键&nbsp;向下 |
| KEY_DPAD_LEFT | 导航键&nbsp;向左 |
| KEY_DPAD_RIGHT | 导航键&nbsp;向右 |
| KEY_DPAD_CENTER | 导航键&nbsp;确定键 |
| KEY_A | 按键'A' |
| KEY_B | 按键'B' |
| KEY_C | 按键'C' |
| KEY_D | 按键'D' |
| KEY_E | 按键'E' |
| KEY_F | 按键'F' |
| KEY_G | 按键'G' |
| KEY_H | 按键'H' |
| KEY_I | 按键'I' |
| KEY_J | 按键'J' |
| KEY_K | 按键'K' |
| KEY_L | 按键'L' |
| KEY_M | 按键'M' |
| KEY_N | 按键'N' |
| KEY_O | 按键'O' |
| KEY_P | 按键'P' |
| KEY_Q | 按键'Q' |
| KEY_R | 按键'R' |
| KEY_S | 按键'S' |
| KEY_T | 按键'T' |
| KEY_U | 按键'U' |
| KEY_V | 按键'V' |
| KEY_W | 按键'W' |
| KEY_X | 按键'X' |
| KEY_Y | 按键'Y' |
| KEY_Z | 按键'Z' |
| KEY_COMMA | 按键',' |
| KEY_PERIOD | 按键'.' |
| KEY_ALT_LEFT | 左Alt键 |
| KEY_ALT_RIGHT | 右Alt键 |
| KEY_SHIFT_LEFT | 左Shift键 |
| KEY_SHIFT_RIGHT | 右Shift键 |
| KEY_TAB | Tab键 |
| KEY_SPACE | 空格键 |
| KEY_SYM | 符号修改器按键 |
| KEY_EXPLORER | 浏览器功能键,此键用于启动浏览器应用程序。 |
| KEY_ENVELOPE | 电子邮件功能键,此键用于启动电子邮件应用程序。 |
| KEY_ENTER | 回车键 |
| KEY_DEL | 退格键 |
| KEY_GRAVE | 按键'‘’ |
| KEY_MINUS | 按键'-' |
| KEY_EQUALS | 按键'=' |
| KEY_LEFT_BRACKET | 按键'[' |
| KEY_RIGHT_BRACKET | 按键']' |
| KEY_BACKSLASH | 按键'\' |
| KEY_SEMICOLON | 按键';' |
| KEY_APOSTROPHE | 按键'''&nbsp;(单引号) |
| KEY_SLASH | 按键'/' |
| KEY_AT | 按键'\@' |
| KEY_PLUS | 按键'+' |
| KEY_MENU | 菜单键 |
| KEY_PAGE_UP | 向上翻页键 |
| KEY_PAGE_DOWN | 向下翻页键 |
| KEY_ESCAPE | ESC键 |
| KEY_FORWARD_DEL | 删除键 |
| KEY_CTRL_LEFT | 左Ctrl键 |
| KEY_CTRL_RIGHT | 右Ctrl键 |
| KEY_CAPS_LOCK | 大写锁定键 |
| KEY_SCROLL_LOCK | 滚动锁定键 |
| KEY_META_LEFT | 左元修改器键 |
| KEY_META_RIGHT | 右元修改器键 |
| KEY_FUNCTION | 功能键 |
| KEY_SYSRQ | 系统请求/打印屏幕键 |
| KEY_BREAK | Break/Pause键 |
| KEY_MOVE_HOME | 光标移动到开始键 |
| KEY_MOVE_END | 光标移动到末尾键 |
| KEY_INSERT | 插入键 |
| KEY_FORWARD | 前进键 |
| KEY_MEDIA_PLAY | 多媒体键&nbsp;播放 |
| KEY_MEDIA_PAUSE | 多媒体键&nbsp;暂停 |
| KEY_MEDIA_CLOSE | 多媒体键&nbsp;关闭 |
| KEY_MEDIA_EJECT | 多媒体键&nbsp;弹出 |
| KEY_MEDIA_RECORD | 多媒体键&nbsp;录音 |
| KEY_F1 | 按键'F1' |
| KEY_F2 | 按键'F2' |
| KEY_F3 | 按键'F3' |
| KEY_F4 | 按键'F4' |
| KEY_F5 | 按键'F5' |
| KEY_F6 | 按键'F6' |
| KEY_F7 | 按键'F7' |
| KEY_F8 | 按键'F8' |
| KEY_F9 | 按键'F9' |
| KEY_F10 | 按键'F10' |
| KEY_F11 | 按键'F11' |
| KEY_F12 | 按键'F12' |
| KEY_NUM_LOCK | 小键盘锁 |
| KEY_NUMPAD_0 | 小键盘按键'0' |
| KEY_NUMPAD_1 | 小键盘按键'1' |
| KEY_NUMPAD_2 | 小键盘按键'2' |
| KEY_NUMPAD_3 | 小键盘按键'3' |
| KEY_NUMPAD_4 | 小键盘按键'4' |
| KEY_NUMPAD_5 | 小键盘按键'5' |
| KEY_NUMPAD_6 | 小键盘按键'6' |
| KEY_NUMPAD_7 | 小键盘按键'7' |
| KEY_NUMPAD_8 | 小键盘按键'8' |
| KEY_NUMPAD_9 | 小键盘按键'9' |
| KEY_NUMPAD_DIVIDE | 小键盘按键'/' |
| KEY_NUMPAD_MULTIPLY | 小键盘按键'\*' |
| KEY_NUMPAD_SUBTRACT | 小键盘按键'-' |
| KEY_NUMPAD_ADD | 小键盘按键'+' |
| KEY_NUMPAD_DOT | 小键盘按键'.' |
| KEY_NUMPAD_COMMA | 小键盘按键',' |
| KEY_NUMPAD_ENTER | 小键盘按键回车 |
| KEY_NUMPAD_EQUALS | 小键盘按键'=' |
| KEY_NUMPAD_LEFT_PAREN | 小键盘按键'(' |
| KEY_NUMPAD_RIGHT_PAREN | 小键盘按键')' |
| KEY_VIRTUAL_MULTITASK | 虚拟多任务键 |
| KEY_SLEEP | 睡眠键 |
| KEY_ZENKAKU_HANKAKU | 日文全宽/半宽键 |
| KEY_102ND | 102nd按键 |
| KEY_RO | 日文Ro键 |
| KEY_KATAKANA | 日文片假名键 |
| KEY_HIRAGANA | 日文平假名键 |
| KEY_HENKAN | 日文转换键 |
| KEY_KATAKANA_HIRAGANA | 日语片假名/平假名键 |
| KEY_MUHENKAN | 日文非转换键 |
| KEY_LINEFEED | 换行键 |
| KEY_MACRO | 宏键 |
| KEY_NUMPAD_PLUSMINUS | 数字键盘上的加号/减号键 |
| KEY_SCALE | 扩展键 |
| KEY_HANGUEL | 日文韩语键 |
| KEY_HANJA | 日文汉语键 |
| KEY_YEN | 日元键 |
| KEY_STOP | 停止键 |
| KEY_AGAIN | 重复键 |
| KEY_PROPS | 道具键 |
| KEY_UNDO | 撤消键 |
| KEY_COPY | 复制键 |
| KEY_OPEN | 打开键 |
| KEY_PASTE | 粘贴键 |
| KEY_FIND | 查找键 |
| KEY_CUT | 剪切键 |
| KEY_HELP | 帮助键 |
| KEY_CALC | 计算器特殊功能键,用于启动计算器应用程序 |
| KEY_FILE | 文件按键 |
| KEY_BOOKMARKS | 书签键 |
| KEY_NEXT | 下一个按键 |
| KEY_PLAYPAUSE | 播放/暂停键 |
| KEY_PREVIOUS | 上一个按键 |
| KEY_STOPCD | CD停止键 |
| KEY_CONFIG | 配置键 |
| KEY_REFRESH | 刷新键 |
| KEY_EXIT | 退出键 |
| KEY_EDIT | 编辑键 |
| KEY_SCROLLUP | 向上滚动键 |
| KEY_SCROLLDOWN | 向下滚动键 |
| KEY_NEW | 新建键 |
| KEY_REDO | 恢复键 |
| KEY_CLOSE | 关闭键 |
| KEY_PLAY | 播放键 |
| KEY_BASSBOOST | 低音增强键 |
| KEY_PRINT | 打印键 |
| KEY_CHAT | 聊天键 |
| KEY_FINANCE | 金融键 |
| KEY_CANCEL | 取消键 |
| KEY_KBDILLUM_TOGGLE | 键盘灯光切换键 |
| KEY_KBDILLUM_DOWN | 键盘灯光调亮键 |
| KEY_KBDILLUM_UP | 键盘灯光调暗键 |
| KEY_SEND | 发送键 |
| KEY_REPLY | 答复键 |
| KEY_FORWARDMAIL | 邮件转发键 |
| KEY_SAVE | 保存键 |
| KEY_DOCUMENTS | 文件键 |
| KEY_VIDEO_NEXT | 下一个视频键 |
| KEY_VIDEO_PREV | 上一个视频键 |
| KEY_BRIGHTNESS_CYCLE | 背光渐变键 |
| KEY_BRIGHTNESS_ZERO | 亮度调节为0键 |
| KEY_DISPLAY_OFF | 显示关闭键 |
| KEY_BTN_MISC | 游戏手柄上的各种按键 |
| KEY_GOTO | 进入键 |
| KEY_INFO | 信息查看键 |
| KEY_PROGRAM | 程序键 |
| KEY_PVR | 个人录像机(PVR)键 |
| KEY_SUBTITLE | 字幕键 |
| KEY_FULL_SCREEN | 全屏键 |
| KEY_KEYBOARD | 键盘 |
| KEY_ASPECT_RATIO | 屏幕纵横比调节键 |
| KEY_PC | 端口控制键 |
| KEY_TV | TV键 |
| KEY_TV2 | TV键2 |
| KEY_VCR | 录像机开启键 |
| KEY_VCR2 | 录像机开启键2 |
| KEY_SAT | SIM卡应用工具包(SAT)键 |
| KEY_CD | CD键 |
| KEY_TAPE | 磁带键 |
| KEY_TUNER | 调谐器键 |
| KEY_PLAYER | 播放器键 |
| KEY_DVD | DVD键 |
| KEY_AUDIO | 音频键 |
| KEY_VIDEO | 视频键 |
| KEY_MEMO | 备忘录键 |
| KEY_CALENDAR | 日历键 |
| KEY_RED | 红色指示器 |
| KEY_GREEN | 绿色指示器 |
| KEY_YELLOW | 黄色指示器 |
| KEY_BLUE | 蓝色指示器 |
| KEY_CHANNELUP | 频道向上键 |
| KEY_CHANNELDOWN | 频道向下键 |
| KEY_LAST | 末尾键 |
| KEY_RESTART | 重启键 |
| KEY_SLOW | 慢速键 |
| KEY_SHUFFLE | 随机播放键 |
| KEY_VIDEOPHONE | 可视电话键 |
| KEY_GAMES | 游戏键 |
| KEY_ZOOMIN | 放大键 |
| KEY_ZOOMOUT | 缩小键 |
| KEY_ZOOMRESET | 缩放重置键 |
| KEY_WORDPROCESSOR | 文字处理键 |
| KEY_EDITOR | 编辑器键 |
| KEY_SPREADSHEET | 电子表格键 |
| KEY_GRAPHICSEDITOR | 图形编辑器键 |
| KEY_PRESENTATION | 演示文稿键 |
| KEY_DATABASE | 数据库键标 |
| KEY_NEWS | 新闻键 |
| KEY_VOICEMAIL | 语音信箱 |
| KEY_ADDRESSBOOK | 通讯簿 |
| KEY_MESSENGER | 通信键 |
| KEY_BRIGHTNESS_TOGGLE | 亮度切换键 |
| KEY_SPELLCHECK | AL拼写检查 |
| KEY_COFFEE | 终端锁/屏幕保护程序 |
| KEY_MEDIA_REPEAT | 媒体循环键 |
| KEY_IMAGES | 图像键 |
| KEY_BUTTONCONFIG | 按键配置键 |
| KEY_TASKMANAGER | 任务管理器 |
| KEY_JOURNAL | 日志按键 |
| KEY_CONTROLPANEL | 控制面板键 |
| KEY_APPSELECT | 应用程序选择键 |
| KEY_SCREENSAVER | 屏幕保护程序键 |
| KEY_ASSISTANT | 辅助键 |
| KEY_KBD_LAYOUT_NEXT | 下一个键盘布局键 |
| KEY_BRIGHTNESS_MIN | 最小亮度键 |
| KEY_BRIGHTNESS_MAX | 最大亮度键 |
| KEY_KBDINPUTASSIST_PREV | 键盘输入Assist_Previous |
| KEY_KBDINPUTASSIST_NEXT | 键盘输入Assist_Next |
| KEY_KBDINPUTASSIST_PREVGROUP | 键盘输入Assist_Previous |
| KEY_KBDINPUTASSIST_NEXTGROUP | 键盘输入Assist_Next |
| KEY_KBDINPUTASSIST_ACCEPT | 键盘输入Assist_Accept |
| KEY_KBDINPUTASSIST_CANCEL | 键盘输入Assist_Cancel |
| KEY_FRONT | 挡风玻璃除雾器开关 |
| KEY_SETUP | 设置键 |
| KEY_WAKEUP | 唤醒键 |
| KEY_SENDFILE | 发送文件按键 |
| KEY_DELETEFILE | 删除文件按键 |
| KEY_XFER | 文件传输(XFER)按键 |
| KEY_PROG1 | 程序键1 |
| KEY_PROG2 | 程序键2 |
| KEY_MSDOS | MS-DOS键(微软磁盘操作系统 |
| KEY_SCREENLOCK | 屏幕锁定键 |
| KEY_DIRECTION_ROTATE_DISPLAY | 方向旋转显示键 |
| KEY_CYCLEWINDOWS | Windows循环键 |
| KEY_COMPUTER | 按键 |
| KEY_EJECTCLOSECD | 弹出CD键 |
| KEY_ISO | ISO键 |
| KEY_MOVE | 移动键 |
| KEY_F13 | 按键'F13' |
| KEY_F14 | 按键'F14' |
| KEY_F15 | 按键'F15' |
| KEY_F16 | 按键'F16' |
| KEY_F17 | 按键'F17' |
| KEY_F18 | 按键'F18' |
| KEY_F19 | 按键'F19' |
| KEY_F20 | 按键'F20' |
| KEY_F21 | 按键'F21' |
| KEY_F22 | 按键'F22' |
| KEY_F23 | 按键'F23' |
| KEY_F24 | 按键'F24' |
| KEY_PROG3 | 程序键3 |
| KEY_PROG4 | 程序键4 |
| KEY_DASHBOARD | 仪表板 |
| KEY_SUSPEND | 挂起键 |
| KEY_HP | 高阶路径键 |
| KEY_SOUND | 音量键 |
| KEY_QUESTION | 疑问按键 |
| KEY_CONNECT | 连接键 |
| KEY_SPORT | 运动按键 |
| KEY_SHOP | 商城键 |
| KEY_ALTERASE | 交替键 |
| KEY_SWITCHVIDEOMODE | 在可用视频之间循环输出(监视器/LCD/TV输出/等) |
| KEY_BATTERY | 电池按键 |
| KEY_BLUETOOTH | 蓝牙按键 |
| KEY_WLAN | 无线局域网 |
| KEY_UWB | 超宽带(UWB) |
| KEY_WWAN_WIMAX | WWAN&nbsp;WiMAX按键 |
| KEY_RFKILL | 控制所有收音机的键 |
| KEY_CHANNEL | 向上频道键 |
| KEY_BTN_0 | 按键0 |
| KEY_BTN_1 | 按键1 |
| KEY_BTN_2 | 按键2 |
| KEY_BTN_3 | 按键3 |
| KEY_BTN_4 | 按键4 |
| KEY_BTN_5 | 按键5 |
| KEY_BTN_6 | 按键6 |
| KEY_BTN_7 | 按键7 |
| KEY_BTN_8 | 按键8 |
| KEY_BTN_9 | 按键9 |
| 枚举值 | 描述 |
| ---------------------------- | --------------------------- |
| KEY_UNKNOWN | 未知按键 |
| KEY_FN | 功能(Fn)键 |
| KEY_HOME | 功能(Home)键 |
| KEY_BACK | 返回键 |
| KEY_MEDIA_PLAY_PAUSE | 多媒体键&nbsp;播放/暂停 |
| KEY_MEDIA_STOP | 多媒体键&nbsp;停止 |
| KEY_MEDIA_NEXT | 多媒体键&nbsp;下一首 |
| KEY_MEDIA_PREVIOUS | 多媒体键&nbsp;上一首 |
| KEY_MEDIA_REWIND | 多媒体键&nbsp;快退 |
| KEY_MEDIA_FAST_FORWARD | 多媒体键&nbsp;快进 |
| KEY_VOLUME_UP | 音量增加键 |
| KEY_VOLUME_DOWN | 音量减小键 |
| KEY_POWER | 电源键 |
| KEY_CAMERA | 拍照键 |
| KEY_VOLUME_MUTE | 扬声器静音键 |
| KEY_MUTE | 话筒静音键 |
| KEY_BRIGHTNESS_UP | 亮度调节按键&nbsp;调亮 |
| KEY_BRIGHTNESS_DOWN | 亮度调节按键&nbsp;调暗 |
| KEY_0 | 按键'0' |
| KEY_1 | 按键'1' |
| KEY_2 | 按键'2' |
| KEY_3 | 按键'3' |
| KEY_4 | 按键'4' |
| KEY_5 | 按键'5' |
| KEY_6 | 按键'6' |
| KEY_7 | 按键'7' |
| KEY_8 | 按键'8' |
| KEY_9 | 按键'9' |
| KEY_STAR | 按键'\*' |
| KEY_POUND | 按键'\#' |
| KEY_DPAD_UP | 导航键&nbsp;向上 |
| KEY_DPAD_DOWN | 导航键&nbsp;向下 |
| KEY_DPAD_LEFT | 导航键&nbsp;向左 |
| KEY_DPAD_RIGHT | 导航键&nbsp;向右 |
| KEY_DPAD_CENTER | 导航键&nbsp;确定键 |
| KEY_A | 按键'A' |
| KEY_B | 按键'B' |
| KEY_C | 按键'C' |
| KEY_D | 按键'D' |
| KEY_E | 按键'E' |
| KEY_F | 按键'F' |
| KEY_G | 按键'G' |
| KEY_H | 按键'H' |
| KEY_I | 按键'I' |
| KEY_J | 按键'J' |
| KEY_K | 按键'K' |
| KEY_L | 按键'L' |
| KEY_M | 按键'M' |
| KEY_N | 按键'N' |
| KEY_O | 按键'O' |
| KEY_P | 按键'P' |
| KEY_Q | 按键'Q' |
| KEY_R | 按键'R' |
| KEY_S | 按键'S' |
| KEY_T | 按键'T' |
| KEY_U | 按键'U' |
| KEY_V | 按键'V' |
| KEY_W | 按键'W' |
| KEY_X | 按键'X' |
| KEY_Y | 按键'Y' |
| KEY_Z | 按键'Z' |
| KEY_COMMA | 按键',' |
| KEY_PERIOD | 按键'.' |
| KEY_ALT_LEFT | 左Alt键 |
| KEY_ALT_RIGHT | 右Alt键 |
| KEY_SHIFT_LEFT | 左Shift键 |
| KEY_SHIFT_RIGHT | 右Shift键 |
| KEY_TAB | Tab键 |
| KEY_SPACE | 空格键 |
| KEY_SYM | 符号修改器按键 |
| KEY_EXPLORER | 浏览器功能键,此键用于启动浏览器应用程序。 |
| KEY_ENVELOPE | 电子邮件功能键,此键用于启动电子邮件应用程序。 |
| KEY_ENTER | 回车键 |
| KEY_DEL | 退格键 |
| KEY_GRAVE | 按键'‘’ |
| KEY_MINUS | 按键'-' |
| KEY_EQUALS | 按键'=' |
| KEY_LEFT_BRACKET | 按键'[' |
| KEY_RIGHT_BRACKET | 按键']' |
| KEY_BACKSLASH | 按键'\' |
| KEY_SEMICOLON | 按键';' |
| KEY_APOSTROPHE | 按键'''&nbsp;(单引号) |
| KEY_SLASH | 按键'/' |
| KEY_AT | 按键'\@' |
| KEY_PLUS | 按键'+' |
| KEY_MENU | 菜单键 |
| KEY_PAGE_UP | 向上翻页键 |
| KEY_PAGE_DOWN | 向下翻页键 |
| KEY_ESCAPE | ESC键 |
| KEY_FORWARD_DEL | 删除键 |
| KEY_CTRL_LEFT | 左Ctrl键 |
| KEY_CTRL_RIGHT | 右Ctrl键 |
| KEY_CAPS_LOCK | 大写锁定键 |
| KEY_SCROLL_LOCK | 滚动锁定键 |
| KEY_META_LEFT | 左元修改器键 |
| KEY_META_RIGHT | 右元修改器键 |
| KEY_FUNCTION | 功能键 |
| KEY_SYSRQ | 系统请求/打印屏幕键 |
| KEY_BREAK | Break/Pause键 |
| KEY_MOVE_HOME | 光标移动到开始键 |
| KEY_MOVE_END | 光标移动到末尾键 |
| KEY_INSERT | 插入键 |
| KEY_FORWARD | 前进键 |
| KEY_MEDIA_PLAY | 多媒体键&nbsp;播放 |
| KEY_MEDIA_PAUSE | 多媒体键&nbsp;暂停 |
| KEY_MEDIA_CLOSE | 多媒体键&nbsp;关闭 |
| KEY_MEDIA_EJECT | 多媒体键&nbsp;弹出 |
| KEY_MEDIA_RECORD | 多媒体键&nbsp;录音 |
| KEY_F1 | 按键'F1' |
| KEY_F2 | 按键'F2' |
| KEY_F3 | 按键'F3' |
| KEY_F4 | 按键'F4' |
| KEY_F5 | 按键'F5' |
| KEY_F6 | 按键'F6' |
| KEY_F7 | 按键'F7' |
| KEY_F8 | 按键'F8' |
| KEY_F9 | 按键'F9' |
| KEY_F10 | 按键'F10' |
| KEY_F11 | 按键'F11' |
| KEY_F12 | 按键'F12' |
| KEY_NUM_LOCK | 小键盘锁 |
| KEY_NUMPAD_0 | 小键盘按键'0' |
| KEY_NUMPAD_1 | 小键盘按键'1' |
| KEY_NUMPAD_2 | 小键盘按键'2' |
| KEY_NUMPAD_3 | 小键盘按键'3' |
| KEY_NUMPAD_4 | 小键盘按键'4' |
| KEY_NUMPAD_5 | 小键盘按键'5' |
| KEY_NUMPAD_6 | 小键盘按键'6' |
| KEY_NUMPAD_7 | 小键盘按键'7' |
| KEY_NUMPAD_8 | 小键盘按键'8' |
| KEY_NUMPAD_9 | 小键盘按键'9' |
| KEY_NUMPAD_DIVIDE | 小键盘按键'/' |
| KEY_NUMPAD_MULTIPLY | 小键盘按键'\*' |
| KEY_NUMPAD_SUBTRACT | 小键盘按键'-' |
| KEY_NUMPAD_ADD | 小键盘按键'+' |
| KEY_NUMPAD_DOT | 小键盘按键'.' |
| KEY_NUMPAD_COMMA | 小键盘按键',' |
| KEY_NUMPAD_ENTER | 小键盘按键回车 |
| KEY_NUMPAD_EQUALS | 小键盘按键'=' |
| KEY_NUMPAD_LEFT_PAREN | 小键盘按键'(' |
| KEY_NUMPAD_RIGHT_PAREN | 小键盘按键')' |
| KEY_VIRTUAL_MULTITASK | 虚拟多任务键 |
| KEY_SLEEP | 睡眠键 |
| KEY_ZENKAKU_HANKAKU | 日文全宽/半宽键 |
| KEY_102ND | 102nd按键 |
| KEY_RO | 日文Ro键 |
| KEY_KATAKANA | 日文片假名键 |
| KEY_HIRAGANA | 日文平假名键 |
| KEY_HENKAN | 日文转换键 |
| KEY_KATAKANA_HIRAGANA | 日语片假名/平假名键 |
| KEY_MUHENKAN | 日文非转换键 |
| KEY_LINEFEED | 换行键 |
| KEY_MACRO | 宏键 |
| KEY_NUMPAD_PLUSMINUS | 数字键盘上的加号/减号键 |
| KEY_SCALE | 扩展键 |
| KEY_HANGUEL | 日文韩语键 |
| KEY_HANJA | 日文汉语键 |
| KEY_YEN | 日元键 |
| KEY_STOP | 停止键 |
| KEY_AGAIN | 重复键 |
| KEY_PROPS | 道具键 |
| KEY_UNDO | 撤消键 |
| KEY_COPY | 复制键 |
| KEY_OPEN | 打开键 |
| KEY_PASTE | 粘贴键 |
| KEY_FIND | 查找键 |
| KEY_CUT | 剪切键 |
| KEY_HELP | 帮助键 |
| KEY_CALC | 计算器特殊功能键,用于启动计算器应用程序 |
| KEY_FILE | 文件按键 |
| KEY_BOOKMARKS | 书签键 |
| KEY_NEXT | 下一个按键 |
| KEY_PLAYPAUSE | 播放/暂停键 |
| KEY_PREVIOUS | 上一个按键 |
| KEY_STOPCD | CD停止键 |
| KEY_CONFIG | 配置键 |
| KEY_REFRESH | 刷新键 |
| KEY_EXIT | 退出键 |
| KEY_EDIT | 编辑键 |
| KEY_SCROLLUP | 向上滚动键 |
| KEY_SCROLLDOWN | 向下滚动键 |
| KEY_NEW | 新建键 |
| KEY_REDO | 恢复键 |
| KEY_CLOSE | 关闭键 |
| KEY_PLAY | 播放键 |
| KEY_BASSBOOST | 低音增强键 |
| KEY_PRINT | 打印键 |
| KEY_CHAT | 聊天键 |
| KEY_FINANCE | 金融键 |
| KEY_CANCEL | 取消键 |
| KEY_KBDILLUM_TOGGLE | 键盘灯光切换键 |
| KEY_KBDILLUM_DOWN | 键盘灯光调亮键 |
| KEY_KBDILLUM_UP | 键盘灯光调暗键 |
| KEY_SEND | 发送键 |
| KEY_REPLY | 答复键 |
| KEY_FORWARDMAIL | 邮件转发键 |
| KEY_SAVE | 保存键 |
| KEY_DOCUMENTS | 文件键 |
| KEY_VIDEO_NEXT | 下一个视频键 |
| KEY_VIDEO_PREV | 上一个视频键 |
| KEY_BRIGHTNESS_CYCLE | 背光渐变键 |
| KEY_BRIGHTNESS_ZERO | 亮度调节为0键 |
| KEY_DISPLAY_OFF | 显示关闭键 |
| KEY_BTN_MISC | 游戏手柄上的各种按键 |
| KEY_GOTO | 进入键 |
| KEY_INFO | 信息查看键 |
| KEY_PROGRAM | 程序键 |
| KEY_PVR | 个人录像机(PVR)键 |
| KEY_SUBTITLE | 字幕键 |
| KEY_FULL_SCREEN | 全屏键 |
| KEY_KEYBOARD | 键盘 |
| KEY_ASPECT_RATIO | 屏幕纵横比调节键 |
| KEY_PC | 端口控制键 |
| KEY_TV | TV键 |
| KEY_TV2 | TV键2 |
| KEY_VCR | 录像机开启键 |
| KEY_VCR2 | 录像机开启键2 |
| KEY_SAT | SIM卡应用工具包(SAT)键 |
| KEY_CD | CD键 |
| KEY_TAPE | 磁带键 |
| KEY_TUNER | 调谐器键 |
| KEY_PLAYER | 播放器键 |
| KEY_DVD | DVD键 |
| KEY_AUDIO | 音频键 |
| KEY_VIDEO | 视频键 |
| KEY_MEMO | 备忘录键 |
| KEY_CALENDAR | 日历键 |
| KEY_RED | 红色指示器 |
| KEY_GREEN | 绿色指示器 |
| KEY_YELLOW | 黄色指示器 |
| KEY_BLUE | 蓝色指示器 |
| KEY_CHANNELUP | 频道向上键 |
| KEY_CHANNELDOWN | 频道向下键 |
| KEY_LAST | 末尾键 |
| KEY_RESTART | 重启键 |
| KEY_SLOW | 慢速键 |
| KEY_SHUFFLE | 随机播放键 |
| KEY_VIDEOPHONE | 可视电话键 |
| KEY_GAMES | 游戏键 |
| KEY_ZOOMIN | 放大键 |
| KEY_ZOOMOUT | 缩小键 |
| KEY_ZOOMRESET | 缩放重置键 |
| KEY_WORDPROCESSOR | 文字处理键 |
| KEY_EDITOR | 编辑器键 |
| KEY_SPREADSHEET | 电子表格键 |
| KEY_GRAPHICSEDITOR | 图形编辑器键 |
| KEY_PRESENTATION | 演示文稿键 |
| KEY_DATABASE | 数据库键标 |
| KEY_NEWS | 新闻键 |
| KEY_VOICEMAIL | 语音信箱 |
| KEY_ADDRESSBOOK | 通讯簿 |
| KEY_MESSENGER | 通信键 |
| KEY_BRIGHTNESS_TOGGLE | 亮度切换键 |
| KEY_SPELLCHECK | AL拼写检查 |
| KEY_COFFEE | 终端锁/屏幕保护程序 |
| KEY_MEDIA_REPEAT | 媒体循环键 |
| KEY_IMAGES | 图像键 |
| KEY_BUTTONCONFIG | 按键配置键 |
| KEY_TASKMANAGER | 任务管理器 |
| KEY_JOURNAL | 日志按键 |
| KEY_CONTROLPANEL | 控制面板键 |
| KEY_APPSELECT | 应用程序选择键 |
| KEY_SCREENSAVER | 屏幕保护程序键 |
| KEY_ASSISTANT | 辅助键 |
| KEY_KBD_LAYOUT_NEXT | 下一个键盘布局键 |
| KEY_BRIGHTNESS_MIN | 最小亮度键 |
| KEY_BRIGHTNESS_MAX | 最大亮度键 |
| KEY_KBDINPUTASSIST_PREV | 键盘输入Assist_Previous |
| KEY_KBDINPUTASSIST_NEXT | 键盘输入Assist_Next |
| KEY_KBDINPUTASSIST_PREVGROUP | 键盘输入Assist_Previous |
| KEY_KBDINPUTASSIST_NEXTGROUP | 键盘输入Assist_Next |
| KEY_KBDINPUTASSIST_ACCEPT | 键盘输入Assist_Accept |
| KEY_KBDINPUTASSIST_CANCEL | 键盘输入Assist_Cancel |
| KEY_FRONT | 挡风玻璃除雾器开关 |
| KEY_SETUP | 设置键 |
| KEY_WAKEUP | 唤醒键 |
| KEY_SENDFILE | 发送文件按键 |
| KEY_DELETEFILE | 删除文件按键 |
| KEY_XFER | 文件传输(XFER)按键 |
| KEY_PROG1 | 程序键1 |
| KEY_PROG2 | 程序键2 |
| KEY_MSDOS | MS-DOS键(微软磁盘操作系统 |
| KEY_SCREENLOCK | 屏幕锁定键 |
| KEY_DIRECTION_ROTATE_DISPLAY | 方向旋转显示键 |
| KEY_CYCLEWINDOWS | Windows循环键 |
| KEY_COMPUTER | 按键 |
| KEY_EJECTCLOSECD | 弹出CD键 |
| KEY_ISO | ISO键 |
| KEY_MOVE | 移动键 |
| KEY_F13 | 按键'F13' |
| KEY_F14 | 按键'F14' |
| KEY_F15 | 按键'F15' |
| KEY_F16 | 按键'F16' |
| KEY_F17 | 按键'F17' |
| KEY_F18 | 按键'F18' |
| KEY_F19 | 按键'F19' |
| KEY_F20 | 按键'F20' |
| KEY_F21 | 按键'F21' |
| KEY_F22 | 按键'F22' |
| KEY_F23 | 按键'F23' |
| KEY_F24 | 按键'F24' |
| KEY_PROG3 | 程序键3 |
| KEY_PROG4 | 程序键4 |
| KEY_DASHBOARD | 仪表板 |
| KEY_SUSPEND | 挂起键 |
| KEY_HP | 高阶路径键 |
| KEY_SOUND | 音量键 |
| KEY_QUESTION | 疑问按键 |
| KEY_CONNECT | 连接键 |
| KEY_SPORT | 运动按键 |
| KEY_SHOP | 商城键 |
| KEY_ALTERASE | 交替键 |
| KEY_SWITCHVIDEOMODE | 在可用视频之间循环输出(监视器/LCD/TV输出/等) |
| KEY_BATTERY | 电池按键 |
| KEY_BLUETOOTH | 蓝牙按键 |
| KEY_WLAN | 无线局域网 |
| KEY_UWB | 超宽带(UWB) |
| KEY_WWAN_WIMAX | WWAN&nbsp;WiMAX按键 |
| KEY_RFKILL | 控制所有收音机的键 |
| KEY_CHANNEL | 向上频道键 |
| KEY_BTN_0 | 按键0 |
| KEY_BTN_1 | 按键1 |
| KEY_BTN_2 | 按键2 |
| KEY_BTN_3 | 按键3 |
| KEY_BTN_4 | 按键4 |
| KEY_BTN_5 | 按键5 |
| KEY_BTN_6 | 按键6 |
| KEY_BTN_7 | 按键7 |
| KEY_BTN_8 | 按键8 |
| KEY_BTN_9 | 按键9 |
**起始版本:**
......@@ -613,12 +614,12 @@ enum OH_NativeXComponent_MouseEventAction
鼠标事件动作。
| 枚举值 | 描述 |
| -------- | -------- |
| OH_NATIVEXCOMPONENT_MOUSE_NONE | 无效鼠标事件&nbsp; |
| OH_NATIVEXCOMPONENT_MOUSE_PRESS | 鼠标按键按下时触发鼠标事件。 |
| OH_NATIVEXCOMPONENT_MOUSE_RELEASE | 鼠标按键松开时触发鼠标事件。 |
| OH_NATIVEXCOMPONENT_MOUSE_MOVE | 鼠标在屏幕上移动时触发鼠标事件。 |
| 枚举值 | 描述 |
| --------------------------------- | ---------------- |
| OH_NATIVEXCOMPONENT_MOUSE_NONE | 无效鼠标事件&nbsp; |
| OH_NATIVEXCOMPONENT_MOUSE_PRESS | 鼠标按键按下时触发鼠标事件。 |
| OH_NATIVEXCOMPONENT_MOUSE_RELEASE | 鼠标按键松开时触发鼠标事件。 |
| OH_NATIVEXCOMPONENT_MOUSE_MOVE | 鼠标在屏幕上移动时触发鼠标事件。 |
**起始版本:**
......@@ -635,13 +636,13 @@ enum OH_NativeXComponent_MouseEventButton
鼠标事件按键。
| 枚举值 | 描述 |
| -------- | -------- |
| OH_NATIVEXCOMPONENT_NONE_BUTTON | 鼠标无按键操作时触发鼠标事件。 |
| OH_NATIVEXCOMPONENT_LEFT_BUTTON | 按下鼠标左键时触发鼠标事件。 |
| OH_NATIVEXCOMPONENT_RIGHT_BUTTON | 按下鼠标右键时触发鼠标事件。 |
| OH_NATIVEXCOMPONENT_MIDDLE_BUTTON | 按下鼠标中键时触发鼠标事件。 |
| OH_NATIVEXCOMPONENT_BACK_BUTTON | 按下鼠标左侧后退键时触发鼠标事件。 |
| 枚举值 | 描述 |
| ---------------------------------- | ----------------- |
| OH_NATIVEXCOMPONENT_NONE_BUTTON | 鼠标无按键操作时触发鼠标事件。 |
| OH_NATIVEXCOMPONENT_LEFT_BUTTON | 按下鼠标左键时触发鼠标事件。 |
| OH_NATIVEXCOMPONENT_RIGHT_BUTTON | 按下鼠标右键时触发鼠标事件。 |
| OH_NATIVEXCOMPONENT_MIDDLE_BUTTON | 按下鼠标中键时触发鼠标事件。 |
| OH_NATIVEXCOMPONENT_BACK_BUTTON | 按下鼠标左侧后退键时触发鼠标事件。 |
| OH_NATIVEXCOMPONENT_FORWARD_BUTTON | 按下鼠标左侧前进键时触发鼠标事件。 |
**起始版本:**
......@@ -659,13 +660,13 @@ enum OH_NativeXComponent_TouchEventType
触摸事件类型。
| 枚举值 | 描述 |
| -------- | -------- |
| OH_NATIVEXCOMPONENT_DOWN | 手指按下时触发触摸事件。 |
| OH_NATIVEXCOMPONENT_UP | 手指抬起时触发触摸事件。 |
| OH_NATIVEXCOMPONENT_MOVE | 手指按下状态下在屏幕上移动时触发触摸事件。 |
| OH_NATIVEXCOMPONENT_CANCEL | 触摸事件取消时触发事件。 |
| OH_NATIVEXCOMPONENT_UNKNOWN | 无效的触摸类型。 |
| 枚举值 | 描述 |
| --------------------------- | --------------------- |
| OH_NATIVEXCOMPONENT_DOWN | 手指按下时触发触摸事件。 |
| OH_NATIVEXCOMPONENT_UP | 手指抬起时触发触摸事件。 |
| OH_NATIVEXCOMPONENT_MOVE | 手指按下状态下在屏幕上移动时触发触摸事件。 |
| OH_NATIVEXCOMPONENT_CANCEL | 触摸事件取消时触发事件。 |
| OH_NATIVEXCOMPONENT_UNKNOWN | 无效的触摸类型。 |
**起始版本:**
......@@ -682,17 +683,17 @@ enum OH_NativeXComponent_TouchPointToolType
触摸点工具类型
| 枚举值 | 描述 |
| -------- | -------- |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_UNKNOWN | 未识别工具类型。 |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_FINGER | 表示用手指。 |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_PEN | 表示用触笔。 |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_RUBBER | 表示用橡皮擦。 |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_BRUSH | 表示用画笔。 |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_PENCIL | 表示用铅笔。 |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_AIRBRUSH | 表示用气笔。 |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_MOUSE | 表示用鼠标。 |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_LENS | 表示用晶状体。 |
| 枚举值 | 描述 |
| -------------------------------------- | -------- |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_UNKNOWN | 未识别工具类型。 |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_FINGER | 表示用手指。 |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_PEN | 表示用触笔。 |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_RUBBER | 表示用橡皮擦。 |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_BRUSH | 表示用画笔。 |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_PENCIL | 表示用铅笔。 |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_AIRBRUSH | 表示用气笔。 |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_MOUSE | 表示用鼠标。 |
| OH_NATIVEXCOMPONENT_TOOL_TYPE_LENS | 表示用晶状体。 |
**起始版本:**
......@@ -714,10 +715,10 @@ int32_t OH_NativeXComponent_GetKeyEvent (OH_NativeXComponent * component, OH_Nat
**参数:**
| 名称 | 描述 |
| -------- | -------- |
| 名称 | 描述 |
| --------- | ----------------------------- |
| component | 表示指向OH_NativeXComponent实例的指针。 |
| keyEvent | 表示指向当前按键事件指针的指针。 |
| keyEvent | 表示指向当前按键事件指针的指针。 |
**返回:**
......@@ -740,10 +741,10 @@ int32_t OH_NativeXComponent_GetKeyEventAction (OH_NativeXComponent_KeyEvent * ke
**参数:**
| 名称 | 描述 |
| -------- | -------- |
| 名称 | 描述 |
| -------- | -------------------------------------- |
| keyEvent | 表示指向OH_NativeXComponent_KeyEvent实例的指针。 |
| action | 表示指向按键事件动作的指针。 |
| action | 表示指向按键事件动作的指针。 |
**返回:**
......@@ -766,10 +767,10 @@ int32_t OH_NativeXComponent_GetKeyEventCode (OH_NativeXComponent_KeyEvent * keyE
**参数:**
| 名称 | 描述 |
| -------- | -------- |
| 名称 | 描述 |
| -------- | -------------------------------------- |
| keyEvent | 表示指向OH_NativeXComponent_KeyEvent实例的指针。 |
| code | 表示指向按键事件按键码的指针。 |
| code | 表示指向按键事件按键码的指针。 |
**返回:**
......@@ -792,10 +793,10 @@ int32_t OH_NativeXComponent_GetKeyEventDeviceId (OH_NativeXComponent_KeyEvent *
**参数:**
| 名称 | 描述 |
| -------- | -------- |
| 名称 | 描述 |
| -------- | -------------------------------------- |
| keyEvent | 表示指向OH_NativeXComponent_KeyEvent实例的指针。 |
| deviceId | 表示指向按键事件设备id的指针。 |
| deviceId | 表示指向按键事件设备id的指针。 |
**返回:**
......@@ -818,10 +819,10 @@ int32_t OH_NativeXComponent_GetKeyEventSourceType (OH_NativeXComponent_KeyEvent
**参数:**
| 名称 | 描述 |
| -------- | -------- |
| keyEvent | 表示指向OH_NativeXComponent_KeyEvent实例的指针。 |
| sourceType | 表示指向按键事件事件源类型的指针。 |
| 名称 | 描述 |
| ---------- | -------------------------------------- |
| keyEvent | 表示指向OH_NativeXComponent_KeyEvent实例的指针。 |
| sourceType | 表示指向按键事件事件源类型的指针。 |
**返回:**
......@@ -844,10 +845,10 @@ int32_t OH_NativeXComponent_GetKeyEventTimeStamp (OH_NativeXComponent_KeyEvent *
**参数:**
| 名称 | 描述 |
| -------- | -------- |
| keyEvent | 表示指向OH_NativeXComponent_KeyEvent实例的指针。 |
| timeStamp | 表示指向按键事件时间戳的指针。 |
| 名称 | 描述 |
| --------- | -------------------------------------- |
| keyEvent | 表示指向OH_NativeXComponent_KeyEvent实例的指针。 |
| timeStamp | 表示指向按键事件时间戳的指针。 |
**返回:**
......@@ -870,11 +871,11 @@ int32_t OH_NativeXComponent_GetMouseEvent (OH_NativeXComponent * component, cons
**参数:**
| 名称 | 描述 |
| -------- | -------- |
| component | 表示指向OH_NativeXComponent实例的指针。 |
| window | 表示NativeWindow句柄 |
| mouseEvent | 指示指向当前鼠标事件的指针。 |
| 名称 | 描述 |
| ---------- | ----------------------------- |
| component | 表示指向OH_NativeXComponent实例的指针。 |
| window | 表示NativeWindow句柄 |
| mouseEvent | 指示指向当前鼠标事件的指针。 |
**返回:**
......@@ -897,11 +898,11 @@ int32_t OH_NativeXComponent_GetTouchEvent (OH_NativeXComponent * component, cons
**参数:**
| 名称 | 描述 |
| -------- | -------- |
| component | 表示指向OH_NativeXComponent实例的指针。 |
| window | 表示NativeWindow句柄。 |
| touchEvent | 指示指向当前触摸事件的指针。 |
| 名称 | 描述 |
| ---------- | ----------------------------- |
| component | 表示指向OH_NativeXComponent实例的指针。 |
| window | 表示NativeWindow句柄。 |
| touchEvent | 指示指向当前触摸事件的指针。 |
**返回:**
......@@ -924,11 +925,11 @@ int32_t OH_NativeXComponent_GetTouchPointTiltX (OH_NativeXComponent * component,
**参数:**
| 名称 | 描述 |
| -------- | -------- |
| component | 表示指向OH_NativeXComponent实例的指针。 |
| pointIndex | 表示触摸点的指针索引。 |
| tiltX | 表示指向X倾斜度的指针。 |
| 名称 | 描述 |
| ---------- | ----------------------------- |
| component | 表示指向OH_NativeXComponent实例的指针。 |
| pointIndex | 表示触摸点的指针索引。 |
| tiltX | 表示指向X倾斜度的指针。 |
**返回:**
......@@ -951,11 +952,11 @@ int32_t OH_NativeXComponent_GetTouchPointTiltY (OH_NativeXComponent * component,
**参数:**
| 名称 | 描述 |
| -------- | -------- |
| component | 表示指向OH_NativeXComponent实例的指针。 |
| pointIndex | 表示触摸点的指针索引。 |
| tiltY | 表示指向Y倾斜度的指针。 |
| 名称 | 描述 |
| ---------- | ----------------------------- |
| component | 表示指向OH_NativeXComponent实例的指针。 |
| pointIndex | 表示触摸点的指针索引。 |
| tiltY | 表示指向Y倾斜度的指针。 |
**返回:**
......@@ -978,11 +979,11 @@ int32_t OH_NativeXComponent_GetTouchPointToolType (OH_NativeXComponent * compone
**参数:**
| 名称 | 描述 |
| -------- | -------- |
| component | 表示指向OH_NativeXComponent实例的指针。 |
| pointIndex | 表示触摸点的指针索引。 |
| toolType | 表示指向工具类型的指针。 |
| 名称 | 描述 |
| ---------- | ----------------------------- |
| component | 表示指向OH_NativeXComponent实例的指针。 |
| pointIndex | 表示触摸点的指针索引。 |
| toolType | 表示指向工具类型的指针。 |
**返回:**
......@@ -1005,11 +1006,11 @@ int32_t OH_NativeXComponent_GetXComponentId (OH_NativeXComponent * component, ch
**参数:**
| 名称 | 描述 |
| -------- | -------- |
| component | 表示指向OH_NativeXComponent实例的指针。 |
| id | 指示用于保存此OH_NativeXComponent实例的ID的字符缓冲区。&nbsp;请注意,空终止符将附加到字符缓冲区,因此字符缓冲区的大小应至少比真实id长度大一个单位。&nbsp;建议字符缓冲区的大小为[OH_XCOMPONENT_ID_LEN_MAX&nbsp;+&nbsp;1]。 |
| size | 指示指向id长度的指针。 |
| 名称 | 描述 |
| --------- | ---------------------------------------- |
| component | 表示指向OH_NativeXComponent实例的指针。 |
| id | 指示用于保存此OH_NativeXComponent实例的ID的字符缓冲区。&nbsp;请注意,空终止符将附加到字符缓冲区,因此字符缓冲区的大小应至少比真实id长度大一个单位。&nbsp;建议字符缓冲区的大小为[OH_XCOMPONENT_ID_LEN_MAX&nbsp;+&nbsp;1]。 |
| size | 指示指向id长度的指针。 |
**返回:**
......@@ -1032,12 +1033,12 @@ int32_t OH_NativeXComponent_GetXComponentOffset (OH_NativeXComponent * component
**参数:**
| 名称 | 描述 |
| -------- | -------- |
| 名称 | 描述 |
| --------- | ----------------------------- |
| component | 表示指向OH_NativeXComponent实例的指针。 |
| window | 表示NativeWindow句柄。 |
| x | 指示指向当前surface的x坐标的指针。 |
| y | 指示指向当前surface的y坐标的指针。 |
| window | 表示NativeWindow句柄。 |
| x | 指示指向当前surface的x坐标的指针。 |
| y | 指示指向当前surface的y坐标的指针。 |
**返回:**
......@@ -1060,12 +1061,12 @@ int32_t OH_NativeXComponent_GetXComponentSize (OH_NativeXComponent * component,
**参数:**
| 名称 | 描述 |
| -------- | -------- |
| 名称 | 描述 |
| --------- | ----------------------------- |
| component | 表示指向OH_NativeXComponent实例的指针。 |
| window | 表示NativeWindow句柄。 |
| width | 指示指向当前surface宽度的指针。 |
| height | 指示指向当前surface高度的指针。 |
| window | 表示NativeWindow句柄。 |
| width | 指示指向当前surface宽度的指针。 |
| height | 指示指向当前surface高度的指针。 |
**返回:**
......@@ -1088,10 +1089,10 @@ int32_t OH_NativeXComponent_RegisterBlurEventCallback (OH_NativeXComponent * com
**参数:**
| 名称 | 描述 |
| -------- | -------- |
| 名称 | 描述 |
| --------- | ----------------------------- |
| component | 表示指向OH_NativeXComponent实例的指针。 |
| callback | 指示指向失焦事件回调的指针。 |
| callback | 指示指向失焦事件回调的指针。 |
**返回:**
......@@ -1114,10 +1115,10 @@ int32_t OH_NativeXComponent_RegisterCallback (OH_NativeXComponent * component, O
**参数:**
| 名称 | 描述 |
| -------- | -------- |
| 名称 | 描述 |
| --------- | ----------------------------- |
| component | 表示指向OH_NativeXComponent实例的指针。 |
| callback | 指示指向surface生命周期和触摸事件回调的指针。 |
| callback | 指示指向surface生命周期和触摸事件回调的指针。 |
**返回:**
......@@ -1140,10 +1141,10 @@ int32_t OH_NativeXComponent_RegisterFocusEventCallback (OH_NativeXComponent * co
**参数:**
| 名称 | 描述 |
| -------- | -------- |
| 名称 | 描述 |
| --------- | ----------------------------- |
| component | 表示指向OH_NativeXComponent实例的指针。 |
| callback | 指示指向获焦事件回调的指针。 |
| callback | 指示指向获焦事件回调的指针。 |
**返回:**
......@@ -1166,10 +1167,10 @@ int32_t OH_NativeXComponent_RegisterKeyEventCallback (OH_NativeXComponent * comp
**参数:**
| 名称 | 描述 |
| -------- | -------- |
| 名称 | 描述 |
| --------- | ----------------------------- |
| component | 表示指向OH_NativeXComponent实例的指针。 |
| callback | 指示指向按键事件回调的指针。 |
| callback | 指示指向按键事件回调的指针。 |
**返回:**
......@@ -1192,10 +1193,10 @@ int32_t OH_NativeXComponent_RegisterMouseEventCallback (OH_NativeXComponent * co
**参数:**
| 名称 | 描述 |
| -------- | -------- |
| 名称 | 描述 |
| --------- | ----------------------------- |
| component | 表示指向OH_NativeXComponent实例的指针。 |
| callback | 指示指向鼠标事件回调的指针。 |
| callback | 指示指向鼠标事件回调的指针。 |
**返回:**
......
......@@ -19,65 +19,65 @@
### 结构体
| 名称 | 描述 |
| -------- | -------- |
| [OH_NativeXComponent_TouchPoint](_o_h___native_x_component___touch_point.md) | 触摸事件中触摸点的信息。 |
| [OH_NativeXComponent_TouchEvent](_o_h___native_x_component___touch_event.md) | 触摸事件。 |
| [OH_NativeXComponent_MouseEvent](_o_h___native_x_component___mouse_event.md) | 鼠标事件。 |
| 名称 | 描述 |
| ---------------------------------------- | --------------------- |
| [OH_NativeXComponent_TouchPoint](_o_h___native_x_component___touch_point.md) | 触摸事件中触摸点的信息。 |
| [OH_NativeXComponent_TouchEvent](_o_h___native_x_component___touch_event.md) | 触摸事件。 |
| [OH_NativeXComponent_MouseEvent](_o_h___native_x_component___mouse_event.md) | 鼠标事件。 |
| [OH_NativeXComponent_Callback](_o_h___native_x_component___callback.md) | 注册surface生命周期和触摸事件回调。 |
| [OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component___mouse_event___callback.md) | 注册鼠标事件的回调。 |
| [OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component___mouse_event___callback.md) | 注册鼠标事件的回调。 |
### 类型定义
| 名称 | 描述 |
| -------- | -------- |
| [OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) | 提供封装的OH_NativeXComponent实例。 |
| [OH_NativeXComponent_Callback](_o_h___native_x_component.md#oh_nativexcomponent_callback) | 注册surface生命周期和触摸事件回调。 |
| [OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component.md#oh_nativexcomponent_mouseevent_callback) | 注册鼠标事件的回调。 |
| 名称 | 描述 |
| ---------------------------------------- | ------------------------------------ |
| [OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent) | 提供封装的OH_NativeXComponent实例。 |
| [OH_NativeXComponent_Callback](_o_h___native_x_component.md#oh_nativexcomponent_callback) | 注册surface生命周期和触摸事件回调。 |
| [OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component.md#oh_nativexcomponent_mouseevent_callback) | 注册鼠标事件的回调。 |
| [OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent) | 提供封装的OH_NativeXComponent_KeyEvent实例。 |
### 枚举
| 枚举名称 | 描述 |
| -------- | -------- |
| 枚举名称 | 描述 |
| ---------------------------------------- | ---------- |
| {&nbsp;OH_NATIVEXCOMPONENT_RESULT_SUCCESS&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_RESULT_FAILED&nbsp;=&nbsp;-1,&nbsp;OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER&nbsp;=&nbsp;-2&nbsp;} | 枚举API访问状态。 |
| [OH_NativeXComponent_TouchEventType](_o_h___native_x_component.md#oh_nativexcomponent_toucheventtype)&nbsp;{<br/>OH_NATIVEXCOMPONENT_DOWN&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_UP,&nbsp;OH_NATIVEXCOMPONENT_MOVE,&nbsp;OH_NATIVEXCOMPONENT_CANCEL,<br/>OH_NATIVEXCOMPONENT_UNKNOWN<br/>} | 触摸事件类型。 |
| [OH_NativeXComponent_TouchPointToolType](_o_h___native_x_component.md#oh_nativexcomponent_touchpointtooltype)&nbsp;{<br/>OH_NATIVEXCOMPONENT_TOOL_TYPE_UNKNOWN&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_FINGER,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_PEN,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_RUBBER,<br/>OH_NATIVEXCOMPONENT_TOOL_TYPE_BRUSH,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_PENCIL,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_AIRBRUSH,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_MOUSE,<br/>OH_NATIVEXCOMPONENT_TOOL_TYPE_LENS<br/>} | 触摸点工具类型。 |
| [OH_NativeXComponent_EventSourceType](_o_h___native_x_component.md#oh_nativexcomponent_eventsourcetype)&nbsp;{<br/>OH_NATIVEXCOMPONENT_SOURCE_TYPE_UNKNOWN&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_SOURCE_TYPE_MOUSE,&nbsp;OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHSCREEN,&nbsp;OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHPAD,<br/>OH_NATIVEXCOMPONENT_SOURCE_TYPE_JOYSTICK,&nbsp;OH_NATIVEXCOMPONENT_SOURCE_TYPE_KEYBOARD<br/>} | 触摸事件源类型。 |
| [OH_NativeXComponent_MouseEventAction](_o_h___native_x_component.md#oh_nativexcomponent_mouseeventaction)&nbsp;{&nbsp;OH_NATIVEXCOMPONENT_MOUSE_NONE&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_MOUSE_PRESS,&nbsp;OH_NATIVEXCOMPONENT_MOUSE_RELEASE,&nbsp;OH_NATIVEXCOMPONENT_MOUSE_MOVE&nbsp;} | 鼠标事件动作。 |
| [OH_NativeXComponent_MouseEventButton](_o_h___native_x_component.md#oh_nativexcomponent_mouseeventbutton)&nbsp;{<br/>OH_NATIVEXCOMPONENT_NONE_BUTTON&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_LEFT_BUTTON&nbsp;=&nbsp;0x01,&nbsp;OH_NATIVEXCOMPONENT_RIGHT_BUTTON&nbsp;=&nbsp;0x02,&nbsp;OH_NATIVEXCOMPONENT_MIDDLE_BUTTON&nbsp;=&nbsp;0x04,<br/>OH_NATIVEXCOMPONENT_BACK_BUTTON&nbsp;=&nbsp;0x08,&nbsp;OH_NATIVEXCOMPONENT_FORWARD_BUTTON&nbsp;=&nbsp;0x10<br/>} | 鼠标事件按键。 |
| [OH_NativeXComponent_TouchEventType](_o_h___native_x_component.md#oh_nativexcomponent_toucheventtype)&nbsp;{<br/>OH_NATIVEXCOMPONENT_DOWN&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_UP,&nbsp;OH_NATIVEXCOMPONENT_MOVE,&nbsp;OH_NATIVEXCOMPONENT_CANCEL,<br/>OH_NATIVEXCOMPONENT_UNKNOWN<br/>} | 触摸事件类型。 |
| [OH_NativeXComponent_TouchPointToolType](_o_h___native_x_component.md#oh_nativexcomponent_touchpointtooltype)&nbsp;{<br/>OH_NATIVEXCOMPONENT_TOOL_TYPE_UNKNOWN&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_FINGER,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_PEN,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_RUBBER,<br/>OH_NATIVEXCOMPONENT_TOOL_TYPE_BRUSH,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_PENCIL,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_AIRBRUSH,&nbsp;OH_NATIVEXCOMPONENT_TOOL_TYPE_MOUSE,<br/>OH_NATIVEXCOMPONENT_TOOL_TYPE_LENS<br/>} | 触摸点工具类型。 |
| [OH_NativeXComponent_EventSourceType](_o_h___native_x_component.md#oh_nativexcomponent_eventsourcetype)&nbsp;{<br/>OH_NATIVEXCOMPONENT_SOURCE_TYPE_UNKNOWN&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_SOURCE_TYPE_MOUSE,&nbsp;OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHSCREEN,&nbsp;OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHPAD,<br/>OH_NATIVEXCOMPONENT_SOURCE_TYPE_JOYSTICK,&nbsp;OH_NATIVEXCOMPONENT_SOURCE_TYPE_KEYBOARD<br/>} | 触摸事件源类型。 |
| [OH_NativeXComponent_MouseEventAction](_o_h___native_x_component.md#oh_nativexcomponent_mouseeventaction)&nbsp;{&nbsp;OH_NATIVEXCOMPONENT_MOUSE_NONE&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_MOUSE_PRESS,&nbsp;OH_NATIVEXCOMPONENT_MOUSE_RELEASE,&nbsp;OH_NATIVEXCOMPONENT_MOUSE_MOVE&nbsp;} | 鼠标事件动作。 |
| [OH_NativeXComponent_MouseEventButton](_o_h___native_x_component.md#oh_nativexcomponent_mouseeventbutton)&nbsp;{<br/>OH_NATIVEXCOMPONENT_NONE_BUTTON&nbsp;=&nbsp;0,&nbsp;OH_NATIVEXCOMPONENT_LEFT_BUTTON&nbsp;=&nbsp;0x01,&nbsp;OH_NATIVEXCOMPONENT_RIGHT_BUTTON&nbsp;=&nbsp;0x02,&nbsp;OH_NATIVEXCOMPONENT_MIDDLE_BUTTON&nbsp;=&nbsp;0x04,<br/>OH_NATIVEXCOMPONENT_BACK_BUTTON&nbsp;=&nbsp;0x08,&nbsp;OH_NATIVEXCOMPONENT_FORWARD_BUTTON&nbsp;=&nbsp;0x10<br/>} | 鼠标事件按键。 |
### 函数
| 名称 | 描述 |
| -------- | -------- |
| [OH_NativeXComponent_GetXComponentId](_o_h___native_x_component.md#oh_nativexcomponent_getxcomponentid)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;char&nbsp;\*id,&nbsp;uint64_t&nbsp;\*size) | 获取ArkUI&nbsp;XComponent的id。 |
| [OH_NativeXComponent_GetXComponentSize](_o_h___native_x_component.md#oh_nativexcomponent_getxcomponentsize)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;const&nbsp;void&nbsp;\*window,&nbsp;uint64_t&nbsp;\*width,&nbsp;uint64_t&nbsp;\*height) | 获取ArkUI&nbsp;XComponent持有的surface的大小。 |
| 名称 | 描述 |
| ---------------------------------------- | -------------------------------------- |
| [OH_NativeXComponent_GetXComponentId](_o_h___native_x_component.md#oh_nativexcomponent_getxcomponentid)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;char&nbsp;\*id,&nbsp;uint64_t&nbsp;\*size) | 获取ArkUI&nbsp;XComponent的id。 |
| [OH_NativeXComponent_GetXComponentSize](_o_h___native_x_component.md#oh_nativexcomponent_getxcomponentsize)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;const&nbsp;void&nbsp;\*window,&nbsp;uint64_t&nbsp;\*width,&nbsp;uint64_t&nbsp;\*height) | 获取ArkUI&nbsp;XComponent持有的surface的大小。 |
| [OH_NativeXComponent_GetXComponentOffset](_o_h___native_x_component.md#oh_nativexcomponent_getxcomponentoffset)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;const&nbsp;void&nbsp;\*window,&nbsp;double&nbsp;\*x,&nbsp;double&nbsp;\*y) | 获取ArkUI&nbsp;XComponent组件相对屏幕左上顶点的偏移量。 |
| [OH_NativeXComponent_GetTouchEvent](_o_h___native_x_component.md#oh_nativexcomponent_gettouchevent)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;const&nbsp;void&nbsp;\*window,&nbsp;[OH_NativeXComponent_TouchEvent](_o_h___native_x_component___touch_event.md)&nbsp;\*touchEvent) | 获取ArkUI&nbsp;XComponent调度的触摸事件。 |
| [OH_NativeXComponent_GetTouchPointToolType](_o_h___native_x_component.md#oh_nativexcomponent_gettouchpointtooltype)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;uint32_t&nbsp;pointIndex,&nbsp;[OH_NativeXComponent_TouchPointToolType](_o_h___native_x_component.md#oh_nativexcomponent_touchpointtooltype)&nbsp;\*toolType) | 获取ArkUI&nbsp;XComponent触摸点工具类型。 |
| [OH_NativeXComponent_GetTouchPointTiltX](_o_h___native_x_component.md#oh_nativexcomponent_gettouchpointtiltx)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;uint32_t&nbsp;pointIndex,&nbsp;float&nbsp;\*tiltX) | 获取ArkUI&nbsp;XComponent触摸点倾斜与X轴角度。 |
| [OH_NativeXComponent_GetTouchPointTiltY](_o_h___native_x_component.md#oh_nativexcomponent_gettouchpointtilty)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;uint32_t&nbsp;pointIndex,&nbsp;float&nbsp;\*tiltY) | 获取ArkUI&nbsp;XComponent触摸点倾斜与Y轴角度。 |
| [OH_NativeXComponent_GetMouseEvent](_o_h___native_x_component.md#oh_nativexcomponent_getmouseevent)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;const&nbsp;void&nbsp;\*window,&nbsp;[OH_NativeXComponent_MouseEvent](_o_h___native_x_component___mouse_event.md)&nbsp;\*mouseEvent) | 获取ArkUI&nbsp;XComponent调度的鼠标事件。 |
| [OH_NativeXComponent_RegisterCallback](_o_h___native_x_component.md#oh_nativexcomponent_registercallback)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;[OH_NativeXComponent_Callback](_o_h___native_x_component___callback.md)&nbsp;\*callback) | 为此OH_NativeXComponent实例注册回调。 |
| [OH_NativeXComponent_RegisterMouseEventCallback](_o_h___native_x_component.md#oh_nativexcomponent_registermouseeventcallback)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;[OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component___mouse_event___callback.md)&nbsp;\*callback) | 为此OH_NativeXComponent实例注册鼠标事件回调。 |
| [OH_NativeXComponent_RegisterFocusEventCallback](_o_h___native_x_component.md#oh_nativexcomponent_registerfocuseventcallback)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;void(\*callback)([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;void&nbsp;\*window)) | 为此OH_NativeXComponent实例注册获焦事件回调。 |
| [OH_NativeXComponent_RegisterKeyEventCallback](_o_h___native_x_component.md#oh_nativexcomponent_registerkeyeventcallback)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;void(\*callback)([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;void&nbsp;\*window)) | 为此OH_NativeXComponent实例注册按键事件回调。 |
| [OH_NativeXComponent_RegisterBlurEventCallback](_o_h___native_x_component.md#oh_nativexcomponent_registerblureventcallback)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;void(\*callback)([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;void&nbsp;\*window)) | 为此OH_NativeXComponent实例注册失焦事件回调。 |
| [OH_NativeXComponent_GetKeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_getkeyevent)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;[OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent)&nbsp;\*\*keyEvent) | 获取ArkUI&nbsp;XComponent调度的按键事件。 |
| [OH_NativeXComponent_GetKeyEventAction](_o_h___native_x_component.md#oh_nativexcomponent_getkeyeventaction)&nbsp;([OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent)&nbsp;\*keyEvent,&nbsp;[OH_NativeXComponent_KeyAction](_o_h___native_x_component.md#oh_nativexcomponent_keyaction)&nbsp;\*action) | 获取传入按键事件的动作。 |
| [OH_NativeXComponent_GetKeyEventCode](_o_h___native_x_component.md#oh_nativexcomponent_getkeyeventcode)&nbsp;([OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent)&nbsp;\*keyEvent,&nbsp;[OH_NativeXComponent_KeyCode](_o_h___native_x_component.md#oh_nativexcomponent_keycode)&nbsp;\*code) | 获取传入按键事件的按键码。 |
| [OH_NativeXComponent_GetKeyEventSourceType](_o_h___native_x_component.md#oh_nativexcomponent_getkeyeventsourcetype)&nbsp;([OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent)&nbsp;\*keyEvent,&nbsp;[OH_NativeXComponent_EventSourceType](_o_h___native_x_component.md#oh_nativexcomponent_eventsourcetype)&nbsp;\*sourceType) | 获取传入按键事件的事件源类型。 |
| [OH_NativeXComponent_GetKeyEventDeviceId](_o_h___native_x_component.md#oh_nativexcomponent_getkeyeventdeviceid)&nbsp;([OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent)&nbsp;\*keyEvent,&nbsp;int64_t&nbsp;\*deviceId) | 获取传入按键事件的设备id。 |
| [OH_NativeXComponent_GetKeyEventTimeStamp](_o_h___native_x_component.md#oh_nativexcomponent_getkeyeventtimestamp)&nbsp;([OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent)&nbsp;\*keyEvent,&nbsp;int64_t&nbsp;\*timeStamp) | 获取传入按键事件的时间戳。 |
| [OH_NativeXComponent_GetTouchEvent](_o_h___native_x_component.md#oh_nativexcomponent_gettouchevent)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;const&nbsp;void&nbsp;\*window,&nbsp;[OH_NativeXComponent_TouchEvent](_o_h___native_x_component___touch_event.md)&nbsp;\*touchEvent) | 获取ArkUI&nbsp;XComponent调度的触摸事件。 |
| [OH_NativeXComponent_GetTouchPointToolType](_o_h___native_x_component.md#oh_nativexcomponent_gettouchpointtooltype)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;uint32_t&nbsp;pointIndex,&nbsp;[OH_NativeXComponent_TouchPointToolType](_o_h___native_x_component.md#oh_nativexcomponent_touchpointtooltype)&nbsp;\*toolType) | 获取ArkUI&nbsp;XComponent触摸点工具类型。 |
| [OH_NativeXComponent_GetTouchPointTiltX](_o_h___native_x_component.md#oh_nativexcomponent_gettouchpointtiltx)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;uint32_t&nbsp;pointIndex,&nbsp;float&nbsp;\*tiltX) | 获取ArkUI&nbsp;XComponent触摸点倾斜与X轴角度。 |
| [OH_NativeXComponent_GetTouchPointTiltY](_o_h___native_x_component.md#oh_nativexcomponent_gettouchpointtilty)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;uint32_t&nbsp;pointIndex,&nbsp;float&nbsp;\*tiltY) | 获取ArkUI&nbsp;XComponent触摸点倾斜与Y轴角度。 |
| [OH_NativeXComponent_GetMouseEvent](_o_h___native_x_component.md#oh_nativexcomponent_getmouseevent)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;const&nbsp;void&nbsp;\*window,&nbsp;[OH_NativeXComponent_MouseEvent](_o_h___native_x_component___mouse_event.md)&nbsp;\*mouseEvent) | 获取ArkUI&nbsp;XComponent调度的鼠标事件。 |
| [OH_NativeXComponent_RegisterCallback](_o_h___native_x_component.md#oh_nativexcomponent_registercallback)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;[OH_NativeXComponent_Callback](_o_h___native_x_component___callback.md)&nbsp;\*callback) | 为此OH_NativeXComponent实例注册回调。 |
| [OH_NativeXComponent_RegisterMouseEventCallback](_o_h___native_x_component.md#oh_nativexcomponent_registermouseeventcallback)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;[OH_NativeXComponent_MouseEvent_Callback](_o_h___native_x_component___mouse_event___callback.md)&nbsp;\*callback) | 为此OH_NativeXComponent实例注册鼠标事件回调。 |
| [OH_NativeXComponent_RegisterFocusEventCallback](_o_h___native_x_component.md#oh_nativexcomponent_registerfocuseventcallback)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;void(\*callback)([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;void&nbsp;\*window)) | 为此OH_NativeXComponent实例注册获焦事件回调。 |
| [OH_NativeXComponent_RegisterKeyEventCallback](_o_h___native_x_component.md#oh_nativexcomponent_registerkeyeventcallback)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;void(\*callback)([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;void&nbsp;\*window)) | 为此OH_NativeXComponent实例注册按键事件回调。 |
| [OH_NativeXComponent_RegisterBlurEventCallback](_o_h___native_x_component.md#oh_nativexcomponent_registerblureventcallback)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;void(\*callback)([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;void&nbsp;\*window)) | 为此OH_NativeXComponent实例注册失焦事件回调。 |
| [OH_NativeXComponent_GetKeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_getkeyevent)&nbsp;([OH_NativeXComponent](_o_h___native_x_component.md#oh_nativexcomponent)&nbsp;\*component,&nbsp;[OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent)&nbsp;\*\*keyEvent) | 获取ArkUI&nbsp;XComponent调度的按键事件。 |
| [OH_NativeXComponent_GetKeyEventAction](_o_h___native_x_component.md#oh_nativexcomponent_getkeyeventaction)&nbsp;([OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent)&nbsp;\*keyEvent,&nbsp;[OH_NativeXComponent_KeyAction](_o_h___native_x_component.md#oh_nativexcomponent_keyaction)&nbsp;\*action) | 获取传入按键事件的动作。 |
| [OH_NativeXComponent_GetKeyEventCode](_o_h___native_x_component.md#oh_nativexcomponent_getkeyeventcode)&nbsp;([OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent)&nbsp;\*keyEvent,&nbsp;[OH_NativeXComponent_KeyCode](_o_h___native_x_component.md#oh_nativexcomponent_keycode)&nbsp;\*code) | 获取传入按键事件的按键码。 |
| [OH_NativeXComponent_GetKeyEventSourceType](_o_h___native_x_component.md#oh_nativexcomponent_getkeyeventsourcetype)&nbsp;([OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent)&nbsp;\*keyEvent,&nbsp;[OH_NativeXComponent_EventSourceType](_o_h___native_x_component.md#oh_nativexcomponent_eventsourcetype)&nbsp;\*sourceType) | 获取传入按键事件的事件源类型。 |
| [OH_NativeXComponent_GetKeyEventDeviceId](_o_h___native_x_component.md#oh_nativexcomponent_getkeyeventdeviceid)&nbsp;([OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent)&nbsp;\*keyEvent,&nbsp;int64_t&nbsp;\*deviceId) | 获取传入按键事件的设备id。 |
| [OH_NativeXComponent_GetKeyEventTimeStamp](_o_h___native_x_component.md#oh_nativexcomponent_getkeyeventtimestamp)&nbsp;([OH_NativeXComponent_KeyEvent](_o_h___native_x_component.md#oh_nativexcomponent_keyevent)&nbsp;\*keyEvent,&nbsp;int64_t&nbsp;\*timeStamp) | 获取传入按键事件的时间戳。 |
### 变量
| 名称 | 描述 |
| -------- | -------- |
| **OH_XCOMPONENT_ID_LEN_MAX**&nbsp;=&nbsp;128 | const&nbsp;uint32_t |
| **OH_MAX_TOUCH_POINTS_NUMBER**&nbsp;=&nbsp;10 | const&nbsp;uint32_t |
| 名称 | 描述 |
| ---------------------------------------- | ------------------------- |
| **OH_XCOMPONENT_ID_LEN_MAX**&nbsp;=&nbsp;128 | ArkUI XComponent的id的最大长度。 |
| **OH_MAX_TOUCH_POINTS_NUMBER**&nbsp;=&nbsp;10 | 触摸事件中的可识别的触摸点个数最大值。 |
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册