Skip to main content

xcomponent_sys/
xcomponent_ffi.rs

1// automatically generated by rust-bindgen 0.71.1
2
3#![allow(non_upper_case_globals)]
4#![allow(non_camel_case_types)]
5#![allow(non_snake_case)]
6#[cfg(feature = "api-13")]
7use ohos_sys_opaque_types::ArkUI_AccessibilityProvider;
8#[cfg(feature = "api-22")]
9use ohos_sys_opaque_types::ArkUI_XComponentSurfaceConfig;
10#[cfg(feature = "api-19")]
11use ohos_sys_opaque_types::{ArkUI_NodeHandle, OHNativeWindow};
12
13pub const OH_NATIVE_XCOMPONENT_OBJ: &::core::ffi::CStr = c"__NATIVE_XCOMPONENT_OBJ__";
14pub const OH_NATIVE_XCOMPONENT_MAX_TOUCH_POINTS_NUMBER: u32 = 10;
15impl OH_NativeXComponent_KeyCode {
16    pub const KEY_UNKNOWN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(-1);
17    pub const KEY_FN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(0);
18    pub const KEY_HOME: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(1);
19    pub const KEY_BACK: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2);
20    pub const KEY_MEDIA_PLAY_PAUSE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(10);
21    pub const KEY_MEDIA_STOP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(11);
22    pub const KEY_MEDIA_NEXT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(12);
23    pub const KEY_MEDIA_PREVIOUS: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(13);
24    pub const KEY_MEDIA_REWIND: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(14);
25    pub const KEY_MEDIA_FAST_FORWARD: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(15);
26    pub const KEY_VOLUME_UP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(16);
27    pub const KEY_VOLUME_DOWN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(17);
28    pub const KEY_POWER: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(18);
29    pub const KEY_CAMERA: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(19);
30    pub const KEY_VOLUME_MUTE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(22);
31    pub const KEY_MUTE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(23);
32    pub const KEY_BRIGHTNESS_UP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(40);
33    pub const KEY_BRIGHTNESS_DOWN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(41);
34    pub const KEY_0: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2000);
35    pub const KEY_1: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2001);
36    pub const KEY_2: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2002);
37    pub const KEY_3: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2003);
38    pub const KEY_4: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2004);
39    pub const KEY_5: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2005);
40    pub const KEY_6: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2006);
41    pub const KEY_7: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2007);
42    pub const KEY_8: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2008);
43    pub const KEY_9: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2009);
44    pub const KEY_STAR: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2010);
45    pub const KEY_POUND: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2011);
46    pub const KEY_DPAD_UP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2012);
47    pub const KEY_DPAD_DOWN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2013);
48    pub const KEY_DPAD_LEFT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2014);
49    pub const KEY_DPAD_RIGHT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2015);
50    pub const KEY_DPAD_CENTER: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2016);
51    pub const KEY_A: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2017);
52    pub const KEY_B: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2018);
53    pub const KEY_C: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2019);
54    pub const KEY_D: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2020);
55    pub const KEY_E: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2021);
56    pub const KEY_F: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2022);
57    pub const KEY_G: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2023);
58    pub const KEY_H: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2024);
59    pub const KEY_I: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2025);
60    pub const KEY_J: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2026);
61    pub const KEY_K: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2027);
62    pub const KEY_L: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2028);
63    pub const KEY_M: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2029);
64    pub const KEY_N: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2030);
65    pub const KEY_O: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2031);
66    pub const KEY_P: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2032);
67    pub const KEY_Q: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2033);
68    pub const KEY_R: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2034);
69    pub const KEY_S: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2035);
70    pub const KEY_T: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2036);
71    pub const KEY_U: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2037);
72    pub const KEY_V: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2038);
73    pub const KEY_W: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2039);
74    pub const KEY_X: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2040);
75    pub const KEY_Y: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2041);
76    pub const KEY_Z: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2042);
77    pub const KEY_COMMA: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2043);
78    pub const KEY_PERIOD: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2044);
79    pub const KEY_ALT_LEFT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2045);
80    pub const KEY_ALT_RIGHT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2046);
81    pub const KEY_SHIFT_LEFT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2047);
82    pub const KEY_SHIFT_RIGHT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2048);
83    pub const KEY_TAB: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2049);
84    pub const KEY_SPACE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2050);
85    pub const KEY_SYM: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2051);
86    pub const KEY_EXPLORER: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2052);
87    pub const KEY_ENVELOPE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2053);
88    pub const KEY_ENTER: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2054);
89    pub const KEY_DEL: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2055);
90    pub const KEY_GRAVE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2056);
91    pub const KEY_MINUS: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2057);
92    pub const KEY_EQUALS: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2058);
93    pub const KEY_LEFT_BRACKET: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2059);
94    pub const KEY_RIGHT_BRACKET: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2060);
95    pub const KEY_BACKSLASH: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2061);
96    pub const KEY_SEMICOLON: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2062);
97    pub const KEY_APOSTROPHE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2063);
98    pub const KEY_SLASH: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2064);
99    pub const KEY_AT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2065);
100    pub const KEY_PLUS: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2066);
101    pub const KEY_MENU: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2067);
102    pub const KEY_PAGE_UP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2068);
103    pub const KEY_PAGE_DOWN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2069);
104    pub const KEY_ESCAPE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2070);
105    pub const KEY_FORWARD_DEL: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2071);
106    pub const KEY_CTRL_LEFT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2072);
107    pub const KEY_CTRL_RIGHT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2073);
108    pub const KEY_CAPS_LOCK: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2074);
109    pub const KEY_SCROLL_LOCK: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2075);
110    pub const KEY_META_LEFT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2076);
111    pub const KEY_META_RIGHT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2077);
112    pub const KEY_FUNCTION: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2078);
113    pub const KEY_SYSRQ: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2079);
114    pub const KEY_BREAK: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2080);
115    pub const KEY_MOVE_HOME: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2081);
116    pub const KEY_MOVE_END: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2082);
117    pub const KEY_INSERT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2083);
118    pub const KEY_FORWARD: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2084);
119    pub const KEY_MEDIA_PLAY: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2085);
120    pub const KEY_MEDIA_PAUSE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2086);
121    pub const KEY_MEDIA_CLOSE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2087);
122    pub const KEY_MEDIA_EJECT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2088);
123    pub const KEY_MEDIA_RECORD: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2089);
124    pub const KEY_F1: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2090);
125    pub const KEY_F2: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2091);
126    pub const KEY_F3: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2092);
127    pub const KEY_F4: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2093);
128    pub const KEY_F5: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2094);
129    pub const KEY_F6: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2095);
130    pub const KEY_F7: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2096);
131    pub const KEY_F8: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2097);
132    pub const KEY_F9: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2098);
133    pub const KEY_F10: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2099);
134    pub const KEY_F11: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2100);
135    pub const KEY_F12: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2101);
136    pub const KEY_NUM_LOCK: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2102);
137    pub const KEY_NUMPAD_0: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2103);
138    pub const KEY_NUMPAD_1: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2104);
139    pub const KEY_NUMPAD_2: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2105);
140    pub const KEY_NUMPAD_3: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2106);
141    pub const KEY_NUMPAD_4: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2107);
142    pub const KEY_NUMPAD_5: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2108);
143    pub const KEY_NUMPAD_6: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2109);
144    pub const KEY_NUMPAD_7: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2110);
145    pub const KEY_NUMPAD_8: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2111);
146    pub const KEY_NUMPAD_9: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2112);
147    pub const KEY_NUMPAD_DIVIDE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2113);
148    pub const KEY_NUMPAD_MULTIPLY: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2114);
149    pub const KEY_NUMPAD_SUBTRACT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2115);
150    pub const KEY_NUMPAD_ADD: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2116);
151    pub const KEY_NUMPAD_DOT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2117);
152    pub const KEY_NUMPAD_COMMA: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2118);
153    pub const KEY_NUMPAD_ENTER: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2119);
154    pub const KEY_NUMPAD_EQUALS: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2120);
155    pub const KEY_NUMPAD_LEFT_PAREN: OH_NativeXComponent_KeyCode =
156        OH_NativeXComponent_KeyCode(2121);
157    pub const KEY_NUMPAD_RIGHT_PAREN: OH_NativeXComponent_KeyCode =
158        OH_NativeXComponent_KeyCode(2122);
159    pub const KEY_VIRTUAL_MULTITASK: OH_NativeXComponent_KeyCode =
160        OH_NativeXComponent_KeyCode(2210);
161    pub const KEY_SLEEP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2600);
162    pub const KEY_ZENKAKU_HANKAKU: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2601);
163    pub const KEY_102ND: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2602);
164    pub const KEY_RO: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2603);
165    pub const KEY_KATAKANA: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2604);
166    pub const KEY_HIRAGANA: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2605);
167    pub const KEY_HENKAN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2606);
168    pub const KEY_KATAKANA_HIRAGANA: OH_NativeXComponent_KeyCode =
169        OH_NativeXComponent_KeyCode(2607);
170    pub const KEY_MUHENKAN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2608);
171    pub const KEY_LINEFEED: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2609);
172    pub const KEY_MACRO: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2610);
173    pub const KEY_NUMPAD_PLUSMINUS: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2611);
174    pub const KEY_SCALE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2612);
175    pub const KEY_HANGUEL: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2613);
176    pub const KEY_HANJA: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2614);
177    pub const KEY_YEN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2615);
178    pub const KEY_STOP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2616);
179    pub const KEY_AGAIN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2617);
180    pub const KEY_PROPS: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2618);
181    pub const KEY_UNDO: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2619);
182    pub const KEY_COPY: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2620);
183    pub const KEY_OPEN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2621);
184    pub const KEY_PASTE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2622);
185    pub const KEY_FIND: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2623);
186    pub const KEY_CUT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2624);
187    pub const KEY_HELP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2625);
188    pub const KEY_CALC: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2626);
189    pub const KEY_FILE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2627);
190    pub const KEY_BOOKMARKS: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2628);
191    pub const KEY_NEXT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2629);
192    pub const KEY_PLAYPAUSE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2630);
193    pub const KEY_PREVIOUS: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2631);
194    pub const KEY_STOPCD: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2632);
195    pub const KEY_CONFIG: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2634);
196    pub const KEY_REFRESH: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2635);
197    pub const KEY_EXIT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2636);
198    pub const KEY_EDIT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2637);
199    pub const KEY_SCROLLUP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2638);
200    pub const KEY_SCROLLDOWN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2639);
201    pub const KEY_NEW: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2640);
202    pub const KEY_REDO: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2641);
203    pub const KEY_CLOSE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2642);
204    pub const KEY_PLAY: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2643);
205    pub const KEY_BASSBOOST: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2644);
206    pub const KEY_PRINT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2645);
207    pub const KEY_CHAT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2646);
208    pub const KEY_FINANCE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2647);
209    pub const KEY_CANCEL: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2648);
210    pub const KEY_KBDILLUM_TOGGLE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2649);
211    pub const KEY_KBDILLUM_DOWN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2650);
212    pub const KEY_KBDILLUM_UP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2651);
213    pub const KEY_SEND: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2652);
214    pub const KEY_REPLY: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2653);
215    pub const KEY_FORWARDMAIL: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2654);
216    pub const KEY_SAVE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2655);
217    pub const KEY_DOCUMENTS: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2656);
218    pub const KEY_VIDEO_NEXT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2657);
219    pub const KEY_VIDEO_PREV: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2658);
220    pub const KEY_BRIGHTNESS_CYCLE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2659);
221    pub const KEY_BRIGHTNESS_ZERO: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2660);
222    pub const KEY_DISPLAY_OFF: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2661);
223    pub const KEY_BTN_MISC: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2662);
224    pub const KEY_GOTO: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2663);
225    pub const KEY_INFO: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2664);
226    pub const KEY_PROGRAM: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2665);
227    pub const KEY_PVR: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2666);
228    pub const KEY_SUBTITLE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2667);
229    pub const KEY_FULL_SCREEN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2668);
230    pub const KEY_KEYBOARD: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2669);
231    pub const KEY_ASPECT_RATIO: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2670);
232    pub const KEY_PC: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2671);
233    pub const KEY_TV: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2672);
234    pub const KEY_TV2: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2673);
235    pub const KEY_VCR: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2674);
236    pub const KEY_VCR2: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2675);
237    pub const KEY_SAT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2676);
238    pub const KEY_CD: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2677);
239    pub const KEY_TAPE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2678);
240    pub const KEY_TUNER: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2679);
241    pub const KEY_PLAYER: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2680);
242    pub const KEY_DVD: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2681);
243    pub const KEY_AUDIO: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2682);
244    pub const KEY_VIDEO: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2683);
245    pub const KEY_MEMO: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2684);
246    pub const KEY_CALENDAR: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2685);
247    pub const KEY_RED: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2686);
248    pub const KEY_GREEN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2687);
249    pub const KEY_YELLOW: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2688);
250    pub const KEY_BLUE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2689);
251    pub const KEY_CHANNELUP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2690);
252    pub const KEY_CHANNELDOWN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2691);
253    pub const KEY_LAST: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2692);
254    pub const KEY_RESTART: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2693);
255    pub const KEY_SLOW: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2694);
256    pub const KEY_SHUFFLE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2695);
257    pub const KEY_VIDEOPHONE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2696);
258    pub const KEY_GAMES: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2697);
259    pub const KEY_ZOOMIN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2698);
260    pub const KEY_ZOOMOUT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2699);
261    pub const KEY_ZOOMRESET: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2700);
262    pub const KEY_WORDPROCESSOR: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2701);
263    pub const KEY_EDITOR: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2702);
264    pub const KEY_SPREADSHEET: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2703);
265    pub const KEY_GRAPHICSEDITOR: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2704);
266    pub const KEY_PRESENTATION: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2705);
267    pub const KEY_DATABASE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2706);
268    pub const KEY_NEWS: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2707);
269    pub const KEY_VOICEMAIL: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2708);
270    pub const KEY_ADDRESSBOOK: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2709);
271    pub const KEY_MESSENGER: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2710);
272    pub const KEY_BRIGHTNESS_TOGGLE: OH_NativeXComponent_KeyCode =
273        OH_NativeXComponent_KeyCode(2711);
274    pub const KEY_SPELLCHECK: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2712);
275    pub const KEY_COFFEE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2713);
276    pub const KEY_MEDIA_REPEAT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2714);
277    pub const KEY_IMAGES: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2715);
278    pub const KEY_BUTTONCONFIG: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2716);
279    pub const KEY_TASKMANAGER: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2717);
280    pub const KEY_JOURNAL: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2718);
281    pub const KEY_CONTROLPANEL: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2719);
282    pub const KEY_APPSELECT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2720);
283    pub const KEY_SCREENSAVER: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2721);
284    pub const KEY_ASSISTANT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2722);
285    pub const KEY_KBD_LAYOUT_NEXT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2723);
286    pub const KEY_BRIGHTNESS_MIN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2724);
287    pub const KEY_BRIGHTNESS_MAX: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2725);
288    pub const KEY_KBDINPUTASSIST_PREV: OH_NativeXComponent_KeyCode =
289        OH_NativeXComponent_KeyCode(2726);
290    pub const KEY_KBDINPUTASSIST_NEXT: OH_NativeXComponent_KeyCode =
291        OH_NativeXComponent_KeyCode(2727);
292    pub const KEY_KBDINPUTASSIST_PREVGROUP: OH_NativeXComponent_KeyCode =
293        OH_NativeXComponent_KeyCode(2728);
294    pub const KEY_KBDINPUTASSIST_NEXTGROUP: OH_NativeXComponent_KeyCode =
295        OH_NativeXComponent_KeyCode(2729);
296    pub const KEY_KBDINPUTASSIST_ACCEPT: OH_NativeXComponent_KeyCode =
297        OH_NativeXComponent_KeyCode(2730);
298    pub const KEY_KBDINPUTASSIST_CANCEL: OH_NativeXComponent_KeyCode =
299        OH_NativeXComponent_KeyCode(2731);
300    pub const KEY_FRONT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2800);
301    pub const KEY_SETUP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2801);
302    pub const KEY_WAKEUP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2802);
303    pub const KEY_SENDFILE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2803);
304    pub const KEY_DELETEFILE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2804);
305    pub const KEY_XFER: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2805);
306    pub const KEY_PROG1: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2806);
307    pub const KEY_PROG2: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2807);
308    pub const KEY_MSDOS: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2808);
309    pub const KEY_SCREENLOCK: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2809);
310    pub const KEY_DIRECTION_ROTATE_DISPLAY: OH_NativeXComponent_KeyCode =
311        OH_NativeXComponent_KeyCode(2810);
312    pub const KEY_CYCLEWINDOWS: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2811);
313    pub const KEY_COMPUTER: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2812);
314    pub const KEY_EJECTCLOSECD: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2813);
315    pub const KEY_ISO: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2814);
316    pub const KEY_MOVE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2815);
317    pub const KEY_F13: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2816);
318    pub const KEY_F14: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2817);
319    pub const KEY_F15: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2818);
320    pub const KEY_F16: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2819);
321    pub const KEY_F17: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2820);
322    pub const KEY_F18: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2821);
323    pub const KEY_F19: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2822);
324    pub const KEY_F20: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2823);
325    pub const KEY_F21: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2824);
326    pub const KEY_F22: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2825);
327    pub const KEY_F23: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2826);
328    pub const KEY_F24: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2827);
329    pub const KEY_PROG3: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2828);
330    pub const KEY_PROG4: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2829);
331    pub const KEY_DASHBOARD: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2830);
332    pub const KEY_SUSPEND: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2831);
333    pub const KEY_HP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2832);
334    pub const KEY_SOUND: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2833);
335    pub const KEY_QUESTION: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2834);
336    pub const KEY_CONNECT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2836);
337    pub const KEY_SPORT: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2837);
338    pub const KEY_SHOP: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2838);
339    pub const KEY_ALTERASE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2839);
340    pub const KEY_SWITCHVIDEOMODE: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2841);
341    pub const KEY_BATTERY: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2842);
342    pub const KEY_BLUETOOTH: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2843);
343    pub const KEY_WLAN: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2844);
344    pub const KEY_UWB: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2845);
345    pub const KEY_WWAN_WIMAX: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2846);
346    pub const KEY_RFKILL: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(2847);
347    pub const KEY_CHANNEL: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(3001);
348    pub const KEY_BTN_0: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(3100);
349    pub const KEY_BTN_1: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(3101);
350    pub const KEY_BTN_2: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(3102);
351    pub const KEY_BTN_3: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(3103);
352    pub const KEY_BTN_4: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(3104);
353    pub const KEY_BTN_5: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(3105);
354    pub const KEY_BTN_6: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(3106);
355    pub const KEY_BTN_7: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(3107);
356    pub const KEY_BTN_8: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(3108);
357    pub const KEY_BTN_9: OH_NativeXComponent_KeyCode = OH_NativeXComponent_KeyCode(3109);
358}
359#[repr(transparent)]
360/// Represents the key event code.
361///
362///
363/// Available since API-level: 10
364///
365/// Version: 1.0
366#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
367pub struct OH_NativeXComponent_KeyCode(pub ::core::ffi::c_int);
368impl OH_NativeXComponent_KeyAction {
369    pub const OH_NATIVEXCOMPONENT_KEY_ACTION_UNKNOWN: OH_NativeXComponent_KeyAction =
370        OH_NativeXComponent_KeyAction(-1);
371    pub const OH_NATIVEXCOMPONENT_KEY_ACTION_DOWN: OH_NativeXComponent_KeyAction =
372        OH_NativeXComponent_KeyAction(0);
373    pub const OH_NATIVEXCOMPONENT_KEY_ACTION_UP: OH_NativeXComponent_KeyAction =
374        OH_NativeXComponent_KeyAction(1);
375}
376#[repr(transparent)]
377/// Represents the key event action.
378///
379///
380/// Available since API-level: 10
381///
382/// Version: 1.0
383#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
384pub struct OH_NativeXComponent_KeyAction(pub ::core::ffi::c_int);
385pub const OH_XCOMPONENT_ID_LEN_MAX: u32 = 128;
386pub const OH_MAX_TOUCH_POINTS_NUMBER: u32 = 10;
387impl OH_NativeXComponent_TouchEventType {
388    /// Trigger a touch event when a finger is pressed.
389    pub const OH_NATIVEXCOMPONENT_DOWN: OH_NativeXComponent_TouchEventType =
390        OH_NativeXComponent_TouchEventType(0);
391    /// Trigger a touch event when a finger is lifted.
392    pub const OH_NATIVEXCOMPONENT_UP: OH_NativeXComponent_TouchEventType =
393        OH_NativeXComponent_TouchEventType(1);
394    /// Trigger a touch event when a finger moves on the screen in pressed state.
395    pub const OH_NATIVEXCOMPONENT_MOVE: OH_NativeXComponent_TouchEventType =
396        OH_NativeXComponent_TouchEventType(2);
397    /// Trigger an event when a touch event is canceled.
398    pub const OH_NATIVEXCOMPONENT_CANCEL: OH_NativeXComponent_TouchEventType =
399        OH_NativeXComponent_TouchEventType(3);
400    /// Invalid touch type.
401    pub const OH_NATIVEXCOMPONENT_UNKNOWN: OH_NativeXComponent_TouchEventType =
402        OH_NativeXComponent_TouchEventType(4);
403}
404#[repr(transparent)]
405/// Represents the type of touch event.
406///
407///
408/// Available since API-level: 8
409///
410/// Version: 1.0
411#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
412pub struct OH_NativeXComponent_TouchEventType(pub ::core::ffi::c_uint);
413impl OH_NativeXComponent_TouchPointToolType {
414    /// Indicates invalid tool type.
415    pub const OH_NATIVEXCOMPONENT_TOOL_TYPE_UNKNOWN: OH_NativeXComponent_TouchPointToolType =
416        OH_NativeXComponent_TouchPointToolType(0);
417    /// Indicates a finger.
418    pub const OH_NATIVEXCOMPONENT_TOOL_TYPE_FINGER: OH_NativeXComponent_TouchPointToolType =
419        OH_NativeXComponent_TouchPointToolType(1);
420    /// Indicates a stylus.
421    pub const OH_NATIVEXCOMPONENT_TOOL_TYPE_PEN: OH_NativeXComponent_TouchPointToolType =
422        OH_NativeXComponent_TouchPointToolType(2);
423    /// Indicates a eraser.
424    pub const OH_NATIVEXCOMPONENT_TOOL_TYPE_RUBBER: OH_NativeXComponent_TouchPointToolType =
425        OH_NativeXComponent_TouchPointToolType(3);
426    /// Indicates a brush.
427    pub const OH_NATIVEXCOMPONENT_TOOL_TYPE_BRUSH: OH_NativeXComponent_TouchPointToolType =
428        OH_NativeXComponent_TouchPointToolType(4);
429    /// Indicates a pencil.
430    pub const OH_NATIVEXCOMPONENT_TOOL_TYPE_PENCIL: OH_NativeXComponent_TouchPointToolType =
431        OH_NativeXComponent_TouchPointToolType(5);
432    /// Indicates a brush.
433    pub const OH_NATIVEXCOMPONENT_TOOL_TYPE_AIRBRUSH: OH_NativeXComponent_TouchPointToolType =
434        OH_NativeXComponent_TouchPointToolType(6);
435    /// Indicates a mouse.
436    pub const OH_NATIVEXCOMPONENT_TOOL_TYPE_MOUSE: OH_NativeXComponent_TouchPointToolType =
437        OH_NativeXComponent_TouchPointToolType(7);
438    /// Indicates a lens.
439    pub const OH_NATIVEXCOMPONENT_TOOL_TYPE_LENS: OH_NativeXComponent_TouchPointToolType =
440        OH_NativeXComponent_TouchPointToolType(8);
441}
442#[repr(transparent)]
443/// Represents the touch point tool type.
444///
445///
446/// Available since API-level: 9
447///
448/// Version: 1.0
449#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
450pub struct OH_NativeXComponent_TouchPointToolType(pub ::core::ffi::c_uint);
451impl OH_NativeXComponent_EventSourceType {
452    /// Indicates an unknown input source type.
453    pub const OH_NATIVEXCOMPONENT_SOURCE_TYPE_UNKNOWN: OH_NativeXComponent_EventSourceType =
454        OH_NativeXComponent_EventSourceType(0);
455    /// Indicates that the input source generates a mouse multi-touch event.
456    pub const OH_NATIVEXCOMPONENT_SOURCE_TYPE_MOUSE: OH_NativeXComponent_EventSourceType =
457        OH_NativeXComponent_EventSourceType(1);
458    /// Indicates that the input source generates a touchscreen multi-touch event.
459    pub const OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHSCREEN: OH_NativeXComponent_EventSourceType =
460        OH_NativeXComponent_EventSourceType(2);
461    /// Indicates that the input source generates a touchpad multi-touch event.
462    pub const OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHPAD: OH_NativeXComponent_EventSourceType =
463        OH_NativeXComponent_EventSourceType(3);
464    /// Indicates that the input source generates a joystick multi-touch event.
465    pub const OH_NATIVEXCOMPONENT_SOURCE_TYPE_JOYSTICK: OH_NativeXComponent_EventSourceType =
466        OH_NativeXComponent_EventSourceType(4);
467    /// Indicates that the input source generates a keyboard event.
468    ///
469    ///
470    /// Available since API-level: 10
471    ///
472    /// Version: 1.0
473    pub const OH_NATIVEXCOMPONENT_SOURCE_TYPE_KEYBOARD: OH_NativeXComponent_EventSourceType =
474        OH_NativeXComponent_EventSourceType(5);
475}
476#[repr(transparent)]
477/// Represents the touch event source type.
478///
479///
480/// Available since API-level: 9
481///
482/// Version: 1.0
483#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
484pub struct OH_NativeXComponent_EventSourceType(pub ::core::ffi::c_uint);
485impl OH_NativeXComponent_MouseEventAction {
486    pub const OH_NATIVEXCOMPONENT_MOUSE_NONE: OH_NativeXComponent_MouseEventAction =
487        OH_NativeXComponent_MouseEventAction(0);
488    pub const OH_NATIVEXCOMPONENT_MOUSE_PRESS: OH_NativeXComponent_MouseEventAction =
489        OH_NativeXComponent_MouseEventAction(1);
490    pub const OH_NATIVEXCOMPONENT_MOUSE_RELEASE: OH_NativeXComponent_MouseEventAction =
491        OH_NativeXComponent_MouseEventAction(2);
492    pub const OH_NATIVEXCOMPONENT_MOUSE_MOVE: OH_NativeXComponent_MouseEventAction =
493        OH_NativeXComponent_MouseEventAction(3);
494    /// Triggered when the mouse event is canceled.
495    ///
496    /// Available since API-level: 18
497    #[cfg(feature = "api-18")]
498    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
499    pub const OH_NATIVEXCOMPONENT_MOUSE_CANCEL: OH_NativeXComponent_MouseEventAction =
500        OH_NativeXComponent_MouseEventAction(4);
501}
502#[repr(transparent)]
503/// Represents the mouse event action.
504///
505///
506/// Available since API-level: 9
507///
508/// Version: 1.0
509#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
510pub struct OH_NativeXComponent_MouseEventAction(pub ::core::ffi::c_uint);
511impl OH_NativeXComponent_MouseEventButton {
512    pub const OH_NATIVEXCOMPONENT_NONE_BUTTON: OH_NativeXComponent_MouseEventButton =
513        OH_NativeXComponent_MouseEventButton(0);
514    pub const OH_NATIVEXCOMPONENT_LEFT_BUTTON: OH_NativeXComponent_MouseEventButton =
515        OH_NativeXComponent_MouseEventButton(1);
516    pub const OH_NATIVEXCOMPONENT_RIGHT_BUTTON: OH_NativeXComponent_MouseEventButton =
517        OH_NativeXComponent_MouseEventButton(2);
518    pub const OH_NATIVEXCOMPONENT_MIDDLE_BUTTON: OH_NativeXComponent_MouseEventButton =
519        OH_NativeXComponent_MouseEventButton(4);
520    pub const OH_NATIVEXCOMPONENT_BACK_BUTTON: OH_NativeXComponent_MouseEventButton =
521        OH_NativeXComponent_MouseEventButton(8);
522    pub const OH_NATIVEXCOMPONENT_FORWARD_BUTTON: OH_NativeXComponent_MouseEventButton =
523        OH_NativeXComponent_MouseEventButton(16);
524}
525#[repr(transparent)]
526/// Represents the mouse event button.
527///
528///
529/// Available since API-level: 9
530///
531/// Version: 1.0
532#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
533pub struct OH_NativeXComponent_MouseEventButton(pub ::core::ffi::c_uint);
534impl OH_NativeXComponent_TouchEvent_SourceTool {
535    pub const OH_NATIVEXCOMPONENT_SOURCETOOL_UNKNOWN: OH_NativeXComponent_TouchEvent_SourceTool =
536        OH_NativeXComponent_TouchEvent_SourceTool(0);
537    pub const OH_NATIVEXCOMPONENT_SOURCETOOL_FINGER: OH_NativeXComponent_TouchEvent_SourceTool =
538        OH_NativeXComponent_TouchEvent_SourceTool(1);
539    pub const OH_NATIVEXCOMPONENT_SOURCETOOL_PEN: OH_NativeXComponent_TouchEvent_SourceTool =
540        OH_NativeXComponent_TouchEvent_SourceTool(2);
541    pub const OH_NATIVEXCOMPONENT_SOURCETOOL_RUBBER: OH_NativeXComponent_TouchEvent_SourceTool =
542        OH_NativeXComponent_TouchEvent_SourceTool(3);
543    pub const OH_NATIVEXCOMPONENT_SOURCETOOL_BRUSH: OH_NativeXComponent_TouchEvent_SourceTool =
544        OH_NativeXComponent_TouchEvent_SourceTool(4);
545    pub const OH_NATIVEXCOMPONENT_SOURCETOOL_PENCIL: OH_NativeXComponent_TouchEvent_SourceTool =
546        OH_NativeXComponent_TouchEvent_SourceTool(5);
547    pub const OH_NATIVEXCOMPONENT_SOURCETOOL_AIRBRUSH: OH_NativeXComponent_TouchEvent_SourceTool =
548        OH_NativeXComponent_TouchEvent_SourceTool(6);
549    pub const OH_NATIVEXCOMPONENT_SOURCETOOL_MOUSE: OH_NativeXComponent_TouchEvent_SourceTool =
550        OH_NativeXComponent_TouchEvent_SourceTool(7);
551    pub const OH_NATIVEXCOMPONENT_SOURCETOOL_LENS: OH_NativeXComponent_TouchEvent_SourceTool =
552        OH_NativeXComponent_TouchEvent_SourceTool(8);
553    pub const OH_NATIVEXCOMPONENT_SOURCETOOL_TOUCHPAD: OH_NativeXComponent_TouchEvent_SourceTool =
554        OH_NativeXComponent_TouchEvent_SourceTool(9);
555}
556#[repr(transparent)]
557/// Represents the source tool type of TouchEvent
558///
559///
560/// Available since API-level: 10
561///
562/// Version: 1.0
563#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
564pub struct OH_NativeXComponent_TouchEvent_SourceTool(pub ::core::ffi::c_uint);
565/// Represents the historical point.
566///
567///
568/// Available since API-level: 10
569///
570/// Version: 1.0
571#[repr(C)]
572#[derive(Debug, Copy, Clone)]
573pub struct OH_NativeXComponent_HistoricalPoint {
574    /// Unique identifier of a finger.
575    pub id: i32,
576    /// X coordinate of the touch point relative to the left edge of the screen.
577    pub screenX: f32,
578    /// Y coordinate of the touch point relative to the upper edge of the screen.
579    pub screenY: f32,
580    /// X coordinate of the touch point relative to the left edge of the element to touch.
581    pub x: f32,
582    /// Y coordinate of the touch point relative to the upper edge of the element to touch.
583    pub y: f32,
584    /// Touch type of the touch event.
585    pub type_: OH_NativeXComponent_TouchEventType,
586    /// Contact area between the finger pad and the screen.
587    pub size: f64,
588    /// Pressure of the current touch event.
589    pub force: f32,
590    /// Timestamp of the current touch event.
591    pub timeStamp: i64,
592    /// The angle betweenprojection on plane-X-Y and axis-Z of the current touch event.
593    pub titlX: f32,
594    /// The angle betweenprojection on plane-Y-Z and axis-Z of the current touch event.
595    pub titlY: f32,
596    /// The sourceTool of the current touch event.
597    pub sourceTool: OH_NativeXComponent_TouchEvent_SourceTool,
598}
599/// Represents the touch point information of touch event.
600///
601///
602/// Available since API-level: 8
603///
604/// Version: 1.0
605#[repr(C)]
606#[derive(Debug, Copy, Clone)]
607pub struct OH_NativeXComponent_TouchPoint {
608    /// Unique identifier of a finger.
609    pub id: i32,
610    /// X coordinate of the touch point relative to the left edge of the screen.
611    pub screenX: f32,
612    /// Y coordinate of the touch point relative to the upper edge of the screen.
613    pub screenY: f32,
614    /// X coordinate of the touch point relative to the left edge of the element to touch.
615    pub x: f32,
616    /// Y coordinate of the touch point relative to the upper edge of the element to touch.
617    pub y: f32,
618    /// Touch type of the touch event.
619    pub type_: OH_NativeXComponent_TouchEventType,
620    /// Contact area between the finger pad and the screen.
621    pub size: f64,
622    /// Pressure of the current touch event.
623    pub force: f32,
624    /// Timestamp of the current touch event.
625    pub timeStamp: i64,
626    /// Whether the current point is pressed.
627    pub isPressed: bool,
628}
629/// Represents the touch event.
630///
631///
632/// Available since API-level: 8
633///
634/// Version: 1.0
635#[repr(C)]
636#[derive(Debug, Copy, Clone)]
637pub struct OH_NativeXComponent_TouchEvent {
638    /// Unique identifier of a finger.
639    pub id: i32,
640    /// X coordinate of the touch point relative to the left edge of the screen.
641    pub screenX: f32,
642    /// Y coordinate of the touch point relative to the upper edge of the screen.
643    pub screenY: f32,
644    /// X coordinate of the touch point relative to the left edge of the element to touch.
645    pub x: f32,
646    /// Y coordinate of the touch point relative to the upper edge of the element to touch.
647    pub y: f32,
648    /// Touch type of the touch event.
649    pub type_: OH_NativeXComponent_TouchEventType,
650    /// Contact area between the finger pad and the screen.
651    pub size: f64,
652    /// Pressure of the current touch event.
653    pub force: f32,
654    /// ID of the device where the current touch event is generated.
655    pub deviceId: i64,
656    /// Timestamp of the current touch event.
657    pub timeStamp: i64,
658    /// Array of the current touch points.
659    pub touchPoints: [OH_NativeXComponent_TouchPoint; 10usize],
660    /// Number of current touch points.
661    pub numPoints: u32,
662}
663/// Represents the mouse event information.
664///
665///
666/// Available since API-level: 9
667///
668/// Version: 1.0
669#[repr(C)]
670#[derive(Debug, Copy, Clone)]
671pub struct OH_NativeXComponent_MouseEvent {
672    /// X coordinate of the mouse point relative to the left edge of the element to mouse.
673    pub x: f32,
674    /// Y coordinate of the mouse point relative to the upper edge of the element to mouse.
675    pub y: f32,
676    /// X coordinate of the mouse point relative to the left edge of the screen.
677    pub screenX: f32,
678    /// Y coordinate of the mouse point relative to the upper edge of the screen.
679    pub screenY: f32,
680    /// Timestamp of the current mouse event.
681    pub timestamp: i64,
682    /// Mouse event action.
683    pub action: OH_NativeXComponent_MouseEventAction,
684    /// Mouse event button.
685    pub button: OH_NativeXComponent_MouseEventButton,
686}
687/// Provides an encapsulated <b>OH_NativeXComponent</b> instance.
688///
689///
690/// Available since API-level: 8
691///
692/// Version: 1.0
693#[repr(C)]
694pub struct OH_NativeXComponent {
695    _unused: [u8; 0],
696}
697/// Registers the surface lifecycle and touch event callbacks.
698///
699///
700/// Available since API-level: 8
701///
702/// Version: 1.0
703#[repr(C)]
704#[derive(Debug, Copy, Clone)]
705pub struct OH_NativeXComponent_Callback {
706    /// Called when the surface is created.
707    pub OnSurfaceCreated: ::core::option::Option<
708        unsafe extern "C" fn(component: *mut OH_NativeXComponent, window: *mut ::core::ffi::c_void),
709    >,
710    /// Called when the surface is changed.
711    pub OnSurfaceChanged: ::core::option::Option<
712        unsafe extern "C" fn(component: *mut OH_NativeXComponent, window: *mut ::core::ffi::c_void),
713    >,
714    /// Called when the surface is destroyed.
715    pub OnSurfaceDestroyed: ::core::option::Option<
716        unsafe extern "C" fn(component: *mut OH_NativeXComponent, window: *mut ::core::ffi::c_void),
717    >,
718    /// Called when a touch event is triggered.
719    pub DispatchTouchEvent: ::core::option::Option<
720        unsafe extern "C" fn(component: *mut OH_NativeXComponent, window: *mut ::core::ffi::c_void),
721    >,
722}
723/// Registers the mouse event callbacks.
724///
725///
726/// Available since API-level: 9
727///
728/// Version: 1.0
729#[repr(C)]
730#[derive(Debug, Copy, Clone)]
731pub struct OH_NativeXComponent_MouseEvent_Callback {
732    /// Called when a mouse event is triggered.
733    pub DispatchMouseEvent: ::core::option::Option<
734        unsafe extern "C" fn(component: *mut OH_NativeXComponent, window: *mut ::core::ffi::c_void),
735    >,
736    /// Called when a hover event is triggered.
737    pub DispatchHoverEvent: ::core::option::Option<
738        unsafe extern "C" fn(component: *mut OH_NativeXComponent, isHover: bool),
739    >,
740}
741/// Provides an encapsulated <b>OH_NativeXComponent_KeyEvent</b> instance.
742///
743///
744/// Available since API-level: 10
745///
746/// Version: 1.0
747#[repr(C)]
748pub struct OH_NativeXComponent_KeyEvent {
749    _unused: [u8; 0],
750}
751/// Defines the expected frame rate range struct.
752///
753///
754/// Available since API-level: 11
755///
756/// Version: 1.0
757#[cfg(feature = "api-11")]
758#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
759#[repr(C)]
760#[derive(Debug, Copy, Clone)]
761pub struct OH_NativeXComponent_ExpectedRateRange {
762    /// The minimum frame rate of dynamical callback rate range.
763    pub min: i32,
764    /// The maximum frame rate of dynamical callback rate range.
765    pub max: i32,
766    /// The expected frame rate of dynamical callback rate range.
767    pub expected: i32,
768}
769/// Provides an encapsulated <b>OH_NativeXComponent_ExtraMouseEventInfo</b>
770/// instance which has extra info compared to OH_NativeXComponent_MouseEvent.
771///
772///
773/// Available since API-level: 20
774///
775/// Version: 1.0
776#[cfg(feature = "api-20")]
777#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
778#[repr(C)]
779pub struct OH_NativeXComponent_ExtraMouseEventInfo {
780    _unused: [u8; 0],
781}
782/// Provides an encapsulated <b>OH_ArkUI_SurfaceHolder</b> instance.
783///
784///
785/// Available since API-level: 19
786#[cfg(feature = "api-19")]
787#[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
788#[repr(C)]
789pub struct OH_ArkUI_SurfaceHolder {
790    _unused: [u8; 0],
791}
792/// Define the surface lifecycle callback.
793///
794///
795/// Available since API-level: 19
796#[cfg(feature = "api-19")]
797#[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
798#[repr(C)]
799pub struct OH_ArkUI_SurfaceCallback {
800    _unused: [u8; 0],
801}
802extern "C" {
803    /// Obtains the ID of the ArkUI XComponent.
804    ///
805    /// # Arguments
806    ///
807    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
808    ///
809    /// * `id` - Indicates the char buffer to keep the ID of this <b>OH_NativeXComponent</b> instance.
810    ///
811    /// Notice that a null-terminator will be appended to the char buffer, so the size of the
812    ///
813    /// char buffer should be at least as large as the size of the real id length plus 1.
814    ///
815    /// It is recommended that the size of the char buffer be [OH_XCOMPONENT_ID_LEN_MAX + 1].
816    ///
817    /// * `size` - Indicates the pointer to the length of <b>id</b>, which you can receive.
818    ///
819    /// # Returns
820    ///
821    /// * Returns the status code of the execution.
822    ///
823    /// Available since API-level: 8
824    ///
825    /// Version: 1.0
826    pub fn OH_NativeXComponent_GetXComponentId(
827        component: *mut OH_NativeXComponent,
828        id: *mut ::core::ffi::c_char,
829        size: *mut u64,
830    ) -> i32;
831    /// Obtains the size of the surface held by the ArkUI XComponent.
832    ///
833    /// # Arguments
834    ///
835    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
836    ///
837    /// * `window` - Indicates the native window handler.
838    ///
839    /// * `width` - Indicates the pointer to the width of the current surface.
840    ///
841    /// * `height` - Indicates the pointer to the height of the current surface.
842    ///
843    /// # Returns
844    ///
845    /// * Returns the status code of the execution.
846    ///
847    /// Available since API-level: 8
848    ///
849    /// Version: 1.0
850    pub fn OH_NativeXComponent_GetXComponentSize(
851        component: *mut OH_NativeXComponent,
852        window: *const ::core::ffi::c_void,
853        width: *mut u64,
854        height: *mut u64,
855    ) -> i32;
856    /// Obtains the offset of the surface held by the ArkUI XComponent.
857    ///
858    /// # Arguments
859    ///
860    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
861    ///
862    /// * `window` - Indicates the native window handler.
863    ///
864    /// * `x` - Indicates the pointer to the x coordinate of the current surface.
865    ///
866    /// * `y` - Indicates the pointer to the y coordinate of the current surface.
867    ///
868    /// # Returns
869    ///
870    /// * Returns the status code of the execution.
871    ///
872    /// Available since API-level: 8
873    ///
874    /// Version: 1.0
875    pub fn OH_NativeXComponent_GetXComponentOffset(
876        component: *mut OH_NativeXComponent,
877        window: *const ::core::ffi::c_void,
878        x: *mut f64,
879        y: *mut f64,
880    ) -> i32;
881    /// Obtains the touch event dispatched by the ArkUI XComponent.
882    ///
883    /// # Arguments
884    ///
885    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
886    ///
887    /// * `window` - Indicates the native window handler.
888    ///
889    /// * `touchEvent` - Indicates the pointer to the current touch event.
890    ///
891    /// # Returns
892    ///
893    /// * Returns the status code of the execution.
894    ///
895    /// Available since API-level: 8
896    ///
897    /// Version: 1.0
898    pub fn OH_NativeXComponent_GetTouchEvent(
899        component: *mut OH_NativeXComponent,
900        window: *const ::core::ffi::c_void,
901        touchEvent: *mut OH_NativeXComponent_TouchEvent,
902    ) -> i32;
903    /// Obtains the touch pointer tool type by the ArkUI XComponent.
904    ///
905    /// # Arguments
906    ///
907    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
908    ///
909    /// * `pointIndex` - Indicates the pointer index in the touchPoints.
910    ///
911    /// * `toolType` - Indicates the tool Type of the pointer.
912    ///
913    /// # Returns
914    ///
915    /// * Returns the status code of the execution.
916    ///
917    /// Available since API-level: 9
918    ///
919    /// Version: 1.0
920    pub fn OH_NativeXComponent_GetTouchPointToolType(
921        component: *mut OH_NativeXComponent,
922        pointIndex: u32,
923        toolType: *mut OH_NativeXComponent_TouchPointToolType,
924    ) -> i32;
925    /// Obtains the touch pointer tiltX by the ArkUI XComponent.
926    ///
927    /// # Arguments
928    ///
929    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
930    ///
931    /// * `pointIndex` - Indicates the pointer index in the touchPoints.
932    ///
933    /// * `tiltX` - Indicates the x tilt of the pointer.
934    ///
935    /// # Returns
936    ///
937    /// * Returns the status code of the execution.
938    ///
939    /// Available since API-level: 9
940    ///
941    /// Version: 1.0
942    pub fn OH_NativeXComponent_GetTouchPointTiltX(
943        component: *mut OH_NativeXComponent,
944        pointIndex: u32,
945        tiltX: *mut f32,
946    ) -> i32;
947    /// Obtains the touch pointer tiltX by the ArkUI XComponent.
948    ///
949    /// # Arguments
950    ///
951    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
952    ///
953    /// * `pointIndex` - Indicates the pointer index in the touchPoints.
954    ///
955    /// * `tiltY` - Indicates the y tilt of the pointer.
956    ///
957    /// # Returns
958    ///
959    /// * Returns the status code of the execution.
960    ///
961    /// Available since API-level: 9
962    ///
963    /// Version: 1.0
964    pub fn OH_NativeXComponent_GetTouchPointTiltY(
965        component: *mut OH_NativeXComponent,
966        pointIndex: u32,
967        tiltY: *mut f32,
968    ) -> i32;
969    /// Obtains the x coordinate of a specific touch point relative to the upper left corner of
970    ///
971    /// the current application window from the ArkUI XComponent.
972    ///
973    /// # Arguments
974    ///
975    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
976    ///
977    /// * `pointIndex` - Indicates the pointer index in the touchPoints.
978    ///
979    /// * `windowX` - Indicates the x coordinate relative to the upper left corner of the current
980    ///
981    /// application window.
982    ///
983    /// # Returns
984    ///
985    /// * Returns the status code of the execution.
986    /// [`OH_NATIVEXCOMPONENT_RESULT_SUCCESS`] get windowX success.
987    /// [`OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER`] component is NULL, windowX is NULL
988    ///
989    /// or native XComponent is NULL.
990    ///
991    /// Available since API-level: 12
992    ///
993    /// Version: 1.0
994    #[cfg(feature = "api-12")]
995    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
996    pub fn OH_NativeXComponent_GetTouchPointWindowX(
997        component: *mut OH_NativeXComponent,
998        pointIndex: u32,
999        windowX: *mut f32,
1000    ) -> i32;
1001    /// Obtains the y coordinate of a specific touch point relative to the upper left corner of
1002    ///
1003    /// the current application window from the ArkUI XComponent.
1004    ///
1005    /// # Arguments
1006    ///
1007    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
1008    ///
1009    /// * `pointIndex` - Indicates the pointer index in the touchPoints.
1010    ///
1011    /// * `windowY` - Indicates the y coordinate relative to the upper left corner of the current
1012    ///
1013    /// application window.
1014    ///
1015    /// # Returns
1016    ///
1017    /// * Returns the status code of the execution.
1018    /// [`OH_NATIVEXCOMPONENT_RESULT_SUCCESS`] get windowY success.
1019    /// [`OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER`] component is NULL, windowY is NULL
1020    ///
1021    /// or native XComponent is NULL.
1022    ///
1023    /// Available since API-level: 12
1024    ///
1025    /// Version: 1.0
1026    #[cfg(feature = "api-12")]
1027    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1028    pub fn OH_NativeXComponent_GetTouchPointWindowY(
1029        component: *mut OH_NativeXComponent,
1030        pointIndex: u32,
1031        windowY: *mut f32,
1032    ) -> i32;
1033    /// Obtains the x coordinate of a specific touch point relative to the upper left corner of
1034    ///
1035    /// the current screen from the ArkUI XComponent.
1036    ///
1037    /// # Arguments
1038    ///
1039    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
1040    ///
1041    /// * `pointIndex` - Indicates the pointer index in the touchPoints.
1042    ///
1043    /// * `displayX` - Indicates the x coordinate relative to the upper left corner of the current
1044    ///
1045    /// screen.
1046    ///
1047    /// # Returns
1048    ///
1049    /// * Returns the status code of the execution.
1050    /// [`OH_NATIVEXCOMPONENT_RESULT_SUCCESS`] get displayX success.
1051    /// [`OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER`] component is NULL, displayX is NULL
1052    ///
1053    /// or native XComponent is NULL.
1054    ///
1055    /// Available since API-level: 12
1056    ///
1057    /// Version: 1.0
1058    #[cfg(feature = "api-12")]
1059    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1060    pub fn OH_NativeXComponent_GetTouchPointDisplayX(
1061        component: *mut OH_NativeXComponent,
1062        pointIndex: u32,
1063        displayX: *mut f32,
1064    ) -> i32;
1065    /// Obtains the y coordinate of a specific touch point relative to the upper left corner of
1066    ///
1067    /// the current screen from the ArkUI XComponent.
1068    ///
1069    /// # Arguments
1070    ///
1071    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
1072    ///
1073    /// * `pointIndex` - Indicates the pointer index in the touchPoints.
1074    ///
1075    /// * `displayY` - Indicates the y coordinate relative to the upper left corner of the current
1076    ///
1077    /// screen.
1078    ///
1079    /// # Returns
1080    ///
1081    /// * Returns the status code of the execution.
1082    /// [`OH_NATIVEXCOMPONENT_RESULT_SUCCESS`] get displayY success.
1083    /// [`OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER`] component is NULL, displayY is NULL
1084    ///
1085    /// or native XComponent is NULL.
1086    ///
1087    /// Available since API-level: 12
1088    ///
1089    /// Version: 1.0
1090    #[cfg(feature = "api-12")]
1091    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1092    pub fn OH_NativeXComponent_GetTouchPointDisplayY(
1093        component: *mut OH_NativeXComponent,
1094        pointIndex: u32,
1095        displayY: *mut f32,
1096    ) -> i32;
1097    /// Obtains the touch event dispatched by the ArkUI XComponent.
1098    ///
1099    /// # Arguments
1100    ///
1101    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
1102    ///
1103    /// * `window` - Indicates the native window handler.
1104    ///
1105    /// * `size` - Length of the historical touch point array.
1106    ///
1107    /// * `historicalPoints` - Pointer to the historical touch point array.
1108    ///
1109    /// # Returns
1110    ///
1111    /// * Returns the status code of the execution.
1112    ///
1113    /// Available since API-level: 10
1114    ///
1115    /// Version: 1.0
1116    pub fn OH_NativeXComponent_GetHistoricalPoints(
1117        component: *mut OH_NativeXComponent,
1118        window: *const ::core::ffi::c_void,
1119        size: *mut i32,
1120        historicalPoints: *mut *mut OH_NativeXComponent_HistoricalPoint,
1121    ) -> i32;
1122    /// Obtains the mouse event dispatched by the ArkUI XComponent.
1123    ///
1124    /// # Arguments
1125    ///
1126    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
1127    ///
1128    /// * `window` - Indicates the native window handler.
1129    ///
1130    /// * `mouseEvent` - Indicates the pointer to the current mouse event.
1131    ///
1132    /// # Returns
1133    ///
1134    /// * Returns the status code of the execution.
1135    ///
1136    /// Available since API-level: 9
1137    ///
1138    /// Version: 1.0
1139    pub fn OH_NativeXComponent_GetMouseEvent(
1140        component: *mut OH_NativeXComponent,
1141        window: *const ::core::ffi::c_void,
1142        mouseEvent: *mut OH_NativeXComponent_MouseEvent,
1143    ) -> i32;
1144    /// Registers a callback for this <b>OH_NativeXComponent</b> instance.
1145    ///
1146    /// # Arguments
1147    ///
1148    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
1149    ///
1150    /// * `callback` - Indicates the pointer to a surface lifecycle and touch event callback.
1151    ///
1152    /// # Returns
1153    ///
1154    /// * Returns the status code of the execution.
1155    ///
1156    /// Available since API-level: 8
1157    ///
1158    /// Version: 1.0
1159    pub fn OH_NativeXComponent_RegisterCallback(
1160        component: *mut OH_NativeXComponent,
1161        callback: *mut OH_NativeXComponent_Callback,
1162    ) -> i32;
1163    /// Registers a callback for this <b>OH_NativeXComponent</b> instance.
1164    ///
1165    /// # Arguments
1166    ///
1167    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
1168    ///
1169    /// * `callback` - Indicates the pointer to a mouse event callback.
1170    ///
1171    /// # Returns
1172    ///
1173    /// * Returns the status code of the execution.
1174    ///
1175    /// Available since API-level: 9
1176    ///
1177    /// Version: 1.0
1178    pub fn OH_NativeXComponent_RegisterMouseEventCallback(
1179        component: *mut OH_NativeXComponent,
1180        callback: *mut OH_NativeXComponent_MouseEvent_Callback,
1181    ) -> i32;
1182    /// Obtains the extra mouse event dispatched by the ArkUI XComponent.
1183    ///
1184    /// # Arguments
1185    ///
1186    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
1187    ///
1188    /// * `extraMouseEventInfo` - Indicates the pointer to pointer of <b>OH_NativeXComponent_ExtraMouseEventInfo</b> instance.
1189    ///
1190    /// # Returns
1191    ///
1192    /// * Returns the status code of the execution.
1193    /// [`ARKUI_ERROR_CODE_NO_ERROR`] the execution is successful.
1194    /// [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1195    ///
1196    /// Available since API-level: 20
1197    ///
1198    /// Version: 1.0
1199    #[cfg(feature = "api-20")]
1200    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1201    pub fn OH_NativeXComponent_GetExtraMouseEventInfo(
1202        component: *mut OH_NativeXComponent,
1203        extraMouseEventInfo: *mut *mut OH_NativeXComponent_ExtraMouseEventInfo,
1204    ) -> i32;
1205    /// Obtains the state of the modifier keys of the mouse event.
1206    ///
1207    /// # Arguments
1208    ///
1209    /// * `extraMouseEventInfo` - Indicates the pointer to this <b>OH_NativeXComponent_ExtraMouseEventInfo</b> instance.
1210    ///
1211    /// * `keys` - Pointer to a variable where the current combination of pressed modifier keys will be returned.
1212    /// The application can use bitwise operations to determine the state of each modifier key.
1213    /// Modifier keys can be referred to [`ArkUI_ModifierKeyName`].
1214    ///
1215    /// # Returns
1216    ///
1217    /// * Returns the result code.
1218    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1219    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1220    ///
1221    /// Available since API-level: 20
1222    ///
1223    /// Version: 1.0
1224    #[cfg(feature = "api-20")]
1225    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1226    pub fn OH_NativeXComponent_GetMouseEventModifierKeyStates(
1227        extraMouseEventInfo: *mut OH_NativeXComponent_ExtraMouseEventInfo,
1228        keys: *mut u64,
1229    ) -> i32;
1230    /// Registers a callback for this <b>OH_NativeXComponent</b> instance.
1231    ///
1232    /// # Arguments
1233    ///
1234    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
1235    ///
1236    /// * `callback` - Indicates the pointer to a focus event callback.
1237    ///
1238    /// # Returns
1239    ///
1240    /// * Returns the status code of the execution.
1241    ///
1242    /// Available since API-level: 10
1243    ///
1244    /// Version: 1.0
1245    pub fn OH_NativeXComponent_RegisterFocusEventCallback(
1246        component: *mut OH_NativeXComponent,
1247        callback: ::core::option::Option<
1248            unsafe extern "C" fn(
1249                component: *mut OH_NativeXComponent,
1250                window: *mut ::core::ffi::c_void,
1251            ),
1252        >,
1253    ) -> i32;
1254    /// Registers a callback for this <b>OH_NativeXComponent</b> instance.
1255    ///
1256    /// # Arguments
1257    ///
1258    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
1259    ///
1260    /// * `callback` - Indicates the pointer to a key event callback.
1261    ///
1262    /// # Returns
1263    ///
1264    /// * Returns the status code of the execution.
1265    ///
1266    /// Available since API-level: 10
1267    ///
1268    /// Version: 1.0
1269    pub fn OH_NativeXComponent_RegisterKeyEventCallback(
1270        component: *mut OH_NativeXComponent,
1271        callback: ::core::option::Option<
1272            unsafe extern "C" fn(
1273                component: *mut OH_NativeXComponent,
1274                window: *mut ::core::ffi::c_void,
1275            ),
1276        >,
1277    ) -> i32;
1278    /// Registers a callback for this <b>OH_NativeXComponent</b> instance.
1279    ///
1280    /// # Arguments
1281    ///
1282    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
1283    ///
1284    /// * `callback` - Indicates the pointer to a blur event callback.
1285    ///
1286    /// # Returns
1287    ///
1288    /// * Returns the status code of the execution.
1289    ///
1290    /// Available since API-level: 10
1291    ///
1292    /// Version: 1.0
1293    pub fn OH_NativeXComponent_RegisterBlurEventCallback(
1294        component: *mut OH_NativeXComponent,
1295        callback: ::core::option::Option<
1296            unsafe extern "C" fn(
1297                component: *mut OH_NativeXComponent,
1298                window: *mut ::core::ffi::c_void,
1299            ),
1300        >,
1301    ) -> i32;
1302    /// Obtains the key event dispatched by the ArkUI XComponent.
1303    ///
1304    /// # Arguments
1305    ///
1306    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
1307    ///
1308    /// * `keyEvent` - Indicates the pointer to pointer of <b>OH_NativeXComponent_KeyEvent</b> instance.
1309    ///
1310    /// # Returns
1311    ///
1312    /// * Returns the status code of the execution.
1313    ///
1314    /// Available since API-level: 10
1315    ///
1316    /// Version: 1.0
1317    pub fn OH_NativeXComponent_GetKeyEvent(
1318        component: *mut OH_NativeXComponent,
1319        keyEvent: *mut *mut OH_NativeXComponent_KeyEvent,
1320    ) -> i32;
1321    /// Obtains the action of the key event.
1322    ///
1323    /// # Arguments
1324    ///
1325    /// * `keyEvent` - Indicates the pointer to this <b>OH_NativeXComponent_KeyEvent</b> instance.
1326    ///
1327    /// * `action` - Indicates the action of the <b>OH_NativeXComponent_KeyEvent</b> instance.
1328    ///
1329    /// # Returns
1330    ///
1331    /// * Returns the status code of the execution.
1332    ///
1333    /// Available since API-level: 10
1334    ///
1335    /// Version: 1.0
1336    pub fn OH_NativeXComponent_GetKeyEventAction(
1337        keyEvent: *mut OH_NativeXComponent_KeyEvent,
1338        action: *mut OH_NativeXComponent_KeyAction,
1339    ) -> i32;
1340    /// Obtains the keyCode of the key event.
1341    ///
1342    /// # Arguments
1343    ///
1344    /// * `keyEvent` - Indicates the pointer to this <b>OH_NativeXComponent_KeyEvent</b> instance.
1345    ///
1346    /// * `code` - Indicates the keyCode of the <b>OH_NativeXComponent_KeyEvent</b> instance.
1347    ///
1348    /// # Returns
1349    ///
1350    /// * Returns the status code of the execution.
1351    ///
1352    /// Available since API-level: 10
1353    ///
1354    /// Version: 1.0
1355    pub fn OH_NativeXComponent_GetKeyEventCode(
1356        keyEvent: *mut OH_NativeXComponent_KeyEvent,
1357        code: *mut OH_NativeXComponent_KeyCode,
1358    ) -> i32;
1359    /// Obtains the sourceType of the key event.
1360    ///
1361    /// # Arguments
1362    ///
1363    /// * `keyEvent` - Indicates the pointer to this <b>OH_NativeXComponent_KeyEvent</b> instance.
1364    ///
1365    /// * `sourceType` - Indicates the sourceType of the <b>OH_NativeXComponent_KeyEvent</b> instance.
1366    ///
1367    /// # Returns
1368    ///
1369    /// * Returns the status code of the execution.
1370    ///
1371    /// Available since API-level: 10
1372    ///
1373    /// Version: 1.0
1374    pub fn OH_NativeXComponent_GetKeyEventSourceType(
1375        keyEvent: *mut OH_NativeXComponent_KeyEvent,
1376        sourceType: *mut OH_NativeXComponent_EventSourceType,
1377    ) -> i32;
1378    /// Obtains the deviceId of the key event.
1379    ///
1380    /// # Arguments
1381    ///
1382    /// * `keyEvent` - Indicates the pointer to this <b>OH_NativeXComponent_KeyEvent</b> instance.
1383    ///
1384    /// * `deviceId` - Indicates the deviceId of the <b>OH_NativeXComponent_KeyEvent</b> instance.
1385    ///
1386    /// # Returns
1387    ///
1388    /// * Returns the status code of the execution.
1389    ///
1390    /// Available since API-level: 10
1391    ///
1392    /// Version: 1.0
1393    pub fn OH_NativeXComponent_GetKeyEventDeviceId(
1394        keyEvent: *mut OH_NativeXComponent_KeyEvent,
1395        deviceId: *mut i64,
1396    ) -> i32;
1397    /// Obtains the timestamp of the key event.
1398    ///
1399    /// # Arguments
1400    ///
1401    /// * `keyEvent` - Indicates the pointer to this <b>OH_NativeXComponent_KeyEvent</b> instance.
1402    ///
1403    /// * `timestamp` - Indicates the timestamp of the <b>OH_NativeXComponent_KeyEvent</b> instance.
1404    ///
1405    /// # Returns
1406    ///
1407    /// * Returns the status code of the execution.
1408    ///
1409    /// Available since API-level: 10
1410    ///
1411    /// Version: 1.0
1412    pub fn OH_NativeXComponent_GetKeyEventTimestamp(
1413        keyEvent: *mut OH_NativeXComponent_KeyEvent,
1414        timestamp: *mut i64,
1415    ) -> i32;
1416    /// Obtains the state of the modifier keys of the key event.
1417    ///
1418    /// # Arguments
1419    ///
1420    /// * `keyEvent` - Indicates the pointer to this <b>OH_NativeXComponent_KeyEvent</b> instance.
1421    ///
1422    /// * `keys` - Pointer to a variable where the current combination of pressed modifier keys will be returned.
1423    /// The application can use bitwise operations to determine the state of each modifier key.
1424    /// Modifier keys can be referred to [`ArkUI_ModifierKeyName`].
1425    ///
1426    /// # Returns
1427    ///
1428    /// * Returns the result code.
1429    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1430    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1431    ///
1432    /// Available since API-level: 20
1433    ///
1434    /// Version: 1.0
1435    #[cfg(feature = "api-20")]
1436    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1437    pub fn OH_NativeXComponent_GetKeyEventModifierKeyStates(
1438        keyEvent: *mut OH_NativeXComponent_KeyEvent,
1439        keys: *mut u64,
1440    ) -> i32;
1441    /// Obtains the Num Lock state of the key event.
1442    ///
1443    /// # Arguments
1444    ///
1445    /// * `keyEvent` - Indicates the pointer to this <b>OH_NativeXComponent_KeyEvent</b> instance.
1446    ///
1447    /// * `isNumLockOn` - Return whether the Num Lock is on.
1448    ///
1449    /// # Returns
1450    ///
1451    /// * Returns the result code.
1452    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1453    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1454    ///
1455    /// Available since API-level: 20
1456    ///
1457    /// Version: 1.0
1458    #[cfg(feature = "api-20")]
1459    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1460    pub fn OH_NativeXComponent_GetKeyEventNumLockState(
1461        keyEvent: *mut OH_NativeXComponent_KeyEvent,
1462        isNumLockOn: *mut bool,
1463    ) -> i32;
1464    /// Obtains the Caps Lock state of the key event.
1465    ///
1466    /// # Arguments
1467    ///
1468    /// * `keyEvent` - Indicates the pointer to this <b>OH_NativeXComponent_KeyEvent</b> instance.
1469    ///
1470    /// * `isCapsLockOn` - Return whether the Caps Lock is on.
1471    ///
1472    /// # Returns
1473    ///
1474    /// * Returns the result code.
1475    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1476    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1477    ///
1478    /// Available since API-level: 20
1479    ///
1480    /// Version: 1.0
1481    #[cfg(feature = "api-20")]
1482    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1483    pub fn OH_NativeXComponent_GetKeyEventCapsLockState(
1484        keyEvent: *mut OH_NativeXComponent_KeyEvent,
1485        isCapsLockOn: *mut bool,
1486    ) -> i32;
1487    /// Obtains the Scroll Lock state of the key event.
1488    ///
1489    /// # Arguments
1490    ///
1491    /// * `keyEvent` - Indicates the pointer to this <b>OH_NativeXComponent_KeyEvent</b> instance.
1492    ///
1493    /// * `isScrollLockOn` - Return whether the Scroll Lock is on.
1494    ///
1495    /// # Returns
1496    ///
1497    /// * Returns the result code.
1498    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1499    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1500    ///
1501    /// Available since API-level: 20
1502    ///
1503    /// Version: 1.0
1504    #[cfg(feature = "api-20")]
1505    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1506    pub fn OH_NativeXComponent_GetKeyEventScrollLockState(
1507        keyEvent: *mut OH_NativeXComponent_KeyEvent,
1508        isScrollLockOn: *mut bool,
1509    ) -> i32;
1510    /// Set the Expected FrameRateRange.
1511    ///
1512    /// # Arguments
1513    ///
1514    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
1515    ///
1516    /// * `range` - Indicates the pointer to a expected rate range.
1517    ///
1518    /// # Returns
1519    ///
1520    /// * Returns the status code of the execution.
1521    ///
1522    /// Available since API-level: 11
1523    ///
1524    /// Version: 1.0
1525    #[cfg(feature = "api-11")]
1526    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
1527    pub fn OH_NativeXComponent_SetExpectedFrameRateRange(
1528        component: *mut OH_NativeXComponent,
1529        range: *mut OH_NativeXComponent_ExpectedRateRange,
1530    ) -> i32;
1531    /// Registers a callback for this <b>OH_NativeXComponent</b> instance.
1532    ///
1533    /// # Arguments
1534    ///
1535    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
1536    ///
1537    /// * `callback` - Indicates the pointer to a onFrame callback.
1538    ///
1539    /// # Returns
1540    ///
1541    /// * Returns the status code of the execution.
1542    ///
1543    /// Available since API-level: 11
1544    ///
1545    /// Version: 1.0
1546    #[cfg(feature = "api-11")]
1547    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
1548    pub fn OH_NativeXComponent_RegisterOnFrameCallback(
1549        component: *mut OH_NativeXComponent,
1550        callback: ::core::option::Option<
1551            unsafe extern "C" fn(
1552                component: *mut OH_NativeXComponent,
1553                timestamp: u64,
1554                targetTimestamp: u64,
1555            ),
1556        >,
1557    ) -> i32;
1558    /// UnRegister a callback for this <b>OH_NativeXComponent</b> instance.
1559    ///
1560    /// # Arguments
1561    ///
1562    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
1563    ///
1564    /// # Returns
1565    ///
1566    /// * Returns the status code of the execution.
1567    ///
1568    /// Available since API-level: 11
1569    ///
1570    /// Version: 1.0
1571    #[cfg(feature = "api-11")]
1572    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
1573    pub fn OH_NativeXComponent_UnregisterOnFrameCallback(
1574        component: *mut OH_NativeXComponent,
1575    ) -> i32;
1576    /// Registers a callback for this <b>OH_NativeXComponent</b> instance.
1577    ///
1578    /// # Arguments
1579    ///
1580    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
1581    ///
1582    /// * `callback` - Indicates the pointer to a surface show event callback.
1583    ///
1584    /// # Returns
1585    ///
1586    /// * Returns the status code of the execution.
1587    ///
1588    /// Available since API-level: 12
1589    ///
1590    /// Version: 1.0
1591    #[cfg(feature = "api-12")]
1592    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1593    pub fn OH_NativeXComponent_RegisterSurfaceShowCallback(
1594        component: *mut OH_NativeXComponent,
1595        callback: ::core::option::Option<
1596            unsafe extern "C" fn(
1597                component: *mut OH_NativeXComponent,
1598                window: *mut ::core::ffi::c_void,
1599            ),
1600        >,
1601    ) -> i32;
1602    /// Registers a callback for this <b>OH_NativeXComponent</b> instance.
1603    ///
1604    /// # Arguments
1605    ///
1606    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
1607    ///
1608    /// * `callback` - Indicates the pointer to a surface hide event callback.
1609    ///
1610    /// # Returns
1611    ///
1612    /// * Returns the status code of the execution.
1613    ///
1614    /// Available since API-level: 12
1615    ///
1616    /// Version: 1.0
1617    #[cfg(feature = "api-12")]
1618    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1619    pub fn OH_NativeXComponent_RegisterSurfaceHideCallback(
1620        component: *mut OH_NativeXComponent,
1621        callback: ::core::option::Option<
1622            unsafe extern "C" fn(
1623                component: *mut OH_NativeXComponent,
1624                window: *mut ::core::ffi::c_void,
1625            ),
1626        >,
1627    ) -> i32;
1628    /// Set whether the <b>OH_NativeXComponent</b> instance needs soft keyboard.
1629    /// # Arguments
1630    ///
1631    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
1632    ///
1633    /// * `needSoftKeyboard` - Indicates whether the <b>OH_NativeXComponent</b> instance needs soft keyboard or not.
1634    /// Default value is false.
1635    ///
1636    /// # Returns
1637    ///
1638    /// * Returns the status code of the execution.
1639    ///
1640    /// Available since API-level: 12
1641    ///
1642    /// Version: 1.0
1643    #[cfg(feature = "api-12")]
1644    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1645    pub fn OH_NativeXComponent_SetNeedSoftKeyboard(
1646        component: *mut OH_NativeXComponent,
1647        needSoftKeyboard: bool,
1648    ) -> i32;
1649    /// Obtains the touch event's source type dispatched by the ArkUI XComponent.
1650    ///
1651    /// # Arguments
1652    ///
1653    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
1654    ///
1655    /// * `pointId` - Indicates the id of the touch point which triggers this touch event.
1656    ///
1657    /// * `sourceType` - Indicates the source type of this touch event.
1658    ///
1659    /// # Returns
1660    ///
1661    /// * Returns OH_NATIVEXCOMPONENT_RESULT_SUCCESS if success.
1662    /// Returns OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER if a parameter exception occurs.
1663    /// Returns OH_NATIVEXCOMPONENT_RESULT_FAILED if other exceptions occur.
1664    ///
1665    /// Available since API-level: 12
1666    ///
1667    /// Version: 1.0
1668    #[cfg(feature = "api-12")]
1669    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1670    pub fn OH_NativeXComponent_GetTouchEventSourceType(
1671        component: *mut OH_NativeXComponent,
1672        pointId: i32,
1673        sourceType: *mut OH_NativeXComponent_EventSourceType,
1674    ) -> i32;
1675    /// Obtains the pointer to the <b> ArkUI_AccessibilityProvider</b>
1676    /// instance of this <b>OH_NativeXComponent</b> instance.
1677    ///
1678    /// # Arguments
1679    ///
1680    /// * `component` - Indicates the pointer to the <b>OH_NativeXComponent</b> instance.
1681    ///
1682    /// * `handle` - Indicates the pointer to the <b>ArkUI_AccessibilityProvider</b> instance.
1683    ///
1684    /// # Returns
1685    ///
1686    /// * Returns [`OH_NATIVEXCOMPONENT_RESULT_SUCCESS`] if the operation is successful.
1687    /// Returns [`OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER`] if a parameter error occurs.
1688    ///
1689    /// Available since API-level: 13
1690    #[cfg(feature = "api-13")]
1691    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
1692    pub fn OH_NativeXComponent_GetNativeAccessibilityProvider(
1693        component: *mut OH_NativeXComponent,
1694        handle: *mut *mut ArkUI_AccessibilityProvider,
1695    ) -> i32;
1696    /// Registers a callback for this <b>OH_NativeXComponent</b> instance.
1697    ///
1698    /// # Arguments
1699    ///
1700    /// * `component` - Indicates the pointer to this <b>OH_NativeXComponent</b> instance.
1701    ///
1702    /// * `callback` - Indicates the pointer to a key event callback with result.
1703    ///
1704    /// # Returns
1705    ///
1706    /// * Returns the status code of the execution.
1707    /// [`OH_NATIVEXCOMPONENT_RESULT_SUCCESS`] the callback function is successfully registered.
1708    ///
1709    /// [`OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER`] component is nullptr or callback is nullptr.
1710    ///
1711    ///
1712    /// Available since API-level: 14
1713    ///
1714    /// Version: 1.0
1715    #[cfg(feature = "api-14")]
1716    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
1717    pub fn OH_NativeXComponent_RegisterKeyEventCallbackWithResult(
1718        component: *mut OH_NativeXComponent,
1719        callback: ::core::option::Option<
1720            unsafe extern "C" fn(
1721                component: *mut OH_NativeXComponent,
1722                window: *mut ::core::ffi::c_void,
1723            ) -> bool,
1724        >,
1725    ) -> i32;
1726    /// Create a <b>OH_ArkUI_SurfaceHolder</b> object from an XComponent node.
1727    ///
1728    /// # Arguments
1729    ///
1730    /// * `node` - Indicates the pointer to the XComponent node.
1731    ///
1732    /// # Returns
1733    ///
1734    /// * Returns the created <b>OH_ArkUI_SurfaceHolder</b> object's pointer.
1735    ///
1736    /// Available since API-level: 19
1737    #[cfg(feature = "api-19")]
1738    #[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
1739    pub fn OH_ArkUI_SurfaceHolder_Create(node: ArkUI_NodeHandle) -> *mut OH_ArkUI_SurfaceHolder;
1740    /// Disposes of a <b>OH_ArkUI_SurfaceHolder</b> object.
1741    ///
1742    /// # Arguments
1743    ///
1744    /// * `node` - Indicates the pointer to <b>OH_ArkUI_SurfaceHolder</b> object needed to dispose.
1745    ///
1746    /// Available since API-level: 19
1747    #[cfg(feature = "api-19")]
1748    #[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
1749    pub fn OH_ArkUI_SurfaceHolder_Dispose(surfaceHolder: *mut OH_ArkUI_SurfaceHolder);
1750    /// Saves custom data on the <b>OH_ArkUI_SurfaceHolder</b> instance.
1751    ///
1752    /// # Arguments
1753    ///
1754    /// * `surfaceHolder` - Indicates the <b>OH_ArkUI_SurfaceHolder</b> instance
1755    /// on which the custom data will be saved.
1756    ///
1757    /// * `userData` - Indicates the custom data to be saved.
1758    ///
1759    /// # Returns
1760    ///
1761    /// * Returns the error code.
1762    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1763    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1764    ///
1765    /// Available since API-level: 19
1766    #[cfg(feature = "api-19")]
1767    #[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
1768    pub fn OH_ArkUI_SurfaceHolder_SetUserData(
1769        surfaceHolder: *mut OH_ArkUI_SurfaceHolder,
1770        userData: *mut ::core::ffi::c_void,
1771    ) -> i32;
1772    /// Obtains the custom data saved on the <b>OH_ArkUI_SurfaceHolder</b> instance.
1773    ///
1774    /// # Arguments
1775    ///
1776    /// * `surfaceHolder` - Indicates the target <b>OH_ArkUI_SurfaceHolder</b> instance.
1777    ///
1778    /// # Returns
1779    ///
1780    /// * Returns the custom data.
1781    ///
1782    /// Available since API-level: 19
1783    #[cfg(feature = "api-19")]
1784    #[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
1785    pub fn OH_ArkUI_SurfaceHolder_GetUserData(
1786        surfaceHolder: *mut OH_ArkUI_SurfaceHolder,
1787    ) -> *mut ::core::ffi::c_void;
1788    /// Create a <b>OH_ArkUI_SurfaceCallback</b> object.
1789    ///
1790    ///
1791    /// # Returns
1792    ///
1793    /// * Returns the created <b>OH_ArkUI_SurfaceCallback</b> object's pointer.
1794    ///
1795    /// Available since API-level: 19
1796    #[cfg(feature = "api-19")]
1797    #[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
1798    pub fn OH_ArkUI_SurfaceCallback_Create() -> *mut OH_ArkUI_SurfaceCallback;
1799    /// Disposes of a <b>OH_ArkUI_SurfaceCallback</b> object.
1800    ///
1801    /// # Arguments
1802    ///
1803    /// * `callback` - Indicates the pointer to <b>OH_ArkUI_SurfaceCallback</b> object needed to dispose.
1804    ///
1805    /// Available since API-level: 19
1806    #[cfg(feature = "api-19")]
1807    #[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
1808    pub fn OH_ArkUI_SurfaceCallback_Dispose(callback: *mut OH_ArkUI_SurfaceCallback);
1809    /// Set the surface created event of the surface callback.
1810    ///
1811    /// # Arguments
1812    ///
1813    /// * `callback` - Indicated the pointer to the surface callback.
1814    ///
1815    /// * `onSurfaceCreated` - Indicates the surface created callback event
1816    /// which will called when the surface is created.
1817    ///
1818    /// Available since API-level: 19
1819    #[cfg(feature = "api-19")]
1820    #[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
1821    pub fn OH_ArkUI_SurfaceCallback_SetSurfaceCreatedEvent(
1822        callback: *mut OH_ArkUI_SurfaceCallback,
1823        onSurfaceCreated: ::core::option::Option<
1824            unsafe extern "C" fn(surfaceHolder: *mut OH_ArkUI_SurfaceHolder),
1825        >,
1826    );
1827    /// Set the surface changed event of the surface callback.
1828    ///
1829    /// # Arguments
1830    ///
1831    /// * `callback` - Indicated the pointer to the surface callback.
1832    ///
1833    /// * `onSurfaceChanged` - Indicates the surface changed callback event
1834    /// which will called when the surface is changed.
1835    ///
1836    /// Available since API-level: 19
1837    #[cfg(feature = "api-19")]
1838    #[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
1839    pub fn OH_ArkUI_SurfaceCallback_SetSurfaceChangedEvent(
1840        callback: *mut OH_ArkUI_SurfaceCallback,
1841        onSurfaceChanged: ::core::option::Option<
1842            unsafe extern "C" fn(
1843                surfaceHolder: *mut OH_ArkUI_SurfaceHolder,
1844                width: u64,
1845                height: u64,
1846            ),
1847        >,
1848    );
1849    /// Set the surface destroyed event of the surface callback.
1850    ///
1851    /// # Arguments
1852    ///
1853    /// * `callback` - Indicated the pointer to the surface callback.
1854    ///
1855    /// * `onSurfaceDestroyed` - Indicates the surface destroyed callback event
1856    /// which will called when the surface is destroyed.
1857    ///
1858    /// Available since API-level: 19
1859    #[cfg(feature = "api-19")]
1860    #[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
1861    pub fn OH_ArkUI_SurfaceCallback_SetSurfaceDestroyedEvent(
1862        callback: *mut OH_ArkUI_SurfaceCallback,
1863        onSurfaceDestroyed: ::core::option::Option<
1864            unsafe extern "C" fn(surfaceHolder: *mut OH_ArkUI_SurfaceHolder),
1865        >,
1866    );
1867    /// Adds a surface lifecycle callback for this <b>OH_ArkUI_SurfaceHolder</b> instance.
1868    ///
1869    /// # Arguments
1870    ///
1871    /// * `surfaceHolder` - Indicates the pointer to this <b>OH_ArkUI_SurfaceHolder</b> instance.
1872    ///
1873    /// * `callback` - Indicates the pointer to this new callback.
1874    ///
1875    /// # Returns
1876    ///
1877    /// * Returns the status code of the execution.
1878    /// [`ARKUI_ERROR_CODE_NO_ERROR`] the execution is successful.
1879    /// [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1880    ///
1881    /// Available since API-level: 19
1882    #[cfg(feature = "api-19")]
1883    #[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
1884    pub fn OH_ArkUI_SurfaceHolder_AddSurfaceCallback(
1885        surfaceHolder: *mut OH_ArkUI_SurfaceHolder,
1886        callback: *mut OH_ArkUI_SurfaceCallback,
1887    ) -> i32;
1888    /// Removes a previously added surface lifecycle callback
1889    /// from this <b>OH_ArkUI_SurfaceHolder</b> instance.
1890    ///
1891    /// # Arguments
1892    ///
1893    /// * `surfaceHolder` - Indicates the pointer to this <b>OH_ArkUI_SurfaceHolder</b> instance.
1894    ///
1895    /// * `callback` - Indicates the pointer to the callback needed to remove.
1896    ///
1897    /// # Returns
1898    ///
1899    /// * Returns the status code of the execution.
1900    /// [`ARKUI_ERROR_CODE_NO_ERROR`] the execution is successful.
1901    /// [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1902    ///
1903    /// Available since API-level: 19
1904    #[cfg(feature = "api-19")]
1905    #[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
1906    pub fn OH_ArkUI_SurfaceHolder_RemoveSurfaceCallback(
1907        surfaceHolder: *mut OH_ArkUI_SurfaceHolder,
1908        callback: *mut OH_ArkUI_SurfaceCallback,
1909    ) -> i32;
1910    /// Obtains the nativeWindow associated with a <b>OH_ArkUI_SurfaceHolder</b> instance.
1911    ///
1912    /// # Arguments
1913    ///
1914    /// * `surfaceHolder` - Indicates the pointer to this <b>OH_ArkUI_SurfaceHolder</b> instance.
1915    ///
1916    /// # Returns
1917    ///
1918    /// * Returns the nativeWindow associated with this <b>OH_ArkUI_SurfaceHolder</b> instance.
1919    ///
1920    /// Available since API-level: 19
1921    #[cfg(feature = "api-19")]
1922    #[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
1923    pub fn OH_ArkUI_XComponent_GetNativeWindow(
1924        surfaceHolder: *mut OH_ArkUI_SurfaceHolder,
1925    ) -> *mut OHNativeWindow;
1926    /// Set whether the XComponent node needs to initialize automatically.
1927    ///
1928    /// # Arguments
1929    ///
1930    /// * `node` - Indicates the pointer to the XComponent node.
1931    ///
1932    /// * `autoInitialize` - Indicates whether the XComponent node needs to initialize automatically or not.
1933    /// If the value is true, OnSurfaceCreated will be called when the node is mounted and
1934    /// OnSurfaceDestroyed will be called when the node is unmounted.
1935    /// Default value is true.
1936    ///
1937    /// # Returns
1938    ///
1939    /// * Returns the status code of the execution.
1940    /// [`ARKUI_ERROR_CODE_NO_ERROR`] the execution is successful.
1941    /// [`ARKUI_ERROR_CODE_PARAM_INVALID`] if the node is invalid.
1942    ///
1943    /// Available since API-level: 19
1944    #[cfg(feature = "api-19")]
1945    #[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
1946    pub fn OH_ArkUI_XComponent_SetAutoInitialize(
1947        node: ArkUI_NodeHandle,
1948        autoInitialize: bool,
1949    ) -> i32;
1950    /// Initialize the XComponent node.
1951    ///
1952    /// # Arguments
1953    ///
1954    /// * `node` - Indicates the pointer to the XComponent node.
1955    ///
1956    /// # Returns
1957    ///
1958    /// * Returns the status code of the execution.
1959    /// [`ARKUI_ERROR_CODE_NO_ERROR`] the execution is successful.
1960    /// [`ARKUI_ERROR_CODE_PARAM_INVALID`] if the node is invalid.
1961    /// [`ARKUI_ERROR_CODE_XCOMPONENT_STATE_INVALID`] if the node has initialized.
1962    ///
1963    /// Available since API-level: 19
1964    #[cfg(feature = "api-19")]
1965    #[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
1966    pub fn OH_ArkUI_XComponent_Initialize(node: ArkUI_NodeHandle) -> i32;
1967    /// Finalize the XComponent node.
1968    ///
1969    /// # Arguments
1970    ///
1971    /// * `node` - Indicates the pointer to the XComponent node.
1972    ///
1973    /// # Returns
1974    ///
1975    /// * Returns the status code of the execution.
1976    /// [`ARKUI_ERROR_CODE_NO_ERROR`] the execution is successful.
1977    /// [`ARKUI_ERROR_CODE_PARAM_INVALID`] if the node is invalid.
1978    /// [`ARKUI_ERROR_CODE_XCOMPONENT_STATE_INVALID`] if the node has finalized.
1979    ///
1980    /// Available since API-level: 19
1981    #[cfg(feature = "api-19")]
1982    #[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
1983    pub fn OH_ArkUI_XComponent_Finalize(node: ArkUI_NodeHandle) -> i32;
1984    /// Obtains whether the XComponent node has initalized or not.
1985    ///
1986    /// # Arguments
1987    ///
1988    /// * `node` - Indicates the pointer to the XComponent node.
1989    ///
1990    /// * `isInitialized` - Indicates whether the XComponent node has initalized.
1991    ///
1992    /// # Returns
1993    ///
1994    /// * Returns the status code of the execution.
1995    /// [`ARKUI_ERROR_CODE_NO_ERROR`] the execution is successful.
1996    /// [`ARKUI_ERROR_CODE_PARAM_INVALID`] if the node is invalid.
1997    ///
1998    /// Available since API-level: 19
1999    #[cfg(feature = "api-19")]
2000    #[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
2001    pub fn OH_ArkUI_XComponent_IsInitialized(
2002        node: ArkUI_NodeHandle,
2003        isInitialized: *mut bool,
2004    ) -> i32;
2005    /// Set the Expected FrameRateRange for the XComponent node.
2006    ///
2007    /// # Arguments
2008    ///
2009    /// * `node` - Indicates the pointer to the XComponent node.
2010    ///
2011    /// * `range` - Indicates the expected rate range.
2012    ///
2013    /// # Returns
2014    ///
2015    /// * Returns the status code of the execution.
2016    /// [`ARKUI_ERROR_CODE_NO_ERROR`] the execution is successful.
2017    /// [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
2018    ///
2019    /// Available since API-level: 20
2020    ///
2021    /// Version: 1.0
2022    #[cfg(feature = "api-20")]
2023    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
2024    pub fn OH_ArkUI_XComponent_SetExpectedFrameRateRange(
2025        node: ArkUI_NodeHandle,
2026        range: OH_NativeXComponent_ExpectedRateRange,
2027    ) -> i32;
2028    /// Registers an onFrame callback for the XComponent node.
2029    ///
2030    /// # Arguments
2031    ///
2032    /// * `node` - Indicates the pointer to the XComponent node.
2033    ///
2034    /// * `callback` - Indicates the pointer to an onFrame callback.
2035    ///
2036    /// # Returns
2037    ///
2038    /// * Returns the status code of the execution.
2039    /// [`ARKUI_ERROR_CODE_NO_ERROR`] the execution is successful.
2040    /// [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
2041    ///
2042    /// Available since API-level: 20
2043    ///
2044    /// Version: 1.0
2045    #[cfg(feature = "api-20")]
2046    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
2047    pub fn OH_ArkUI_XComponent_RegisterOnFrameCallback(
2048        node: ArkUI_NodeHandle,
2049        callback: ::core::option::Option<
2050            unsafe extern "C" fn(node: ArkUI_NodeHandle, timestamp: u64, targetTimestamp: u64),
2051        >,
2052    ) -> i32;
2053    /// UnRegister the onFrame callback for the XComponent node.
2054    ///
2055    /// # Arguments
2056    ///
2057    /// * `node` - Indicates the pointer to the XComponent node.
2058    ///
2059    /// # Returns
2060    ///
2061    /// * Returns the status code of the execution.
2062    /// [`ARKUI_ERROR_CODE_NO_ERROR`] the execution is successful.
2063    /// [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
2064    ///
2065    /// Available since API-level: 20
2066    ///
2067    /// Version: 1.0
2068    #[cfg(feature = "api-20")]
2069    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
2070    pub fn OH_ArkUI_XComponent_UnregisterOnFrameCallback(node: ArkUI_NodeHandle) -> i32;
2071    /// Set whether the XComponent node needs soft keyboard when focused.
2072    /// # Arguments
2073    ///
2074    /// * `node` - Indicates the pointer to the XComponent node.
2075    ///
2076    /// * `needSoftKeyboard` - Indicates whether the XComponent node needs soft keyboard or not.
2077    /// Default value is false.
2078    ///
2079    /// # Returns
2080    ///
2081    /// * Returns the status code of the execution.
2082    /// [`ARKUI_ERROR_CODE_NO_ERROR`] the execution is successful.
2083    /// [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
2084    ///
2085    /// Available since API-level: 20
2086    #[cfg(feature = "api-20")]
2087    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
2088    pub fn OH_ArkUI_XComponent_SetNeedSoftKeyboard(
2089        node: ArkUI_NodeHandle,
2090        needSoftKeyboard: bool,
2091    ) -> i32;
2092    /// Create a <b>ArkUI_AccessibilityProvider</b> object from an XComponent node.
2093    ///
2094    /// # Arguments
2095    ///
2096    /// * `node` - Indicates the pointer to the XComponent node.
2097    ///
2098    /// # Returns
2099    ///
2100    /// * Returns the created <b>ArkUI_AccessibilityProvider</b> object's pointer.
2101    ///
2102    /// Available since API-level: 20
2103    #[cfg(feature = "api-20")]
2104    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
2105    pub fn OH_ArkUI_AccessibilityProvider_Create(
2106        node: ArkUI_NodeHandle,
2107    ) -> *mut ArkUI_AccessibilityProvider;
2108    /// Disposes of an <b>ArkUI_AccessibilityProvider</b> object.
2109    ///
2110    /// # Arguments
2111    ///
2112    /// * `provider` - Indicates the pointer to <b>ArkUI_AccessibilityProvider</b> object needed to dispose.
2113    ///
2114    /// Available since API-level: 20
2115    #[cfg(feature = "api-20")]
2116    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
2117    pub fn OH_ArkUI_AccessibilityProvider_Dispose(provider: *mut ArkUI_AccessibilityProvider);
2118    /// Set the surface show event of the surface callback.
2119    ///
2120    /// # Arguments
2121    ///
2122    /// * `callback` - Indicated the pointer to the surface callback.
2123    ///
2124    /// * `onSurfaceShow` - Indicates the surface show callback event which will called when the surface is shown.
2125    ///
2126    /// Available since API-level: 20
2127    #[cfg(feature = "api-20")]
2128    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
2129    pub fn OH_ArkUI_SurfaceCallback_SetSurfaceShowEvent(
2130        callback: *mut OH_ArkUI_SurfaceCallback,
2131        onSurfaceShow: ::core::option::Option<
2132            unsafe extern "C" fn(surfaceHolder: *mut OH_ArkUI_SurfaceHolder),
2133        >,
2134    );
2135    /// Set the surface hide event of the surface callback.
2136    ///
2137    /// # Arguments
2138    ///
2139    /// * `callback` - Indicated the pointer to the surface callback.
2140    ///
2141    /// * `onSurfaceHide` - Indicates the surface hide callback event which will called when the surface is hide.
2142    ///
2143    /// Available since API-level: 20
2144    #[cfg(feature = "api-20")]
2145    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
2146    pub fn OH_ArkUI_SurfaceCallback_SetSurfaceHideEvent(
2147        callback: *mut OH_ArkUI_SurfaceCallback,
2148        onSurfaceHide: ::core::option::Option<
2149            unsafe extern "C" fn(surfaceHolder: *mut OH_ArkUI_SurfaceHolder),
2150        >,
2151    );
2152    /// Create an <b>ArkUI_XComponentSurfaceConfig</b> object.
2153    ///
2154    ///
2155    /// # Returns
2156    ///
2157    /// * A pointer to the object of the XComponent's surface config.
2158    ///
2159    /// Available since API-level: 22
2160    #[cfg(feature = "api-22")]
2161    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
2162    pub fn OH_ArkUI_XComponentSurfaceConfig_Create() -> *mut ArkUI_XComponentSurfaceConfig;
2163    /// Dispose of an <b>ArkUI_XComponentSurfaceConfig</b> object.
2164    ///
2165    /// # Arguments
2166    ///
2167    /// * `config` - A pointer to the object of the XComponent's surface config to be destroyed.
2168    ///
2169    /// Available since API-level: 22
2170    #[cfg(feature = "api-22")]
2171    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
2172    pub fn OH_ArkUI_XComponentSurfaceConfig_Dispose(config: *mut ArkUI_XComponentSurfaceConfig);
2173    /// Set whether the surface held by XComponent needs to be considered opaque,
2174    /// even if the surface has translucent pixel.
2175    ///
2176    /// # Arguments
2177    ///
2178    /// * `config` - A pointer to the object of the XComponent's surface config.
2179    ///
2180    /// * `isOpaque` - Indicates whether the surface held by XComponent needs to be considered opaque,
2181    /// True means needing to be considered opaque, false otherwise.
2182    ///
2183    /// Available since API-level: 22
2184    #[cfg(feature = "api-22")]
2185    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
2186    pub fn OH_ArkUI_XComponentSurfaceConfig_SetIsOpaque(
2187        config: *mut ArkUI_XComponentSurfaceConfig,
2188        isOpaque: bool,
2189    );
2190    /// Set surface config for this <b>OH_ArkUI_SurfaceHolder</b> instance.
2191    ///
2192    /// # Arguments
2193    ///
2194    /// * `surfaceHolder` - Indicates the pointer to this <b>OH_ArkUI_SurfaceHolder</b> instance.
2195    ///
2196    /// * `config` - Indicates the pointer to the XComponent's surface config.
2197    ///
2198    /// # Returns
2199    ///
2200    /// * Returns the status code of the execution.
2201    /// [`ARKUI_ERROR_CODE_NO_ERROR`] the execution is successful.
2202    /// [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
2203    ///
2204    /// Available since API-level: 22
2205    #[cfg(feature = "api-22")]
2206    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
2207    pub fn OH_ArkUI_SurfaceHolder_SetSurfaceConfig(
2208        surfaceHolder: *mut OH_ArkUI_SurfaceHolder,
2209        config: *mut ArkUI_XComponentSurfaceConfig,
2210    ) -> i32;
2211}