arkui_sys/native_gesture/
native_gesture_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::*;
7use crate::ui_input_event::ArkUI_UIInputEvent;
8
9/// Defines a gesture recognizer.
10///
11///
12/// Available since API-level: 12
13#[cfg(feature = "api-12")]
14#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
15#[repr(C)]
16pub struct ArkUI_GestureRecognizer {
17    _unused: [u8; 0],
18}
19/// Defines the gesture interruption information.
20///
21///
22/// Available since API-level: 12
23#[cfg(feature = "api-12")]
24#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
25#[repr(C)]
26pub struct ArkUI_GestureInterruptInfo {
27    _unused: [u8; 0],
28}
29/// Defines the gesture event.
30///
31///
32/// Available since API-level: 12
33#[cfg(feature = "api-12")]
34#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
35#[repr(C)]
36pub struct ArkUI_GestureEvent {
37    _unused: [u8; 0],
38}
39#[cfg(feature = "api-12")]
40#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
41impl ArkUI_GestureEventActionType {
42    /// Triggered.
43    pub const GESTURE_EVENT_ACTION_ACCEPT: ArkUI_GestureEventActionType =
44        ArkUI_GestureEventActionType(1);
45    /// Updated.
46    pub const GESTURE_EVENT_ACTION_UPDATE: ArkUI_GestureEventActionType =
47        ArkUI_GestureEventActionType(2);
48    /// Ended.
49    pub const GESTURE_EVENT_ACTION_END: ArkUI_GestureEventActionType =
50        ArkUI_GestureEventActionType(4);
51    /// Canceled.
52    pub const GESTURE_EVENT_ACTION_CANCEL: ArkUI_GestureEventActionType =
53        ArkUI_GestureEventActionType(8);
54}
55#[repr(transparent)]
56/// Enumerates gesture event types.
57///
58///
59/// Available since API-level: 12
60#[cfg(feature = "api-12")]
61#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
62#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
63pub struct ArkUI_GestureEventActionType(pub ::core::ffi::c_uint);
64/// Defines a set of gesture event types.
65///
66/// Example: ArkUI_GestureEventActionTypeMask actions = GESTURE_EVENT_ACTION_ACCEPT | GESTURE_EVENT_ACTION_UPDATE;
67///
68///
69///
70/// Available since API-level: 12
71#[cfg(feature = "api-12")]
72#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
73pub type ArkUI_GestureEventActionTypeMask = u32;
74#[cfg(feature = "api-12")]
75#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
76impl ArkUI_GesturePriority {
77    /// Normal.
78    pub const NORMAL: ArkUI_GesturePriority = ArkUI_GesturePriority(0);
79    /// High-priority.
80    pub const PRIORITY: ArkUI_GesturePriority = ArkUI_GesturePriority(1);
81    /// Parallel.
82    pub const PARALLEL: ArkUI_GesturePriority = ArkUI_GesturePriority(2);
83}
84#[repr(transparent)]
85/// Enumerates gesture event modes.
86///
87///
88/// Available since API-level: 12
89#[cfg(feature = "api-12")]
90#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
91#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
92pub struct ArkUI_GesturePriority(pub ::core::ffi::c_uint);
93#[cfg(feature = "api-12")]
94#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
95impl ArkUI_GroupGestureMode {
96    /// Sequential recognition. Gestures are recognized in the registration sequence until all gestures are recognized
97    /// successfully. Once one gesture fails to be recognized, all subsequent gestures fail to be recognized.
98    /// Only the last gesture in the gesture group can respond to the end event.
99    pub const SEQUENTIAL_GROUP: ArkUI_GroupGestureMode = ArkUI_GroupGestureMode(0);
100    /// Parallel recognition. Registered gestures are recognized concurrently until all gestures are recognized.
101    /// The recognition result of each gesture does not affect each other.
102    pub const PARALLEL_GROUP: ArkUI_GroupGestureMode = ArkUI_GroupGestureMode(1);
103    /// Exclusive recognition. Registered gestures are identified concurrently.
104    /// If one gesture is successfully recognized, gesture recognition ends.
105    pub const EXCLUSIVE_GROUP: ArkUI_GroupGestureMode = ArkUI_GroupGestureMode(2);
106}
107#[repr(transparent)]
108/// Enumerates gesture group modes.
109///
110///
111/// Available since API-level: 12
112#[cfg(feature = "api-12")]
113#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
114#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
115pub struct ArkUI_GroupGestureMode(pub ::core::ffi::c_uint);
116#[cfg(feature = "api-12")]
117#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
118impl ArkUI_GestureDirection {
119    /// All directions.
120    pub const GESTURE_DIRECTION_ALL: ArkUI_GestureDirection = ArkUI_GestureDirection(15);
121    /// Horizontal direction.
122    pub const GESTURE_DIRECTION_HORIZONTAL: ArkUI_GestureDirection = ArkUI_GestureDirection(3);
123    /// Vertical direction.
124    pub const GESTURE_DIRECTION_VERTICAL: ArkUI_GestureDirection = ArkUI_GestureDirection(12);
125    /// Leftward.
126    pub const GESTURE_DIRECTION_LEFT: ArkUI_GestureDirection = ArkUI_GestureDirection(1);
127    /// Rightward.
128    pub const GESTURE_DIRECTION_RIGHT: ArkUI_GestureDirection = ArkUI_GestureDirection(2);
129    /// Upward.
130    pub const GESTURE_DIRECTION_UP: ArkUI_GestureDirection = ArkUI_GestureDirection(4);
131    /// Downward.
132    pub const GESTURE_DIRECTION_DOWN: ArkUI_GestureDirection = ArkUI_GestureDirection(8);
133    /// None.
134    pub const GESTURE_DIRECTION_NONE: ArkUI_GestureDirection = ArkUI_GestureDirection(0);
135}
136#[repr(transparent)]
137/// Enumerates gesture directions.
138///
139///
140/// Available since API-level: 12
141#[cfg(feature = "api-12")]
142#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
143#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
144pub struct ArkUI_GestureDirection(pub ::core::ffi::c_uint);
145/// Defines a set of gesture directions.
146///
147/// Example: ArkUI_GestureDirectionMask directions = GESTURE_DIRECTION_LEFT | GESTURE_DIRECTION_RIGHT
148///
149/// This example indicates that the leftward and rightward directions are supported.
150///
151///
152///
153/// Available since API-level: 12
154#[cfg(feature = "api-12")]
155#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
156pub type ArkUI_GestureDirectionMask = u32;
157#[cfg(feature = "api-12")]
158#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
159impl ArkUI_GestureMask {
160    /// The gestures of child components are enabled and recognized based on the default gesture recognition sequence.
161    pub const NORMAL_GESTURE_MASK: ArkUI_GestureMask = ArkUI_GestureMask(0);
162    /// The gestures of child components are disabled, including the built-in gestures.
163    pub const IGNORE_INTERNAL_GESTURE_MASK: ArkUI_GestureMask = ArkUI_GestureMask(1);
164}
165#[repr(transparent)]
166/// Enumerates gesture masking modes.
167///
168///
169/// Available since API-level: 12
170#[cfg(feature = "api-12")]
171#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
172#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
173pub struct ArkUI_GestureMask(pub ::core::ffi::c_uint);
174#[cfg(feature = "api-12")]
175#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
176impl ArkUI_GestureRecognizerType {
177    /// Tap.
178    pub const TAP_GESTURE: ArkUI_GestureRecognizerType = ArkUI_GestureRecognizerType(0);
179    /// Long press.
180    pub const LONG_PRESS_GESTURE: ArkUI_GestureRecognizerType = ArkUI_GestureRecognizerType(1);
181    /// Pan.
182    pub const PAN_GESTURE: ArkUI_GestureRecognizerType = ArkUI_GestureRecognizerType(2);
183    /// Pinch.
184    pub const PINCH_GESTURE: ArkUI_GestureRecognizerType = ArkUI_GestureRecognizerType(3);
185    /// Rotate.
186    pub const ROTATION_GESTURE: ArkUI_GestureRecognizerType = ArkUI_GestureRecognizerType(4);
187    /// Swipe.
188    pub const SWIPE_GESTURE: ArkUI_GestureRecognizerType = ArkUI_GestureRecognizerType(5);
189    /// A group of gestures.
190    pub const GROUP_GESTURE: ArkUI_GestureRecognizerType = ArkUI_GestureRecognizerType(6);
191    /// The click gesture registed through onClick.
192    ///
193    ///
194    /// Available since API-level: 20
195    #[cfg(feature = "api-20")]
196    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
197    pub const CLICK_GESTURE: ArkUI_GestureRecognizerType = ArkUI_GestureRecognizerType(7);
198    /// Drag gesture used for drag and drop.
199    ///
200    ///
201    /// Available since API-level: 20
202    #[cfg(feature = "api-20")]
203    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
204    pub const DRAG_DROP: ArkUI_GestureRecognizerType = ArkUI_GestureRecognizerType(8);
205}
206#[repr(transparent)]
207/// Enumerates gesture types.
208///
209///
210/// Available since API-level: 12
211#[cfg(feature = "api-12")]
212#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
213#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
214pub struct ArkUI_GestureRecognizerType(pub ::core::ffi::c_uint);
215#[cfg(feature = "api-12")]
216#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
217impl ArkUI_GestureInterruptResult {
218    /// The gesture recognition process continues.
219    pub const CONTINUE: ArkUI_GestureInterruptResult = ArkUI_GestureInterruptResult(0);
220    /// The gesture recognition process is paused.
221    pub const REJECT: ArkUI_GestureInterruptResult = ArkUI_GestureInterruptResult(1);
222}
223#[repr(transparent)]
224/// Enumerates gesture interruption results.
225///
226///
227/// Available since API-level: 12
228#[cfg(feature = "api-12")]
229#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
230#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
231pub struct ArkUI_GestureInterruptResult(pub ::core::ffi::c_uint);
232#[cfg(feature = "api-12")]
233#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
234impl ArkUI_GestureRecognizerState {
235    /// Ready.
236    pub const ARKUI_GESTURE_RECOGNIZER_STATE_READY: ArkUI_GestureRecognizerState =
237        ArkUI_GestureRecognizerState(0);
238    /// Detecting.
239    pub const ARKUI_GESTURE_RECOGNIZER_STATE_DETECTING: ArkUI_GestureRecognizerState =
240        ArkUI_GestureRecognizerState(1);
241    /// Pending.
242    pub const ARKUI_GESTURE_RECOGNIZER_STATE_PENDING: ArkUI_GestureRecognizerState =
243        ArkUI_GestureRecognizerState(2);
244    /// Blocked.
245    pub const ARKUI_GESTURE_RECOGNIZER_STATE_BLOCKED: ArkUI_GestureRecognizerState =
246        ArkUI_GestureRecognizerState(3);
247    /// Successful.
248    pub const ARKUI_GESTURE_RECOGNIZER_STATE_SUCCESSFUL: ArkUI_GestureRecognizerState =
249        ArkUI_GestureRecognizerState(4);
250    /// Failed.
251    pub const ARKUI_GESTURE_RECOGNIZER_STATE_FAILED: ArkUI_GestureRecognizerState =
252        ArkUI_GestureRecognizerState(5);
253}
254#[repr(transparent)]
255/// Enumerates the gesture recognizer states.
256///
257///
258/// Available since API-level: 12
259#[cfg(feature = "api-12")]
260#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
261#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
262pub struct ArkUI_GestureRecognizerState(pub ::core::ffi::c_uint);
263/// Defines the gesture recognizer handle.
264///
265///
266/// Available since API-level: 12
267#[cfg(feature = "api-12")]
268#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
269pub type ArkUI_GestureRecognizerHandle = *mut ArkUI_GestureRecognizer;
270/// Defines the gesture recognizer handle array.
271///
272///
273/// Available since API-level: 12
274#[cfg(feature = "api-12")]
275#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
276pub type ArkUI_GestureRecognizerHandleArray = *mut ArkUI_GestureRecognizerHandle;
277/// Defines a <b>GestureEventTargetInfo</b> object that provides information about a gesture event target.
278///
279///
280/// Available since API-level: 12
281#[cfg(feature = "api-12")]
282#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
283#[repr(C)]
284pub struct ArkUI_GestureEventTargetInfo {
285    _unused: [u8; 0],
286}
287/// Defines a parallel internal gesture event.
288///
289///
290/// Available since API-level: 12
291#[cfg(feature = "api-12")]
292#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
293#[repr(C)]
294pub struct ArkUI_ParallelInnerGestureEvent {
295    _unused: [u8; 0],
296}
297/// Defines a touch recognizer.
298///
299///
300/// Available since API-level: 15
301#[cfg(feature = "api-15")]
302#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
303#[repr(C)]
304pub struct ArkUI_TouchRecognizer {
305    _unused: [u8; 0],
306}
307/// Defines a touch recognizer handle.
308///
309///
310/// Available since API-level: 15
311#[cfg(feature = "api-15")]
312#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
313pub type ArkUI_TouchRecognizerHandle = *mut ArkUI_TouchRecognizer;
314/// Defines an array of touch recognizer handle.
315///
316///
317/// Available since API-level: 15
318#[cfg(feature = "api-15")]
319#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
320pub type ArkUI_TouchRecognizerHandleArray = *mut ArkUI_TouchRecognizerHandle;
321/// Defines a callback function for notifying gesture recognizer destruction.
322///
323/// # Arguments
324///
325/// * `recognizer` - Indicates the pointer to a gesture recognizer.
326///
327/// * `userData` - Indicates the custom data.
328///
329/// Available since API-level: 12
330#[cfg(feature = "api-12")]
331#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
332pub type ArkUI_GestureRecognizerDisposeNotifyCallback = ::core::option::Option<
333    unsafe extern "C" fn(
334        recognizer: *mut ArkUI_GestureRecognizer,
335        userData: *mut ::core::ffi::c_void,
336    ),
337>;
338/// Defines the gesture APIs.
339///
340///
341/// Available since API-level: 12
342#[cfg(feature = "api-12")]
343#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
344#[repr(C)]
345pub struct ArkUI_NativeGestureAPI_1 {
346    /// The struct version is 1.
347    pub version: i32,
348    /// Creates a tap gesture.
349    ///
350    /// 1. This API is used to trigger a tap gesture with one, two, or more taps.
351    ///
352    /// 2. If multi-tap is configured, the timeout interval between a lift and the next tap is 300 ms.
353    ///
354    /// 3. If the distance between the last tapped position and the current tapped position exceeds 60 vp,
355    /// gesture recognition fails.
356    ///
357    /// 4. If the value is greater than 1, the tap gesture will fail to be recognized when the number of fingers
358    /// touching the screen within 300 ms of the first finger touch is less than the required number,
359    ///
360    /// or when the number of fingers lifted from the screen within 300 ms of the first finger's being lifted
361    /// is less than the required number.
362    ///
363    /// 5. When the number of fingers touching the screen exceeds the set value, the gesture can be recognized.
364    ///
365    ///
366    /// # Arguments
367    ///
368    /// * `countNum` - Indicates the number of consecutive taps. If the value is less than 1 or is not set,
369    /// the default value <b>1</b> is used.
370    ///
371    /// * `fingersNum` - Indicates the number of fingers required to trigger a tap. The value ranges
372    /// from 1 to 10. If the value is less than 1 or is not set, the default value <b>1</b> is used.
373    ///
374    /// # Returns
375    ///
376    /// * Returns the pointer to the created gesture.
377    pub createTapGesture: ::core::option::Option<
378        unsafe extern "C" fn(countNum: i32, fingersNum: i32) -> *mut ArkUI_GestureRecognizer,
379    >,
380    /// Creates a long press gesture.
381    ///
382    /// 1. This API is used to trigger a long press gesture, which requires one or more fingers with a minimum
383    /// The value ranges 500 ms hold-down time.
384    ///
385    /// 2. In components that support drag actions by default, such as <b><Text></b>, <b><TextInput></b>,
386    /// <b><TextArea></b>, <b><Hyperlink></b>, <b><Image></b>, and <b>RichEditor></b>, the long press gesture
387    ///
388    /// may conflict with the drag action. If this occurs, they are handled as follows:
389    ///
390    /// If the minimum duration of the long press gesture is less than 500 ms, the long press gesture receives
391    /// a higher response priority than the drag action.
392    ///
393    /// If the minimum duration of the long press gesture is greater than or equal to 500 ms,
394    /// the drag action receives a higher response priority than the long press gesture.
395    ///
396    /// 3. If a finger moves more than 15 px after being pressed, the gesture recognition fails.
397    ///
398    ///
399    /// # Arguments
400    ///
401    /// * `fingersNum` - Indicates the minimum number of fingers to trigger a long press gesture.
402    /// The value ranges from 1 to 10.
403    ///
404    /// * `repeatResult` - Indicates whether to continuously trigger the event callback.
405    ///
406    /// * `durationNum` - Indicates the minimum hold-down time, in ms.
407    /// If the value is less than or equal to 0, the default value <b>500</b> is used.
408    ///
409    /// # Returns
410    ///
411    /// * Returns the pointer to the created gesture.
412    pub createLongPressGesture: ::core::option::Option<
413        unsafe extern "C" fn(
414            fingersNum: i32,
415            repeatResult: bool,
416            durationNum: i32,
417        ) -> *mut ArkUI_GestureRecognizer,
418    >,
419    /// Creates a pan gesture.
420    ///
421    /// 1. This API is used to trigger a pan gesture when the movement distance of a finger on the screen exceeds
422    /// the minimum value.
423    ///
424    /// 2. If a pan gesture and a tab swipe occur at the same time, set <b>distanceNum</b> to <b>1</b>
425    /// so that the gesture can be more easily recognized.
426    ///
427    ///
428    /// # Arguments
429    ///
430    /// * `fingersNum` - Indicates the minimum number of fingers to trigger a pan gesture. The value ranges from 1 to 10.
431    /// If the value is less than 1 or is not set, the default value <b>1</b> is used.
432    ///
433    /// * `directions` - Indicates the pan direction. The value supports the AND (&amp;) and OR (operations.
434    ///
435    /// * `distanceNum` - Indicates the minimum pan distance to trigger the gesture, in vp. If this parameter is
436    /// set to a value less than or equal to 0, the default value <b>5</b> is used.
437    ///
438    /// # Returns
439    ///
440    /// * Returns the pointer to the created gesture.
441    pub createPanGesture: ::core::option::Option<
442        unsafe extern "C" fn(
443            fingersNum: i32,
444            directions: ArkUI_GestureDirectionMask,
445            distanceNum: f64,
446        ) -> *mut ArkUI_GestureRecognizer,
447    >,
448    /// Creates a pinch gesture.
449    ///
450    /// 1. This API is used to trigger a pinch gesture, which requires two to five fingers with a minimum 5 vp
451    /// distance between the fingers.
452    ///
453    /// 2. While more fingers than the minimum number can be pressed to trigger the gesture, only the first
454    /// fingers of the minimum number participate in gesture calculation.
455    ///
456    ///
457    /// # Arguments
458    ///
459    /// * `fingersNum` - Indicates the minimum number of fingers to trigger a pinch. The value ranges from 2 to 5.
460    /// Default value: <b>2</b>
461    ///
462    /// * `distanceNum` - Indicates the minimum recognition distance, in px. If this parameter is set to a value less
463    /// than or equal to 0, the default value <b>5</b> is used.
464    ///
465    /// # Returns
466    ///
467    /// * Returns the pointer to the created gesture.
468    pub createPinchGesture: ::core::option::Option<
469        unsafe extern "C" fn(fingersNum: i32, distanceNum: f64) -> *mut ArkUI_GestureRecognizer,
470    >,
471    /// Creates a rotation gesture.
472    ///
473    /// 1. This API is used to trigger a rotation gesture, which requires two to five fingers with a
474    /// minimum 1-degree rotation angle.
475    ///
476    /// 2. While more fingers than the minimum number can be pressed to trigger the gesture, only the first
477    /// two fingers participate in gesture calculation.
478    ///
479    ///
480    /// # Arguments
481    ///
482    /// * `fingersNum` - Indicates the minimum number of fingers to trigger a rotation. The value ranges from 2 to 5.
483    /// Default value: <b>2</b>
484    ///
485    /// * `angleNum` - Indicates the minimum degree that can trigger the rotation gesture. Default value: <b>1</b>
486    /// If this parameter is set to a value less than or equal to 0 or greater than 360,
487    /// the default value <b>1</b> is used.
488    ///
489    /// # Returns
490    ///
491    /// * Returns the pointer to the created gesture.
492    pub createRotationGesture: ::core::option::Option<
493        unsafe extern "C" fn(fingersNum: i32, angleNum: f64) -> *mut ArkUI_GestureRecognizer,
494    >,
495    /// Creates a swipe gesture.
496    ///
497    /// This API is used to implement a swipe gesture, which can be recognized when the swipe speed is 100
498    /// vp/s or higher.
499    ///
500    ///
501    /// # Arguments
502    ///
503    /// * `fingersNum` - Indicates the minimum number of fingers to trigger a swipe gesture.
504    /// The value ranges from 1 to 10.
505    ///
506    /// * `directions` - Indicates the swipe direction.
507    ///
508    /// * `speedNum` - Indicates the minimum speed of the swipe gesture, in px/s.
509    /// If this parameter is set to a value less than or equal to 0, the default value <b>100</b> is used.
510    ///
511    /// # Returns
512    ///
513    /// * Returns the pointer to the created gesture.
514    pub createSwipeGesture: ::core::option::Option<
515        unsafe extern "C" fn(
516            fingersNum: i32,
517            directions: ArkUI_GestureDirectionMask,
518            speedNum: f64,
519        ) -> *mut ArkUI_GestureRecognizer,
520    >,
521    /// Creates a gesture group.
522    ///
523    /// # Arguments
524    ///
525    /// * `gestureMode` - Indicates the gesture group mode.
526    ///
527    /// # Returns
528    ///
529    /// * Returns the pointer to the created gesture group.
530    pub createGroupGesture: ::core::option::Option<
531        unsafe extern "C" fn(gestureMode: ArkUI_GroupGestureMode) -> *mut ArkUI_GestureRecognizer,
532    >,
533    /// Disposes a gesture to release resources.
534    ///
535    /// # Arguments
536    ///
537    /// * `recognizer` - Indicates the pointer to the gesture to dispose.
538    pub dispose:
539        ::core::option::Option<unsafe extern "C" fn(recognizer: *mut ArkUI_GestureRecognizer)>,
540    /// Adds a gesture to a gesture group.
541    ///
542    /// # Arguments
543    ///
544    /// * `group` - Indicates the pointer to the gesture group.
545    ///
546    /// * `child` - Indicates the gesture to be added to the gesture group.
547    ///
548    /// # Returns
549    ///
550    /// * Returns <b>0</b> if success.
551    /// Returns <b>401</b> if a parameter exception occurs. Returns 401 if a parameter exception occurs.
552    pub addChildGesture: ::core::option::Option<
553        unsafe extern "C" fn(
554            group: *mut ArkUI_GestureRecognizer,
555            child: *mut ArkUI_GestureRecognizer,
556        ) -> i32,
557    >,
558    /// Removes a gesture to a gesture group.
559    ///
560    /// # Arguments
561    ///
562    /// * `group` - Indicates the pointer to the gesture group.
563    ///
564    /// * `child` - Indicates the gesture to be removed to the gesture group.
565    ///
566    /// # Returns
567    ///
568    /// * Returns <b>0</b> if success.
569    /// Returns <b>401</b> if a parameter exception occurs.
570    pub removeChildGesture: ::core::option::Option<
571        unsafe extern "C" fn(
572            group: *mut ArkUI_GestureRecognizer,
573            child: *mut ArkUI_GestureRecognizer,
574        ) -> i32,
575    >,
576    /// Registers a callback for gestures.
577    ///
578    /// # Arguments
579    ///
580    /// * `recognizer` - Indicates the pointer to the gesture recognizer.
581    ///
582    /// * `actionTypeMask` - Indicates the set of gesture event types. Multiple callbacks can be registered at once,
583    /// with the callback event types distinguished in the callbacks.
584    /// Example: actionTypeMask = GESTURE_EVENT_ACTION_ACCEPT | GESTURE_EVENT_ACTION_UPDATE;
585    ///
586    /// * `extraParams` - Indicates the context passed in the <b>targetReceiver</b> callback.
587    ///
588    /// * `targetReceiver` - Indicates the callback to register for processing the gesture event types.
589    /// <b>event</b> indicates the gesture callback data.
590    ///
591    /// # Returns
592    ///
593    /// * Returns <b>0</b> if success.
594    /// Returns <b>401</b> if a parameter exception occurs.
595    pub setGestureEventTarget: ::core::option::Option<
596        unsafe extern "C" fn(
597            recognizer: *mut ArkUI_GestureRecognizer,
598            actionTypeMask: ArkUI_GestureEventActionTypeMask,
599            extraParams: *mut ::core::ffi::c_void,
600            targetReceiver: ::core::option::Option<
601                unsafe extern "C" fn(
602                    event: *mut ArkUI_GestureEvent,
603                    extraParams: *mut ::core::ffi::c_void,
604                ),
605            >,
606        ) -> i32,
607    >,
608    /// Adds a gesture to a UI component.
609    ///
610    /// # Arguments
611    ///
612    /// * `node` - Indicates the UI component to which you want to add the gesture.
613    ///
614    /// * `recognizer` - Indicates the gesture to be added to the UI component.
615    ///
616    /// * `mode` - Indicates the gesture event mode. Available options are <b>NORMAL_GESTURE</b>,
617    /// <b>PARALLEL_GESTURE</b>, and <b>PRIORITY_GESTURE</b>.
618    ///
619    /// * `mask` - Indicates the gesture masking mode.
620    ///
621    /// # Returns
622    ///
623    /// * Returns <b>0</b> if success.
624    /// Returns <b>401</b> if a parameter exception occurs.
625    pub addGestureToNode: ::core::option::Option<
626        unsafe extern "C" fn(
627            node: ArkUI_NodeHandle,
628            recognizer: *mut ArkUI_GestureRecognizer,
629            mode: ArkUI_GesturePriority,
630            mask: ArkUI_GestureMask,
631        ) -> i32,
632    >,
633    /// Removes a gesture from a node.
634    ///
635    /// # Arguments
636    ///
637    /// * `node` - Indicates the node from which you want to remove the gesture.
638    ///
639    /// * `recognizer` - Indicates the gesture to be removed.
640    ///
641    /// # Returns
642    ///
643    /// * Returns <b>0</b> if success.
644    /// Returns <b>401</b> if a parameter exception occurs.
645    pub removeGestureFromNode: ::core::option::Option<
646        unsafe extern "C" fn(
647            node: ArkUI_NodeHandle,
648            recognizer: *mut ArkUI_GestureRecognizer,
649        ) -> i32,
650    >,
651    /// Sets a gesture interruption callback for a node.
652    ///
653    /// # Arguments
654    ///
655    /// * `node` - Indicates the node for which you want to set a gesture interruption callback.
656    ///
657    /// * `interrupter` - Indicates the gesture interruption callback to set.
658    /// <b>info</b> indicates the gesture interruption data. If <b>interrupter</b> returns
659    /// <b>GESTURE_INTERRUPT_RESULT_CONTINUE</b>, the gesture recognition process continues. If it returns
660    /// <b>GESTURE_INTERRUPT_RESULT_REJECT</b>, the gesture recognition process is paused.
661    ///
662    /// # Returns
663    ///
664    /// * Returns <b>0</b> if success.
665    /// Returns <b>401</b> if a parameter exception occurs.
666    pub setGestureInterrupterToNode: ::core::option::Option<
667        unsafe extern "C" fn(
668            node: ArkUI_NodeHandle,
669            interrupter: ::core::option::Option<
670                unsafe extern "C" fn(
671                    info: *mut ArkUI_GestureInterruptInfo,
672                ) -> ArkUI_GestureInterruptResult,
673            >,
674        ) -> i32,
675    >,
676    /// Obtains the type of a gesture.
677    ///
678    /// # Arguments
679    ///
680    /// * `recognizer` - Indicates the pointer to the gesture.
681    ///
682    /// # Returns
683    ///
684    /// * Returns the gesture type.
685    pub getGestureType: ::core::option::Option<
686        unsafe extern "C" fn(
687            recognizer: *mut ArkUI_GestureRecognizer,
688        ) -> ArkUI_GestureRecognizerType,
689    >,
690    /// Sets the callback function for a parallel internal gesture event.
691    ///
692    /// # Arguments
693    ///
694    /// * `node` - Indicates the ArkUI node for which the callback of a parallel internal gesture event is to be set.
695    ///
696    /// * `userData` - Indicates the custom data.
697    ///
698    /// * `parallelInnerGesture` - Indicates the parallel internal gesture event. <b>event</b> returns the data of the
699    /// parallel internal gesture event; <b>parallelInnerGesture</b> returns the pointer to the gesture recognizer
700    /// that requires parallel recognition.
701    ///
702    /// # Returns
703    ///
704    /// * Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if success.
705    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter exception occurs.
706    pub setInnerGestureParallelTo: ::core::option::Option<
707        unsafe extern "C" fn(
708            node: ArkUI_NodeHandle,
709            userData: *mut ::core::ffi::c_void,
710            parallelInnerGesture: ::core::option::Option<
711                unsafe extern "C" fn(
712                    event: *mut ArkUI_ParallelInnerGestureEvent,
713                ) -> *mut ArkUI_GestureRecognizer,
714            >,
715        ) -> i32,
716    >,
717    /// Creates a tap gesture that is subject to distance restrictions.
718    ///
719    /// 1. This API is used to trigger a tap gesture with one, two, or more taps.
720    ///
721    /// 2. If multi-tap is configured, the timeout interval between a lift and the next tap is 300 ms.
722    ///
723    /// 3. If the distance between the last tapped position and the current tapped position exceeds 60 vp,
724    /// gesture recognition fails.
725    ///
726    /// 4. If the value is greater than 1, the tap gesture will fail to be recognized when the number of fingers
727    /// touching the screen within 300 ms of the first finger touch is less than the required number,
728    /// or when the number of fingers lifted from the screen within 300 ms of the first finger's being lifted
729    /// is less than the required number.
730    ///
731    /// 5. When the number of fingers touching the screen exceeds the set value, the gesture can be recognized.
732    ///
733    /// 6. If the finger moves beyond the preset distance limit, gesture recognition fails.
734    ///
735    ///
736    /// # Arguments
737    ///
738    /// * `countNum` - Indicates the number of consecutive taps. If the value is less than 1 or is not set, the default
739    /// value <b>1</b> is used.
740    ///
741    /// * `fingersNum` - Indicates the number of fingers required to trigger a tap. The value ranges from 1 to 10.
742    /// If the value is less than 1 or is not set, the default value <b>1</b> is used.
743    ///
744    /// * `distanceThreshold` - Indicates the allowed moving distance of a finger.
745    /// If the value is less than 0 or is not set, it will be converted to the default value of infinity.
746    ///
747    /// # Returns
748    ///
749    /// * Returns the pointer to the created gesture.
750    pub createTapGestureWithDistanceThreshold: ::core::option::Option<
751        unsafe extern "C" fn(
752            countNum: i32,
753            fingersNum: i32,
754            distanceThreshold: f64,
755        ) -> *mut ArkUI_GestureRecognizer,
756    >,
757}
758/// Defines the gesture APIs.
759///
760///
761/// Available since API-level: 18
762#[cfg(feature = "api-18")]
763#[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
764#[repr(C)]
765#[derive(Debug, Copy, Clone)]
766pub struct ArkUI_NativeGestureAPI_2 {
767    /// Pointer to the <b>ArkUI_NativeGestureAPI_1</b> struct.
768    pub gestureApi1: *mut ArkUI_NativeGestureAPI_1,
769    /// Sets the callback for gesture interruption events.
770    ///
771    /// # Arguments
772    ///
773    /// * `node` - Node for which you want to set a gesture interruption callback.
774    ///
775    /// * `userData` - Custom data.
776    ///
777    /// * `interrupter` - Gesture interruption callback to set. <b>info</b> indicates the gesture interruption data.
778    /// If <b>interrupter</b> returns <b>GESTURE_INTERRUPT_RESULT_CONTINUE</b>, the gesture recognition process proceeds
779    /// properly. If it returns <b>GESTURE_INTERRUPT_RESULT_REJECT</b>, the gesture recognition process is paused.
780    ///
781    /// # Returns
782    ///
783    /// * Returns <b>0</b> if success.
784    /// Returns <b>401</b> if a parameter error occurs.
785    pub setGestureInterrupterToNode: ::core::option::Option<
786        unsafe extern "C" fn(
787            node: ArkUI_NodeHandle,
788            userData: *mut ::core::ffi::c_void,
789            interrupter: ::core::option::Option<
790                unsafe extern "C" fn(
791                    info: *mut ArkUI_GestureInterruptInfo,
792                ) -> ArkUI_GestureInterruptResult,
793            >,
794        ) -> i32,
795    >,
796}
797extern "C" {
798    /// Checks whether a gesture is a built-in gesture of the component.
799    ///
800    /// # Arguments
801    ///
802    /// * `event` - Indicates the pointer to the gesture interruption information.
803    ///
804    /// # Returns
805    ///
806    /// * Returns <b>true</b> if the gesture is a built-in gesture; returns <b>false</b> otherwise.
807    ///
808    ///
809    /// Available since API-level: 12
810    #[cfg(feature = "api-12")]
811    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
812    pub fn OH_ArkUI_GestureInterruptInfo_GetSystemFlag(
813        event: *const ArkUI_GestureInterruptInfo,
814    ) -> bool;
815    /// Obtains the pointer to interrupted gesture recognizer.
816    ///
817    /// # Arguments
818    ///
819    /// * `event` - Indicates the pointer to the gesture interruption information.
820    ///
821    /// # Returns
822    ///
823    /// * Returns the pointer to interrupted gesture recognizer.
824    ///
825    /// Available since API-level: 12
826    #[cfg(feature = "api-12")]
827    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
828    pub fn OH_ArkUI_GestureInterruptInfo_GetRecognizer(
829        event: *const ArkUI_GestureInterruptInfo,
830    ) -> *mut ArkUI_GestureRecognizer;
831    /// Obtains the pointer to the interrupted gesture event.
832    ///
833    /// # Arguments
834    ///
835    /// * `event` - Indicates the pointer to the gesture interruption information.
836    ///
837    /// # Returns
838    ///
839    /// * Returns the pointer to the interrupted gesture event.
840    ///
841    /// Available since API-level: 12
842    #[cfg(feature = "api-12")]
843    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
844    pub fn OH_ArkUI_GestureInterruptInfo_GetGestureEvent(
845        event: *const ArkUI_GestureInterruptInfo,
846    ) -> *mut ArkUI_GestureEvent;
847    /// Obtains the type of the system gesture to trigger.
848    ///
849    /// # Arguments
850    ///
851    /// * `event` - Indicates the pointer to the gesture interruption information.
852    ///
853    /// # Returns
854    ///
855    /// * Returns the type of the system gesture to trigger. If the gesture to trigger is not a system gesture,
856    /// <b>-1</b> is returned.
857    ///
858    /// Available since API-level: 12
859    #[cfg(feature = "api-12")]
860    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
861    pub fn OH_ArkUI_GestureInterruptInfo_GetSystemRecognizerType(
862        event: *const ArkUI_GestureInterruptInfo,
863    ) -> i32;
864    /// Get the touch recognizer handles from the gesture interrupt info.
865    ///
866    /// # Arguments
867    ///
868    /// * `info` - Indicates the pointer to a gesture interrupt info.
869    ///
870    /// * `recognizers` - Indicates the pointer to an array of touch recognizer handles.
871    ///
872    /// * `size` - Indicates the size of recognizers.
873    ///
874    /// # Returns
875    ///
876    /// * Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if success.
877    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter exception occurs.
878    ///
879    /// Available since API-level: 15
880    #[cfg(feature = "api-15")]
881    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
882    pub fn OH_ArkUI_GestureInterruptInfo_GetTouchRecognizers(
883        info: *const ArkUI_GestureInterruptInfo,
884        recognizers: *mut ArkUI_TouchRecognizerHandleArray,
885        size: *mut i32,
886    ) -> i32;
887    /// Get component object of the specific touch recognizer.
888    ///
889    /// # Arguments
890    ///
891    /// * `recognizer` - Indicates the pointer to the TouchRecognizer.
892    ///
893    /// # Returns
894    ///
895    /// * Get component object of the specific touch recognizer.
896    ///
897    /// Available since API-level: 15
898    #[cfg(feature = "api-15")]
899    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
900    pub fn OH_ArkUI_TouchRecognizer_GetNodeHandle(
901        recognizer: ArkUI_TouchRecognizerHandle,
902    ) -> ArkUI_NodeHandle;
903    /// Send touch-cancel event to the touch recognizer in a gesture interruption callback.
904    ///
905    /// # Arguments
906    ///
907    /// * `recognizer` - Indicates the touch recognizer handle.
908    ///
909    /// * `info` - Indicates the pointer to a gesture interrupt info.
910    ///
911    /// # Returns
912    ///
913    /// * Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if success.
914    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter exception occurs.
915    ///
916    /// Available since API-level: 15
917    #[cfg(feature = "api-15")]
918    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
919    pub fn OH_ArkUI_TouchRecognizer_CancelTouch(
920        recognizer: ArkUI_TouchRecognizerHandle,
921        info: *mut ArkUI_GestureInterruptInfo,
922    ) -> i32;
923    /// Obtains the gesture event type.
924    ///
925    /// # Arguments
926    ///
927    /// * `event` - Indicates the pointer to the gesture event.
928    ///
929    /// # Returns
930    ///
931    /// * Returns the gesture event type.
932    ///
933    /// Available since API-level: 12
934    #[cfg(feature = "api-12")]
935    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
936    pub fn OH_ArkUI_GestureEvent_GetActionType(
937        event: *const ArkUI_GestureEvent,
938    ) -> ArkUI_GestureEventActionType;
939    /// Obtains gesture input.
940    ///
941    /// # Arguments
942    ///
943    /// * `event` - Indicates the pointer to the gesture event.
944    ///
945    /// # Returns
946    ///
947    /// * Returns the pointer to the input event of the gesture event.
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_GestureEvent_GetRawInputEvent(
953        event: *const ArkUI_GestureEvent,
954    ) -> *const ArkUI_UIInputEvent;
955    /// Obtains the number of times that a long press gesture is triggered periodically.
956    ///
957    /// # Arguments
958    ///
959    /// * `event` - Indicates the pointer to the gesture event.
960    ///
961    /// # Returns
962    ///
963    /// * Returns the number of times that the long press gesture is triggered periodically.
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_LongPress_GetRepeatCount(event: *const ArkUI_GestureEvent) -> i32;
969    /// Obtains the velocity of a pan gesture along the main axis.
970    ///
971    /// # Arguments
972    ///
973    /// * `event` - Indicates the pointer to the gesture event.
974    ///
975    /// # Returns
976    ///
977    /// * Returns the velocity of the pan gesture along the main axis, in px/s.
978    /// The value is the square root of the sum of the squares of the velocity on the x-axis and y-axis.
979    ///
980    /// Available since API-level: 12
981    #[cfg(feature = "api-12")]
982    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
983    pub fn OH_ArkUI_PanGesture_GetVelocity(event: *const ArkUI_GestureEvent) -> f32;
984    /// Obtains the velocity of a pan gesture along the x-axis.
985    ///
986    /// # Arguments
987    ///
988    /// * `event` - Indicates the pointer to the gesture event.
989    ///
990    /// # Returns
991    ///
992    /// * Returns the velocity of the pan gesture along the x-axis, in px/s.
993    ///
994    /// Available since API-level: 12
995    #[cfg(feature = "api-12")]
996    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
997    pub fn OH_ArkUI_PanGesture_GetVelocityX(event: *const ArkUI_GestureEvent) -> f32;
998    /// Obtains the velocity of a pan gesture along the y-axis.
999    ///
1000    /// # Arguments
1001    ///
1002    /// * `event` - Indicates the pointer to the gesture event.
1003    ///
1004    /// # Returns
1005    ///
1006    /// * Returns the velocity of the pan gesture along the y-axis, in px/s.
1007    ///
1008    /// Available since API-level: 12
1009    #[cfg(feature = "api-12")]
1010    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1011    pub fn OH_ArkUI_PanGesture_GetVelocityY(event: *const ArkUI_GestureEvent) -> f32;
1012    /// Obtains the relative offset of a pan gesture along the x-axis.
1013    ///
1014    /// # Arguments
1015    ///
1016    /// * `event` - Indicates the pointer to the gesture event.
1017    ///
1018    /// # Returns
1019    ///
1020    /// * Returns the relative offset of the gesture along the x-axis, in px.
1021    ///
1022    /// Available since API-level: 12
1023    #[cfg(feature = "api-12")]
1024    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1025    pub fn OH_ArkUI_PanGesture_GetOffsetX(event: *const ArkUI_GestureEvent) -> f32;
1026    /// Obtains the relative offset of a pan gesture along the y-axis.
1027    ///
1028    /// # Arguments
1029    ///
1030    /// * `event` - Indicates the pointer to the gesture event.
1031    ///
1032    /// # Returns
1033    ///
1034    /// * Returns the relative offset of the gesture along the y-axis, in px.
1035    ///
1036    /// Available since API-level: 12
1037    #[cfg(feature = "api-12")]
1038    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1039    pub fn OH_ArkUI_PanGesture_GetOffsetY(event: *const ArkUI_GestureEvent) -> f32;
1040    /// Obtains the angle information of the swipe gesture.
1041    ///
1042    /// After a swipe gesture is recognized, a line connecting the two fingers is identified as the initial line.
1043    /// As the fingers swipe, the line between the fingers rotates.
1044    ///
1045    /// Based on the coordinates of the initial line's and current line's end points, the arc tangent function is used to
1046    /// calculate the respective included angle of the points relative to the horizontal direction
1047    ///
1048    /// by using the following formula: Rotation angle = arctan2(cy2-cy1,cx2-cx1) - arctan2(y2-y1,x2-x1).
1049    ///
1050    /// The initial line is used as the coordinate system. Values from 0 to 180 degrees represent clockwise rotation,
1051    /// while values from –180 to 0 degrees represent counterclockwise rotation.
1052    ///
1053    ///
1054    /// # Arguments
1055    ///
1056    /// * `event` - Indicates the pointer to the gesture event.
1057    ///
1058    /// # Returns
1059    ///
1060    /// * Returns the angle of the swipe gesture, which is the result obtained based on the aforementioned formula.
1061    ///
1062    /// Available since API-level: 12
1063    #[cfg(feature = "api-12")]
1064    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1065    pub fn OH_ArkUI_SwipeGesture_GetAngle(event: *const ArkUI_GestureEvent) -> f32;
1066    /// Obtains the average velocity of all fingers used in the swipe gesture.
1067    ///
1068    /// # Arguments
1069    ///
1070    /// * `event` - Indicates the pointer to the gesture event.
1071    ///
1072    /// # Returns
1073    ///
1074    /// * Returns the average velocity of all fingers used in the swipe gesture, in px/s.
1075    ///
1076    /// Available since API-level: 12
1077    #[cfg(feature = "api-12")]
1078    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1079    pub fn OH_ArkUI_SwipeGesture_GetVelocity(event: *const ArkUI_GestureEvent) -> f32;
1080    /// Obtains the angle information of a rotation gesture.
1081    ///
1082    /// # Arguments
1083    ///
1084    /// * `event` - Indicates the pointer to the gesture event.
1085    ///
1086    /// # Returns
1087    ///
1088    /// * Returns the rotation angle.
1089    ///
1090    /// Available since API-level: 12
1091    #[cfg(feature = "api-12")]
1092    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1093    pub fn OH_ArkUI_RotationGesture_GetAngle(event: *const ArkUI_GestureEvent) -> f32;
1094    /// Obtains the scale ratio of a pinch gesture.
1095    ///
1096    /// # Arguments
1097    ///
1098    /// * `event` - Indicates the pointer to the gesture event.
1099    ///
1100    /// # Returns
1101    ///
1102    /// * Returns the scale ratio.
1103    ///
1104    /// Available since API-level: 12
1105    #[cfg(feature = "api-12")]
1106    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1107    pub fn OH_ArkUI_PinchGesture_GetScale(event: *const ArkUI_GestureEvent) -> f32;
1108    /// Obtains the X coordinate of the center of the pinch gesture, in vp,
1109    /// relative to the upper left corner of the current component.
1110    ///
1111    /// # Arguments
1112    ///
1113    /// * `event` - Indicates the pointer to the gesture event.
1114    ///
1115    /// # Returns
1116    ///
1117    /// * Returns the X coordinate of the center of the pinch gesture, in vp,
1118    /// relative to the upper left corner of the current component.
1119    ///
1120    /// Available since API-level: 12
1121    #[cfg(feature = "api-12")]
1122    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1123    pub fn OH_ArkUI_PinchGesture_GetCenterX(event: *const ArkUI_GestureEvent) -> f32;
1124    /// Obtains the Y coordinate of the center of the pinch gesture, in vp,
1125    /// relative to the upper left corner of the current component.
1126    ///
1127    /// # Arguments
1128    ///
1129    /// * `event` - Indicates the pointer to the gesture event.
1130    ///
1131    /// # Returns
1132    ///
1133    /// * Returns the Y coordinate of the center of the pinch gesture, in vp,
1134    /// relative to the upper left corner of the current component.
1135    ///
1136    /// Available since API-level: 12
1137    #[cfg(feature = "api-12")]
1138    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1139    pub fn OH_ArkUI_PinchGesture_GetCenterY(event: *const ArkUI_GestureEvent) -> f32;
1140    /// Obtains information about a gesture response chain.
1141    ///
1142    /// # Arguments
1143    ///
1144    /// * `event` - Indicates the pointer to the gesture interruption information.
1145    ///
1146    /// * `responseChain` - Indicates the pointer to an array of gesture recognizers on the response chain.
1147    ///
1148    /// * `count` - Indicates the pointer to the number of gesture recognizers on the response chain.
1149    ///
1150    /// # Returns
1151    ///
1152    /// * Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if success.
1153    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter exception occurs.
1154    ///
1155    /// Available since API-level: 12
1156    #[cfg(feature = "api-12")]
1157    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1158    pub fn OH_ArkUI_GetResponseRecognizersFromInterruptInfo(
1159        event: *const ArkUI_GestureInterruptInfo,
1160        responseChain: *mut ArkUI_GestureRecognizerHandleArray,
1161        count: *mut i32,
1162    ) -> i32;
1163    /// Sets the enabled state of a gesture recognizer.
1164    ///
1165    /// # Arguments
1166    ///
1167    /// * `recognizer` - Indicates the pointer to a gesture recognizer.
1168    ///
1169    /// * `enabled` - Indicates the enabled state.
1170    ///
1171    /// # Returns
1172    ///
1173    /// * Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if success.
1174    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter exception occurs.
1175    ///
1176    /// Available since API-level: 12
1177    #[cfg(feature = "api-12")]
1178    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1179    pub fn OH_ArkUI_SetGestureRecognizerEnabled(
1180        recognizer: *mut ArkUI_GestureRecognizer,
1181        enabled: bool,
1182    ) -> i32;
1183    /// Sets whether to enable strict finger count checking. If this feature is enabled and the actual number of touch
1184    /// fingers does not match the set number, the gesture recognition fails.
1185    ///
1186    /// # Arguments
1187    ///
1188    /// * `recognizer` - Indicates the pointer to a gesture recognizer.
1189    ///
1190    /// * `limitFingerCount` - Indicates whether to enable strict finger count checking.
1191    ///
1192    /// # Returns
1193    ///
1194    /// * Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if success.
1195    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1196    ///
1197    /// Available since API-level: 15
1198    #[cfg(feature = "api-15")]
1199    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1200    pub fn OH_ArkUI_SetGestureRecognizerLimitFingerCount(
1201        recognizer: *mut ArkUI_GestureRecognizer,
1202        limitFingerCount: bool,
1203    ) -> i32;
1204    /// Obtains the enabled state of a gesture recognizer.
1205    ///
1206    /// # Arguments
1207    ///
1208    /// * `recognizer` - Indicates the pointer to a gesture recognizer.
1209    ///
1210    /// # Returns
1211    ///
1212    /// * Returns <b>true</b> if the gesture recognizer is enabled.
1213    /// Returns <b>false</b> if the gesture recognizer is disabled.
1214    ///
1215    /// Available since API-level: 12
1216    #[cfg(feature = "api-12")]
1217    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1218    pub fn OH_ArkUI_GetGestureRecognizerEnabled(recognizer: *mut ArkUI_GestureRecognizer) -> bool;
1219    /// Obtains the state of a gesture recognizer.
1220    ///
1221    /// # Arguments
1222    ///
1223    /// * `recognizer` - Indicates the pointer to a gesture recognizer.
1224    ///
1225    /// * `state` - Indicates the pointer to the state of the gesture recognizer.
1226    ///
1227    /// # Returns
1228    ///
1229    /// * Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if success.
1230    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter exception occurs.
1231    ///
1232    /// Available since API-level: 12
1233    #[cfg(feature = "api-12")]
1234    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1235    pub fn OH_ArkUI_GetGestureRecognizerState(
1236        recognizer: *mut ArkUI_GestureRecognizer,
1237        state: *mut ArkUI_GestureRecognizerState,
1238    ) -> i32;
1239    /// Obtains the information about a gesture event target.
1240    ///
1241    /// # Arguments
1242    ///
1243    /// * `recognizer` - Indicates the pointer to a gesture recognizer.
1244    ///
1245    /// * `info` - Indicates the information about a gesture event target.
1246    ///
1247    /// # Returns
1248    ///
1249    /// * Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if success.
1250    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter exception occurs.
1251    ///
1252    /// Available since API-level: 12
1253    #[cfg(feature = "api-12")]
1254    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1255    pub fn OH_ArkUI_GetGestureEventTargetInfo(
1256        recognizer: *mut ArkUI_GestureRecognizer,
1257        info: *mut *mut ArkUI_GestureEventTargetInfo,
1258    ) -> i32;
1259    /// Obtains whether this scroll container is scrolled to the top.
1260    ///
1261    /// # Arguments
1262    ///
1263    /// * `info` - Indicates the information about a gesture event target.
1264    ///
1265    /// * `ret` - Indicates whether the scroll container is scrolled to the top.
1266    ///
1267    /// # Returns
1268    ///
1269    /// * Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if success.
1270    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter exception occurs.
1271    /// Returns [`ARKUI_ERROR_CODE_NON_SCROLLABLE_CONTAINER`] if the component is not a scroll container.
1272    ///
1273    /// Available since API-level: 12
1274    #[cfg(feature = "api-12")]
1275    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1276    pub fn OH_ArkUI_GestureEventTargetInfo_IsScrollBegin(
1277        info: *mut ArkUI_GestureEventTargetInfo,
1278        ret: *mut bool,
1279    ) -> i32;
1280    /// Obtains whether this scroll container is scrolled to the bottom.
1281    ///
1282    /// # Arguments
1283    ///
1284    /// * `info` - Indicates the information about a gesture event target.
1285    ///
1286    /// * `ret` - Indicates whether the scroll container is scrolled to the bottom.
1287    ///
1288    /// # Returns
1289    ///
1290    /// * Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if success.
1291    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter exception occurs.
1292    /// Returns [`ARKUI_ERROR_CODE_NON_SCROLLABLE_CONTAINER`] if the component is not a scroll container.
1293    ///
1294    /// Available since API-level: 12
1295    #[cfg(feature = "api-12")]
1296    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1297    pub fn OH_ArkUI_GestureEventTargetInfo_IsScrollEnd(
1298        info: *mut ArkUI_GestureEventTargetInfo,
1299        ret: *mut bool,
1300    ) -> i32;
1301    /// Obtains the direction of a pan gesture.
1302    ///
1303    /// # Arguments
1304    ///
1305    /// * `recognizer` - Indicates the pointer to a gesture recognizer.
1306    ///
1307    /// * `directionMask` - Indicates the pan direction.
1308    ///
1309    /// # Returns
1310    ///
1311    /// * Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if success.
1312    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter exception occurs.
1313    ///
1314    /// Available since API-level: 12
1315    #[cfg(feature = "api-12")]
1316    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1317    pub fn OH_ArkUI_GetPanGestureDirectionMask(
1318        recognizer: *mut ArkUI_GestureRecognizer,
1319        directionMask: *mut ArkUI_GestureDirectionMask,
1320    ) -> i32;
1321    /// Obtains whether a gesture is a built-in gesture.
1322    ///
1323    /// # Arguments
1324    ///
1325    /// * `recognizer` - Indicates the pointer to a gesture recognizer.
1326    ///
1327    /// # Returns
1328    ///
1329    /// * Returns <b>true</b> if the gesture is a built-in gesture; returns <b>false</b> otherwise.
1330    ///
1331    /// Available since API-level: 12
1332    #[cfg(feature = "api-12")]
1333    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1334    pub fn OH_ArkUI_IsBuiltInGesture(recognizer: *mut ArkUI_GestureRecognizer) -> bool;
1335    /// Obtains the tag of a gesture recognizer.
1336    ///
1337    /// # Arguments
1338    ///
1339    /// * `recognizer` - Indicates the pointer to a gesture recognizer.
1340    ///
1341    /// * `buffer` - Indicates the buffer.
1342    ///
1343    /// * `bufferSize` - Indicates the buffer size.
1344    ///
1345    /// * `result` - Indicates the length of the string to be written to the buffer.
1346    ///
1347    /// # Returns
1348    ///
1349    /// * Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if success.
1350    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter exception occurs.
1351    /// Returns [`ARKUI_ERROR_CODE_BUFFER_SIZE_NOT_ENOUGH`] if the buffer is not large enough.
1352    ///
1353    /// Available since API-level: 12
1354    #[cfg(feature = "api-12")]
1355    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1356    pub fn OH_ArkUI_GetGestureTag(
1357        recognizer: *mut ArkUI_GestureRecognizer,
1358        buffer: *mut ::core::ffi::c_char,
1359        bufferSize: i32,
1360        result: *mut i32,
1361    ) -> i32;
1362    /// Obtains the ID of the component linked to a gesture recognizer.
1363    ///
1364    /// # Arguments
1365    ///
1366    /// * `recognizer` - Indicates the pointer to a gesture recognizer.
1367    ///
1368    /// * `nodeId` - Indicates the component ID.
1369    ///
1370    /// * `size` - Indicates the buffer size.
1371    ///
1372    /// * `result` - Indicates the length of the string to be written to the buffer.
1373    ///
1374    /// # Returns
1375    ///
1376    /// * Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if success.
1377    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter exception occurs.
1378    /// Returns [`ARKUI_ERROR_CODE_BUFFER_SIZE_NOT_ENOUGH`] if the buffer is not large enough.
1379    ///
1380    /// Available since API-level: 12
1381    #[cfg(feature = "api-12")]
1382    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1383    pub fn OH_ArkUI_GetGestureBindNodeId(
1384        recognizer: *mut ArkUI_GestureRecognizer,
1385        nodeId: *mut ::core::ffi::c_char,
1386        size: i32,
1387        result: *mut i32,
1388    ) -> i32;
1389    /// Obtains whether a gesture recognizer is valid.
1390    ///
1391    /// # Arguments
1392    ///
1393    /// * `recognizer` - Indicates the pointer to a gesture recognizer.
1394    ///
1395    /// # Returns
1396    ///
1397    /// * Returns <b>true</b> if the gesture recognizer is valid.
1398    /// Returns <b>false</b> if the gesture recognizer is invalid.
1399    ///
1400    /// Available since API-level: 12
1401    #[cfg(feature = "api-12")]
1402    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1403    pub fn OH_ArkUI_IsGestureRecognizerValid(recognizer: *mut ArkUI_GestureRecognizer) -> bool;
1404    /// Obtains custom data in the parallel internal gesture event.
1405    ///
1406    /// # Arguments
1407    ///
1408    /// * `event` - Indicates the pointer to a parallel internal gesture event.
1409    ///
1410    /// # Returns
1411    ///
1412    /// * Returns the pointer to custom data.
1413    ///
1414    /// Available since API-level: 12
1415    #[cfg(feature = "api-12")]
1416    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1417    pub fn OH_ArkUI_ParallelInnerGestureEvent_GetUserData(
1418        event: *mut ArkUI_ParallelInnerGestureEvent,
1419    ) -> *mut ::core::ffi::c_void;
1420    /// Obtains the current gesture recognizer in a parallel internal gesture event.
1421    ///
1422    /// # Arguments
1423    ///
1424    /// * `event` - Indicates the pointer to a parallel internal gesture event.
1425    ///
1426    /// # Returns
1427    ///
1428    /// * Returns the pointer to the current gesture recognizer.
1429    ///
1430    /// Available since API-level: 12
1431    #[cfg(feature = "api-12")]
1432    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1433    pub fn OH_ArkUI_ParallelInnerGestureEvent_GetCurrentRecognizer(
1434        event: *mut ArkUI_ParallelInnerGestureEvent,
1435    ) -> *mut ArkUI_GestureRecognizer;
1436    /// Obtains the conflicting gesture recognizers in a parallel internal gesture event.
1437    ///
1438    /// # Arguments
1439    ///
1440    /// * `event` - Indicates the pointer to a parallel internal gesture event.
1441    ///
1442    /// * `array` - Indicates the pointer to the array of conflicting gesture recognizers.
1443    ///
1444    /// * `size` - Indicates the size of the array of conflicting gesture recognizers.
1445    ///
1446    /// # Returns
1447    ///
1448    /// * Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if success.
1449    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter exception occurs.
1450    ///
1451    /// Available since API-level: 12
1452    #[cfg(feature = "api-12")]
1453    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1454    pub fn OH_ArkUI_ParallelInnerGestureEvent_GetConflictRecognizers(
1455        event: *mut ArkUI_ParallelInnerGestureEvent,
1456        array: *mut ArkUI_GestureRecognizerHandleArray,
1457        size: *mut i32,
1458    ) -> i32;
1459    /// Sets a callback function for notifying gesture recognizer destruction.
1460    ///
1461    /// # Arguments
1462    ///
1463    /// * `recognizer` - Indicates the pointer to a gesture recognizer.
1464    ///
1465    /// * `callback` - Indicates the callback function for notifying gesture recognizer destruction.
1466    ///
1467    /// * `userData` - Indicates the custom data.
1468    ///
1469    /// # Returns
1470    ///
1471    /// * Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if success.
1472    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter exception occurs.
1473    ///
1474    /// Available since API-level: 12
1475    #[cfg(feature = "api-12")]
1476    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1477    pub fn OH_ArkUI_SetArkUIGestureRecognizerDisposeNotify(
1478        recognizer: *mut ArkUI_GestureRecognizer,
1479        callback: ArkUI_GestureRecognizerDisposeNotifyCallback,
1480        userData: *mut ::core::ffi::c_void,
1481    ) -> i32;
1482    /// Obtains the swipe direction of a gesture recognizer.
1483    ///
1484    /// # Arguments
1485    ///
1486    /// * `recognizer` - Pointer to a gesture recognizer.
1487    ///
1488    /// * `directMask` - Swipe direction of the gesture recognizer.
1489    ///
1490    /// # Returns
1491    ///
1492    /// * Returns the result code.
1493    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1494    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1495    ///
1496    /// Available since API-level: 18
1497    #[cfg(feature = "api-18")]
1498    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
1499    pub fn OH_ArkUI_GetGestureParam_DirectMask(
1500        recognizer: *mut ArkUI_GestureRecognizer,
1501        directMask: *mut ArkUI_GestureDirectionMask,
1502    ) -> i32;
1503    /// Obtains the number of fingers used by a gesture recognizer.
1504    ///
1505    /// # Arguments
1506    ///
1507    /// * `recognizer` - Pointer to a gesture recognizer.
1508    ///
1509    /// * `finger` - Number of fingers used by the gesture recognizer.
1510    ///
1511    /// # Returns
1512    ///
1513    /// * Returns the result code.
1514    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1515    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1516    ///
1517    /// Available since API-level: 18
1518    #[cfg(feature = "api-18")]
1519    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
1520    pub fn OH_ArkUI_GetGestureParam_FingerCount(
1521        recognizer: *mut ArkUI_GestureRecognizer,
1522        finger: *mut ::core::ffi::c_int,
1523    ) -> i32;
1524    /// Checks whether a gesture recognizer has a finger count limit.
1525    ///
1526    /// # Arguments
1527    ///
1528    /// * `recognizer` - Pointer to a gesture recognizer.
1529    ///
1530    /// * `isLimited` - Whether the gesture recognizer has a finger count limit.
1531    ///
1532    /// # Returns
1533    ///
1534    /// * Returns the result code.
1535    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1536    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1537    ///
1538    /// Available since API-level: 18
1539    #[cfg(feature = "api-18")]
1540    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
1541    pub fn OH_ArkUI_GetGestureParam_limitFingerCount(
1542        recognizer: *mut ArkUI_GestureRecognizer,
1543        isLimited: *mut bool,
1544    ) -> i32;
1545    /// Checks whether a gesture recognizer supports repeated event callbacks.
1546    ///
1547    /// # Arguments
1548    ///
1549    /// * `recognizer` - Pointer to a gesture recognizer.
1550    ///
1551    /// * `isRepeat` - Whether the gesture recognizer supports repeated event callbacks.
1552    ///
1553    /// # Returns
1554    ///
1555    /// * Returns the result code.
1556    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1557    /// Returns [`ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED`] if the gesture recognizer type is not
1558    /// supported.
1559    ///
1560    /// Available since API-level: 18
1561    #[cfg(feature = "api-18")]
1562    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
1563    pub fn OH_ArkUI_GetGestureParam_repeat(
1564        recognizer: *mut ArkUI_GestureRecognizer,
1565        isRepeat: *mut bool,
1566    ) -> i32;
1567    /// Obtains the allowed movement distance range for a gesture recognizer.
1568    ///
1569    /// # Arguments
1570    ///
1571    /// * `recognizer` - Pointer to a gesture recognizer.
1572    ///
1573    /// * `distance` - Allowed movement distance range of the gesture recognizer.
1574    ///
1575    /// # Returns
1576    ///
1577    /// * Returns the result code.
1578    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1579    /// Returns [`ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED`] if the gesture recognizer type is not
1580    /// supported.
1581    ///
1582    /// Available since API-level: 18
1583    #[cfg(feature = "api-18")]
1584    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
1585    pub fn OH_ArkUI_GetGestureParam_distance(
1586        recognizer: *mut ArkUI_GestureRecognizer,
1587        distance: *mut f64,
1588    ) -> i32;
1589    /// Obtains the minimum swipe speed recognized by a gesture recognizer.
1590    ///
1591    /// # Arguments
1592    ///
1593    /// * `recognizer` - Pointer to a gesture recognizer.
1594    ///
1595    /// * `speed` - Minimum swipe speed recognized by a gesture recognizer.
1596    ///
1597    /// # Returns
1598    ///
1599    /// * Returns the result code.
1600    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1601    /// Returns [`ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED`] if the gesture recognizer type is not
1602    /// supported.
1603    ///
1604    /// Available since API-level: 18
1605    #[cfg(feature = "api-18")]
1606    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
1607    pub fn OH_ArkUI_GetGestureParam_speed(
1608        recognizer: *mut ArkUI_GestureRecognizer,
1609        speed: *mut f64,
1610    ) -> i32;
1611    /// Obtains the minimum duration required to trigger a long press by a gesture recognizer.
1612    ///
1613    /// # Arguments
1614    ///
1615    /// * `recognizer` - Pointer to a gesture recognizer.
1616    ///
1617    /// * `duration` - Minimum duration for a long press.
1618    ///
1619    /// # Returns
1620    ///
1621    /// * Returns the result code.
1622    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1623    /// Returns [`ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED`] if the gesture recognizer type is not
1624    /// supported.
1625    ///
1626    /// Available since API-level: 18
1627    #[cfg(feature = "api-18")]
1628    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
1629    pub fn OH_ArkUI_GetGestureParam_duration(
1630        recognizer: *mut ArkUI_GestureRecognizer,
1631        duration: *mut ::core::ffi::c_int,
1632    ) -> i32;
1633    /// Obtains the minimum angle change required for a rotation gesture to be recognized by a gesture recognizer.
1634    ///
1635    /// # Arguments
1636    ///
1637    /// * `recognizer` - Pointer to a gesture recognizer.
1638    ///
1639    /// * `angle` - Minimum angle change.
1640    ///
1641    /// # Returns
1642    ///
1643    /// * Returns the result code.
1644    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1645    /// Returns [`ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED`] if the gesture recognizer type is not
1646    /// supported.
1647    ///
1648    /// Available since API-level: 18
1649    #[cfg(feature = "api-18")]
1650    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
1651    pub fn OH_ArkUI_GetGestureParam_angle(
1652        recognizer: *mut ArkUI_GestureRecognizer,
1653        angle: *mut f64,
1654    ) -> i32;
1655    /// Obtains the movement threshold for gestures to be recognized by a gesture recognizer.
1656    ///
1657    /// # Arguments
1658    ///
1659    /// * `recognizer` - Pointer to a gesture recognizer.
1660    ///
1661    /// * `distanceThresHold` - Movement threshold.
1662    ///
1663    /// # Returns
1664    ///
1665    /// * Returns the result code.
1666    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1667    /// Returns [`ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED`] if the gesture recognizer type is not
1668    /// supported.
1669    ///
1670    /// Available since API-level: 18
1671    #[cfg(feature = "api-18")]
1672    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
1673    pub fn OH_ArkUI_GetGestureParam_distanceThreshold(
1674        recognizer: *mut ArkUI_GestureRecognizer,
1675        distanceThreshold: *mut f64,
1676    ) -> i32;
1677    /// Sets the minimum movement distance thresholds for gestures to be recognized by a gesture recognizer.
1678    ///
1679    /// # Arguments
1680    ///
1681    /// * `recognizer` - Indicates the pointer to a gesture recognizer.
1682    ///
1683    /// * `size` - Size of the array of minimum movement distance thresholds.
1684    ///
1685    /// * `toolTypeArray` - Pointer to the array of tool types for which thresholds are set.
1686    ///
1687    /// * `distanceArray` - Pointer to the array of minimum movement distances, in px.
1688    ///
1689    /// # Returns
1690    ///
1691    /// * Returns the result code.
1692    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1693    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1694    /// Returns [`ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED`] if the gesture recognizer type is
1695    /// not supported.
1696    ///
1697    /// Available since API-level: 19
1698    #[cfg(feature = "api-19")]
1699    #[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
1700    pub fn OH_ArkUI_PanGesture_SetDistanceMap(
1701        recognizer: *mut ArkUI_GestureRecognizer,
1702        size: ::core::ffi::c_int,
1703        toolTypeArray: *mut ::core::ffi::c_int,
1704        distanceArray: *mut f64,
1705    ) -> ArkUiResult;
1706    /// Obtains the movement threshold for gestures to be recognized by a gesture recognizer for a specific tool type.
1707    ///
1708    /// # Arguments
1709    ///
1710    /// * `recognizer` - Indicates the pointer to a gesture recognizer.
1711    ///
1712    /// * `toolType` - Tool type for which you want to obtain the threshold.
1713    ///
1714    /// * `distance` - Gesture movement threshold of the gesture recognizer, in px.
1715    ///
1716    /// # Returns
1717    ///
1718    /// * Returns the result code.
1719    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1720    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter exception occurs.
1721    /// Returns [`ARKUI_ERROR_CODE_RECOGNIZER_TYPE_NOT_SUPPORTED`] if the gesture recognizer type is
1722    /// not supported.
1723    ///
1724    /// Available since API-level: 19
1725    #[cfg(feature = "api-19")]
1726    #[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
1727    pub fn OH_ArkUI_PanGesture_GetDistanceByToolType(
1728        recognizer: *mut ArkUI_GestureRecognizer,
1729        toolType: ::core::ffi::c_int,
1730        distance: *mut f64,
1731    ) -> ArkUiResult;
1732    /// Registers a callback that is executed after all gesture recognizers are collected.
1733    /// When the user begins touching the screen, the system performs hit testing and collects gesture recognizers
1734    /// based on the touch location. Subsequently, before processing any move events, the component can use this API
1735    /// to determine the gesture recognizers that will participate in and compete for recognition.
1736    ///
1737    /// # Arguments
1738    ///
1739    /// * `node` - Handle to the node on which the callback is to be set.
1740    ///
1741    /// * `userData` - Custom data.
1742    ///
1743    /// * `touchTestDone` - Callback for completion of gesture recognizer collection.
1744    /// - event: Basic information of the gesture.
1745    /// - recognizers: Array of gesture recognizers.
1746    /// - count: Number of gesture recognizers.
1747    ///
1748    /// # Returns
1749    ///
1750    /// * Result code.
1751    /// [`ARKUI_ERROR_CODE_NO_ERROR`]: The operation is successful.
1752    /// [`ARKUI_ERROR_CODE_PARAM_INVALID`]: A parameter error occurs.
1753    ///
1754    /// Available since API-level: 20
1755    #[cfg(feature = "api-20")]
1756    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1757    pub fn OH_ArkUI_SetTouchTestDoneCallback(
1758        node: ArkUI_NodeHandle,
1759        userData: *mut ::core::ffi::c_void,
1760        touchTestDone: ::core::option::Option<
1761            unsafe extern "C" fn(
1762                event: *mut ArkUI_GestureEvent,
1763                recognizers: ArkUI_GestureRecognizerHandleArray,
1764                count: i32,
1765                userData: *mut ::core::ffi::c_void,
1766            ),
1767        >,
1768    ) -> ArkUiResult;
1769    /// Obtains the custom data from a gesture interruption event.
1770    ///
1771    /// # Arguments
1772    ///
1773    /// * `event` - Pointer to the gesture interruption information.
1774    ///
1775    /// # Returns
1776    ///
1777    /// * Returns the pointer to the custom data.
1778    ///
1779    /// Available since API-level: 18
1780    #[cfg(feature = "api-18")]
1781    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
1782    pub fn OH_ArkUI_GestureInterrupter_GetUserData(
1783        event: *mut ArkUI_GestureInterruptInfo,
1784    ) -> *mut ::core::ffi::c_void;
1785    /// Prevents a gesture recognizer from participating in the current gesture recognition before all fingers are
1786    /// lifted.
1787    /// If the system has already determined the result of the gesture recognizer (regardless of success or failure),
1788    /// calling this API will be ineffective.
1789    ///
1790    /// # Arguments
1791    ///
1792    /// * `recognizer` - Pointer to a gesture recognizer.
1793    ///
1794    /// # Returns
1795    ///
1796    /// * Result code.
1797    /// [`ARKUI_ERROR_CODE_NO_ERROR`]: The operation is successful.
1798    /// [`ARKUI_ERROR_CODE_PARAM_INVALID`]: A parameter error occurs.
1799    ///
1800    /// Available since API-level: 20
1801    #[cfg(feature = "api-20")]
1802    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1803    pub fn OH_ArkUI_PreventGestureRecognizerBegin(
1804        recognizer: *mut ArkUI_GestureRecognizer,
1805    ) -> ArkUiResult;
1806}