arkui-sys 0.3.3

Bindings to the native ArkUI API of OpenHarmony
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
// automatically generated by rust-bindgen 0.71.1

#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
use crate::native_type::*;
use crate::ui_input_event::ArkUI_UIInputEvent;

#[cfg(feature = "api-14")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
impl ArkUI_KeyCode {
    /// Unknown (or unrecognized) key
    pub const ARKUI_KEYCODE_UNKNOWN: ArkUI_KeyCode = ArkUI_KeyCode(-1);
    /// Function (Fn) key
    pub const ARKUI_KEYCODE_FN: ArkUI_KeyCode = ArkUI_KeyCode(0);
    /// Volume Up key
    pub const ARKUI_KEYCODE_VOLUME_UP: ArkUI_KeyCode = ArkUI_KeyCode(16);
    /// Volume Down key
    pub const ARKUI_KEYCODE_VOLUME_DOWN: ArkUI_KeyCode = ArkUI_KeyCode(17);
    /// Power key
    pub const ARKUI_KEYCODE_POWER: ArkUI_KeyCode = ArkUI_KeyCode(18);
    /// Shutter key
    pub const ARKUI_KEYCODE_CAMERA: ArkUI_KeyCode = ArkUI_KeyCode(19);
    /// Speaker Mute key
    pub const ARKUI_KEYCODE_VOLUME_MUTE: ArkUI_KeyCode = ArkUI_KeyCode(22);
    /// Mute key
    pub const ARKUI_KEYCODE_MUTE: ArkUI_KeyCode = ArkUI_KeyCode(23);
    /// Brightness Up key
    pub const ARKUI_KEYCODE_BRIGHTNESS_UP: ArkUI_KeyCode = ArkUI_KeyCode(40);
    /// Brightness Down key
    pub const ARKUI_KEYCODE_BRIGHTNESS_DOWN: ArkUI_KeyCode = ArkUI_KeyCode(41);
    /// Key 0
    pub const ARKUI_KEYCODE_0: ArkUI_KeyCode = ArkUI_KeyCode(2000);
    /// Key 1
    pub const ARKUI_KEYCODE_1: ArkUI_KeyCode = ArkUI_KeyCode(2001);
    /// Key 2
    pub const ARKUI_KEYCODE_2: ArkUI_KeyCode = ArkUI_KeyCode(2002);
    /// Key 3
    pub const ARKUI_KEYCODE_3: ArkUI_KeyCode = ArkUI_KeyCode(2003);
    /// Key 4
    pub const ARKUI_KEYCODE_4: ArkUI_KeyCode = ArkUI_KeyCode(2004);
    /// Key 5
    pub const ARKUI_KEYCODE_5: ArkUI_KeyCode = ArkUI_KeyCode(2005);
    /// Key 6
    pub const ARKUI_KEYCODE_6: ArkUI_KeyCode = ArkUI_KeyCode(2006);
    /// Key 7
    pub const ARKUI_KEYCODE_7: ArkUI_KeyCode = ArkUI_KeyCode(2007);
    /// Key 8
    pub const ARKUI_KEYCODE_8: ArkUI_KeyCode = ArkUI_KeyCode(2008);
    /// Key 9
    pub const ARKUI_KEYCODE_9: ArkUI_KeyCode = ArkUI_KeyCode(2009);
    /// Key +
    pub const ARKUI_KEYCODE_STAR: ArkUI_KeyCode = ArkUI_KeyCode(2010);
    /// Key #
    pub const ARKUI_KEYCODE_POUND: ArkUI_KeyCode = ArkUI_KeyCode(2011);
    /// Up key on D-pad
    pub const ARKUI_KEYCODE_DPAD_UP: ArkUI_KeyCode = ArkUI_KeyCode(2012);
    /// Down key on D-pad
    pub const ARKUI_KEYCODE_DPAD_DOWN: ArkUI_KeyCode = ArkUI_KeyCode(2013);
    /// Left key on D-pad
    pub const ARKUI_KEYCODE_DPAD_LEFT: ArkUI_KeyCode = ArkUI_KeyCode(2014);
    /// Right key on D-pad
    pub const ARKUI_KEYCODE_DPAD_RIGHT: ArkUI_KeyCode = ArkUI_KeyCode(2015);
    /// OK key on D-pad
    pub const ARKUI_KEYCODE_DPAD_CENTER: ArkUI_KeyCode = ArkUI_KeyCode(2016);
    /// Key A
    pub const ARKUI_KEYCODE_A: ArkUI_KeyCode = ArkUI_KeyCode(2017);
    /// Key B
    pub const ARKUI_KEYCODE_B: ArkUI_KeyCode = ArkUI_KeyCode(2018);
    /// Key C
    pub const ARKUI_KEYCODE_C: ArkUI_KeyCode = ArkUI_KeyCode(2019);
    /// Key D
    pub const ARKUI_KEYCODE_D: ArkUI_KeyCode = ArkUI_KeyCode(2020);
    /// Key E
    pub const ARKUI_KEYCODE_E: ArkUI_KeyCode = ArkUI_KeyCode(2021);
    /// Key F
    pub const ARKUI_KEYCODE_F: ArkUI_KeyCode = ArkUI_KeyCode(2022);
    /// Key G
    pub const ARKUI_KEYCODE_G: ArkUI_KeyCode = ArkUI_KeyCode(2023);
    /// Key H
    pub const ARKUI_KEYCODE_H: ArkUI_KeyCode = ArkUI_KeyCode(2024);
    /// Key I
    pub const ARKUI_KEYCODE_I: ArkUI_KeyCode = ArkUI_KeyCode(2025);
    /// Key J
    pub const ARKUI_KEYCODE_J: ArkUI_KeyCode = ArkUI_KeyCode(2026);
    /// Key K
    pub const ARKUI_KEYCODE_K: ArkUI_KeyCode = ArkUI_KeyCode(2027);
    /// Key L
    pub const ARKUI_KEYCODE_L: ArkUI_KeyCode = ArkUI_KeyCode(2028);
    /// Key M
    pub const ARKUI_KEYCODE_M: ArkUI_KeyCode = ArkUI_KeyCode(2029);
    /// Key N
    pub const ARKUI_KEYCODE_N: ArkUI_KeyCode = ArkUI_KeyCode(2030);
    /// Key O
    pub const ARKUI_KEYCODE_O: ArkUI_KeyCode = ArkUI_KeyCode(2031);
    /// Key P
    pub const ARKUI_KEYCODE_P: ArkUI_KeyCode = ArkUI_KeyCode(2032);
    /// Key R
    pub const ARKUI_KEYCODE_Q: ArkUI_KeyCode = ArkUI_KeyCode(2033);
    /// Key R
    pub const ARKUI_KEYCODE_R: ArkUI_KeyCode = ArkUI_KeyCode(2034);
    /// Key S
    pub const ARKUI_KEYCODE_S: ArkUI_KeyCode = ArkUI_KeyCode(2035);
    /// Key T
    pub const ARKUI_KEYCODE_T: ArkUI_KeyCode = ArkUI_KeyCode(2036);
    /// Key U
    pub const ARKUI_KEYCODE_U: ArkUI_KeyCode = ArkUI_KeyCode(2037);
    /// Key V
    pub const ARKUI_KEYCODE_V: ArkUI_KeyCode = ArkUI_KeyCode(2038);
    /// Key W
    pub const ARKUI_KEYCODE_W: ArkUI_KeyCode = ArkUI_KeyCode(2039);
    /// Key X
    pub const ARKUI_KEYCODE_X: ArkUI_KeyCode = ArkUI_KeyCode(2040);
    /// Key Y
    pub const ARKUI_KEYCODE_Y: ArkUI_KeyCode = ArkUI_KeyCode(2041);
    /// Key Z
    pub const ARKUI_KEYCODE_Z: ArkUI_KeyCode = ArkUI_KeyCode(2042);
    /// Key #
    pub const ARKUI_KEYCODE_COMMA: ArkUI_KeyCode = ArkUI_KeyCode(2043);
    /// Key #
    pub const ARKUI_KEYCODE_PERIOD: ArkUI_KeyCode = ArkUI_KeyCode(2044);
    /// Left Alt key
    pub const ARKUI_KEYCODE_ALT_LEFT: ArkUI_KeyCode = ArkUI_KeyCode(2045);
    /// Right Alt key
    pub const ARKUI_KEYCODE_ALT_RIGHT: ArkUI_KeyCode = ArkUI_KeyCode(2046);
    /// Left Shift key
    pub const ARKUI_KEYCODE_SHIFT_LEFT: ArkUI_KeyCode = ArkUI_KeyCode(2047);
    /// Right Shift key
    pub const ARKUI_KEYCODE_SHIFT_RIGHT: ArkUI_KeyCode = ArkUI_KeyCode(2048);
    /// Tab key
    pub const ARKUI_KEYCODE_TAB: ArkUI_KeyCode = ArkUI_KeyCode(2049);
    /// Space key
    pub const ARKUI_KEYCODE_SPACE: ArkUI_KeyCode = ArkUI_KeyCode(2050);
    /// Symbol key
    pub const ARKUI_KEYCODE_SYM: ArkUI_KeyCode = ArkUI_KeyCode(2051);
    /// Explorer key, used to start the explorer application
    pub const ARKUI_KEYCODE_EXPLORER: ArkUI_KeyCode = ArkUI_KeyCode(2052);
    /// Email key, used to start the email application
    pub const ARKUI_KEYCODE_ENVELOPE: ArkUI_KeyCode = ArkUI_KeyCode(2053);
    /// Enter key
    pub const ARKUI_KEYCODE_ENTER: ArkUI_KeyCode = ArkUI_KeyCode(2054);
    /// Backspace key
    pub const ARKUI_KEYCODE_DEL: ArkUI_KeyCode = ArkUI_KeyCode(2055);
    /// Key `
    pub const ARKUI_KEYCODE_GRAVE: ArkUI_KeyCode = ArkUI_KeyCode(2056);
    /// Key -
    pub const ARKUI_KEYCODE_MINUS: ArkUI_KeyCode = ArkUI_KeyCode(2057);
    /// Key =
    pub const ARKUI_KEYCODE_EQUALS: ArkUI_KeyCode = ArkUI_KeyCode(2058);
    /// Key [
    pub const ARKUI_KEYCODE_LEFT_BRACKET: ArkUI_KeyCode = ArkUI_KeyCode(2059);
    /// Key ]
    pub const ARKUI_KEYCODE_RIGHT_BRACKET: ArkUI_KeyCode = ArkUI_KeyCode(2060);
    /// Key
    pub const ARKUI_KEYCODE_BACKSLASH: ArkUI_KeyCode = ArkUI_KeyCode(2061);
    /// Key ;
    pub const ARKUI_KEYCODE_SEMICOLON: ArkUI_KeyCode = ArkUI_KeyCode(2062);
    /// Key '
    pub const ARKUI_KEYCODE_APOSTROPHE: ArkUI_KeyCode = ArkUI_KeyCode(2063);
    /// Key /
    pub const ARKUI_KEYCODE_SLASH: ArkUI_KeyCode = ArkUI_KeyCode(2064);
    /// Key
    pub const ARKUI_KEYCODE_AT: ArkUI_KeyCode = ArkUI_KeyCode(2065);
    /// Key +
    pub const ARKUI_KEYCODE_PLUS: ArkUI_KeyCode = ArkUI_KeyCode(2066);
    /// Menu key
    pub const ARKUI_KEYCODE_MENU: ArkUI_KeyCode = ArkUI_KeyCode(2067);
    /// Page Up key
    pub const ARKUI_KEYCODE_PAGE_UP: ArkUI_KeyCode = ArkUI_KeyCode(2068);
    /// Page Down key
    pub const ARKUI_KEYCODE_PAGE_DOWN: ArkUI_KeyCode = ArkUI_KeyCode(2069);
    /// ESC key
    pub const ARKUI_KEYCODE_ESCAPE: ArkUI_KeyCode = ArkUI_KeyCode(2070);
    /// Delete key
    pub const ARKUI_KEYCODE_FORWARD_DEL: ArkUI_KeyCode = ArkUI_KeyCode(2071);
    /// Left Ctrl key
    pub const ARKUI_KEYCODE_CTRL_LEFT: ArkUI_KeyCode = ArkUI_KeyCode(2072);
    /// Right Ctrl key
    pub const ARKUI_KEYCODE_CTRL_RIGHT: ArkUI_KeyCode = ArkUI_KeyCode(2073);
    /// Caps Lock key
    pub const ARKUI_KEYCODE_CAPS_LOCK: ArkUI_KeyCode = ArkUI_KeyCode(2074);
    /// Scroll Lock key
    pub const ARKUI_KEYCODE_SCROLL_LOCK: ArkUI_KeyCode = ArkUI_KeyCode(2075);
    /// Left Meta key
    pub const ARKUI_KEYCODE_META_LEFT: ArkUI_KeyCode = ArkUI_KeyCode(2076);
    /// Right Meta key
    pub const ARKUI_KEYCODE_META_RIGHT: ArkUI_KeyCode = ArkUI_KeyCode(2077);
    /// Function key
    pub const ARKUI_KEYCODE_FUNCTION: ArkUI_KeyCode = ArkUI_KeyCode(2078);
    /// System Request/Print Screen key
    pub const ARKUI_KEYCODE_SYSRQ: ArkUI_KeyCode = ArkUI_KeyCode(2079);
    /// Break/Pause key
    pub const ARKUI_KEYCODE_BREAK: ArkUI_KeyCode = ArkUI_KeyCode(2080);
    /// Move to Home key
    pub const ARKUI_KEYCODE_MOVE_HOME: ArkUI_KeyCode = ArkUI_KeyCode(2081);
    /// Move to End key
    pub const ARKUI_KEYCODE_MOVE_END: ArkUI_KeyCode = ArkUI_KeyCode(2082);
    /// Insert key
    pub const ARKUI_KEYCODE_INSERT: ArkUI_KeyCode = ArkUI_KeyCode(2083);
    /// Forward key
    pub const ARKUI_KEYCODE_FORWARD: ArkUI_KeyCode = ArkUI_KeyCode(2084);
    /// Play key
    pub const ARKUI_KEYCODE_MEDIA_PLAY: ArkUI_KeyCode = ArkUI_KeyCode(2085);
    /// Pause key
    pub const ARKUI_KEYCODE_MEDIA_PAUSE: ArkUI_KeyCode = ArkUI_KeyCode(2086);
    /// Close key
    pub const ARKUI_KEYCODE_MEDIA_CLOSE: ArkUI_KeyCode = ArkUI_KeyCode(2087);
    /// Eject key
    pub const ARKUI_KEYCODE_MEDIA_EJECT: ArkUI_KeyCode = ArkUI_KeyCode(2088);
    /// Record key
    pub const ARKUI_KEYCODE_MEDIA_RECORD: ArkUI_KeyCode = ArkUI_KeyCode(2089);
    /// F1 key
    pub const ARKUI_KEYCODE_F1: ArkUI_KeyCode = ArkUI_KeyCode(2090);
    /// F2 key
    pub const ARKUI_KEYCODE_F2: ArkUI_KeyCode = ArkUI_KeyCode(2091);
    /// F3 key
    pub const ARKUI_KEYCODE_F3: ArkUI_KeyCode = ArkUI_KeyCode(2092);
    /// F4 key
    pub const ARKUI_KEYCODE_F4: ArkUI_KeyCode = ArkUI_KeyCode(2093);
    /// F5 key
    pub const ARKUI_KEYCODE_F5: ArkUI_KeyCode = ArkUI_KeyCode(2094);
    /// F6 key
    pub const ARKUI_KEYCODE_F6: ArkUI_KeyCode = ArkUI_KeyCode(2095);
    /// F7 key
    pub const ARKUI_KEYCODE_F7: ArkUI_KeyCode = ArkUI_KeyCode(2096);
    /// F8 key
    pub const ARKUI_KEYCODE_F8: ArkUI_KeyCode = ArkUI_KeyCode(2097);
    /// F9 key
    pub const ARKUI_KEYCODE_F9: ArkUI_KeyCode = ArkUI_KeyCode(2098);
    /// F10 key
    pub const ARKUI_KEYCODE_F10: ArkUI_KeyCode = ArkUI_KeyCode(2099);
    /// F11 key
    pub const ARKUI_KEYCODE_F11: ArkUI_KeyCode = ArkUI_KeyCode(2100);
    /// F12 key
    pub const ARKUI_KEYCODE_F12: ArkUI_KeyCode = ArkUI_KeyCode(2101);
    /// Number Lock key on numeric keypad
    pub const ARKUI_KEYCODE_NUM_LOCK: ArkUI_KeyCode = ArkUI_KeyCode(2102);
    /// Key 0 on numeric keypad
    pub const ARKUI_KEYCODE_NUMPAD_0: ArkUI_KeyCode = ArkUI_KeyCode(2103);
    /// Key 1 on numeric keypad
    pub const ARKUI_KEYCODE_NUMPAD_1: ArkUI_KeyCode = ArkUI_KeyCode(2104);
    /// Key 2 on numeric keypad
    pub const ARKUI_KEYCODE_NUMPAD_2: ArkUI_KeyCode = ArkUI_KeyCode(2105);
    /// Key 3 on numeric keypad
    pub const ARKUI_KEYCODE_NUMPAD_3: ArkUI_KeyCode = ArkUI_KeyCode(2106);
    /// Key 4 on numeric keypad
    pub const ARKUI_KEYCODE_NUMPAD_4: ArkUI_KeyCode = ArkUI_KeyCode(2107);
    /// Key 5 on numeric keypad
    pub const ARKUI_KEYCODE_NUMPAD_5: ArkUI_KeyCode = ArkUI_KeyCode(2108);
    /// Key 6 on numeric keypad
    pub const ARKUI_KEYCODE_NUMPAD_6: ArkUI_KeyCode = ArkUI_KeyCode(2109);
    /// Key 7 on numeric keypad
    pub const ARKUI_KEYCODE_NUMPAD_7: ArkUI_KeyCode = ArkUI_KeyCode(2110);
    /// Key 8 on numeric keypad
    pub const ARKUI_KEYCODE_NUMPAD_8: ArkUI_KeyCode = ArkUI_KeyCode(2111);
    /// Key 9 on numeric keypad
    pub const ARKUI_KEYCODE_NUMPAD_9: ArkUI_KeyCode = ArkUI_KeyCode(2112);
    /// Key / on numeric keypad
    pub const ARKUI_KEYCODE_NUMPAD_DIVIDE: ArkUI_KeyCode = ArkUI_KeyCode(2113);
    /// Key ) on numeric keypad
    pub const ARKUI_KEYCODE_NUMPAD_MULTIPLY: ArkUI_KeyCode = ArkUI_KeyCode(2114);
    /// Key - on numeric keypad
    pub const ARKUI_KEYCODE_NUMPAD_SUBTRACT: ArkUI_KeyCode = ArkUI_KeyCode(2115);
    /// Key + on numeric keypad
    pub const ARKUI_KEYCODE_NUMPAD_ADD: ArkUI_KeyCode = ArkUI_KeyCode(2116);
    /// Key . on numeric keypad
    pub const ARKUI_KEYCODE_NUMPAD_DOT: ArkUI_KeyCode = ArkUI_KeyCode(2117);
    /// Key , on numeric keypad
    pub const ARKUI_KEYCODE_NUMPAD_COMMA: ArkUI_KeyCode = ArkUI_KeyCode(2118);
    /// Enter key on numeric keypad
    pub const ARKUI_KEYCODE_NUMPAD_ENTER: ArkUI_KeyCode = ArkUI_KeyCode(2119);
    /// Key = on numeric keypad
    pub const ARKUI_KEYCODE_NUMPAD_EQUALS: ArkUI_KeyCode = ArkUI_KeyCode(2120);
    /// Key ( on numeric keypad
    pub const ARKUI_KEYCODE_NUMPAD_LEFT_PAREN: ArkUI_KeyCode = ArkUI_KeyCode(2121);
    /// Key ) on numeric keypad
    pub const ARKUI_KEYCODE_NUMPAD_RIGHT_PAREN: ArkUI_KeyCode = ArkUI_KeyCode(2122);
    /// Joystick key A
    ///
    /// Available since API-level: 15
    #[cfg(feature = "api-15")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
    pub const ARKUI_KEYCODE_BUTTON_A: ArkUI_KeyCode = ArkUI_KeyCode(2301);
    /// Joystick key B
    ///
    /// Available since API-level: 15
    #[cfg(feature = "api-15")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
    pub const ARKUI_KEYCODE_BUTTON_B: ArkUI_KeyCode = ArkUI_KeyCode(2302);
    /// Joystick key X
    ///
    /// Available since API-level: 15
    #[cfg(feature = "api-15")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
    pub const ARKUI_KEYCODE_BUTTON_X: ArkUI_KeyCode = ArkUI_KeyCode(2304);
    /// Joystick key Y
    ///
    /// Available since API-level: 15
    #[cfg(feature = "api-15")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
    pub const ARKUI_KEYCODE_BUTTON_Y: ArkUI_KeyCode = ArkUI_KeyCode(2305);
    /// Joystick key L1
    ///
    /// Available since API-level: 15
    #[cfg(feature = "api-15")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
    pub const ARKUI_KEYCODE_BUTTON_L1: ArkUI_KeyCode = ArkUI_KeyCode(2307);
    /// Joystick key R1
    ///
    /// Available since API-level: 15
    #[cfg(feature = "api-15")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
    pub const ARKUI_KEYCODE_BUTTON_R1: ArkUI_KeyCode = ArkUI_KeyCode(2308);
    /// Joystick key L2
    ///
    /// Available since API-level: 15
    #[cfg(feature = "api-15")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
    pub const ARKUI_KEYCODE_BUTTON_L2: ArkUI_KeyCode = ArkUI_KeyCode(2309);
    /// Joystick key R2
    ///
    /// Available since API-level: 15
    #[cfg(feature = "api-15")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
    pub const ARKUI_KEYCODE_BUTTON_R2: ArkUI_KeyCode = ArkUI_KeyCode(2310);
    /// Joystick key Select
    ///
    /// Available since API-level: 15
    #[cfg(feature = "api-15")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
    pub const ARKUI_KEYCODE_BUTTON_SELECT: ArkUI_KeyCode = ArkUI_KeyCode(2311);
    /// Joystick key Start
    ///
    /// Available since API-level: 15
    #[cfg(feature = "api-15")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
    pub const ARKUI_KEYCODE_BUTTON_START: ArkUI_KeyCode = ArkUI_KeyCode(2312);
    /// Joystick key Mode
    ///
    /// Available since API-level: 15
    #[cfg(feature = "api-15")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
    pub const ARKUI_KEYCODE_BUTTON_MODE: ArkUI_KeyCode = ArkUI_KeyCode(2313);
    /// Joystick key THUMBL
    ///
    /// Available since API-level: 15
    #[cfg(feature = "api-15")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
    pub const ARKUI_KEYCODE_BUTTON_THUMBL: ArkUI_KeyCode = ArkUI_KeyCode(2314);
    /// Joystick key THUMBR
    ///
    /// Available since API-level: 15
    #[cfg(feature = "api-15")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
    pub const ARKUI_KEYCODE_BUTTON_THUMBR: ArkUI_KeyCode = ArkUI_KeyCode(2315);
}
#[repr(transparent)]
/// Defines an enum for the key codes in key events.
///
///
/// Available since API-level: 14
#[cfg(feature = "api-14")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_KeyCode(pub ::core::ffi::c_int);
#[cfg(feature = "api-14")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
impl ArkUI_KeyEventType {
    /// Unknown type
    pub const ARKUI_KEY_EVENT_UNKNOWN: ArkUI_KeyEventType = ArkUI_KeyEventType(-1);
    /// Pressing of a key
    pub const ARKUI_KEY_EVENT_DOWN: ArkUI_KeyEventType = ArkUI_KeyEventType(0);
    /// Release of a key
    pub const ARKUI_KEY_EVENT_UP: ArkUI_KeyEventType = ArkUI_KeyEventType(1);
    /// Long press of a key
    pub const ARKUI_KEY_EVENT_LONG_PRESS: ArkUI_KeyEventType = ArkUI_KeyEventType(2);
    /// Click of a key
    pub const ARKUI_KEY_EVENT_CLICK: ArkUI_KeyEventType = ArkUI_KeyEventType(3);
}
#[repr(transparent)]
/// Defines an enum for the key event types.
///
///
/// Available since API-level: 14
#[cfg(feature = "api-14")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_KeyEventType(pub ::core::ffi::c_int);
#[cfg(feature = "api-14")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
impl ArkUI_KeySourceType {
    /// Unknown type
    pub const ARKUI_KEY_SOURCE_UNKNOWN: ArkUI_KeySourceType = ArkUI_KeySourceType(0);
    /// Mouse
    pub const ARKUI_KEY_SOURCE_TYPE_MOUSE: ArkUI_KeySourceType = ArkUI_KeySourceType(1);
    /// Keyboard
    pub const ARKUI_KEY_SOURCE_TYPE_KEYBOARD: ArkUI_KeySourceType = ArkUI_KeySourceType(4);
    /// Joystick.
    ///
    ///
    /// Available since API-level: 15
    #[cfg(feature = "api-15")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
    pub const ARKUI_KEY_SOURCE_TYPE_JOYSTICK: ArkUI_KeySourceType = ArkUI_KeySourceType(5);
}
#[repr(transparent)]
/// Defines an enum for the types of devices that trigger a key event.
///
///
/// Available since API-level: 14
#[cfg(feature = "api-14")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_KeySourceType(pub ::core::ffi::c_uint);
#[cfg(feature = "api-14")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
impl ArkUI_KeyIntension {
    /// Unknown intention
    pub const ARKUI_KEY_INTENSION_UNKNOWN: ArkUI_KeyIntension = ArkUI_KeyIntension(-1);
    /// Upward
    pub const ARKUI_KEY_INTENSION_UP: ArkUI_KeyIntension = ArkUI_KeyIntension(1);
    /// Downward
    pub const ARKUI_KEY_INTENSION_DOWN: ArkUI_KeyIntension = ArkUI_KeyIntension(2);
    /// Leftward
    pub const ARKUI_KEY_INTENSION_LEFT: ArkUI_KeyIntension = ArkUI_KeyIntension(3);
    /// Rightward
    pub const ARKUI_KEY_INTENSION_RIGHT: ArkUI_KeyIntension = ArkUI_KeyIntension(4);
    /// Select
    pub const ARKUI_KEY_INTENSION_SELECT: ArkUI_KeyIntension = ArkUI_KeyIntension(5);
    /// Escape
    pub const ARKUI_KEY_INTENSION_ESCAPE: ArkUI_KeyIntension = ArkUI_KeyIntension(6);
    /// Back
    pub const ARKUI_KEY_INTENSION_BACK: ArkUI_KeyIntension = ArkUI_KeyIntension(7);
    /// Forward
    pub const ARKUI_KEY_INTENSION_FORWARD: ArkUI_KeyIntension = ArkUI_KeyIntension(8);
    /// Menu
    pub const ARKUI_KEY_INTENSION_MENU: ArkUI_KeyIntension = ArkUI_KeyIntension(9);
    /// Home
    pub const ARKUI_KEY_INTENSION_HOME: ArkUI_KeyIntension = ArkUI_KeyIntension(10);
    /// Page up
    pub const ARKUI_KEY_INTENSION_PAGE_UP: ArkUI_KeyIntension = ArkUI_KeyIntension(11);
    /// Page down
    pub const ARKUI_KEY_INTENSION_PAGE_DOWN: ArkUI_KeyIntension = ArkUI_KeyIntension(12);
    /// Zoom out
    pub const ARKUI_KEY_INTENSION_ZOOM_OUT: ArkUI_KeyIntension = ArkUI_KeyIntension(13);
    /// Zoom in
    pub const ARKUI_KEY_INTENSION_ZOOM_IN: ArkUI_KeyIntension = ArkUI_KeyIntension(14);
    /// Play or pause
    pub const ARKUI_KEY_INTENTION_MEDIA_PLAY_PAUSE: ArkUI_KeyIntension = ArkUI_KeyIntension(100);
    /// Fast-forward
    pub const ARKUI_KEY_INTENTION_MEDIA_FAST_FORWARD: ArkUI_KeyIntension = ArkUI_KeyIntension(101);
    /// Fast playback
    pub const ARKUI_KEY_INTENTION_MEDIA_FAST_PLAYBACK: ArkUI_KeyIntension = ArkUI_KeyIntension(103);
    /// Play next
    pub const ARKUI_KEY_INTENTION_MEDIA_NEXT: ArkUI_KeyIntension = ArkUI_KeyIntension(104);
    /// Play previous
    pub const ARKUI_KEY_INTENTION_MEDIA_PREVIOUS: ArkUI_KeyIntension = ArkUI_KeyIntension(105);
    /// Mute
    pub const ARKUI_KEY_INTENTION_MEDIA_MUTE: ArkUI_KeyIntension = ArkUI_KeyIntension(106);
    /// Volume up
    pub const ARKUI_KEY_INTENTION_VOLUME_UP: ArkUI_KeyIntension = ArkUI_KeyIntension(107);
    /// Volume down
    pub const ARKUI_KEY_INTENTION_VOLUME_DOWN: ArkUI_KeyIntension = ArkUI_KeyIntension(108);
    /// Answer a call
    pub const ARKUI_KEY_INTENTION_CALL: ArkUI_KeyIntension = ArkUI_KeyIntension(200);
    /// Camera
    pub const ARKUI_KEY_INTENTION_CAMERA: ArkUI_KeyIntension = ArkUI_KeyIntension(300);
}
#[repr(transparent)]
/// Defines an enum for key intentions.
///
///
/// Available since API-level: 14
#[cfg(feature = "api-14")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_KeyIntension(pub ::core::ffi::c_int);
extern "C" {
    /// Obtains the type of a key event.
    ///
    /// # Arguments
    ///
    /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
    ///
    /// # Returns
    ///
    /// * Returns the key event type.
    ///
    /// Available since API-level: 14
    #[cfg(feature = "api-14")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
    pub fn OH_ArkUI_KeyEvent_GetType(event: *const ArkUI_UIInputEvent) -> ArkUI_KeyEventType;
    /// Obtains the key code from a key event.
    ///
    /// # Arguments
    ///
    /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
    ///
    /// # Returns
    ///
    /// * Returns the key code.
    ///
    /// Available since API-level: 14
    #[cfg(feature = "api-14")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
    pub fn OH_ArkUI_KeyEvent_GetKeyCode(event: *const ArkUI_UIInputEvent) -> i32;
    /// Obtains the key value from a key event.
    ///
    /// # Arguments
    ///
    /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
    ///
    /// # Returns
    ///
    /// * Returns the key value.
    ///
    /// Available since API-level: 14
    #[cfg(feature = "api-14")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
    pub fn OH_ArkUI_KeyEvent_GetKeyText(
        event: *const ArkUI_UIInputEvent,
    ) -> *const ::core::ffi::c_char;
    /// Obtains the type of device that triggers a key event.
    ///
    /// # Arguments
    ///
    /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
    ///
    /// # Returns
    ///
    /// * Returns the device type.
    ///
    /// Available since API-level: 14
    #[cfg(feature = "api-14")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
    pub fn OH_ArkUI_KeyEvent_GetKeySource(event: *const ArkUI_UIInputEvent) -> ArkUI_KeySourceType;
    /// Prevents a key event from bubbling up.
    ///
    /// # Arguments
    ///
    /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
    ///
    /// * `stopPropagation` - Whether to stop event propagation.
    ///
    /// Available since API-level: 14
    #[cfg(feature = "api-14")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
    pub fn OH_ArkUI_KeyEvent_StopPropagation(
        event: *const ArkUI_UIInputEvent,
        stopPropagation: bool,
    );
    /// Obtains the intention code associated with a key event.
    ///
    /// # Arguments
    ///
    /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
    ///
    /// # Returns
    ///
    /// * Returns the intention code associated with the key event.
    ///
    /// Available since API-level: 14
    #[cfg(feature = "api-14")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
    pub fn OH_ArkUI_KeyEvent_GetKeyIntensionCode(
        event: *const ArkUI_UIInputEvent,
    ) -> ArkUI_KeyIntension;
    /// Obtains the Unicode value associated with a key event.
    /// Non-space basic Latin characters in the 0x0021-0x007E range are supported. Characters with a value of 0 are not
    /// supported. In the case of key combination, this API returns the Unicode value of the key corresponding to the key
    /// event.
    ///
    /// # Arguments
    ///
    /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
    ///
    /// # Returns
    ///
    /// * Returns the Unicode value.
    ///
    /// Available since API-level: 14
    #[cfg(feature = "api-14")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
    pub fn OH_ArkUI_KeyEvent_GetUnicode(event: *const ArkUI_UIInputEvent) -> u32;
    /// Sets whether a key event is consumed in the key event callback.
    ///
    /// # Arguments
    ///
    /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
    ///
    /// * `isConsumed` - Whether the event is consumed.
    ///
    /// Available since API-level: 14
    #[cfg(feature = "api-14")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
    pub fn OH_ArkUI_KeyEvent_SetConsumed(event: *const ArkUI_UIInputEvent, isConsumed: bool);
    /// Dispatch key event to a specific component node.
    ///
    /// # Arguments
    ///
    /// * `node` - Indicates the pointer to a component node.
    ///
    /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
    ///
    /// Available since API-level: 15
    #[cfg(feature = "api-15")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
    pub fn OH_ArkUI_KeyEvent_Dispatch(node: ArkUI_NodeHandle, event: *const ArkUI_UIInputEvent);
    /// Get the Num Lock state of the key event.
    ///
    /// # Arguments
    ///
    /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
    ///
    /// * `state` - Return whether the Num Lock is on.
    ///
    /// # Returns
    ///
    /// * Returns the result code.
    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
    ///
    /// Available since API-level: 19
    #[cfg(feature = "api-19")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
    pub fn OH_ArkUI_KeyEvent_IsNumLockOn(
        event: *const ArkUI_UIInputEvent,
        state: *mut bool,
    ) -> ArkUiResult;
    /// Get the Caps Lock state of the key event.
    ///
    /// # Arguments
    ///
    /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
    ///
    /// * `state` - Return whether the Caps Lock is on.
    ///
    /// # Returns
    ///
    /// * Returns the result code.
    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
    ///
    /// Available since API-level: 19
    #[cfg(feature = "api-19")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
    pub fn OH_ArkUI_KeyEvent_IsCapsLockOn(
        event: *const ArkUI_UIInputEvent,
        state: *mut bool,
    ) -> ArkUiResult;
    /// Get the Scroll Lock state of the key event.
    ///
    /// # Arguments
    ///
    /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
    ///
    /// * `state` - Return whether the Scroll Lock is on.
    ///
    /// # Returns
    ///
    /// * Returns the result code.
    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
    ///
    /// Available since API-level: 19
    #[cfg(feature = "api-19")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
    pub fn OH_ArkUI_KeyEvent_IsScrollLockOn(
        event: *const ArkUI_UIInputEvent,
        state: *mut bool,
    ) -> ArkUiResult;
}