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