arkui_sys/ui_input_event/
ui_input_event_ffi.rs

1// automatically generated by rust-bindgen 0.71.1
2
3#![allow(non_upper_case_globals)]
4#![allow(non_camel_case_types)]
5#![allow(non_snake_case)]
6use crate::native_type::*;
7
8#[repr(C)]
9pub struct ArkUI_UIInputEvent {
10    _unused: [u8; 0],
11}
12#[cfg(feature = "api-12")]
13#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
14impl ArkUI_UIInputEvent_Type {
15    pub const ARKUI_UIINPUTEVENT_TYPE_UNKNOWN: ArkUI_UIInputEvent_Type = ArkUI_UIInputEvent_Type(0);
16}
17#[cfg(feature = "api-12")]
18#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
19impl ArkUI_UIInputEvent_Type {
20    pub const ARKUI_UIINPUTEVENT_TYPE_TOUCH: ArkUI_UIInputEvent_Type = ArkUI_UIInputEvent_Type(1);
21}
22#[cfg(feature = "api-12")]
23#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
24impl ArkUI_UIInputEvent_Type {
25    pub const ARKUI_UIINPUTEVENT_TYPE_AXIS: ArkUI_UIInputEvent_Type = ArkUI_UIInputEvent_Type(2);
26}
27#[cfg(feature = "api-12")]
28#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
29impl ArkUI_UIInputEvent_Type {
30    /// Mouse event.
31    pub const ARKUI_UIINPUTEVENT_TYPE_MOUSE: ArkUI_UIInputEvent_Type = ArkUI_UIInputEvent_Type(3);
32}
33#[repr(transparent)]
34/// Enumerates the UI input event types.
35///
36///
37/// Available since API-level: 12
38#[cfg(feature = "api-12")]
39#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
40#[derive(Clone, Hash, PartialEq, Eq)]
41pub struct ArkUI_UIInputEvent_Type(pub ::core::ffi::c_uint);
42#[cfg(feature = "api-12")]
43#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
44impl HitTestMode {
45    /// Both the node and its child node respond to the hit test of a touch event, but its sibling node is blocked from
46    /// the hit test.
47    pub const HTM_DEFAULT: HitTestMode = HitTestMode(0);
48}
49#[cfg(feature = "api-12")]
50#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
51impl HitTestMode {
52    /// The node responds to the hit test of a touch event, but its child node and sibling node are blocked from the hit
53    /// test.
54    pub const HTM_BLOCK: HitTestMode = HitTestMode(1);
55}
56#[cfg(feature = "api-12")]
57#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
58impl HitTestMode {
59    /// Both the node and its child node respond to the hit test of a touch event, and its sibling node is also
60    /// considered during the hit test.
61    pub const HTM_TRANSPARENT: HitTestMode = HitTestMode(2);
62}
63#[cfg(feature = "api-12")]
64#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
65impl HitTestMode {
66    /// The node does not respond to the hit test of a touch event, but its child node and sibling node are considered
67    /// during the hit test.
68    pub const HTM_NONE: HitTestMode = HitTestMode(3);
69}
70#[repr(transparent)]
71/// Enumerates the hit test modes.
72///
73///
74/// Available since API-level: 12
75#[cfg(feature = "api-12")]
76#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
77#[derive(Clone, Hash, PartialEq, Eq)]
78pub struct HitTestMode(pub ::core::ffi::c_uint);
79#[cfg(feature = "api-12")]
80#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
81impl ArkUI_ModifierKeyName {
82    /// Ctrl.
83    pub const ARKUI_MODIFIER_KEY_CTRL: ArkUI_ModifierKeyName = ArkUI_ModifierKeyName(1);
84}
85#[cfg(feature = "api-12")]
86#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
87impl ArkUI_ModifierKeyName {
88    /// Shift.
89    pub const ARKUI_MODIFIER_KEY_SHIFT: ArkUI_ModifierKeyName = ArkUI_ModifierKeyName(2);
90}
91#[cfg(feature = "api-12")]
92#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
93impl ArkUI_ModifierKeyName {
94    /// Alt.
95    pub const ARKUI_MODIFIER_KEY_ALT: ArkUI_ModifierKeyName = ArkUI_ModifierKeyName(4);
96}
97#[cfg(feature = "api-12")]
98#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
99impl ArkUI_ModifierKeyName {
100    /// Fn.
101    pub const ARKUI_MODIFIER_KEY_FN: ArkUI_ModifierKeyName = ArkUI_ModifierKeyName(8);
102}
103#[cfg(feature = "api-12")]
104#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
105impl ::core::ops::BitOr<ArkUI_ModifierKeyName> for ArkUI_ModifierKeyName {
106    type Output = Self;
107    #[inline]
108    fn bitor(self, other: Self) -> Self {
109        ArkUI_ModifierKeyName(self.0 | other.0)
110    }
111}
112#[cfg(feature = "api-12")]
113#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
114impl ::core::ops::BitOrAssign for ArkUI_ModifierKeyName {
115    #[inline]
116    fn bitor_assign(&mut self, rhs: ArkUI_ModifierKeyName) {
117        self.0 |= rhs.0;
118    }
119}
120#[cfg(feature = "api-12")]
121#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
122impl ::core::ops::BitAnd<ArkUI_ModifierKeyName> for ArkUI_ModifierKeyName {
123    type Output = Self;
124    #[inline]
125    fn bitand(self, other: Self) -> Self {
126        ArkUI_ModifierKeyName(self.0 & other.0)
127    }
128}
129#[cfg(feature = "api-12")]
130#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
131impl ::core::ops::BitAndAssign for ArkUI_ModifierKeyName {
132    #[inline]
133    fn bitand_assign(&mut self, rhs: ArkUI_ModifierKeyName) {
134        self.0 &= rhs.0;
135    }
136}
137#[repr(transparent)]
138/// Defines an enum for modifier keys.
139///
140///
141/// Available since API-level: 12
142#[cfg(feature = "api-12")]
143#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
144#[derive(Clone, Hash, PartialEq, Eq)]
145pub struct ArkUI_ModifierKeyName(pub ::core::ffi::c_uint);
146extern "C" {
147    /// Obtains the type of this UI input event.
148    ///
149    /// # Arguments
150    ///
151    /// * `event` - Indicates the pointer to the current UI input event.
152    ///
153    /// # Returns
154    ///
155    /// * Returns the type of the current UI input event; returns <b>0</b> if any parameter error occurs.
156    ///
157    /// Available since API-level: 12
158    #[cfg(feature = "api-12")]
159    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
160    pub fn OH_ArkUI_UIInputEvent_GetType(event: *const ArkUI_UIInputEvent) -> i32;
161    /// Obtains the action type of this UI input event.
162    ///
163    /// # Arguments
164    ///
165    /// * `event` - Indicates the pointer to the current UI input event.
166    ///
167    /// # Returns
168    ///
169    /// * Returns the action type of the current UI input event; returns <b>0</b> if any parameter error occurs.
170    ///
171    /// Available since API-level: 12
172    #[cfg(feature = "api-12")]
173    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
174    pub fn OH_ArkUI_UIInputEvent_GetAction(event: *const ArkUI_UIInputEvent) -> i32;
175    /// Obtains the source type of this UI input event.
176    ///
177    /// # Arguments
178    ///
179    /// * `event` - Indicates the pointer to the current UI input event.
180    ///
181    /// # Returns
182    ///
183    /// * Returns the source type of the current UI input event.
184    ///
185    /// Available since API-level: 12
186    #[cfg(feature = "api-12")]
187    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
188    pub fn OH_ArkUI_UIInputEvent_GetSourceType(event: *const ArkUI_UIInputEvent) -> i32;
189    /// Obtains the tool type of this UI input event.
190    ///
191    /// # Arguments
192    ///
193    /// * `event` - Indicates the pointer to the current UI input event.
194    ///
195    /// # Returns
196    ///
197    /// * Returns the tool type of the current UI input event.
198    ///
199    /// Available since API-level: 12
200    #[cfg(feature = "api-12")]
201    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
202    pub fn OH_ArkUI_UIInputEvent_GetToolType(event: *const ArkUI_UIInputEvent) -> i32;
203    /// Obtains the time when this UI input event occurs.
204    ///
205    /// # Arguments
206    ///
207    /// * `event` - Indicates the pointer to the current UI input event.
208    ///
209    /// # Returns
210    ///
211    /// * Returns the time when the UI input event occurs; returns <b>0</b> if any parameter error occurs.
212    ///
213    /// Available since API-level: 12
214    #[cfg(feature = "api-12")]
215    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
216    pub fn OH_ArkUI_UIInputEvent_GetEventTime(event: *const ArkUI_UIInputEvent) -> i64;
217    /// Obtains the number of touch points from a directional input event (such as a touch event, mouse event,
218    /// or axis event).
219    ///
220    /// # Arguments
221    ///
222    /// * `event` - Indicates the pointer to the current UI input event.
223    ///
224    /// # Returns
225    ///
226    /// * Returns the number of touch points for the directional input event.
227    ///
228    /// Available since API-level: 12
229    #[cfg(feature = "api-12")]
230    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
231    pub fn OH_ArkUI_PointerEvent_GetPointerCount(event: *const ArkUI_UIInputEvent) -> u32;
232    /// Obtains the ID of a touch point from a directional input event (such as a touch event, mouse event,
233    /// or axis event).
234    ///
235    /// # Arguments
236    ///
237    /// * `event` - Indicates the pointer to the current UI input event.
238    ///
239    /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
240    ///
241    /// # Returns
242    ///
243    /// * Returns the ID of the corresponding touch point.
244    ///
245    /// Available since API-level: 12
246    #[cfg(feature = "api-12")]
247    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
248    pub fn OH_ArkUI_PointerEvent_GetPointerId(
249        event: *const ArkUI_UIInputEvent,
250        pointerIndex: u32,
251    ) -> i32;
252    /// Obtains the X coordinate relative to the upper left corner of the current component from a directional
253    /// input event (such as a touch event, mouse event, or axis event).
254    ///
255    /// # Arguments
256    ///
257    /// * `event` - Indicates the pointer to the directional input event.
258    ///
259    /// # Returns
260    ///
261    /// * Returns the X coordinate relative to the upper left corner of the current component;
262    /// returns <b>0</b> if any parameter error occurs.
263    ///
264    /// Available since API-level: 12
265    #[cfg(feature = "api-12")]
266    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
267    pub fn OH_ArkUI_PointerEvent_GetX(event: *const ArkUI_UIInputEvent) -> f32;
268    /// Obtains the X coordinate of a specific touch point relative to the upper left corner of the current component
269    /// from a directional input event (such as a touch event, mouse event, or axis event).
270    ///
271    /// # Arguments
272    ///
273    /// * `event` - Indicates the pointer to the current UI input event.
274    ///
275    /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
276    ///
277    /// # Returns
278    ///
279    /// * Returns the X coordinate relative to the upper left corner of the current component;
280    /// returns <b>0.0f</b> if any parameter error occurs.
281    ///
282    /// Available since API-level: 12
283    #[cfg(feature = "api-12")]
284    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
285    pub fn OH_ArkUI_PointerEvent_GetXByIndex(
286        event: *const ArkUI_UIInputEvent,
287        pointerIndex: u32,
288    ) -> f32;
289    /// Obtains the Y coordinate relative to the upper left corner of the current component from a directional
290    /// input event (such as a touch event, mouse event, or axis event).
291    ///
292    /// # Arguments
293    ///
294    /// * `event` - Indicates the pointer to the UI input event.
295    ///
296    /// # Returns
297    ///
298    /// * Returns the Y coordinate relative to the upper left corner of the current component;
299    /// returns <b>0</b> if any parameter error occurs.
300    ///
301    /// Available since API-level: 12
302    #[cfg(feature = "api-12")]
303    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
304    pub fn OH_ArkUI_PointerEvent_GetY(event: *const ArkUI_UIInputEvent) -> f32;
305    /// Obtains the Y coordinate of a specific touch point relative to the upper left corner of the current component
306    /// from a directional input event (such as a touch event, mouse event, or axis event).
307    ///
308    /// # Arguments
309    ///
310    /// * `event` - Indicates the pointer to the current UI input event.
311    ///
312    /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
313    ///
314    /// # Returns
315    ///
316    /// * Returns the Y coordinate relative to the upper left corner of the current component;
317    /// returns <b>0.0f</b> if any parameter error occurs.
318    ///
319    /// Available since API-level: 12
320    #[cfg(feature = "api-12")]
321    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
322    pub fn OH_ArkUI_PointerEvent_GetYByIndex(
323        event: *const ArkUI_UIInputEvent,
324        pointerIndex: u32,
325    ) -> f32;
326    /// Obtains the X coordinate relative to the upper left corner of the current application window from a
327    /// directional input event (such as a touch event, mouse event, or axis event).
328    ///
329    /// # Arguments
330    ///
331    /// * `event` - Indicates the pointer to the UI input event.
332    ///
333    /// # Returns
334    ///
335    /// * Returns the X coordinate relative to the upper left corner of the current application window;
336    /// returns <b>0</b> if any parameter error occurs.
337    ///
338    /// Available since API-level: 12
339    #[cfg(feature = "api-12")]
340    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
341    pub fn OH_ArkUI_PointerEvent_GetWindowX(event: *const ArkUI_UIInputEvent) -> f32;
342    /// Obtains the X coordinate of a specific touch point relative to the upper left corner of the current
343    /// application window from a directional input event (such as a touch event, mouse event, or axis event).
344    ///
345    /// # Arguments
346    ///
347    /// * `event` - Indicates the pointer to the current UI input event.
348    ///
349    /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
350    ///
351    /// # Returns
352    ///
353    /// * Returns the X coordinate relative to the upper left corner of the current application window;
354    /// returns <b>0.0f</b> if any parameter error occurs.
355    ///
356    /// Available since API-level: 12
357    #[cfg(feature = "api-12")]
358    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
359    pub fn OH_ArkUI_PointerEvent_GetWindowXByIndex(
360        event: *const ArkUI_UIInputEvent,
361        pointerIndex: u32,
362    ) -> f32;
363    /// Obtains the Y coordinate relative to the upper left corner of the current application window from a
364    /// directional input event (such as a touch event, mouse event, or axis event).
365    ///
366    /// # Arguments
367    ///
368    /// * `event` - Indicates the pointer to the UI input event.
369    ///
370    /// # Returns
371    ///
372    /// * Returns the Y coordinate relative to the upper left corner of the current application window;
373    /// returns <b>0</b> if any parameter error occurs.
374    ///
375    /// Available since API-level: 12
376    #[cfg(feature = "api-12")]
377    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
378    pub fn OH_ArkUI_PointerEvent_GetWindowY(event: *const ArkUI_UIInputEvent) -> f32;
379    /// Obtains the Y coordinate of a specific touch point relative to the upper left corner of the current
380    /// application window from a directional input event (such as a touch event, mouse event, or axis event).
381    ///
382    /// # Arguments
383    ///
384    /// * `event` - Indicates the pointer to the current UI input event.
385    ///
386    /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
387    ///
388    /// # Returns
389    ///
390    /// * Returns the Y coordinate relative to the upper left corner of the current application window;
391    /// returns <b>0.0f</b> if any parameter error occurs.
392    ///
393    /// Available since API-level: 12
394    #[cfg(feature = "api-12")]
395    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
396    pub fn OH_ArkUI_PointerEvent_GetWindowYByIndex(
397        event: *const ArkUI_UIInputEvent,
398        pointerIndex: u32,
399    ) -> f32;
400    /// Obtains the X coordinate relative to the upper left corner of the current screen from a directional input
401    /// event (such as a touch event, mouse event, or axis event).
402    ///
403    /// # Arguments
404    ///
405    /// * `event` - Indicates the pointer to the UI input event.
406    ///
407    /// # Returns
408    ///
409    /// * Returns the X coordinate relative to the upper left corner of the current screen;
410    /// returns <b>0</b> if any parameter error occurs.
411    ///
412    /// Available since API-level: 12
413    #[cfg(feature = "api-12")]
414    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
415    pub fn OH_ArkUI_PointerEvent_GetDisplayX(event: *const ArkUI_UIInputEvent) -> f32;
416    /// Obtains the X coordinate of a specific touch point relative to the upper left corner of the current screen
417    /// from a directional input event (such as a touch event, mouse event, or axis event).
418    ///
419    /// # Arguments
420    ///
421    /// * `event` - Indicates the pointer to the current UI input event.
422    ///
423    /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
424    ///
425    /// # Returns
426    ///
427    /// * Returns the X coordinate relative to the upper left corner of the current screen;
428    /// returns <b>0.0f</b> if any parameter error occurs.
429    ///
430    /// Available since API-level: 12
431    #[cfg(feature = "api-12")]
432    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
433    pub fn OH_ArkUI_PointerEvent_GetDisplayXByIndex(
434        event: *const ArkUI_UIInputEvent,
435        pointerIndex: u32,
436    ) -> f32;
437    /// Obtains the Y coordinate relative to the upper left corner of the current screen from a directional input
438    /// event (such as a touch event, mouse event, or axis event).
439    ///
440    /// # Arguments
441    ///
442    /// * `event` - Indicates the pointer to the UI input event.
443    ///
444    /// # Returns
445    ///
446    /// * Returns the Y coordinate relative to the upper left corner of the current screen;
447    /// returns <b>0</b> if any parameter error occurs.
448    ///
449    /// Available since API-level: 12
450    #[cfg(feature = "api-12")]
451    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
452    pub fn OH_ArkUI_PointerEvent_GetDisplayY(event: *const ArkUI_UIInputEvent) -> f32;
453    /// Obtains the Y coordinate of a specific touch point relative to the upper left corner of the current screen
454    /// from a directional input event (such as a touch event, mouse event, or axis event).
455    ///
456    /// # Arguments
457    ///
458    /// * `event` - Indicates the pointer to the current UI input event.
459    ///
460    /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
461    ///
462    /// # Returns
463    ///
464    /// * Returns the Y coordinate relative to the upper left corner of the current screen;
465    /// returns <b>0.0f</b> if any parameter error occurs.
466    ///
467    /// Available since API-level: 12
468    #[cfg(feature = "api-12")]
469    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
470    pub fn OH_ArkUI_PointerEvent_GetDisplayYByIndex(
471        event: *const ArkUI_UIInputEvent,
472        pointerIndex: u32,
473    ) -> f32;
474    /// Obtains the pressure applied to the touchscreen from a directional input event (for example, a touch event).
475    ///
476    /// # Arguments
477    ///
478    /// * `event` - Indicates the pointer to the current UI input event.
479    ///
480    /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
481    ///
482    /// # Returns
483    ///
484    /// * Returns the pressure applied to the touchscreen; returns <b>0.0f</b> if any parameter error occurs.
485    ///
486    /// Available since API-level: 12
487    #[cfg(feature = "api-12")]
488    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
489    pub fn OH_ArkUI_PointerEvent_GetPressure(
490        event: *const ArkUI_UIInputEvent,
491        pointerIndex: u32,
492    ) -> f32;
493    /// Obtains the angle relative to the YZ plane from a directional input event (for example, a touch event).
494    /// The value range is [-90, 90]. A positive value indicates a rightward tilt.
495    ///
496    /// # Arguments
497    ///
498    /// * `event` - Indicates the pointer to the current UI input event.
499    ///
500    /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
501    ///
502    /// # Returns
503    ///
504    /// * Returns the angle relative to the YZ plane.
505    ///
506    /// Available since API-level: 12
507    #[cfg(feature = "api-12")]
508    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
509    pub fn OH_ArkUI_PointerEvent_GetTiltX(
510        event: *const ArkUI_UIInputEvent,
511        pointerIndex: u32,
512    ) -> f32;
513    /// Obtains the angle relative to the XZ plane from a directional input event (for example, a touch event).
514    /// The value range is [-90, 90]. A positive value indicates a downward tilt.
515    ///
516    /// # Arguments
517    ///
518    /// * `event` - Indicates the pointer to the current UI input event.
519    ///
520    /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
521    ///
522    /// # Returns
523    ///
524    /// * Returns the angle relative to the XZ plane.
525    ///
526    /// Available since API-level: 12
527    #[cfg(feature = "api-12")]
528    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
529    pub fn OH_ArkUI_PointerEvent_GetTiltY(
530        event: *const ArkUI_UIInputEvent,
531        pointerIndex: u32,
532    ) -> f32;
533    /// Obtains the width of the touch area from a directional input event (for example, a touch event).
534    ///
535    /// # Arguments
536    ///
537    /// * `event` - Indicates the pointer to the current UI input event.
538    ///
539    /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
540    ///
541    /// # Returns
542    ///
543    /// * Returns the width of the touch area.
544    ///
545    /// Available since API-level: 12
546    #[cfg(feature = "api-12")]
547    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
548    pub fn OH_ArkUI_PointerEvent_GetTouchAreaWidth(
549        event: *const ArkUI_UIInputEvent,
550        pointerIndex: u32,
551    ) -> f32;
552    /// Obtains the height of the touch area from a directional input event (for example, a touch event).
553    ///
554    /// # Arguments
555    ///
556    /// * `event` - Indicates the pointer to the current UI input event.
557    ///
558    /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
559    ///
560    /// # Returns
561    ///
562    /// * Returns the height of the touch area.
563    ///
564    /// Available since API-level: 12
565    #[cfg(feature = "api-12")]
566    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
567    pub fn OH_ArkUI_PointerEvent_GetTouchAreaHeight(
568        event: *const ArkUI_UIInputEvent,
569        pointerIndex: u32,
570    ) -> f32;
571    /// Obtains the number of historical events from a directional input event (such as a touch event, mouse event,
572    /// or axis event).
573    ///
574    /// # Arguments
575    ///
576    /// * `event` - Indicates the pointer to the current UI input event.
577    ///
578    /// # Returns
579    ///
580    /// * Returns the number of historical events.
581    ///
582    /// Available since API-level: 12
583    #[cfg(feature = "api-12")]
584    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
585    pub fn OH_ArkUI_PointerEvent_GetHistorySize(event: *const ArkUI_UIInputEvent) -> u32;
586    /// Obtains the occurrence time of a historical event from a directional input event (such as a touch event,
587    /// mouse event, or axis event).
588    ///
589    /// # Arguments
590    ///
591    /// * `event` - Indicates the pointer to the current UI input event.
592    ///
593    /// * `historyIndex` - Indicates the index of the target historical event.
594    ///
595    /// # Returns
596    ///
597    /// * Returns the time when the UI input event occurs; returns <b>0</b> if any parameter error occurs.
598    ///
599    /// Available since API-level: 12
600    #[cfg(feature = "api-12")]
601    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
602    pub fn OH_ArkUI_PointerEvent_GetHistoryEventTime(
603        event: *const ArkUI_UIInputEvent,
604        historyIndex: u32,
605    ) -> i64;
606    /// Obtains the number of touch points in a specific historical event from a directional input event (such as
607    /// a touch event, mouse event, or axis event).
608    ///
609    /// # Arguments
610    ///
611    /// * `event` - Indicates the pointer to the current UI input event.
612    ///
613    /// * `historyIndex` - Indicates the index of the target historical event.
614    ///
615    /// # Returns
616    ///
617    /// * Returns the number of touch points in the specified historical event
618    ///
619    /// Available since API-level: 12
620    #[cfg(feature = "api-12")]
621    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
622    pub fn OH_ArkUI_PointerEvent_GetHistoryPointerCount(
623        event: *const ArkUI_UIInputEvent,
624        historyIndex: u32,
625    ) -> u32;
626    /// Obtains the ID of a touch point in a specific historical event from a directional input event (such as
627    /// a touch event, mouse event, or axis event).
628    ///
629    /// # Arguments
630    ///
631    /// * `event` - Indicates the pointer to the current UI input event.
632    ///
633    /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
634    ///
635    /// * `historyIndex` - Indicates the index of the target historical event.
636    ///
637    /// # Returns
638    ///
639    /// * Returns the ID of the corresponding touch point in the specified historical event.
640    ///
641    /// Available since API-level: 12
642    #[cfg(feature = "api-12")]
643    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
644    pub fn OH_ArkUI_PointerEvent_GetHistoryPointerId(
645        event: *const ArkUI_UIInputEvent,
646        pointerIndex: u32,
647        historyIndex: u32,
648    ) -> i32;
649    /// Obtains the X coordinate of a specific touch point in a historical event relative to the upper left corner
650    /// of the current component from a directional input event (such as a touch event, mouse event, or axis event).
651    ///
652    /// # Arguments
653    ///
654    /// * `event` - Indicates the pointer to the current UI input event.
655    ///
656    /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
657    ///
658    /// * `historyIndex` - Indicates the index of the target historical event.
659    ///
660    /// # Returns
661    ///
662    /// * Returns the X coordinate relative to the upper left corner of the current component;
663    /// returns <b>0.0f</b> if any parameter error occurs.
664    ///
665    /// Available since API-level: 12
666    #[cfg(feature = "api-12")]
667    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
668    pub fn OH_ArkUI_PointerEvent_GetHistoryX(
669        event: *const ArkUI_UIInputEvent,
670        pointerIndex: u32,
671        historyIndex: u32,
672    ) -> f32;
673    /// Obtains the Y coordinate of a specific touch point in a historical event relative to the upper left corner
674    /// of the current component from a directional input event (such as a touch event, mouse event, or axis event).
675    ///
676    /// # Arguments
677    ///
678    /// * `event` - Indicates the pointer to the current UI input event.
679    ///
680    /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
681    ///
682    /// * `historyIndex` - Indicates the index of the target historical event.
683    ///
684    /// # Returns
685    ///
686    /// * Returns the Y coordinate relative to the upper left corner of the current component;
687    /// returns <b>0.0f</b> if any parameter error occurs.
688    ///
689    /// Available since API-level: 12
690    #[cfg(feature = "api-12")]
691    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
692    pub fn OH_ArkUI_PointerEvent_GetHistoryY(
693        event: *const ArkUI_UIInputEvent,
694        pointerIndex: u32,
695        historyIndex: u32,
696    ) -> f32;
697    /// Obtains the X coordinate of a specific touch point in a historical event relative to the upper left corner
698    /// of the current application window from a directional input event (such as a touch event, mouse event, or axis event).
699    ///
700    /// # Arguments
701    ///
702    /// * `event` - Indicates the pointer to the current UI input event.
703    ///
704    /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
705    ///
706    /// * `historyIndex` - Indicates the index of the target historical event.
707    ///
708    /// # Returns
709    ///
710    /// * Returns the X coordinate relative to the upper left corner of the current application window;
711    /// returns <b>0.0f</b> if any parameter error occurs.
712    ///
713    /// Available since API-level: 12
714    #[cfg(feature = "api-12")]
715    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
716    pub fn OH_ArkUI_PointerEvent_GetHistoryWindowX(
717        event: *const ArkUI_UIInputEvent,
718        pointerIndex: u32,
719        historyIndex: u32,
720    ) -> f32;
721    /// Obtains the Y coordinate of a specific touch point in a historical event relative to the upper left corner
722    /// of the current application window from a directional input event (such as a touch event, mouse event, or axis event).
723    ///
724    /// # Arguments
725    ///
726    /// * `event` - Indicates the pointer to the current UI input event.
727    ///
728    /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
729    ///
730    /// * `historyIndex` - Indicates the index of the target historical event.
731    ///
732    /// # Returns
733    ///
734    /// * Returns the Y coordinate relative to the upper left corner of the current application window;
735    /// returns <b>0.0f</b> if any parameter error occurs.
736    ///
737    /// Available since API-level: 12
738    #[cfg(feature = "api-12")]
739    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
740    pub fn OH_ArkUI_PointerEvent_GetHistoryWindowY(
741        event: *const ArkUI_UIInputEvent,
742        pointerIndex: u32,
743        historyIndex: u32,
744    ) -> f32;
745    /// Obtains the X coordinate of a specific touch point in a historical event relative to the upper left corner
746    /// of the current screen from a directional input event (such as a touch event, mouse event, or axis event).
747    ///
748    /// # Arguments
749    ///
750    /// * `event` - Indicates the pointer to the current UI input event.
751    ///
752    /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
753    ///
754    /// * `historyIndex` - Indicates the index of the target historical event.
755    ///
756    /// # Returns
757    ///
758    /// * Returns the X coordinate relative to the upper left corner of the current screen;
759    /// returns <b>0.0f</b> if any parameter error occurs.
760    ///
761    /// Available since API-level: 12
762    #[cfg(feature = "api-12")]
763    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
764    pub fn OH_ArkUI_PointerEvent_GetHistoryDisplayX(
765        event: *const ArkUI_UIInputEvent,
766        pointerIndex: u32,
767        historyIndex: u32,
768    ) -> f32;
769    /// Obtains the Y coordinate of a specific touch point in a historical event relative to the upper left corner
770    /// of the current screen from a directional input event (such as a touch event, mouse event, or axis event).
771    ///
772    /// # Arguments
773    ///
774    /// * `event` - Indicates the pointer to the current UI input event.
775    ///
776    /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
777    ///
778    /// * `historyIndex` - Indicates the index of the target historical event.
779    ///
780    /// # Returns
781    ///
782    /// * Returns the Y coordinate relative to the upper left corner of the current screen;
783    /// returns <b>0.0f</b> if any parameter error occurs.
784    ///
785    /// Available since API-level: 12
786    #[cfg(feature = "api-12")]
787    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
788    pub fn OH_ArkUI_PointerEvent_GetHistoryDisplayY(
789        event: *const ArkUI_UIInputEvent,
790        pointerIndex: u32,
791        historyIndex: u32,
792    ) -> f32;
793    /// Obtains the pressure applied to the touchscreen in a specific historical event from a directional input event
794    /// (for example, a touch event)..
795    ///
796    /// # Arguments
797    ///
798    /// * `event` - Indicates the pointer to the current UI input event.
799    ///
800    /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
801    ///
802    /// * `historyIndex` - Indicates the index of the target historical event.
803    ///
804    /// # Returns
805    ///
806    /// * Returns the pressure applied to the touchscreen; returns <b>0.0f</b> if any parameter error occurs.
807    ///
808    /// Available since API-level: 12
809    #[cfg(feature = "api-12")]
810    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
811    pub fn OH_ArkUI_PointerEvent_GetHistoryPressure(
812        event: *const ArkUI_UIInputEvent,
813        pointerIndex: u32,
814        historyIndex: u32,
815    ) -> f32;
816    /// Obtains the angle relative to the YZ plane in a specific historical event from a directional input event
817    /// (for example, a touch event). The value range is [-90, 90]. A positive value indicates a rightward tilt.
818    ///
819    /// # Arguments
820    ///
821    /// * `event` - Indicates the pointer to the current UI input event.
822    ///
823    /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
824    ///
825    /// * `historyIndex` - Indicates the index of the target historical event.
826    ///
827    /// # Returns
828    ///
829    /// * Returns the angle relative to the YZ plane.
830    ///
831    /// Available since API-level: 12
832    #[cfg(feature = "api-12")]
833    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
834    pub fn OH_ArkUI_PointerEvent_GetHistoryTiltX(
835        event: *const ArkUI_UIInputEvent,
836        pointerIndex: u32,
837        historyIndex: u32,
838    ) -> f32;
839    /// Obtains the angle relative to the XZ plane in a specific historical event from a directional input event
840    /// (for example, a touch event). The value range is [-90, 90]. A positive value indicates a downward tilt.
841    ///
842    /// # Arguments
843    ///
844    /// * `event` - Indicates the pointer to the current UI input event.
845    ///
846    /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
847    ///
848    /// * `historyIndex` - Indicates the index of the target historical event.
849    ///
850    /// # Returns
851    ///
852    /// * Returns the angle relative to the XZ plane.
853    ///
854    /// Available since API-level: 12
855    #[cfg(feature = "api-12")]
856    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
857    pub fn OH_ArkUI_PointerEvent_GetHistoryTiltY(
858        event: *const ArkUI_UIInputEvent,
859        pointerIndex: u32,
860        historyIndex: u32,
861    ) -> f32;
862    /// Obtains the width of the touch area in a specific historical event from a directional input event
863    /// (for example, a touch event).
864    ///
865    /// # Arguments
866    ///
867    /// * `event` - Indicates the pointer to the current UI input event.
868    ///
869    /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
870    ///
871    /// * `historyIndex` - Indicates the index of the target historical event.
872    ///
873    /// # Returns
874    ///
875    /// * Returns the width of the touch area.
876    ///
877    /// Available since API-level: 12
878    #[cfg(feature = "api-12")]
879    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
880    pub fn OH_ArkUI_PointerEvent_GetHistoryTouchAreaWidth(
881        event: *const ArkUI_UIInputEvent,
882        pointerIndex: u32,
883        historyIndex: u32,
884    ) -> f32;
885    /// Obtains the height of the touch area in a specific historical event from a directional input event
886    /// (for example, a touch event).
887    ///
888    /// # Arguments
889    ///
890    /// * `event` - Indicates the pointer to the current UI input event.
891    ///
892    /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
893    ///
894    /// * `historyIndex` - Indicates the index of the target historical event.
895    ///
896    /// # Returns
897    ///
898    /// * Returns the height of the touch area.
899    ///
900    /// Available since API-level: 12
901    #[cfg(feature = "api-12")]
902    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
903    pub fn OH_ArkUI_PointerEvent_GetHistoryTouchAreaHeight(
904        event: *const ArkUI_UIInputEvent,
905        pointerIndex: u32,
906        historyIndex: u32,
907    ) -> f32;
908    /// Obtains the value of the vertical scroll axis for this axis event.
909    ///
910    /// # Arguments
911    ///
912    /// * `event` - Indicates the pointer to the UI input event.
913    ///
914    /// # Returns
915    ///
916    /// * Returns the value of the vertical scroll axis of the current axis event;
917    /// returns <b>0</b> if any parameter error occurs.
918    ///
919    /// Available since API-level: 12
920    #[cfg(feature = "api-12")]
921    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
922    pub fn OH_ArkUI_AxisEvent_GetVerticalAxisValue(event: *const ArkUI_UIInputEvent) -> f64;
923    /// Obtains the value of the horizontal scroll axis for this axis event.
924    ///
925    /// # Arguments
926    ///
927    /// * `event` - Indicates the pointer to the UI input event.
928    ///
929    /// # Returns
930    ///
931    /// * Returns the value of the horizontal scroll axis of the current axis event;
932    /// returns <b>0</b> if any parameter error occurs.
933    ///
934    /// Available since API-level: 12
935    #[cfg(feature = "api-12")]
936    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
937    pub fn OH_ArkUI_AxisEvent_GetHorizontalAxisValue(event: *const ArkUI_UIInputEvent) -> f64;
938    /// Obtains the scale value of the pinch axis for this axis event.
939    ///
940    /// # Arguments
941    ///
942    /// * `event` - Indicates the pointer to the UI input event.
943    ///
944    /// # Returns
945    ///
946    /// * Returns the scale value of the pinch axis of the current axis event;
947    /// returns <b>0</b> if any parameter error occurs.
948    ///
949    /// Available since API-level: 12
950    #[cfg(feature = "api-12")]
951    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
952    pub fn OH_ArkUI_AxisEvent_GetPinchAxisScaleValue(event: *const ArkUI_UIInputEvent) -> f64;
953    /// Sets how the component behaves during hit testing.
954    ///
955    /// # Arguments
956    ///
957    /// * `event` - Indicates the pointer to the current UI input event.
958    ///
959    /// * `mode` - Indicates how the component behaves during hit testing. The parameter type is [`HitTestMode`].
960    ///
961    /// # Returns
962    ///
963    /// * Returns the status code of the execution.
964    ///
965    /// Available since API-level: 12
966    #[cfg(feature = "api-12")]
967    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
968    pub fn OH_ArkUI_PointerEvent_SetInterceptHitTestMode(
969        event: *const ArkUI_UIInputEvent,
970        mode: HitTestMode,
971    ) -> i32;
972    /// Get the value of the button type for mouse events.
973    ///
974    /// # Arguments
975    ///
976    /// * `event` - Represents a pointer to the current UI input event.
977    ///
978    /// # Returns
979    ///
980    /// * Return to the mouse button type, where <b>1</b> is the left button, <b>2</b> is the right button,
981    /// <b>3</b> is the middle button, <b>4</b> is the back button, and <b>5</b> is the forward button.
982    ///
983    /// Available since API-level: 12
984    #[cfg(feature = "api-12")]
985    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
986    pub fn OH_ArkUI_MouseEvent_GetMouseButton(event: *const ArkUI_UIInputEvent) -> i32;
987    /// Get the value of the mouse action type for mouse events.
988    ///
989    /// # Arguments
990    ///
991    /// * `event` - Represents a pointer to the current UI input event.
992    ///
993    /// # Returns
994    ///
995    /// * Returns the type of mouse action, where <b>1</b> represents button pressed,
996    /// <b>2</b> represents button released, and <b>3</b> represents mouse movement.
997    ///
998    /// Available since API-level: 12
999    #[cfg(feature = "api-12")]
1000    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1001    pub fn OH_ArkUI_MouseEvent_GetMouseAction(event: *const ArkUI_UIInputEvent) -> i32;
1002    /// Sets whether to prevent event bubbling.
1003    ///
1004    /// # Arguments
1005    ///
1006    /// * `event` - Indicates the pointer to the current UI input event.
1007    ///
1008    /// * `stopPropagation` - Indicates whether the event is prevented from bubbling.
1009    ///
1010    /// # Returns
1011    ///
1012    /// * Returns the status code of the execution. If 0 is returned, the setting is successful.
1013    /// If 401 is returned, the execution fails.
1014    /// The possible cause of the failure is that the event parameter is abnormal, such as a null pointer.
1015    ///
1016    /// Available since API-level: 12
1017    #[cfg(feature = "api-12")]
1018    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1019    pub fn OH_ArkUI_PointerEvent_SetStopPropagation(
1020        event: *const ArkUI_UIInputEvent,
1021        stopPropagation: bool,
1022    ) -> i32;
1023    /// Obtains the ID of device that triggers UI input event.
1024    ///
1025    /// # Arguments
1026    ///
1027    /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
1028    ///
1029    /// # Returns
1030    ///
1031    /// * Returns the device ID.
1032    ///
1033    /// Available since API-level: 14
1034    #[cfg(feature = "api-14")]
1035    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
1036    pub fn OH_ArkUI_UIInputEvent_GetDeviceId(event: *const ArkUI_UIInputEvent) -> i32;
1037    /// Obtains the pressed status of modifier keys from UI input event.
1038    /// The following modifier keys are supported: Ctrl, Alt, Shift, Fn. However, the <b>Fn</b> key on external keyboards
1039    /// is not supported.
1040    ///
1041    /// # Arguments
1042    ///
1043    /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
1044    ///
1045    /// * `pressedKeyCodes` - Array of all keys that are pressed. You need to allocate the memory space.
1046    ///
1047    /// * `length` - Length of the passed pressedKeyCodes array (when used as an input parameter);
1048    /// number of the keys pressed (when used as an output parameter).
1049    ///
1050    /// # Returns
1051    ///
1052    /// * Returns the result code.
1053    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1054    /// Returns [`ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR`] if the giving buffer is not enough.
1055    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1056    ///
1057    /// Available since API-level: 14
1058    #[cfg(feature = "api-14")]
1059    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
1060    pub fn OH_ArkUI_UIInputEvent_GetPressedKeys(
1061        event: *const ArkUI_UIInputEvent,
1062        pressedKeyCodes: *mut i32,
1063        length: *mut i32,
1064    ) -> i32;
1065}