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
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
// 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::*;
/// Defines the UI input event.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_UIInputEvent {
_unused: [u8; 0],
}
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_UIInputEvent_Type {
pub const ARKUI_UIINPUTEVENT_TYPE_UNKNOWN: ArkUI_UIInputEvent_Type = ArkUI_UIInputEvent_Type(0);
pub const ARKUI_UIINPUTEVENT_TYPE_TOUCH: ArkUI_UIInputEvent_Type = ArkUI_UIInputEvent_Type(1);
pub const ARKUI_UIINPUTEVENT_TYPE_AXIS: ArkUI_UIInputEvent_Type = ArkUI_UIInputEvent_Type(2);
/// Mouse event.
pub const ARKUI_UIINPUTEVENT_TYPE_MOUSE: ArkUI_UIInputEvent_Type = ArkUI_UIInputEvent_Type(3);
/// key event.
///
///
/// Available since API-level: 20
#[cfg(feature = "api-20")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
pub const ARKUI_UIINPUTEVENT_TYPE_KEY: ArkUI_UIInputEvent_Type = ArkUI_UIInputEvent_Type(4);
}
#[repr(transparent)]
/// Enumerates the UI input event types.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_UIInputEvent_Type(pub ::core::ffi::c_uint);
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl HitTestMode {
/// Both the node and its child node respond to the hit test of a touch event, but its sibling node is blocked from
/// the hit test.
pub const HTM_DEFAULT: HitTestMode = HitTestMode(0);
/// The node responds to the hit test of a touch event, but its child node and sibling node are blocked from the hit
/// test.
pub const HTM_BLOCK: HitTestMode = HitTestMode(1);
/// Both the node and its child node respond to the hit test of a touch event, and its sibling node is also
/// considered during the hit test.
pub const HTM_TRANSPARENT: HitTestMode = HitTestMode(2);
/// The node does not respond to the hit test of a touch event, but its child node and sibling node are considered
/// during the hit test.
pub const HTM_NONE: HitTestMode = HitTestMode(3);
/// The node and its child nodes participate in hit tests, while blocking hit tests for all sibling nodes and parent
/// nodes with lower priority.
///
///
/// Available since API-level: 20
#[cfg(feature = "api-20")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
pub const HTM_BLOCK_HIERARCHY: HitTestMode = HitTestMode(4);
/// The node does not respond to hit tests, and none of its descendants (including children and grandchildren)
/// participate in hit tests either.
///
///
/// Available since API-level: 20
#[cfg(feature = "api-20")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
pub const HTM_BLOCK_DESCENDANTS: HitTestMode = HitTestMode(5);
}
#[repr(transparent)]
/// Enumerates the hit test modes.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct HitTestMode(pub ::core::ffi::c_uint);
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ::core::ops::BitOr<ArkUI_ModifierKeyName> for ArkUI_ModifierKeyName {
type Output = Self;
#[inline]
fn bitor(self, other: Self) -> Self {
ArkUI_ModifierKeyName(self.0 | other.0)
}
}
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ::core::ops::BitOrAssign for ArkUI_ModifierKeyName {
#[inline]
fn bitor_assign(&mut self, rhs: ArkUI_ModifierKeyName) {
self.0 |= rhs.0;
}
}
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ::core::ops::BitAnd<ArkUI_ModifierKeyName> for ArkUI_ModifierKeyName {
type Output = Self;
#[inline]
fn bitand(self, other: Self) -> Self {
ArkUI_ModifierKeyName(self.0 & other.0)
}
}
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ::core::ops::BitAndAssign for ArkUI_ModifierKeyName {
#[inline]
fn bitand_assign(&mut self, rhs: ArkUI_ModifierKeyName) {
self.0 &= rhs.0;
}
}
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl ArkUI_ModifierKeyName {
/// Ctrl.
pub const ARKUI_MODIFIER_KEY_CTRL: ArkUI_ModifierKeyName = ArkUI_ModifierKeyName(1);
/// Shift.
pub const ARKUI_MODIFIER_KEY_SHIFT: ArkUI_ModifierKeyName = ArkUI_ModifierKeyName(2);
/// Alt.
pub const ARKUI_MODIFIER_KEY_ALT: ArkUI_ModifierKeyName = ArkUI_ModifierKeyName(4);
/// Fn.
pub const ARKUI_MODIFIER_KEY_FN: ArkUI_ModifierKeyName = ArkUI_ModifierKeyName(8);
}
#[repr(transparent)]
/// Defines an enum for modifier keys.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_ModifierKeyName(pub ::core::ffi::c_uint);
/// ABS_X.
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub const UI_FOCUS_AXIS_EVENT_ABS_X: _bindgen_ty_6 = _bindgen_ty_6(0);
/// ABS_Y.
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub const UI_FOCUS_AXIS_EVENT_ABS_Y: _bindgen_ty_6 = _bindgen_ty_6(1);
/// ABS_Z.
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub const UI_FOCUS_AXIS_EVENT_ABS_Z: _bindgen_ty_6 = _bindgen_ty_6(2);
/// ABS_RZ.
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub const UI_FOCUS_AXIS_EVENT_ABS_RZ: _bindgen_ty_6 = _bindgen_ty_6(3);
/// ABS_GAS.
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub const UI_FOCUS_AXIS_EVENT_ABS_GAS: _bindgen_ty_6 = _bindgen_ty_6(4);
/// ABS_BRAKE.
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub const UI_FOCUS_AXIS_EVENT_ABS_BRAKE: _bindgen_ty_6 = _bindgen_ty_6(5);
/// ABS_HAT0X.
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub const UI_FOCUS_AXIS_EVENT_ABS_HAT0X: _bindgen_ty_6 = _bindgen_ty_6(6);
/// ABS_HAT0Y.
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub const UI_FOCUS_AXIS_EVENT_ABS_HAT0Y: _bindgen_ty_6 = _bindgen_ty_6(7);
#[repr(transparent)]
/// Defines an enum for the axis types for focus axis events.
///
///
/// Available since API-level: 15
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct _bindgen_ty_6(pub ::core::ffi::c_uint);
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
impl ArkUI_InteractionHand {
/// Unknown.
pub const ARKUI_EVENT_HAND_NONE: ArkUI_InteractionHand = ArkUI_InteractionHand(0);
/// Left hand.
pub const ARKUI_EVENT_HAND_LEFT: ArkUI_InteractionHand = ArkUI_InteractionHand(1);
/// Right hand.
pub const ARKUI_EVENT_HAND_RIGHT: ArkUI_InteractionHand = ArkUI_InteractionHand(2);
}
#[repr(transparent)]
/// Defines whether the touch event is from the left or right hand.
///
///
/// Available since API-level: 15
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkUI_InteractionHand(pub ::core::ffi::c_uint);
/// The axis event is abnormal.
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub const UI_AXIS_EVENT_ACTION_NONE: _bindgen_ty_7 = _bindgen_ty_7(0);
/// The axis event begins.
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub const UI_AXIS_EVENT_ACTION_BEGIN: _bindgen_ty_7 = _bindgen_ty_7(1);
/// The axis event is updated.
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub const UI_AXIS_EVENT_ACTION_UPDATE: _bindgen_ty_7 = _bindgen_ty_7(2);
/// The axis event ends.
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub const UI_AXIS_EVENT_ACTION_END: _bindgen_ty_7 = _bindgen_ty_7(3);
/// The axis event is canceled.
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub const UI_AXIS_EVENT_ACTION_CANCEL: _bindgen_ty_7 = _bindgen_ty_7(4);
#[repr(transparent)]
/// Enumerates the action types for axis events.
///
///
/// Available since API-level: 15
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct _bindgen_ty_7(pub ::core::ffi::c_uint);
extern "C" {
/// Obtains the type of a UI input event.
///
/// Before accessing an <b>ArkUI_UIInputEvent</b> pointer, use this API to determine the type of the input event.
/// This API returns a value from the [`ArkUI_UIInputEvent_Type`] enum. It helps ensure compatibility with subsequent
/// accessors. For example, if the event is a touch event,
/// which is directional, you can use OH_ArkUI_UIInputEvent_GetXXX or OH_ArkUI_PointerEvent_GetXXX for access.
/// Using OH_ArkUI_KeyEvent_GetXXX to access the event may produce undefined behavior.
///
/// For unsupported event types, this API returns the default value <b>0</b>.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// # Returns
///
/// * Returns the type of the current UI input event; returns <b>0</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_UIInputEvent_GetType(event: *const ArkUI_UIInputEvent) -> i32;
/// Obtains the action type of this UI input event.
///
/// The action type defines the phase of a basic event (for example, start or end) and characterizes its behavior,
/// such as touch down or touch up Action types are specific to the event category:
/// UI_TOUCH_EVENT_ACTION_XXX for touch events and UI_MOUSE_EVENT_ACTION_XXX for mouse events.
///
///
/// **Note:** 1. For axis events, use [`OH_ArkUI_AxisEvent_GetAxisAction`] to obtain the action type,
/// which returns UI_AXIS_EVENT_ACTION_XXX.
/// 2. For key events, use [`OH_ArkUI_KeyEvent_GetType`] instead.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// # Returns
///
/// * Returns the action type of the current UI input event; returns <b>-1</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_UIInputEvent_GetAction(event: *const ArkUI_UIInputEvent) -> i32;
/// Obtains the source type of a UI input event.
///
/// The source represents the physical device, such as a touchscreen or mouse device, that generates the event.
/// It is defined by the UI_INPUT_EVENT_SOURCE_TYPE_XXX enum.
/// This is different from the input tool, which is the device used to interact with the source, for example,
/// a finger or stylus. However, in certain cases, the input source and the input tool can be the same.
/// For example, a mouse device acts as both the source and tool for click events.
///
///
/// **Note:** For key events, obtaining the source type is not supported, and in such cases,
/// the API will return an <b>unknown</b> value.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// # Returns
///
/// * Returns the source type of the current UI input event.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_UIInputEvent_GetSourceType(event: *const ArkUI_UIInputEvent) -> i32;
/// Obtains the tool type of a UI input event.
///
/// The input tool is the device used to interact with the input source, such as a finger or stylus.
/// It is defined by the UI_INPUT_EVENT_TOOL_TYPE_XXX enum.
/// These tools do not produce events directly but drive the input source to generate them.
///
///
/// **Note:** For key events, obtaining the tool type is not supported, and in such cases,
/// the API will return an <b>unknown</b> value.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// # Returns
///
/// * Returns the tool type of the current UI input event.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_UIInputEvent_GetToolType(event: *const ArkUI_UIInputEvent) -> i32;
/// Obtains the time when this UI input event occurs.
///
/// # Arguments
///
/// * `event` - Indicates the pointer to the current UI input event.
///
/// # Returns
///
/// * Returns the time when the UI input event occurs; returns <b>0</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_UIInputEvent_GetEventTime(event: *const ArkUI_UIInputEvent) -> i64;
/// Obtains the number of contact points from a pointer event (such as a touch, mouse, or axis event).
///
/// Pointer events are typically events that carry position information, such as touch events,
/// where the location of the event can be determined.
/// Non-pointer events, such as key events, do not have position information and do not involve contact points,
/// so this API is not applicable to key events.
///
/// For touch events, this API returns the number of active touch points, for example, fingers on the screen.
/// For mouse and axis events, this API always returns <b>1</b>, as they are single-pointer interactions.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// # Returns
///
/// * Number of contact points for the current pointer event.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetPointerCount(event: *const ArkUI_UIInputEvent) -> u32;
/// Obtains the unique ID of a contact point from a pointer event (such as a touch, mouse, or axis event).
///
/// The ID distinguishes between multiple contact points from the same input device. The return value itself does not
/// have any other meaning beyond identifying the contact point.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// * `pointerIndex` - Index of the target contact point in the contact point list.
///
/// # Returns
///
/// * Unique ID of the specified contact point.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetPointerId(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
) -> i32;
/// Obtains the ID of the touch pointer that triggers the current touch event.
///
/// # Arguments
///
/// * `event` - Indicates the pointer to the current UI input event.
///
/// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
///
/// # 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: 15
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub fn OH_ArkUI_PointerEvent_GetChangedPointerId(
event: *const ArkUI_UIInputEvent,
pointerIndex: *mut u32,
) -> i32;
/// Obtains the X coordinate relative to the upper left corner of the current component from a directional
/// input event (such as a touch event, mouse event, or axis event).
///
/// # Arguments
///
/// * `event` - Indicates the pointer to the directional input event.
///
/// # Returns
///
/// * Returns the X coordinate relative to the upper left corner of the current component;
/// returns <b>0</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetX(event: *const ArkUI_UIInputEvent) -> f32;
/// Obtains the X coordinate of a specific contact point relative to the upper left corner of the current
/// component from a pointer event (such as a touch, mouse, or axis event).
/// For mouse and axis events, this API returns the default value of <b>0.0f</b> if the given index is greater than 0.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// * `pointerIndex` - Index of the target contact point in the contact point list.
///
/// # Returns
///
/// * Returns the X coordinate relative to the upper left corner of the current component;
/// returns <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetXByIndex(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
) -> f32;
/// Obtains the Y coordinate relative to the upper left corner of the current component from a directional
/// input event (such as a touch event, mouse event, or axis event).
///
/// # Arguments
///
/// * `event` - Indicates the pointer to the UI input event.
///
/// # Returns
///
/// * Returns the Y coordinate relative to the upper left corner of the current component;
/// returns <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetY(event: *const ArkUI_UIInputEvent) -> f32;
/// Obtains the Y coordinate of a specific contact point relative to the upper left corner of the current
/// component from a pointer event (such as a touch, mouse, or axis event).
/// For mouse and axis events, this API returns the default value of <b>0.0f</b> if the given index is greater than 0.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// * `pointerIndex` - Index of the target contact point in the contact point list.
///
/// # Returns
///
/// * Y coordinate relative to the upper left corner of the current component;
/// <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetYByIndex(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
) -> f32;
/// Obtains the X coordinate relative to the upper left corner of the current application window from a
/// directional input event (such as a touch event, mouse event, or axis event).
///
/// # Arguments
///
/// * `event` - Indicates the pointer to the UI input event.
///
/// # Returns
///
/// * Returns the X coordinate relative to the upper left corner of the current application window;
/// returns <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetWindowX(event: *const ArkUI_UIInputEvent) -> f32;
/// Obtains the X coordinate of a specific contact point relative to the upper left corner of the current
/// application window from a pointer event (such as a touch, mouse, or axis event).
/// For mouse and axis events, this API returns the default value of <b>0.0f</b> if the given index is greater than 0.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// * `pointerIndex` - Index of the target contact point in the contact point list.
///
/// # Returns
///
/// * X coordinate relative to the upper left corner of the current application window;
/// <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetWindowXByIndex(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
) -> f32;
/// Obtains the Y coordinate relative to the upper left corner of the current application window from a
/// directional input event (such as a touch event, mouse event, or axis event).
///
/// # Arguments
///
/// * `event` - Indicates the pointer to the UI input event.
///
/// # Returns
///
/// * Returns the Y coordinate relative to the upper left corner of the current application window;
/// returns <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetWindowY(event: *const ArkUI_UIInputEvent) -> f32;
/// Obtains the Y coordinate of a specific contact point relative to the upper left corner of the current
/// application window from a pointer event (such as a touch, mouse, or axis event).
/// For mouse and axis events, this API returns the default value of <b>0.0f</b> if the given index is greater than 0.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// * `pointerIndex` - Index of the target contact point in the contact point list.
///
/// # Returns
///
/// * Returns the Y coordinate relative to the upper left corner of the current application window;
/// returns <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetWindowYByIndex(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
) -> f32;
/// Obtains the X coordinate relative to the upper left corner of the current screen from a directional input
/// event (such as a touch event, mouse event, or axis event).
///
/// # Arguments
///
/// * `event` - Indicates the pointer to the UI input event.
///
/// # Returns
///
/// * Returns the X coordinate relative to the upper left corner of the current screen;
/// returns <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetDisplayX(event: *const ArkUI_UIInputEvent) -> f32;
/// Obtains the X coordinate of a specific contact point relative to the upper left corner of the current screen
/// from a pointer event (such as a touch, mouse, or axis event).
/// For mouse and axis events, this API returns the default value of <b>0.0f</b> if the given index is greater than 0.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// * `pointerIndex` - Index of the target contact point in the contact point list.
///
/// # Returns
///
/// * Returns the X coordinate relative to the upper left corner of the current screen;
/// returns <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetDisplayXByIndex(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
) -> f32;
/// Obtains the Y coordinate relative to the upper left corner of the current screen from a directional input
/// event (such as a touch event, mouse event, or axis event).
///
/// # Arguments
///
/// * `event` - Indicates the pointer to the UI input event.
///
/// # Returns
///
/// * Returns the Y coordinate relative to the upper left corner of the current screen;
/// returns <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetDisplayY(event: *const ArkUI_UIInputEvent) -> f32;
/// Obtains the Y coordinate of a specific touch point relative to the upper left corner of the current screen
/// from a pointer event (such as a touch event, mouse event, or axis event).
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// * `pointerIndex` - Index of the target contact point in the contact point list.
///
/// # Returns
///
/// * Returns the Y coordinate relative to the upper left corner of the current screen;
/// returns <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetDisplayYByIndex(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
) -> f32;
/// Obtains the X coordinate relative to global display from a pointer event (such as a touch, mouse,
/// or axis event).
/// Position information can only be obtained from UI input events.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// # Returns
///
/// * float X coordinate relative to the global display. <b>0</b> is returned if any parameter error occurs
/// (for example, if the event does not contain position information).
///
/// Available since API-level: 20
#[cfg(feature = "api-20")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
pub fn OH_ArkUI_PointerEvent_GetGlobalDisplayX(event: *const ArkUI_UIInputEvent) -> f32;
/// Obtains the X coordinate of a specific contact point relative to global display from a pointer event
/// (such as a touch, mouse, or axis event).
/// Position information can only be obtained from UI input events. For mouse and axis events, if the provided
/// <b>pointerIndex</b> is greater than 0, this API always returns the default value <b>0.0f</b>.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// * `pointerIndex` - Index of the target touch point in the multi-touch data list.
/// Value range: [0, OH_ArkUI_PointerEvent_GetPointerCount() - 1]
///
/// # Returns
///
/// * float X coordinate relative to the global display; <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 20
#[cfg(feature = "api-20")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
pub fn OH_ArkUI_PointerEvent_GetGlobalDisplayXByIndex(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
) -> f32;
/// Obtains the Y coordinate relative to global display from a pointer event (such as a touch, mouse,
/// or axis event).
/// Position information can only be obtained from pointer-like events.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// # Returns
///
/// * float Y coordinate relative to the global display; <b>0</b> if any parameter error occurs
/// (for example, if the event does not contain position information).
///
/// Available since API-level: 20
#[cfg(feature = "api-20")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
pub fn OH_ArkUI_PointerEvent_GetGlobalDisplayY(event: *const ArkUI_UIInputEvent) -> f32;
/// Obtains the Y coordinate of a specific contact point relative to global display from a pointer event
/// (such as a touch, mouse, or axis event).
/// Position information can only be obtained from UI input events. For mouse and axis events, if the provided
/// <b>pointerIndex</b> is greater than 0, this API always returns the default value <b>0.0f</b>.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// * `pointerIndex` - Index of the target touch point in the multi-touch data list.
/// Value range: [0, OH_ArkUI_PointerEvent_GetPointerCount() - 1]
///
/// # Returns
///
/// * float Y coordinate relative to the global display; <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 20
#[cfg(feature = "api-20")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
pub fn OH_ArkUI_PointerEvent_GetGlobalDisplayYByIndex(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
) -> f32;
/// Obtains the pressure applied to the touchscreen from a directional input event (for example, a touch event).
///
/// # Arguments
///
/// * `event` - Indicates the pointer to the current UI input event.
///
/// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
///
/// # Returns
///
/// * Returns the pressure applied to the touchscreen; returns <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetPressure(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
) -> f32;
/// Obtains the tilt angle relative to the YZ plane from a pointer event.
/// The value range is [-90, 90], where positive values indicate a rightward tilt.
/// This API is applicable only to stylus-based touch events from devices that support tilt angle reporting.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// * `pointerIndex` - Index of the target contact point in the contact point list.
///
/// # Returns
///
/// * Returns the angle relative to the YZ plane.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetTiltX(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
) -> f32;
/// Obtains the tilt angle relative to the XZ plane from a pointer event.
/// The value range is [-90, 90], where positive values indicate a rightward tilt.
/// This API is applicable only to stylus-based touch events from devices that support tilt angle reporting.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// * `pointerIndex` - Index of the target contact point in the contact point list.
///
/// # Returns
///
/// * Returns the angle relative to the XZ plane.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetTiltY(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
) -> f32;
/// Obtains the rotation angle of the stylus around the z-axis from a UI input event.
///
/// # Arguments
///
/// * `event` - Pointer to the UI input event.
///
/// * `rollAngle` - Rotation angle of the stylus around the z-axis.
///
/// # 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: 17
#[cfg(feature = "api-17")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
pub fn OH_ArkUI_PointerEvent_GetRollAngle(
event: *const ArkUI_UIInputEvent,
rollAngle: *mut f64,
) -> i32;
/// Obtains the width of the contact area for a pointer event. This API is applicable only to finger-based touch
/// events, and the return value typically represents the radius of a circular touch area.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// * `pointerIndex` - Index of the target contact point in the contact point list.
///
/// # Returns
///
/// * Returns the width of the touch area.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetTouchAreaWidth(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
) -> f32;
/// Obtains the height of the contact area for a pointer event. This API is applicable only to finger-based touch
/// events, and the return value typically represents the radius of a circular touch area.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// * `pointerIndex` - Index of the target contact point in the contact point list.
///
/// # Returns
///
/// * Returns the height of the touch area.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetTouchAreaHeight(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
) -> f32;
/// Checks whether an event is triggered by the user's left or right hand.
/// This API is only effective on some touch devices.
///
///
/// **Note:** This value cannot be obtained in real time when pressed. Before the
/// system completes result inference, it will return <b>NONE</b> by default. Therefore,
/// please do not over-rely on the results returned by this interface.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// * `hand` - Whether the touch point is from the left or right hand.
///
/// # Returns
///
/// * Result code.
/// [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
/// [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
///
/// Available since API-level: 15
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub fn OH_ArkUI_PointerEvent_GetInteractionHand(
event: *const ArkUI_UIInputEvent,
hand: *mut ArkUI_InteractionHand,
) -> i32;
/// Checks whether an event is triggered by the user's left or right hand.
/// This API is only effective on some touch devices.
///
///
/// **Note:** This value cannot be obtained in real time when pressed. Before the
/// system completes result inference, it will return <b>NONE</b> by default. Therefore,
/// please do not over-rely on the results returned by this interface.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// * `pointerIndex` - Index of the target touch point in the multi-touch data list.
///
/// * `hand` - Whether the touch point is from the left or right hand.
///
/// # Returns
///
/// * Result code.
/// [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
/// [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
///
/// Available since API-level: 15
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub fn OH_ArkUI_PointerEvent_GetInteractionHandByIndex(
event: *const ArkUI_UIInputEvent,
pointerIndex: i32,
hand: *mut ArkUI_InteractionHand,
) -> i32;
/// Obtains the number of historical events from a pointer event (such as a touch event).
/// Historical events are the raw events that occur between the current event and the previous event.
/// This API is applicable only to move events.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// # Returns
///
/// * Returns the number of historical events.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistorySize(event: *const ArkUI_UIInputEvent) -> u32;
/// Obtains the occurrence time of a historical event from a directional input event (such as a touch event,
/// mouse event, or axis event).
///
/// # Arguments
///
/// * `event` - Indicates the pointer to the current UI input event.
///
/// * `historyIndex` - Indicates the index of the target historical event.
///
/// # Returns
///
/// * Returns the time when the UI input event occurs; returns <b>0</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryEventTime(
event: *const ArkUI_UIInputEvent,
historyIndex: u32,
) -> i64;
/// Obtains the number of touch points in a specific historical event from a directional input event (such as
/// a touch event, mouse event, or axis event).
///
/// # Arguments
///
/// * `event` - Indicates the pointer to the current UI input event.
///
/// * `historyIndex` - Indicates the index of the target historical event.
///
/// # Returns
///
/// * Returns the number of touch points in the specified historical event
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryPointerCount(
event: *const ArkUI_UIInputEvent,
historyIndex: u32,
) -> u32;
/// Obtains the unique ID of a contact point from a historical event of a pointer event (such as a touch event).
///
/// The ID distinguishes between multiple contact points from the same input device.
/// The return value itself does not have any other meaning beyond identifying the contact point.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// * `pointerIndex` - Index of the target contact point in the contact point list.
///
/// * `historyIndex` - Index of the target historical event.
///
/// # Returns
///
/// * Returns the ID of the corresponding touch point in the specified historical event.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryPointerId(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
historyIndex: u32,
) -> i32;
/// Obtains the X coordinate of a specific touch point in a historical event relative to the upper left corner
/// of the current component from a directional input event (such as a touch event, mouse event, or axis event).
///
/// # Arguments
///
/// * `event` - Indicates the pointer to the current UI input event.
///
/// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
///
/// * `historyIndex` - Indicates the index of the target historical event.
///
/// # Returns
///
/// * Returns the X coordinate relative to the upper left corner of the current component;
/// returns <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryX(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
historyIndex: u32,
) -> f32;
/// Obtains the Y coordinate of a specific touch point in a historical event relative to the upper left corner
/// of the current component from a directional input event (such as a touch event, mouse event, or axis event).
///
/// # Arguments
///
/// * `event` - Indicates the pointer to the current UI input event.
///
/// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
///
/// * `historyIndex` - Indicates the index of the target historical event.
///
/// # Returns
///
/// * Returns the Y coordinate relative to the upper left corner of the current component;
/// returns <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryY(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
historyIndex: u32,
) -> f32;
/// Obtains the X coordinate of a specific touch point in a historical event relative to the upper left corner
/// of the current application window from a directional input event (such as a touch event, mouse event, or axis event).
///
/// # Arguments
///
/// * `event` - Indicates the pointer to the current UI input event.
///
/// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
///
/// * `historyIndex` - Indicates the index of the target historical event.
///
/// # Returns
///
/// * Returns the X coordinate relative to the upper left corner of the current application window;
/// returns <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryWindowX(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
historyIndex: u32,
) -> f32;
/// Obtains the Y coordinate of a specific touch point in a historical event relative to the upper left corner
/// of the current application window from a directional input event (such as a touch event, mouse event, or axis event).
///
/// # Arguments
///
/// * `event` - Indicates the pointer to the current UI input event.
///
/// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
///
/// * `historyIndex` - Indicates the index of the target historical event.
///
/// # Returns
///
/// * Returns the Y coordinate relative to the upper left corner of the current application window;
/// returns <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryWindowY(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
historyIndex: u32,
) -> f32;
/// Obtains the X coordinate of a specific touch point in a historical event relative to the upper left corner
/// of the current screen from a directional input event (such as a touch event, mouse event, or axis event).
///
/// # Arguments
///
/// * `event` - Indicates the pointer to the current UI input event.
///
/// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
///
/// * `historyIndex` - Indicates the index of the target historical event.
///
/// # Returns
///
/// * Returns the X coordinate relative to the upper left corner of the current screen;
/// returns <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryDisplayX(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
historyIndex: u32,
) -> f32;
/// Obtains the Y coordinate of a specific touch point in a historical event relative to the upper left corner
/// of the current screen from a directional input event (such as a touch event, mouse event, or axis event).
///
/// # Arguments
///
/// * `event` - Indicates the pointer to the current UI input event.
///
/// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
///
/// * `historyIndex` - Indicates the index of the target historical event.
///
/// # Returns
///
/// * Returns the Y coordinate relative to the upper left corner of the current screen;
/// returns <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryDisplayY(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
historyIndex: u32,
) -> f32;
/// Obtains the X coordinate relative to the global display for a specific touch point from historical events,
/// based on the given pointer index and history index of an input event (such as a touch, mouse, or axis event).
/// Position information can only be obtained from UI input events. For mouse and axis events, if the provided
/// <b>pointerIndex</b> is greater than 0, this API always returns the default value <b>0.0f</b>.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// * `pointerIndex` - Index of the target touch point in the multi-touch data list.
/// Value range: [0, OH_ArkUI_PointerEvent_GetPointerCount() - 1]
///
/// * `historyIndex` - Index of the historical value to return. It must be less than
/// [`#OH_ArkUI_PointerEvent_GetHistorySize`].
///
/// # Returns
///
/// * float X coordinate relative to the global display; <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 20
#[cfg(feature = "api-20")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryGlobalDisplayX(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
historyIndex: u32,
) -> f32;
/// Obtains the Y coordinate relative to the global display for a specific touch point from historical events,
/// based on the given pointer index and history index of an input event (such as a touch, mouse, or axis event).
/// Position information can only be obtained from UI input events. For mouse and axis events, if the provided
/// <b>pointerIndex</b> is greater than 0, this API always returns the default value <b>0.0f</b>.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// * `pointerIndex` - Index of the target touch point in the multi-touch data list.
/// Value range: [0, OH_ArkUI_PointerEvent_GetPointerCount() - 1]
///
/// * `historyIndex` - Index of the historical value to return. It must be less than
/// [`#OH_ArkUI_PointerEvent_GetHistorySize`].
///
/// # Returns
///
/// * float Y coordinate relative to the global display; <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 20
#[cfg(feature = "api-20")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryGlobalDisplayY(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
historyIndex: u32,
) -> f32;
/// Obtains the pressure applied to the touchscreen in a specific historical event from a directional input event
/// (for example, a touch event)..
///
/// # Arguments
///
/// * `event` - Indicates the pointer to the current UI input event.
///
/// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
///
/// * `historyIndex` - Indicates the index of the target historical event.
///
/// # Returns
///
/// * Returns the pressure applied to the touchscreen; returns <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryPressure(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
historyIndex: u32,
) -> f32;
/// Obtains the angle relative to the YZ plane in a specific historical event from a directional input event
/// (for example, a touch event). The value range is [-90, 90]. A positive value indicates a rightward tilt.
///
/// # Arguments
///
/// * `event` - Indicates the pointer to the current UI input event.
///
/// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
///
/// * `historyIndex` - Indicates the index of the target historical event.
///
/// # Returns
///
/// * Returns the angle relative to the YZ plane.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryTiltX(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
historyIndex: u32,
) -> f32;
/// Obtains the angle relative to the XZ plane in a specific historical event from a directional input event
/// (for example, a touch event). The value range is [-90, 90]. A positive value indicates a downward tilt.
///
/// # Arguments
///
/// * `event` - Indicates the pointer to the current UI input event.
///
/// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
///
/// * `historyIndex` - Indicates the index of the target historical event.
///
/// # Returns
///
/// * Returns the angle relative to the XZ plane.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryTiltY(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
historyIndex: u32,
) -> f32;
/// Obtains the width of the touch area in a specific historical event from a directional input event
/// (for example, a touch event).
///
/// # Arguments
///
/// * `event` - Indicates the pointer to the current UI input event.
///
/// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
///
/// * `historyIndex` - Indicates the index of the target historical event.
///
/// # Returns
///
/// * Returns the width of the touch area.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryTouchAreaWidth(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
historyIndex: u32,
) -> f32;
/// Obtains the height of the touch area in a specific historical event from a directional input event
/// (for example, a touch event).
///
/// # Arguments
///
/// * `event` - Indicates the pointer to the current UI input event.
///
/// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
///
/// * `historyIndex` - Indicates the index of the target historical event.
///
/// # Returns
///
/// * Returns the height of the touch area.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_GetHistoryTouchAreaHeight(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
historyIndex: u32,
) -> f32;
/// Obtains the value of the vertical scroll axis for this axis event.
/// This value is typically generated by mouse wheel scrolling or two-finger vertical swiping on a touchpad.
///
/// If the value is generated by mouse wheel scrolling:
/// 1. The reported value is in degrees and represents the incremental angle of a single scroll,
/// not the total scroll amount.
/// 2. The reported value includes the user's scroll step configuration (see [`OH_ArkUI_AxisEvent_GetScrollStep`]).
/// 3. The sign of the value indicates the direction: positive for forward scrolling and negative for backward scrolling.
///
/// If the value is generated by two-finger vertical swiping on a touchpad:
/// 1. The reported value is in px and represents the incremental scroll amount, not the total scroll amount.
/// 2. The reported value does not include the user's scroll step configuration.
/// 3. The sign of the value indicates the direction: positive for swiping down and negative for swiping up.
/// 4. The direction is affected by the system settings for natural scrolling.
///
/// Under normal circumstances, vertical scroll axis events only drive vertical swipe gestures. However,
/// if the mouse pointer is over a scrollable area where the scrollable directions are consistent,
/// the vertical scroll axis event can drive the swipe gestures in this scrollable area, even if they are defined
/// as horizontal.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// # Returns
///
/// * Value of the vertical scroll axis of the current axis event; <b>0.0</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AxisEvent_GetVerticalAxisValue(event: *const ArkUI_UIInputEvent) -> f64;
/// Obtains the value of the horizontal scroll axis for this axis event.
/// This value is generated by two-finger horizontal swiping on a touchpad.
///
///
/// **Note:** 1. The reported value is in px and represents the incremental scroll amount, not the total scroll amount.
/// 2. The reported value does not include the user's scroll step configuration.
/// 3. The sign of the value indicates the direction: positive for swiping right and negative for swiping left.
/// 4. The direction is affected by the system settings for natural scrolling.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// # Returns
///
/// * Returns the value of the horizontal scroll axis of the current axis event;
/// returns <b>0</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AxisEvent_GetHorizontalAxisValue(event: *const ArkUI_UIInputEvent) -> f64;
/// This value is generated by a two-finger pinch gesture on a touchpad.
/// The reported scale value is relative to the initial state
///
/// when the system first detects the pinch gesture, with an initial scale value of 1.0.
/// During the pinch operation, the scale value decreases from 1.0 towards 0.0 when the user pinches inward
/// and increases from 1.0 when the user spreads fingers outward.
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// # Returns
///
/// * Scale value of the pinch axis of the current axis event; <b>0.0</b> if any parameter error occurs.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_AxisEvent_GetPinchAxisScaleValue(event: *const ArkUI_UIInputEvent) -> f64;
/// Obtains the action type of the current axis event.
///
/// # Arguments
///
/// * `event` - Indicates the pointer to the current UI input event.
///
/// # Returns
///
/// * Returns the action type of the current axis event.
///
/// Available since API-level: 15
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub fn OH_ArkUI_AxisEvent_GetAxisAction(event: *const ArkUI_UIInputEvent) -> i32;
/// Sets the hit testing mode, that is, how the component behaves during hit testing.
/// This API only applies to scenarios raw input events are received, such as when [`NODE_ON_TOUCH`] is used for
/// touch event handling.
/// It cannot be used with <b>ArkUI_UIInputEvent</b> objects obtained from gesture events through
/// [`OH_ArkUI_GestureEvent_GetRawInputEvent`].
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// * `mode` - Hit testing mode, of type [`HitTestMode`].
///
/// # Returns
///
/// * Result code.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_SetInterceptHitTestMode(
event: *const ArkUI_UIInputEvent,
mode: HitTestMode,
) -> i32;
/// Get the value of the button type for mouse events.
///
/// # Arguments
///
/// * `event` - Represents a pointer to the current UI input event.
///
/// # Returns
///
/// * Return to the mouse button type, where <b>1</b> is the left button, <b>2</b> is the right button,
/// <b>3</b> is the middle button, <b>4</b> is the back button, and <b>5</b> is the forward button.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_MouseEvent_GetMouseButton(event: *const ArkUI_UIInputEvent) -> i32;
/// Get the value of the mouse action type for mouse events.
///
/// # Arguments
///
/// * `event` - Represents a pointer to the current UI input event.
///
/// # Returns
///
/// * Returns the type of mouse action, where <b>1</b> represents button pressed,
/// <b>2</b> represents button released, and <b>3</b> represents mouse movement.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_MouseEvent_GetMouseAction(event: *const ArkUI_UIInputEvent) -> i32;
/// Sets whether to stop event propagation. This API only applies to scenarios raw input events are received,
/// such as when [`NODE_ON_TOUCH`] is used for touch event handling.
/// It cannot be used with <b>ArkUI_UIInputEvent</b> objects obtained from gesture events
/// through [`OH_ArkUI_GestureEvent_GetRawInputEvent`].
///
/// # Arguments
///
/// * `event` - Pointer to the current UI input event.
///
/// * `stopPropagation` - Whether to stop event propagation.
///
/// # Returns
///
/// * Returns the status code of the execution. If 0 is returned, the setting is successful.
/// If 401 is returned, the execution fails.
/// The possible cause of the failure is that the event parameter is abnormal, such as a null pointer.
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_ArkUI_PointerEvent_SetStopPropagation(
event: *const ArkUI_UIInputEvent,
stopPropagation: bool,
) -> i32;
/// Obtains the ID of device that triggers UI input event.
///
/// # Arguments
///
/// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
///
/// # Returns
///
/// * Returns the device ID.
///
/// Available since API-level: 14
#[cfg(feature = "api-14")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
pub fn OH_ArkUI_UIInputEvent_GetDeviceId(event: *const ArkUI_UIInputEvent) -> i32;
/// Obtains all keys that are pressed from UI input event. Only supports key events currently.
///
/// # Arguments
///
/// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
///
/// * `pressedKeyCodes` - Array of all keys that are pressed. You need to allocate the memory space.
///
/// * `length` - Length of the passed pressedKeyCodes array (when used as an input parameter);
/// number of the keys pressed (when used as an output parameter).
///
/// # Returns
///
/// * Returns the result code.
/// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
/// Returns [`ARKUI_ERROR_CODE_BUFFER_SIZE_NOT_ENOUGH`] if the giving buffer is not enough.
/// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
///
/// Available since API-level: 14
#[cfg(feature = "api-14")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
pub fn OH_ArkUI_UIInputEvent_GetPressedKeys(
event: *const ArkUI_UIInputEvent,
pressedKeyCodes: *mut i32,
length: *mut i32,
) -> i32;
/// Obtains the axis value of a focus axis event.
///
/// # Arguments
///
/// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
///
/// * `axis` - Axis type of the focus axis event.
///
/// # Returns
///
/// * Returns the axis value of the focus axis event; returns <b>0.0</b> if any parameter error occurs.
///
/// Available since API-level: 15
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub fn OH_ArkUI_FocusAxisEvent_GetAxisValue(event: *const ArkUI_UIInputEvent, axis: i32)
-> f64;
/// Sets whether to prevent a focus axis event from bubbling up.
///
/// # Arguments
///
/// * `event` - Indicates the pointer to the current UI input event.
///
/// * `stopPropagation` - Indicates whether to stop event propagation.
///
/// # 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: 15
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub fn OH_ArkUI_FocusAxisEvent_SetStopPropagation(
event: *const ArkUI_UIInputEvent,
stopPropagation: bool,
) -> i32;
/// Obtains the width of the component hit by an event.
///
/// # Arguments
///
/// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
///
/// # Returns
///
/// * Returns the width of the component hit by the event; returns <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 17
#[cfg(feature = "api-17")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
pub fn OH_ArkUI_UIInputEvent_GetEventTargetWidth(event: *const ArkUI_UIInputEvent) -> f32;
/// Obtains the height of the component hit by an event.
///
/// # Arguments
///
/// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
///
/// # Returns
///
/// * Returns the height of the component hit by the event; returns <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 17
#[cfg(feature = "api-17")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
pub fn OH_ArkUI_UIInputEvent_GetEventTargetHeight(event: *const ArkUI_UIInputEvent) -> f32;
/// Obtains the X coordinate of the component hit by an event.
///
/// # Arguments
///
/// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
///
/// # Returns
///
/// * Returns the X coordinate of the component hit by the event; returns <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 17
#[cfg(feature = "api-17")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
pub fn OH_ArkUI_UIInputEvent_GetEventTargetPositionX(event: *const ArkUI_UIInputEvent) -> f32;
/// Obtains the Y coordinate of the component hit by an event.
///
/// # Arguments
///
/// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
///
/// # Returns
///
/// * Returns the Y coordinate of the component hit by the event;
/// returns <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 17
#[cfg(feature = "api-17")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
pub fn OH_ArkUI_UIInputEvent_GetEventTargetPositionY(event: *const ArkUI_UIInputEvent) -> f32;
/// Obtains the global X coordinate of the component hit by an event.
///
/// # Arguments
///
/// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
///
/// # Returns
///
/// * Returns the global X coordinate of the component hit by the event;
/// returns <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 17
#[cfg(feature = "api-17")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
pub fn OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionX(
event: *const ArkUI_UIInputEvent,
) -> f32;
/// Obtains the global Y coordinate of the component hit by an event.
///
/// # Arguments
///
/// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
///
/// # Returns
///
/// * Returns the global Y coordinate of the component hit by the event;
/// returns <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 17
#[cfg(feature = "api-17")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
pub fn OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionY(
event: *const ArkUI_UIInputEvent,
) -> f32;
/// Checks whether the cursor is hovering over this component.
///
/// # Arguments
///
/// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
///
/// # Returns
///
/// * Returns <b>true</b> if the cursor is hovering over the current component.
/// Returns <b>false</b> if the cursor is not hovering over the current component.
///
/// Available since API-level: 17
#[cfg(feature = "api-17")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
pub fn OH_ArkUI_HoverEvent_IsHovered(event: *const ArkUI_UIInputEvent) -> bool;
/// Obtains the modifier key states for a UI input event.
/// This API outputs the state of all modifier keys at the time of the event through the <b>keys</b> parameter.
/// You can determine which keys are pressed by performing bitwise operations with the modifier key types defined
/// in [`ArkUI_ModifierKeyName`].
///
/// # Arguments
///
/// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
///
/// * `keys` - Pointer to a variable where the current combination of pressed modifier keys will be returned.
/// The application can use bitwise operations to determine the state of each modifier key.
///
/// # Returns
///
/// * Result code.
/// [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
/// [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
///
/// Available since API-level: 17
#[cfg(feature = "api-17")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
pub fn OH_ArkUI_UIInputEvent_GetModifierKeyStates(
event: *const ArkUI_UIInputEvent,
keys: *mut u64,
) -> i32;
/// Obtains the press time of a specified touch point. This API is effective only for touch events.
///
/// # Arguments
///
/// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
///
/// * `pointerIndex` - Index of the target touch point in the multi-touch data list.
///
/// # Returns
///
/// * Returns the press time of the specific touch point; returns <b>0</b> if any parameter error occurs.
///
/// Available since API-level: 15
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub fn OH_ArkUI_PointerEvent_GetPressedTimeByIndex(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
) -> i64;
/// Obtains the x-axis offset of the mouse pointer position relative to the position in the previously reported
/// mouse event. This value may be less than the difference between the two reported X coordinates when the mouse pointer
/// is near the screen edge.
/// # Arguments
///
/// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
///
/// # Returns
///
/// * Returns the x-axis offset of the mouse pointer position relative to the position in the previously reported
/// mouse event; returns <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 15
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub fn OH_ArkUI_MouseEvent_GetRawDeltaX(event: *const ArkUI_UIInputEvent) -> f32;
/// Obtains the y-axis offset of the mouse pointer position relative to the position in the previously reported
/// mouse event. This value may be less than the difference between the two reported Y coordinates when the mouse pointer
/// is near the screen edge.
/// # Arguments
///
/// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
///
/// # Returns
///
/// * Returns the y-axis offset of the mouse pointer position relative to the position in the previously reported
/// mouse event; returns <b>0.0f</b> if any parameter error occurs.
///
/// Available since API-level: 15
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub fn OH_ArkUI_MouseEvent_GetRawDeltaY(event: *const ArkUI_UIInputEvent) -> f32;
/// Obtains the pressed buttons from a mouse event.
///
/// # Arguments
///
/// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
///
/// * `pressedButtons` - Array of the pressed buttons. An int array must be created beforehand to store the pressed
/// buttons.
///
/// * `length` - Length of the passed pressedButtons array (when used as an input parameter);
/// number of the buttons pressed (when used as an output parameter).
///
/// # Returns
///
/// * Returns the result code.
/// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
/// Returns [`ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR`] if the given buffer size is insufficient.
///
/// Available since API-level: 15
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub fn OH_ArkUI_MouseEvent_GetPressedButtons(
event: *const ArkUI_UIInputEvent,
pressedButtons: *mut i32,
length: *mut i32,
) -> i32;
/// Obtains the ID of the screen where the UI input event occurs.
///
/// # Arguments
///
/// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
///
/// # Returns
///
/// * Returns the screen ID; returns <b>0</b> if any parameter error occurs.
///
/// Available since API-level: 15
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub fn OH_ArkUI_UIInputEvent_GetTargetDisplayId(event: *const ArkUI_UIInputEvent) -> i32;
/// Sets whether to enable axis event propagation (bubbling). By default, axis events do not bubble and are
/// only sent to the first component that can respond to axis events. You can enable axis event bubbling
/// to allow the current event to be passed to the next ancestor component in the response chain
/// that can handle axis events.
/// This API cannot be used on axis events obtained from gesture events.
///
/// # Arguments
///
/// * `event` - Pointer to the UI input event.
///
/// * `propagation` - Whether to enable event propagation.
///
/// # Returns
///
/// * Result code.
/// [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
/// [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
///
/// Available since API-level: 17
#[cfg(feature = "api-17")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
pub fn OH_ArkUI_AxisEvent_SetPropagation(
event: *const ArkUI_UIInputEvent,
propagation: bool,
) -> i32;
/// Obtains the scroll step coefficient for a wheel-based axis event.
/// This API returns the user-configured scroll scale factor factor.
///
/// # Arguments
///
/// * `event` - Pointer to the UI input event.
///
/// # Returns
///
/// * Scroll step configuration of the mouse wheel axis event.
///
/// Available since API-level: 17
#[cfg(feature = "api-17")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
pub fn OH_ArkUI_AxisEvent_GetScrollStep(event: *const ArkUI_UIInputEvent) -> i32;
/// Creates a cloned event pointer based on an event pointer. This API is effective only for touch events.
///
/// # Arguments
///
/// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
///
/// * `clonedEvent` - Pointer to the cloned <b>ArkUI_UIInputEvent</b> object.
///
/// # Returns
///
/// * Result code.
/// [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
/// [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
///
/// Available since API-level: 15
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub fn OH_ArkUI_PointerEvent_CreateClonedEvent(
event: *const ArkUI_UIInputEvent,
clonedEvent: *mut *mut ArkUI_UIInputEvent,
) -> i32;
/// Destroys a cloned event pointer.
///
/// # Arguments
///
/// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
///
/// # 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.
/// Returns [`ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT`] if the input event pointer is not a
/// cloned event pointer.
///
/// Available since API-level: 15
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub fn OH_ArkUI_PointerEvent_DestroyClonedEvent(event: *const ArkUI_UIInputEvent) -> i32;
/// Sets the X and Y coordinates of a cloned event relative to the upper left corner of the current component.
///
/// # Arguments
///
/// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
///
/// * `x` - X coordinate of the event relative to the upper left corner of the current component.
///
/// * `y` - Y coordinate of the event relative to the upper left corner of the current component.
///
/// # 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.
/// Returns [`ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT`] if the input event pointer is not a
/// cloned event pointer.
///
/// Available since API-level: 15
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub fn OH_ArkUI_PointerEvent_SetClonedEventLocalPosition(
event: *const ArkUI_UIInputEvent,
x: f32,
y: f32,
) -> i32;
/// Sets the X and Y coordinates of a specific contact point of a cloned event relative to the upper left corner
/// of the current component.
///
/// # Arguments
///
/// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
///
/// * `x` - X coordinate of the event relative to the upper left corner of the current component.
///
/// * `y` - Y coordinate of the event relative to the upper left corner of the current component.
///
/// * `pointerIndex` - Index of the target touch point in the multi-touch data list.
///
/// # 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.
/// Returns [`ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT`] if the input event pointer is not a
/// cloned event pointer.
///
/// Available since API-level: 15
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub fn OH_ArkUI_PointerEvent_SetClonedEventLocalPositionByIndex(
event: *const ArkUI_UIInputEvent,
x: f32,
y: f32,
pointerIndex: i32,
) -> i32;
/// Sets the action type of a cloned event.
///
/// # Arguments
///
/// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
///
/// * `actionType` - Action type of the cloned event.
///
/// # 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.
/// Returns [`ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT`] if the input event pointer is not a
/// cloned event pointer.
///
/// Available since API-level: 15
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub fn OH_ArkUI_PointerEvent_SetClonedEventActionType(
event: *const ArkUI_UIInputEvent,
actionType: i32,
) -> i32;
/// Sets the touch point ID of a cloned pointer event.
///
/// # Arguments
///
/// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
///
/// * `fingerId` - ID of the touch point that triggers the event.
///
/// # 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.
/// Returns [`ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT`] if the input event pointer is not a
/// cloned event pointer.
///
/// Available since API-level: 15
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub fn OH_ArkUI_PointerEvent_SetClonedEventChangedFingerId(
event: *const ArkUI_UIInputEvent,
fingerId: i32,
) -> i32;
/// Sets the touch point ID of a specific contact point of a cloned event.
///
/// # Arguments
///
/// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
///
/// * `fingerId` - Touch point ID of the specific contact point.
///
/// * `pointerIndex` - Index of the target touch point in the multi-touch data list.
///
/// # 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.
/// Returns [`ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT`] if the input event pointer is not a
/// cloned event pointer.
///
/// Available since API-level: 15
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub fn OH_ArkUI_PointerEvent_SetClonedEventFingerIdByIndex(
event: *const ArkUI_UIInputEvent,
fingerId: i32,
pointerIndex: i32,
) -> i32;
/// Posts a cloned event to a specific node.
///
/// # Arguments
///
/// * `node` - Target node.
///
/// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
///
/// # 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.
/// Returns [`ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT`] if the input event pointer is not a
/// cloned event pointer.
/// Returns [`ARKUI_ERROR_CODE_POST_CLONED_COMPONENT_STATUS_ABNORMAL`]
/// if the component status abnormal.
/// Returns [`ARKUI_ERROR_CODE_POST_CLONED_NO_COMPONENT_HIT_TO_RESPOND_TO_THE_EVENT`]
/// if no component hit to response to the event.
///
/// Available since API-level: 15
#[cfg(feature = "api-15")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
pub fn OH_ArkUI_PointerEvent_PostClonedEvent(
node: ArkUI_NodeHandle,
event: *const ArkUI_UIInputEvent,
) -> i32;
/// Use this method to obtain the execution status of the latest UI input related method.
///
/// In most cases, this method is unnecessary unless you need to determine if the return value indicates an error.
/// Here's an example of usage: For return values like float (where 0.0 doesn't indicate an error), use GetLatestStatus
/// to confirm if an error occurred.
/// float x = OH_ArkUI_PointerEvent_GetX(event);
/// if (ARKUI_ERROR_CODE_NO_ERROR != OH_ArkUI_UIInputEvent_GetLatestStatus()) {
/// // error
/// return;
/// }
/// Note: The system clears the status of the previous function call each time a UIInput-related function is executed,
/// ensuring you always get the latest status.
///
///
/// # Returns
///
/// * Returns the ArkUI_ErrorCode.
///
/// Available since API-level: 20
#[cfg(feature = "api-20")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
pub fn OH_ArkUI_UIInputEvent_GetLatestStatus() -> ArkUiResult;
}