Skip to main content

arkui_sys/native_animate/
native_animate_ffi.rs

1// automatically generated by rust-bindgen 0.71.1
2
3#![allow(non_upper_case_globals)]
4#![allow(non_camel_case_types)]
5#![allow(non_snake_case)]
6use crate::native_type::*;
7#[cfg(feature = "api-12")]
8use ohos_sys_opaque_types::ArkUI_ContextHandle;
9
10/// Defines the expected frame rate range of the animation.
11///
12///
13/// Available since API-level: 12
14#[cfg(feature = "api-12")]
15#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
16#[repr(C)]
17#[derive(Debug, Copy, Clone)]
18pub struct ArkUI_ExpectedFrameRateRange {
19    /// Expected minimum frame rate.
20    pub min: u32,
21    /// Expected maximum frame rate.
22    pub max: u32,
23    /// Expected optimal frame rate.
24    pub expected: u32,
25}
26/// Defines the callback type for when the animation playback is complete.
27///
28///
29/// Available since API-level: 12
30#[cfg(feature = "api-12")]
31#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
32#[repr(C)]
33pub struct ArkUI_AnimateCompleteCallback {
34    /// Type of the <b>onFinish</b> callback.
35    pub type_: ArkUI_FinishCallbackType,
36    /// Callback invoked when the animation playback is complete.
37    pub callback: ::core::option::Option<unsafe extern "C" fn(userData: *mut ::core::ffi::c_void)>,
38    /// Custom type.
39    pub userData: *mut ::core::ffi::c_void,
40}
41/// Defines the animation configuration.
42///
43///
44/// Available since API-level: 12
45#[cfg(feature = "api-12")]
46#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
47#[repr(C)]
48pub struct ArkUI_AnimateOption {
49    _unused: [u8; 0],
50}
51/// Defines an interpolation curve.
52///
53///
54/// Available since API-level: 12
55#[cfg(feature = "api-12")]
56#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
57#[repr(C)]
58pub struct ArkUI_Curve {
59    _unused: [u8; 0],
60}
61/// Defines the pointer to an interpolation curve.
62///
63///
64/// Available since API-level: 12
65#[cfg(feature = "api-12")]
66#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
67pub type ArkUI_CurveHandle = *mut ArkUI_Curve;
68/// Defines the keyframe animation parameter object.
69///
70///
71/// Available since API-level: 12
72#[cfg(feature = "api-12")]
73#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
74#[repr(C)]
75pub struct ArkUI_KeyframeAnimateOption {
76    _unused: [u8; 0],
77}
78/// Defines the animator parameter object.
79///
80///
81/// Available since API-level: 12
82#[cfg(feature = "api-12")]
83#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
84#[repr(C)]
85pub struct ArkUI_AnimatorOption {
86    _unused: [u8; 0],
87}
88#[repr(C)]
89pub struct ArkUI_Animator {
90    _unused: [u8; 0],
91}
92/// Defines the pointer to an animator object.
93///
94///
95/// Available since API-level: 12
96#[cfg(feature = "api-12")]
97#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
98pub type ArkUI_AnimatorHandle = *mut ArkUI_Animator;
99/// Defines the animator callback event object.
100///
101///
102/// Available since API-level: 12
103#[cfg(feature = "api-12")]
104#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
105#[repr(C)]
106pub struct ArkUI_AnimatorEvent {
107    _unused: [u8; 0],
108}
109/// Defines the callback object when the animator receives a frame.
110///
111///
112/// Available since API-level: 12
113#[cfg(feature = "api-12")]
114#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
115#[repr(C)]
116pub struct ArkUI_AnimatorOnFrameEvent {
117    _unused: [u8; 0],
118}
119/// Defines the transition effect.
120///
121///
122/// Available since API-level: 12
123#[cfg(feature = "api-12")]
124#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
125#[repr(C)]
126pub struct ArkUI_TransitionEffect {
127    _unused: [u8; 0],
128}
129/// Implements the native animation APIs provided by ArkUI.
130///
131///
132/// Version: 1
133///
134/// Available since API-level: 12
135#[cfg(feature = "api-12")]
136#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
137#[repr(C)]
138pub struct ArkUI_NativeAnimateAPI_1 {
139    /// Defines an explicit animation.
140    ///
141    ///
142    /// **Note:** Make sure the component attributes to be set in the event closure have been set before.
143    ///
144    /// # Arguments
145    ///
146    /// * `context` - Indicates a <b>UIContext</b> instance.
147    ///
148    /// * `option` - Indicates the pointer to an animation configuration.
149    ///
150    /// * `update` - Indicates the animation closure. The system automatically inserts a transition animation for the
151    /// state change caused by the closure.
152    ///
153    /// * `complete` - Indicates the callback to be invoked when the animation playback is complete.
154    ///
155    /// # Returns
156    ///
157    /// * Returns the error code.
158    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
159    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
160    pub animateTo: ::core::option::Option<
161        unsafe extern "C" fn(
162            context: ArkUI_ContextHandle,
163            option: *mut ArkUI_AnimateOption,
164            update: *mut ArkUI_ContextCallback,
165            complete: *mut ArkUI_AnimateCompleteCallback,
166        ) -> i32,
167    >,
168    /// Sets the keyframe animation.
169    ///
170    ///
171    /// # Arguments
172    ///
173    /// * `context` - Indicates a <b>UIContext</b> instance.
174    ///
175    /// * `option` - Indicates the keyframe animation parameters.
176    ///
177    /// # Returns
178    ///
179    /// * Returns the error code.
180    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
181    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
182    pub keyframeAnimateTo: ::core::option::Option<
183        unsafe extern "C" fn(
184            context: ArkUI_ContextHandle,
185            option: *mut ArkUI_KeyframeAnimateOption,
186        ) -> i32,
187    >,
188    /// Creates an animator object.
189    ///
190    /// # Arguments
191    ///
192    /// * `context` - Indicates a <b>UIContext</b> instance.
193    ///
194    /// * `option` - Indicates the animator parameters.
195    ///
196    /// # Returns
197    ///
198    /// * Returns the pointer to the animator object; returns <b>NULL</b> if a function parameter error occurs.
199    pub createAnimator: ::core::option::Option<
200        unsafe extern "C" fn(
201            context: ArkUI_ContextHandle,
202            option: *mut ArkUI_AnimatorOption,
203        ) -> ArkUI_AnimatorHandle,
204    >,
205    /// Disposes of an animator object.
206    ///
207    /// # Arguments
208    ///
209    /// * `animatorHandle` - Indicates the target animator object.
210    pub disposeAnimator:
211        ::core::option::Option<unsafe extern "C" fn(animatorHandle: ArkUI_AnimatorHandle)>,
212}
213extern "C" {
214    /// Creates an animation configuration.
215    ///
216    ///
217    /// # Returns
218    ///
219    /// * Returns the pointer to the created animation configuration.
220    ///
221    /// Available since API-level: 12
222    #[cfg(feature = "api-12")]
223    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
224    pub fn OH_ArkUI_AnimateOption_Create() -> *mut ArkUI_AnimateOption;
225    /// Disposes of an animation configuration.
226    ///
227    /// # Arguments
228    ///
229    /// * `option` - Indicates the pointer to an animation configuration.
230    ///
231    /// Available since API-level: 12
232    #[cfg(feature = "api-12")]
233    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
234    pub fn OH_ArkUI_AnimateOption_Dispose(option: *mut ArkUI_AnimateOption);
235    /// Obtains the animation duration, in milliseconds.
236    ///
237    /// # Arguments
238    ///
239    /// * `option` - Indicates the pointer to an animation configuration.
240    ///
241    /// # Returns
242    ///
243    /// * Returns the duration.
244    ///
245    /// Available since API-level: 12
246    #[cfg(feature = "api-12")]
247    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
248    pub fn OH_ArkUI_AnimateOption_GetDuration(option: *mut ArkUI_AnimateOption) -> u32;
249    /// Obtains the animation playback speed.
250    ///
251    /// # Arguments
252    ///
253    /// * `option` - Indicates the pointer to an animation configuration.
254    ///
255    /// # Returns
256    ///
257    /// * Returns the animation playback speed.
258    ///
259    /// Available since API-level: 12
260    #[cfg(feature = "api-12")]
261    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
262    pub fn OH_ArkUI_AnimateOption_GetTempo(option: *mut ArkUI_AnimateOption) -> f32;
263    /// Obtains the animation curve.
264    ///
265    /// # Arguments
266    ///
267    /// * `option` - Indicates the pointer to an animation configuration.
268    ///
269    /// # Returns
270    ///
271    /// * Returns the animated curve.If Null is returned, it means option is an invalid value.
272    ///
273    /// Available since API-level: 12
274    #[cfg(feature = "api-12")]
275    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
276    pub fn OH_ArkUI_AnimateOption_GetCurve(
277        option: *mut ArkUI_AnimateOption,
278    ) -> ArkUI_AnimationCurve;
279    /// Obtains the animation delay, in milliseconds.
280    ///
281    /// # Arguments
282    ///
283    /// * `option` - Indicates the pointer to an animation configuration.
284    ///
285    /// # Returns
286    ///
287    /// * Returns the animation delay.
288    ///
289    /// Available since API-level: 12
290    #[cfg(feature = "api-12")]
291    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
292    pub fn OH_ArkUI_AnimateOption_GetDelay(option: *mut ArkUI_AnimateOption) -> i32;
293    /// Obtains the number of times that an animation is played.
294    ///
295    /// # Arguments
296    ///
297    /// * `option` - Indicates the pointer to an animation configuration.
298    ///
299    /// # Returns
300    ///
301    /// * Returns the number of times that the animation is played.
302    ///
303    /// Available since API-level: 12
304    #[cfg(feature = "api-12")]
305    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
306    pub fn OH_ArkUI_AnimateOption_GetIterations(option: *mut ArkUI_AnimateOption) -> i32;
307    /// Obtains the animation playback mode.
308    ///
309    /// # Arguments
310    ///
311    /// * `option` - Indicates the pointer to an animation configuration.
312    ///
313    /// # Returns
314    ///
315    /// * Returns the animation playback mode.
316    ///
317    /// Available since API-level: 12
318    #[cfg(feature = "api-12")]
319    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
320    pub fn OH_ArkUI_AnimateOption_GetPlayMode(
321        option: *mut ArkUI_AnimateOption,
322    ) -> ArkUI_AnimationPlayMode;
323    /// Obtains the expected frame rate range of an animation.
324    ///
325    /// # Arguments
326    ///
327    /// * `option` - Indicates the pointer to an animation configuration.
328    ///
329    /// # Returns
330    ///
331    /// * Returns the expected frame rate range.
332    ///
333    /// Available since API-level: 12
334    #[cfg(feature = "api-12")]
335    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
336    pub fn OH_ArkUI_AnimateOption_GetExpectedFrameRateRange(
337        option: *mut ArkUI_AnimateOption,
338    ) -> *mut ArkUI_ExpectedFrameRateRange;
339    /// Sets the animation duration.
340    ///
341    /// # Arguments
342    ///
343    /// * `option` - Indicates the pointer to an animation configuration.
344    ///
345    /// * `value` - Indicates the duration, in milliseconds.
346    ///
347    /// Available since API-level: 12
348    #[cfg(feature = "api-12")]
349    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
350    pub fn OH_ArkUI_AnimateOption_SetDuration(option: *mut ArkUI_AnimateOption, value: i32);
351    /// Sets the animation playback speed.
352    ///
353    /// # Arguments
354    ///
355    /// * `option` - Indicates the pointer to an animation configuration.
356    ///
357    /// * `value` - Indicates the animation playback speed.
358    ///
359    /// Available since API-level: 12
360    #[cfg(feature = "api-12")]
361    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
362    pub fn OH_ArkUI_AnimateOption_SetTempo(option: *mut ArkUI_AnimateOption, value: f32);
363    /// Sets the animation curve.
364    ///
365    /// # Arguments
366    ///
367    /// * `option` - Indicates the pointer to an animation configuration.
368    ///
369    /// * `value` - Indicates the animated curve. Default value:ARKUI_CURVE_LINEAR.
370    ///
371    /// Available since API-level: 12
372    #[cfg(feature = "api-12")]
373    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
374    pub fn OH_ArkUI_AnimateOption_SetCurve(
375        option: *mut ArkUI_AnimateOption,
376        value: ArkUI_AnimationCurve,
377    );
378    /// Sets the animation delay.
379    ///
380    /// # Arguments
381    ///
382    /// * `option` - Indicates the pointer to an animation configuration.
383    ///
384    /// * `value` - Indicates the animation delay.
385    ///
386    /// Available since API-level: 12
387    #[cfg(feature = "api-12")]
388    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
389    pub fn OH_ArkUI_AnimateOption_SetDelay(option: *mut ArkUI_AnimateOption, value: i32);
390    /// Sets the number of times that an animation is played.
391    ///
392    /// # Arguments
393    ///
394    /// * `option` - Indicates the pointer to an animation configuration.
395    ///
396    /// * `value` - Indicates the number of times that the animation is played.
397    ///
398    /// Available since API-level: 12
399    #[cfg(feature = "api-12")]
400    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
401    pub fn OH_ArkUI_AnimateOption_SetIterations(option: *mut ArkUI_AnimateOption, value: i32);
402    /// Sets the animation playback mode.
403    ///
404    /// # Arguments
405    ///
406    /// * `option` - Indicates the pointer to an animation configuration.
407    ///
408    /// * `value` - Indicates the animation playback mode.
409    ///
410    /// Available since API-level: 12
411    #[cfg(feature = "api-12")]
412    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
413    pub fn OH_ArkUI_AnimateOption_SetPlayMode(
414        option: *mut ArkUI_AnimateOption,
415        value: ArkUI_AnimationPlayMode,
416    );
417    /// Sets the expected frame rate range of an animation.
418    ///
419    /// # Arguments
420    ///
421    /// * `option` - Indicates the pointer to an animation configuration.
422    ///
423    /// * `value` - Indicates the expected frame rate range.
424    ///
425    /// Available since API-level: 12
426    #[cfg(feature = "api-12")]
427    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
428    pub fn OH_ArkUI_AnimateOption_SetExpectedFrameRateRange(
429        option: *mut ArkUI_AnimateOption,
430        value: *mut ArkUI_ExpectedFrameRateRange,
431    );
432    /// Sets the animation curve for the animation of an animator.
433    ///
434    ///
435    /// **Note:** This method is better than the value set by OH_ArkUI_AnimateOption_SetCurve.
436    /// # Arguments
437    ///
438    /// * `option` - Indicates the animator parameters.
439    ///
440    /// * `value` - Indicates the animation curve settings.
441    ///
442    /// Available since API-level: 12
443    #[cfg(feature = "api-12")]
444    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
445    pub fn OH_ArkUI_AnimateOption_SetICurve(
446        option: *mut ArkUI_AnimateOption,
447        value: ArkUI_CurveHandle,
448    );
449    /// Obtains the animation curve of the animation of an animator.
450    ///
451    /// # Arguments
452    ///
453    /// * `option` - Indicates the animator parameters.
454    ///
455    /// # Returns
456    ///
457    /// * Returns the animation curve of the specified animation.
458    /// If Null is returned, it means option is an invalid value.
459    ///
460    /// Available since API-level: 12
461    #[cfg(feature = "api-12")]
462    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
463    pub fn OH_ArkUI_AnimateOption_GetICurve(option: *mut ArkUI_AnimateOption) -> ArkUI_CurveHandle;
464    /// Obtains the keyframe animation parameters.
465    ///
466    /// # Arguments
467    ///
468    /// * `size` - Indicates the number of keyframe animation states.
469    ///
470    /// # Returns
471    ///
472    /// * Returns the keyframe animation parameter object; returns <b>NULL</b> if the value of <b>size</b> is less than
473    /// 0.
474    ///
475    /// Available since API-level: 12
476    #[cfg(feature = "api-12")]
477    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
478    pub fn OH_ArkUI_KeyframeAnimateOption_Create(size: i32) -> *mut ArkUI_KeyframeAnimateOption;
479    /// Disposes of the keyframe animation parameter object.
480    ///
481    /// # Arguments
482    ///
483    /// * `option` - Indicates the keyframe animation parameter object.
484    ///
485    /// Available since API-level: 12
486    #[cfg(feature = "api-12")]
487    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
488    pub fn OH_ArkUI_KeyframeAnimateOption_Dispose(option: *mut ArkUI_KeyframeAnimateOption);
489    /// Sets the overall delay of a keyframe animation, in milliseconds. By default, the keyframe animation is played
490    /// without delay.
491    ///
492    /// # Arguments
493    ///
494    /// * `option` - Indicates the keyframe animation parameters.
495    ///
496    /// * `value` - Indicates the delay, in milliseconds.
497    ///
498    /// # Returns
499    ///
500    /// * Returns the error code.
501    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
502    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
503    ///
504    /// Available since API-level: 12
505    #[cfg(feature = "api-12")]
506    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
507    pub fn OH_ArkUI_KeyframeAnimateOption_SetDelay(
508        option: *mut ArkUI_KeyframeAnimateOption,
509        value: i32,
510    ) -> i32;
511    /// Sets the number of times that the keyframe animation is played. By default, the animation is played once.
512    /// The value <b>-1</b> indicates that the animation is played for an unlimited number of times. The value <b>0</b>
513    /// indicates that there is no animation.
514    ///
515    /// # Arguments
516    ///
517    /// * `option` - Indicates the keyframe animation parameters.
518    ///
519    /// * `value` - Indicates the number of times that the animation is played.
520    ///
521    /// # Returns
522    ///
523    /// * Returns the error code.
524    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
525    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
526    ///
527    /// Available since API-level: 12
528    #[cfg(feature = "api-12")]
529    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
530    pub fn OH_ArkUI_KeyframeAnimateOption_SetIterations(
531        option: *mut ArkUI_KeyframeAnimateOption,
532        value: i32,
533    ) -> i32;
534    /// Sets the callback invoked when the keyframe animation playback is complete. This API is called after the
535    /// keyframe animation has played for the specified number of times.
536    ///
537    /// # Arguments
538    ///
539    /// * `option` - Indicates the keyframe animation parameters.
540    ///
541    /// * `userData` - Indicates the pointer to a custom object.
542    ///
543    /// * `onFinish` - Indicates the callback.
544    ///
545    /// # Returns
546    ///
547    /// * Returns the error code.
548    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
549    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
550    ///
551    /// Available since API-level: 12
552    #[cfg(feature = "api-12")]
553    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
554    pub fn OH_ArkUI_KeyframeAnimateOption_RegisterOnFinishCallback(
555        option: *mut ArkUI_KeyframeAnimateOption,
556        userData: *mut ::core::ffi::c_void,
557        onFinish: ::core::option::Option<unsafe extern "C" fn(userData: *mut ::core::ffi::c_void)>,
558    ) -> i32;
559    /// Sets the expected frame rate range of a keyframe animation.
560    ///
561    /// # Arguments
562    ///
563    /// * `option` - Indicates the pointer to a keyframe animation configuration.
564    ///
565    /// * `frameRate` - Indicates the expected frame rate range.
566    ///
567    /// # Returns
568    ///
569    /// * Returns the error code.
570    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
571    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
572    ///
573    /// Available since API-level: 19
574    #[cfg(feature = "api-19")]
575    #[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
576    pub fn OH_ArkUI_KeyframeAnimateOption_SetExpectedFrameRate(
577        option: *mut ArkUI_KeyframeAnimateOption,
578        frameRate: *mut ArkUI_ExpectedFrameRateRange,
579    ) -> i32;
580    /// Sets the duration of a keyframe animation, in milliseconds.
581    ///
582    /// # Arguments
583    ///
584    /// * `option` - Indicates the keyframe animation parameters.
585    ///
586    /// * `value` - Indicates the duration to set, in milliseconds.
587    ///
588    /// * `index` - Indicates a state index.
589    ///
590    /// # Returns
591    ///
592    /// * Returns the error code.
593    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
594    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
595    ///
596    /// Available since API-level: 12
597    #[cfg(feature = "api-12")]
598    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
599    pub fn OH_ArkUI_KeyframeAnimateOption_SetDuration(
600        option: *mut ArkUI_KeyframeAnimateOption,
601        value: i32,
602        index: i32,
603    ) -> i32;
604    /// Sets the animation curve for a specific keyframe in a keyframe animation.
605    ///
606    ///
607    /// **Note:** Because the <b>springMotion</b>, <b>responsiveSpringMotion</b>, and <b>interpolatingSpring</b> curves do not
608    /// have effective duration settings, they are not supported.
609    /// # Arguments
610    ///
611    /// * `option` - Indicates the keyframe animation parameters.
612    ///
613    /// * `value` - Indicates the animation curve to set. Default value:EASE_IN_OUT.
614    ///
615    /// * `index` - Indicates a state index.
616    ///
617    /// # Returns
618    ///
619    /// * Returns the error code.
620    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
621    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
622    ///
623    /// Available since API-level: 12
624    #[cfg(feature = "api-12")]
625    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
626    pub fn OH_ArkUI_KeyframeAnimateOption_SetCurve(
627        option: *mut ArkUI_KeyframeAnimateOption,
628        value: ArkUI_CurveHandle,
629        index: i32,
630    ) -> i32;
631    /// Sets the closure function of the state at the time of the keyframe, that is, the state to be reached at the
632    /// time of the keyframe.
633    ///
634    /// # Arguments
635    ///
636    /// * `option` - Indicates the keyframe animation parameters.
637    ///
638    /// * `event` - Indicates a closure function.
639    ///
640    /// * `userData` - Indicates the pointer to a custom object.
641    ///
642    /// * `index` - Indicates a state index.
643    ///
644    /// # Returns
645    ///
646    /// * Returns the error code.
647    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
648    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
649    ///
650    /// Available since API-level: 12
651    #[cfg(feature = "api-12")]
652    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
653    pub fn OH_ArkUI_KeyframeAnimateOption_RegisterOnEventCallback(
654        option: *mut ArkUI_KeyframeAnimateOption,
655        userData: *mut ::core::ffi::c_void,
656        event: ::core::option::Option<unsafe extern "C" fn(userData: *mut ::core::ffi::c_void)>,
657        index: i32,
658    ) -> i32;
659    /// Obtains the overall delay of a keyframe animation
660    ///
661    /// # Arguments
662    ///
663    /// * `option` - Indicates the keyframe animation parameters.
664    ///
665    /// # Returns
666    ///
667    /// * Returns the overall delay.
668    ///
669    /// Available since API-level: 12
670    #[cfg(feature = "api-12")]
671    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
672    pub fn OH_ArkUI_KeyframeAnimateOption_GetDelay(option: *mut ArkUI_KeyframeAnimateOption)
673        -> i32;
674    /// Obtains the number of times that a keyframe animation is played.
675    ///
676    /// # Arguments
677    ///
678    /// * `option` - Indicates the keyframe animation parameters.
679    ///
680    /// # Returns
681    ///
682    /// * Returns the number of times that the animation is played.
683    ///
684    /// Available since API-level: 12
685    #[cfg(feature = "api-12")]
686    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
687    pub fn OH_ArkUI_KeyframeAnimateOption_GetIterations(
688        option: *mut ArkUI_KeyframeAnimateOption,
689    ) -> i32;
690    /// Obtains the expected frame rate range of a keyframe animation configuration.
691    ///
692    /// # Arguments
693    ///
694    /// * `option` - Indicates the pointer to a keyframe animation configuration.
695    ///
696    /// # Returns
697    ///
698    /// * Returns the expected frame rate range of the keyframe animation.
699    ///
700    /// Available since API-level: 19
701    #[cfg(feature = "api-19")]
702    #[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
703    pub fn OH_ArkUI_KeyframeAnimateOption_GetExpectedFrameRate(
704        option: *mut ArkUI_KeyframeAnimateOption,
705    ) -> *mut ArkUI_ExpectedFrameRateRange;
706    /// Obtains the duration of a specific state in a keyframe animation.
707    ///
708    /// # Arguments
709    ///
710    /// * `option` - Indicates the keyframe animation parameters.
711    ///
712    /// * `index` - Indicates a state index.
713    ///
714    /// # Returns
715    ///
716    /// * Returns the duration. The unit is millisecond.
717    ///
718    /// Available since API-level: 12
719    #[cfg(feature = "api-12")]
720    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
721    pub fn OH_ArkUI_KeyframeAnimateOption_GetDuration(
722        option: *mut ArkUI_KeyframeAnimateOption,
723        index: i32,
724    ) -> i32;
725    /// Obtains the animation curve of a specific state in a keyframe animation.
726    ///
727    /// # Arguments
728    ///
729    /// * `option` - Indicates the keyframe animation parameters.
730    ///
731    /// * `index` - Indicates a state index.
732    ///
733    /// # Returns
734    ///
735    /// * Returns the animated curve.
736    /// Returns <b>NULL</b> if a parameter error occurs.
737    ///
738    /// Available since API-level: 12
739    #[cfg(feature = "api-12")]
740    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
741    pub fn OH_ArkUI_KeyframeAnimateOption_GetCurve(
742        option: *mut ArkUI_KeyframeAnimateOption,
743        index: i32,
744    ) -> ArkUI_CurveHandle;
745    /// Creates an animator parameter object.
746    ///
747    ///
748    /// **Note:** When <b>keyframeSize</b> is greater than 0, the animation interpolation start point is 0, and the animation
749    /// interpolation end point is 1; no setting is allowed.
750    /// # Arguments
751    ///
752    /// * `keyframeSize` - Indicates the number of keyframes.
753    ///
754    /// # Returns
755    ///
756    /// * Returns the pointer to the animator parameter object.
757    /// returns <b>NULL</b> if the value of <b>size</b> is less than 0.
758    ///
759    /// Available since API-level: 12
760    #[cfg(feature = "api-12")]
761    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
762    pub fn OH_ArkUI_AnimatorOption_Create(keyframeSize: i32) -> *mut ArkUI_AnimatorOption;
763    /// Disposes of an animator parameter object.
764    ///
765    /// # Arguments
766    ///
767    /// * `option` - Indicates the target animator parameter object.
768    ///
769    /// Available since API-level: 12
770    #[cfg(feature = "api-12")]
771    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
772    pub fn OH_ArkUI_AnimatorOption_Dispose(option: *mut ArkUI_AnimatorOption);
773    /// Sets the duration for thea nimation of an animator, in milliseconds.
774    ///
775    /// # Arguments
776    ///
777    /// * `option` - Indicates the target animator parameter object.
778    ///
779    /// * `value` - Indicates the playback duration, in milliseconds.
780    ///
781    /// # Returns
782    ///
783    /// * Returns the error code.
784    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
785    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
786    ///
787    /// Available since API-level: 12
788    #[cfg(feature = "api-12")]
789    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
790    pub fn OH_ArkUI_AnimatorOption_SetDuration(
791        option: *mut ArkUI_AnimatorOption,
792        value: i32,
793    ) -> i32;
794    /// Sets the delay for playing the animation of an animator, in milliseconds.
795    ///
796    /// # Arguments
797    ///
798    /// * `option` - Indicates an animator parameter object.
799    ///
800    /// * `value` - Indicates the delay to set, in milliseconds.
801    ///
802    /// # Returns
803    ///
804    /// * Returns the error code.
805    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
806    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
807    ///
808    /// Available since API-level: 12
809    #[cfg(feature = "api-12")]
810    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
811    pub fn OH_ArkUI_AnimatorOption_SetDelay(option: *mut ArkUI_AnimatorOption, value: i32) -> i32;
812    /// Sets the number of times that the animation of an animator is played. The value <b>0</b> means not to play the
813    /// animation, and <b>-1</b> means to play the animation for an unlimited number of times.
814    ///
815    ///
816    /// **Note:** If this parameter is set to a negative value other than <b>-1</b>, the value is invalid. In this case, the
817    /// animation is played once.
818    /// # Arguments
819    ///
820    /// * `option` - Indicates an animator parameter object.
821    ///
822    /// * `value` - Indicates the number of times that the animation is played.
823    ///
824    /// # Returns
825    ///
826    /// * Returns the error code.
827    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
828    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
829    ///
830    /// Available since API-level: 12
831    #[cfg(feature = "api-12")]
832    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
833    pub fn OH_ArkUI_AnimatorOption_SetIterations(
834        option: *mut ArkUI_AnimatorOption,
835        value: i32,
836    ) -> i32;
837    /// Sets whether the animation of an animator is restored to the initial state after being executed.
838    ///
839    /// # Arguments
840    ///
841    /// * `option` - Indicates an animator parameter object.
842    ///
843    /// * `value` - Indicates whether to restore the animation to the initial state after the animation is executed.
844    ///
845    /// # Returns
846    ///
847    /// * Returns the error code.
848    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
849    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
850    ///
851    /// Available since API-level: 12
852    #[cfg(feature = "api-12")]
853    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
854    pub fn OH_ArkUI_AnimatorOption_SetFill(
855        option: *mut ArkUI_AnimatorOption,
856        value: ArkUI_AnimationFillMode,
857    ) -> i32;
858    /// Sets the playback direction for the animation of an animator.
859    ///
860    /// # Arguments
861    ///
862    /// * `option` - Indicates an animator parameter object.
863    ///
864    /// * `value` - Indicates the animation playback direction.
865    ///
866    /// # Returns
867    ///
868    /// * Returns the error code.
869    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
870    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
871    ///
872    /// Available since API-level: 12
873    #[cfg(feature = "api-12")]
874    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
875    pub fn OH_ArkUI_AnimatorOption_SetDirection(
876        option: *mut ArkUI_AnimatorOption,
877        value: ArkUI_AnimationDirection,
878    ) -> i32;
879    /// Sets the interpolation curve for the animation of an animator.
880    ///
881    ///
882    /// **Note:** <b>springCurve</b>, <b>springMotion</b>, <b>responsiveSpringMotion</b>, <b>interpolatingSpring</b>,
883    /// and <b>customCurve</b> curves are not supported.
884    ///
885    /// # Arguments
886    ///
887    /// * `option` - Indicates an animator parameter object.
888    ///
889    /// * `value` - Indicates the target interpolation curve. Default value:ARKUI_CURVE_LINEAR.
890    ///
891    /// # Returns
892    ///
893    /// * Returns the error code.
894    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
895    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
896    ///
897    /// Available since API-level: 12
898    #[cfg(feature = "api-12")]
899    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
900    pub fn OH_ArkUI_AnimatorOption_SetCurve(
901        option: *mut ArkUI_AnimatorOption,
902        value: ArkUI_CurveHandle,
903    ) -> i32;
904    /// Sets the interpolation start point for the animation of an animator.
905    ///
906    /// **Note:** This API does not take effect when the animation is a keyframe animation.
907    ///
908    /// # Arguments
909    ///
910    /// * `option` - Indicates an animator parameter object.
911    ///
912    /// * `value` - Indicates the interpolation start point to set.
913    ///
914    /// # Returns
915    ///
916    /// * Returns the error code.
917    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
918    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
919    ///
920    /// Available since API-level: 12
921    #[cfg(feature = "api-12")]
922    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
923    pub fn OH_ArkUI_AnimatorOption_SetBegin(option: *mut ArkUI_AnimatorOption, value: f32) -> i32;
924    /// Sets the interpolation end point for the animation of an animator.
925    ///
926    /// **Note:** This API does not take effect when the animation is a keyframe animation.
927    ///
928    /// # Arguments
929    ///
930    /// * `option` - Indicates an animator parameter object.
931    ///
932    /// * `value` - Indicates the interpolation end point to set.
933    ///
934    /// # Returns
935    ///
936    /// * Returns the error code.
937    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
938    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
939    ///
940    /// Available since API-level: 12
941    #[cfg(feature = "api-12")]
942    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
943    pub fn OH_ArkUI_AnimatorOption_SetEnd(option: *mut ArkUI_AnimatorOption, value: f32) -> i32;
944    /// Sets the expected frame rate range for the animation of an animator.
945    ///
946    /// # Arguments
947    ///
948    /// * `option` - Indicates an animator parameter object.
949    ///
950    /// * `value` - Indicates the expected frame rate range to set.
951    ///
952    /// # Returns
953    ///
954    /// * Returns the error code.
955    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
956    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
957    ///
958    /// Available since API-level: 12
959    #[cfg(feature = "api-12")]
960    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
961    pub fn OH_ArkUI_AnimatorOption_SetExpectedFrameRateRange(
962        option: *mut ArkUI_AnimatorOption,
963        value: *mut ArkUI_ExpectedFrameRateRange,
964    ) -> i32;
965    /// Sets the keyframe parameters for the animation of an animator.
966    ///
967    /// # Arguments
968    ///
969    /// * `option` - Indicates an animator parameter object.
970    ///
971    /// * `time` - Indicates the keyframe time. Value range: [0,1].
972    ///
973    /// * `value` - Indicates the keyframe value.
974    ///
975    /// * `index` - Indicates the keyframe index.
976    ///
977    /// # Returns
978    ///
979    /// * Returns the error code.
980    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
981    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
982    ///
983    /// Available since API-level: 12
984    #[cfg(feature = "api-12")]
985    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
986    pub fn OH_ArkUI_AnimatorOption_SetKeyframe(
987        option: *mut ArkUI_AnimatorOption,
988        time: f32,
989        value: f32,
990        index: i32,
991    ) -> i32;
992    /// Sets the keyframe curve type for the animation of an animator.
993    ///
994    ///
995    /// **Note:** <b>springCurve</b>, <b>springMotion</b>, <b>responsiveSpringMotion</b>, <b>interpolatingSpring</b>,
996    /// and <b>customCurve</b> curves are not supported.
997    ///
998    /// # Arguments
999    ///
1000    /// * `option` - Indicates an animator parameter object.
1001    ///
1002    /// * `value` - Indicates the target interpolation curve.
1003    ///
1004    /// * `index` - Indicates the keyframe index.
1005    ///
1006    /// # Returns
1007    ///
1008    /// * Returns the error code.
1009    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1010    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1011    ///
1012    /// Available since API-level: 12
1013    #[cfg(feature = "api-12")]
1014    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1015    pub fn OH_ArkUI_AnimatorOption_SetKeyframeCurve(
1016        option: *mut ArkUI_AnimatorOption,
1017        value: ArkUI_CurveHandle,
1018        index: i32,
1019    ) -> i32;
1020    /// Obtains the duration for playing an animation.
1021    ///
1022    /// # Arguments
1023    ///
1024    /// * `option` - Indicates the animator parameters.
1025    ///
1026    /// # Returns
1027    ///
1028    /// * Returns the duration for playing the animation, in milliseconds.
1029    ///
1030    /// Available since API-level: 12
1031    #[cfg(feature = "api-12")]
1032    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1033    pub fn OH_ArkUI_AnimatorOption_GetDuration(option: *mut ArkUI_AnimatorOption) -> i32;
1034    /// Obtains the delay for playing the animation of an animator.
1035    ///
1036    /// # Arguments
1037    ///
1038    /// * `option` - Indicates the animator parameters.
1039    ///
1040    /// # Returns
1041    ///
1042    /// * Returns the delay for playing the animation, in milliseconds.
1043    ///
1044    /// Available since API-level: 12
1045    #[cfg(feature = "api-12")]
1046    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1047    pub fn OH_ArkUI_AnimatorOption_GetDelay(option: *mut ArkUI_AnimatorOption) -> i32;
1048    /// Obtains the number of times that an animation is played.
1049    ///
1050    /// # Arguments
1051    ///
1052    /// * `option` - Animator animation parameter.
1053    ///
1054    /// # Returns
1055    ///
1056    /// * Returns the number of times that the animation is played.
1057    ///
1058    /// Available since API-level: 12
1059    #[cfg(feature = "api-12")]
1060    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1061    pub fn OH_ArkUI_AnimatorOption_GetIterations(option: *mut ArkUI_AnimatorOption) -> i32;
1062    /// Obtains whether the animator animation is restored to the initial state after being executed.
1063    ///
1064    /// # Arguments
1065    ///
1066    /// * `option` - Indicates the animator parameters.
1067    ///
1068    /// # Returns
1069    ///
1070    /// * Returns whether the animator animation is restored to the initial state after being executed.
1071    ///
1072    /// Available since API-level: 12
1073    #[cfg(feature = "api-12")]
1074    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1075    pub fn OH_ArkUI_AnimatorOption_GetFill(
1076        option: *mut ArkUI_AnimatorOption,
1077    ) -> ArkUI_AnimationFillMode;
1078    /// Obtains the playback direction of an animation.
1079    ///
1080    /// # Arguments
1081    ///
1082    /// * `option` - Indicates the animator parameters.
1083    ///
1084    /// # Returns
1085    ///
1086    /// * Returns the animation playback direction.
1087    ///
1088    /// Available since API-level: 12
1089    #[cfg(feature = "api-12")]
1090    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1091    pub fn OH_ArkUI_AnimatorOption_GetDirection(
1092        option: *mut ArkUI_AnimatorOption,
1093    ) -> ArkUI_AnimationDirection;
1094    /// Obtains the interpolation curve of the animation of an animator.
1095    ///
1096    /// # Arguments
1097    ///
1098    /// * `option` - Indicates the animator parameters.
1099    ///
1100    /// # Returns
1101    ///
1102    /// * Returns the interpolation curve of the animation.
1103    /// Returns <b>NULL</b> if a parameter error occurs.
1104    ///
1105    /// Available since API-level: 12
1106    #[cfg(feature = "api-12")]
1107    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1108    pub fn OH_ArkUI_AnimatorOption_GetCurve(option: *mut ArkUI_AnimatorOption)
1109        -> ArkUI_CurveHandle;
1110    /// Obtains the interpolation start point of an animation.
1111    ///
1112    /// # Arguments
1113    ///
1114    /// * `option` - Indicates the animator parameters.
1115    ///
1116    /// # Returns
1117    ///
1118    /// * Returns the interpolation start point of the animation.
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_AnimatorOption_GetBegin(option: *mut ArkUI_AnimatorOption) -> f32;
1124    /// Obtains the interpolation end point of an animation.
1125    ///
1126    /// # Arguments
1127    ///
1128    /// * `option` - Indicates the animator parameters.
1129    ///
1130    /// # Returns
1131    ///
1132    /// * Returns the interpolation end point of the animation.
1133    ///
1134    /// Available since API-level: 12
1135    #[cfg(feature = "api-12")]
1136    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1137    pub fn OH_ArkUI_AnimatorOption_GetEnd(option: *mut ArkUI_AnimatorOption) -> f32;
1138    /// Obtains the expected frame rate range of an animation.
1139    ///
1140    /// # Arguments
1141    ///
1142    /// * `option` - Indicates the animator parameters.
1143    ///
1144    /// # Returns
1145    ///
1146    /// * Returns the pointer to the expected frame rate range object.
1147    /// Returns <b>NULL</b> if a parameter error occurs.
1148    ///
1149    /// Available since API-level: 12
1150    #[cfg(feature = "api-12")]
1151    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1152    pub fn OH_ArkUI_AnimatorOption_GetExpectedFrameRateRange(
1153        option: *mut ArkUI_AnimatorOption,
1154    ) -> *mut ArkUI_ExpectedFrameRateRange;
1155    /// Obtains the keyframe time of an animation.
1156    ///
1157    /// # Arguments
1158    ///
1159    /// * `option` - Indicates an animator parameter object.
1160    ///
1161    /// * `index` - Indicates the keyframe index.
1162    ///
1163    /// # Returns
1164    ///
1165    /// * Returns the keyframe time.
1166    ///
1167    /// Available since API-level: 12
1168    #[cfg(feature = "api-12")]
1169    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1170    pub fn OH_ArkUI_AnimatorOption_GetKeyframeTime(
1171        option: *mut ArkUI_AnimatorOption,
1172        index: i32,
1173    ) -> f32;
1174    /// Obtains the keyframe value of an animation.
1175    ///
1176    /// # Arguments
1177    ///
1178    /// * `option` - Indicates an animator parameter object.
1179    ///
1180    /// * `index` - Indicates the keyframe index.
1181    ///
1182    /// # Returns
1183    ///
1184    /// * Returns the keyframe value.
1185    ///
1186    /// Available since API-level: 12
1187    #[cfg(feature = "api-12")]
1188    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1189    pub fn OH_ArkUI_AnimatorOption_GetKeyframeValue(
1190        option: *mut ArkUI_AnimatorOption,
1191        index: i32,
1192    ) -> f32;
1193    /// Obtains the interpolation curve for a keyframe in the animation of an animator.
1194    ///
1195    /// # Arguments
1196    ///
1197    /// * `option` - Indicates an animator parameter object.
1198    ///
1199    /// * `index` - Indicates the keyframe index.
1200    ///
1201    /// # Returns
1202    ///
1203    /// * Returns the interpolation curve.
1204    /// Returns <b>NULL</b> if a parameter error occurs.
1205    ///
1206    /// Available since API-level: 12
1207    #[cfg(feature = "api-12")]
1208    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1209    pub fn OH_ArkUI_AnimatorOption_GetKeyframeCurve(
1210        option: *mut ArkUI_AnimatorOption,
1211        index: i32,
1212    ) -> ArkUI_CurveHandle;
1213    /// Obtains the custom object in an animation event object.
1214    ///
1215    /// # Arguments
1216    ///
1217    /// * `event` - Indicates an animation event object.
1218    ///
1219    /// # Returns
1220    ///
1221    /// * Returns the custom object.
1222    /// Returns <b>NULL</b> if a parameter error occurs.
1223    ///
1224    /// Available since API-level: 12
1225    #[cfg(feature = "api-12")]
1226    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1227    pub fn OH_ArkUI_AnimatorEvent_GetUserData(
1228        event: *mut ArkUI_AnimatorEvent,
1229    ) -> *mut ::core::ffi::c_void;
1230    /// Obtains the custom object in an animation event object.
1231    ///
1232    /// # Arguments
1233    ///
1234    /// * `event` - Indicates an animation event object.
1235    ///
1236    /// # Returns
1237    ///
1238    /// * Returns the custom object.
1239    ///
1240    /// Available since API-level: 12
1241    #[cfg(feature = "api-12")]
1242    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1243    pub fn OH_ArkUI_AnimatorOnFrameEvent_GetUserData(
1244        event: *mut ArkUI_AnimatorOnFrameEvent,
1245    ) -> *mut ::core::ffi::c_void;
1246    /// Obtains the current progress in an animation event object.
1247    ///
1248    /// # Arguments
1249    ///
1250    /// * `event` - Indicates an animation event object.
1251    ///
1252    /// # Returns
1253    ///
1254    /// * Returns the animation progress.
1255    ///
1256    /// Available since API-level: 12
1257    #[cfg(feature = "api-12")]
1258    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1259    pub fn OH_ArkUI_AnimatorOnFrameEvent_GetValue(event: *mut ArkUI_AnimatorOnFrameEvent) -> f32;
1260    /// Sets the callback invoked when the animator receives a frame.
1261    ///
1262    /// # Arguments
1263    ///
1264    /// * `option` - Indicates an animator parameter object.
1265    ///
1266    /// * `userData` - Indicates the custom parameter.
1267    ///
1268    /// * `callback` - Indicates the callback to set.
1269    ///
1270    /// # Returns
1271    ///
1272    /// * Returns the error code.
1273    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1274    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1275    ///
1276    /// Available since API-level: 12
1277    #[cfg(feature = "api-12")]
1278    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1279    pub fn OH_ArkUI_AnimatorOption_RegisterOnFrameCallback(
1280        option: *mut ArkUI_AnimatorOption,
1281        userData: *mut ::core::ffi::c_void,
1282        callback: ::core::option::Option<
1283            unsafe extern "C" fn(event: *mut ArkUI_AnimatorOnFrameEvent),
1284        >,
1285    ) -> i32;
1286    /// Sets the callback invoked when the animation playback is complete.
1287    ///
1288    /// # Arguments
1289    ///
1290    /// * `option` - Indicates an animator parameter object.
1291    ///
1292    /// * `userData` - Indicates the custom parameter.
1293    ///
1294    /// * `callback` - Indicates the callback to set.
1295    ///
1296    /// # Returns
1297    ///
1298    /// * Returns the error code.
1299    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1300    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1301    ///
1302    /// Available since API-level: 12
1303    #[cfg(feature = "api-12")]
1304    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1305    pub fn OH_ArkUI_AnimatorOption_RegisterOnFinishCallback(
1306        option: *mut ArkUI_AnimatorOption,
1307        userData: *mut ::core::ffi::c_void,
1308        callback: ::core::option::Option<unsafe extern "C" fn(event: *mut ArkUI_AnimatorEvent)>,
1309    ) -> i32;
1310    /// Sets the callback invoked when the animation playback is canceled.
1311    ///
1312    /// # Arguments
1313    ///
1314    /// * `option` - Indicates an animator parameter object.
1315    ///
1316    /// * `userData` - Indicates the custom parameter.
1317    ///
1318    /// * `callback` - Indicates the callback to set.
1319    ///
1320    /// # Returns
1321    ///
1322    /// * Returns the error code.
1323    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1324    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1325    ///
1326    /// Available since API-level: 12
1327    #[cfg(feature = "api-12")]
1328    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1329    pub fn OH_ArkUI_AnimatorOption_RegisterOnCancelCallback(
1330        option: *mut ArkUI_AnimatorOption,
1331        userData: *mut ::core::ffi::c_void,
1332        callback: ::core::option::Option<unsafe extern "C" fn(event: *mut ArkUI_AnimatorEvent)>,
1333    ) -> i32;
1334    /// Sets the callback invoked when the animation playback is repeated.
1335    ///
1336    /// # Arguments
1337    ///
1338    /// * `option` - Indicates an animator parameter object.
1339    ///
1340    /// * `userData` - Indicates the custom parameter.
1341    ///
1342    /// * `callback` - Indicates the callback to set.
1343    ///
1344    /// # Returns
1345    ///
1346    /// * Returns the error code.
1347    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1348    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1349    ///
1350    /// Available since API-level: 12
1351    #[cfg(feature = "api-12")]
1352    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1353    pub fn OH_ArkUI_AnimatorOption_RegisterOnRepeatCallback(
1354        option: *mut ArkUI_AnimatorOption,
1355        userData: *mut ::core::ffi::c_void,
1356        callback: ::core::option::Option<unsafe extern "C" fn(event: *mut ArkUI_AnimatorEvent)>,
1357    ) -> i32;
1358    /// Resets the animation of an animator.
1359    ///
1360    /// # Arguments
1361    ///
1362    /// * `animatorHandle` - Indicates an animator object.
1363    ///
1364    /// * `option` - Indicates the animator parameters.
1365    ///
1366    /// # Returns
1367    ///
1368    /// * Returns the error code.
1369    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1370    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1371    ///
1372    /// Available since API-level: 12
1373    #[cfg(feature = "api-12")]
1374    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1375    pub fn OH_ArkUI_Animator_ResetAnimatorOption(
1376        animatorHandle: ArkUI_AnimatorHandle,
1377        option: *mut ArkUI_AnimatorOption,
1378    ) -> i32;
1379    /// Starts the animation of an animator.
1380    ///
1381    /// # Arguments
1382    ///
1383    /// * `animatorHandle` - Indicates an animator object.
1384    ///
1385    /// # Returns
1386    ///
1387    /// * Returns the error code.
1388    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1389    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
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_Animator_Play(animatorHandle: ArkUI_AnimatorHandle) -> i32;
1395    /// Ends the animation of an animator.
1396    ///
1397    /// # Arguments
1398    ///
1399    /// * `animatorHandle` - Indicates an animator object.
1400    ///
1401    /// # Returns
1402    ///
1403    /// * Returns the error code.
1404    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1405    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
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_Animator_Finish(animatorHandle: ArkUI_AnimatorHandle) -> i32;
1411    /// Pauses the animation of an animator.
1412    ///
1413    /// # Arguments
1414    ///
1415    /// * `animatorHandle` - Indicates an animator object.
1416    ///
1417    /// # Returns
1418    ///
1419    /// * Returns the error code.
1420    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1421    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1422    ///
1423    /// Available since API-level: 12
1424    #[cfg(feature = "api-12")]
1425    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1426    pub fn OH_ArkUI_Animator_Pause(animatorHandle: ArkUI_AnimatorHandle) -> i32;
1427    /// Cancels the animation of an animator.
1428    ///
1429    /// # Arguments
1430    ///
1431    /// * `animatorHandle` - Indicates an animator object.
1432    ///
1433    /// # Returns
1434    ///
1435    /// * Returns the error code.
1436    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1437    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1438    ///
1439    /// Available since API-level: 12
1440    #[cfg(feature = "api-12")]
1441    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1442    pub fn OH_ArkUI_Animator_Cancel(animatorHandle: ArkUI_AnimatorHandle) -> i32;
1443    /// Plays the animation of an animator in reverse order.
1444    ///
1445    /// # Arguments
1446    ///
1447    /// * `animatorHandle` - Indicates an animator object.
1448    ///
1449    /// # Returns
1450    ///
1451    /// * Returns the error code.
1452    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1453    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1454    ///
1455    /// Available since API-level: 12
1456    #[cfg(feature = "api-12")]
1457    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1458    pub fn OH_ArkUI_Animator_Reverse(animatorHandle: ArkUI_AnimatorHandle) -> i32;
1459    /// Implements initialization for the interpolation curve, which is used to create an interpolation curve based on
1460    /// the input parameter.
1461    ///
1462    /// # Arguments
1463    ///
1464    /// * `curve` - Indicates the curve type.
1465    ///
1466    /// # Returns
1467    ///
1468    /// * Returns the pointer to the interpolation object of the curve.
1469    /// Returns <b>NULL</b> if a parameter error occurs.
1470    ///
1471    /// Available since API-level: 12
1472    #[cfg(feature = "api-12")]
1473    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1474    pub fn OH_ArkUI_Curve_CreateCurveByType(curve: ArkUI_AnimationCurve) -> ArkUI_CurveHandle;
1475    /// Creates a step curve.
1476    ///
1477    /// # Arguments
1478    ///
1479    /// * `count` - Indicates the number of steps. The value must be a positive integer. Value range: [1, +∞).
1480    ///
1481    /// * `end` - Indicates whether jumping occurs when the interpolation ends.
1482    /// <b>true</b>: Jumping occurs when the interpolation ends. <b>false</b>: Jumping occurs when the interpolation starts.
1483    ///
1484    /// # Returns
1485    ///
1486    /// * Returns the pointer to the interpolation object of the curve.
1487    /// Returns <b>NULL</b> if a parameter error occurs.
1488    ///
1489    /// Available since API-level: 12
1490    #[cfg(feature = "api-12")]
1491    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1492    pub fn OH_ArkUI_Curve_CreateStepsCurve(count: i32, end: bool) -> ArkUI_CurveHandle;
1493    /// Creates a cubic Bezier curve.
1494    ///
1495    ///
1496    /// # Arguments
1497    ///
1498    /// * `x1` - Indicates the X coordinate of the first point on the Bezier curve. Value range: [0, 1].
1499    /// A value less than 0 is handed as <b>0</b>. A value greater than 1 is handed as <b>1</b>.
1500    ///
1501    /// * `y1` - Indicates the Y coordinate of the first point on the Bezier curve.
1502    ///
1503    /// * `x2` - Indicates the X coordinate of the second point on the Bezier curve. Value range: [0, 1].
1504    /// A value less than 0 is handed as <b>0</b>. A value greater than 1 is handed as <b>1</b>.
1505    ///
1506    /// * `y2` - Indicates the Y coordinate of the second point on the Bezier curve.
1507    ///
1508    /// # Returns
1509    ///
1510    /// * Returns the pointer to the interpolation object of the curve.
1511    /// Returns <b>NULL</b> if a parameter error occurs.
1512    ///
1513    /// Available since API-level: 12
1514    #[cfg(feature = "api-12")]
1515    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1516    pub fn OH_ArkUI_Curve_CreateCubicBezierCurve(
1517        x1: f32,
1518        y1: f32,
1519        x2: f32,
1520        y2: f32,
1521    ) -> ArkUI_CurveHandle;
1522    /// Creates a spring curve. The curve shape is subject to the spring parameters, and the animation duration is
1523    /// subject to the <b>duration</b> parameter in <b>animation</b> and <b>animateTo</b>.
1524    ///
1525    /// # Arguments
1526    ///
1527    /// * `velocity` - Indicates the initial velocity of the spring. It is applied by external factors to the spring
1528    /// animation, designed to help ensure the smooth transition from the previous motion state. The velocity is the
1529    /// normalized velocity, and its value is equal to the actual velocity at the beginning of the animation divided by the
1530    /// animation attribute change value.
1531    ///
1532    /// * `mass` - Indicates the mass, which influences the inertia in the spring system. The greater the mass, the greater
1533    /// the amplitude of the oscillation, and the slower the speed of restoring to the equilibrium position.
1534    ///
1535    /// * `stiffness` - Indicates the stiffness. It is the degree to which an object deforms by resisting the force applied.
1536    /// In an elastic system, the greater the stiffness, the stronger the ability to resist deformation, and the faster the
1537    /// speed of restoring to the equilibrium position.
1538    ///
1539    /// * `damping` - Indicates the damping. It is used to describe the oscillation and attenuation of the system after
1540    /// being disturbed. The larger the damping, the smaller the number of oscillations of elastic motion, and the smaller
1541    /// the oscillation amplitude.
1542    ///
1543    /// # Returns
1544    ///
1545    /// * Returns the pointer to the interpolation object of the curve.
1546    /// Returns <b>NULL</b> if a parameter error occurs.
1547    ///
1548    /// Available since API-level: 12
1549    #[cfg(feature = "api-12")]
1550    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1551    pub fn OH_ArkUI_Curve_CreateSpringCurve(
1552        velocity: f32,
1553        mass: f32,
1554        stiffness: f32,
1555        damping: f32,
1556    ) -> ArkUI_CurveHandle;
1557    /// Creates a spring animation curve. If multiple spring animations are applied to the same attribute of an
1558    /// object, each animation replaces their predecessor and inherits the velocity.
1559    ///
1560    /// **Note:** The animation duration is subject to the curve parameters, rather than the <b>duration</b> parameter in
1561    /// <b>animation</b> or <b>animateTo</b>.
1562    ///
1563    /// # Arguments
1564    ///
1565    /// * `response` - Indicates the duration of one complete oscillation.
1566    ///
1567    /// * `dampingFraction` - Indicates the damping coefficient.
1568    /// > 0 and < 1: underdamped. In this case, the spring overshoots the equilibrium position.
1569    /// <b>1</b>: critically damped.
1570    /// > 1: overdamped. In this case, the spring approaches equilibrium gradually.
1571    ///
1572    /// * `overlapDuration` - Indicates the duration for animations to overlap. When animations overlap, the <b>response</b>
1573    /// values of these animations will
1574    /// transit smoothly over this duration if they are different.
1575    ///
1576    /// # Returns
1577    ///
1578    /// * Returns the pointer to the interpolation object of the curve.
1579    /// Returns <b>NULL</b> if a parameter error occurs.
1580    ///
1581    /// Available since API-level: 12
1582    #[cfg(feature = "api-12")]
1583    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1584    pub fn OH_ArkUI_Curve_CreateSpringMotion(
1585        response: f32,
1586        dampingFraction: f32,
1587        overlapDuration: f32,
1588    ) -> ArkUI_CurveHandle;
1589    /// Creates a responsive spring animation curve. It is a special case of <b>springMotion</b>, with the only
1590    /// difference in the default values. It can be used together with <b>springMotion</b>.
1591    ///
1592    /// **Note:** The animation duration is subject to the curve parameters, rather than the <b>duration</b> parameter in
1593    /// <b>animation</b> or <b>animateTo</b>.
1594    ///
1595    /// # Arguments
1596    ///
1597    /// * `response` - Indicates the duration of one complete oscillation.
1598    ///
1599    /// * `dampingFraction` - Indicates the damping coefficient.
1600    /// > 0 and < 1: underdamped. In this case, the spring overshoots the equilibrium position.
1601    /// <b>1</b>: critically damped.
1602    /// > 1: overdamped. In this case, the spring approaches equilibrium gradually.
1603    ///
1604    /// * `overlapDuration` - Indicates the duration for animations to overlap. When animations overlap, the
1605    /// <b>response</b> values of these animations will
1606    /// transit smoothly over this duration if they are different.
1607    ///
1608    /// # Returns
1609    ///
1610    /// * Returns the pointer to the interpolation object of the curve.
1611    /// Returns <b>NULL</b> if a parameter error occurs.
1612    ///
1613    /// Available since API-level: 12
1614    #[cfg(feature = "api-12")]
1615    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1616    pub fn OH_ArkUI_Curve_CreateResponsiveSpringMotion(
1617        response: f32,
1618        dampingFraction: f32,
1619        overlapDuration: f32,
1620    ) -> ArkUI_CurveHandle;
1621    /// Creates an interpolating spring curve animated from 0 to 1. The actual animation value is calculated based on
1622    /// the curve.
1623    ///
1624    /// **Note:** The animation duration is subject to the curve parameters, rather than the <b>duration</b> parameter in
1625    /// <b>animation</b> or <b>animateTo</b>.
1626    ///
1627    ///
1628    /// # Arguments
1629    ///
1630    /// * `velocity` - Indicates the initial velocity of the spring. It is applied by external factors to the spring
1631    /// animation, esigned to help ensure the smooth transition from the previous motion state. The velocity is the
1632    /// normalized velocity, and its value is equal to the actual velocity
1633    /// at the beginning of the animation divided by the animation attribute change value.
1634    ///
1635    /// * `mass` - Indicates the mass, which influences the inertia in the spring system.
1636    /// The greater the mass, the greater the amplitude of the oscillation, and the slower the speed of restoring to the
1637    /// equilibrium position.
1638    ///
1639    /// * `stiffness` - Indicates the stiffness. It is the degree to which an object deforms by resisting the force applied.
1640    /// In an elastic system, the greater the stiffness, the stronger the ability to resist deformation, and the faster the
1641    /// speed of restoring to the equilibrium position.
1642    ///
1643    /// * `damping` - Indicates the damping. It is used to describe the oscillation and attenuation of the system after
1644    /// being disturbed. The larger the damping, the smaller the number of oscillations of elastic motion, and the smaller
1645    /// the oscillation amplitude.
1646    ///
1647    /// # Returns
1648    ///
1649    /// * Returns the pointer to the interpolation object of the curve.
1650    /// Returns <b>NULL</b> if a parameter error occurs.
1651    ///
1652    /// Available since API-level: 12
1653    #[cfg(feature = "api-12")]
1654    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1655    pub fn OH_ArkUI_Curve_CreateInterpolatingSpring(
1656        velocity: f32,
1657        mass: f32,
1658        stiffness: f32,
1659        damping: f32,
1660    ) -> ArkUI_CurveHandle;
1661    /// Creates a custom curve.
1662    ///
1663    /// # Arguments
1664    ///
1665    /// * `userData` - Indicates the custom data.
1666    ///
1667    /// * `interpolate` - Indicates the custom interpolation callback. <b>fraction</b> indicates the input x value for
1668    /// interpolation when the animation starts; value range: [0,1].
1669    /// The return value is the y value of the curve; value range: [0,1].
1670    /// If <b>fraction</b> is <b>0</b>, the return value <b>0</b> corresponds to the animation start point; any other return
1671    /// value means that the animation jumps at the start point.
1672    /// If <b>fraction</b> is <b>1</b>, the return value <b>1</b> corresponds to the animation end point; any other return
1673    /// value means that the end value of the animation is not the value of the state variable,
1674    /// which will result in an effect of transition from that end value to the value of the state variable.
1675    ///
1676    /// # Returns
1677    ///
1678    /// * Returns the pointer to the interpolation object of the curve.
1679    /// Returns <b>NULL</b> if a parameter error occurs.
1680    ///
1681    /// Available since API-level: 12
1682    #[cfg(feature = "api-12")]
1683    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1684    pub fn OH_ArkUI_Curve_CreateCustomCurve(
1685        userData: *mut ::core::ffi::c_void,
1686        interpolate: ::core::option::Option<
1687            unsafe extern "C" fn(fraction: f32, userdata: *mut ::core::ffi::c_void) -> f32,
1688        >,
1689    ) -> ArkUI_CurveHandle;
1690    /// Disposes of a custom curve.
1691    ///
1692    /// # Arguments
1693    ///
1694    /// * `curveHandle` - Indicates the pointer to the interpolation object of the curve.
1695    ///
1696    /// Available since API-level: 12
1697    #[cfg(feature = "api-12")]
1698    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1699    pub fn OH_ArkUI_Curve_DisposeCurve(curveHandle: ArkUI_CurveHandle);
1700    /// Creates an opacity object for component transition.
1701    ///
1702    ///
1703    /// **Note:** If the value specified is less than 0, the value <b>0</b> is used. If the value specified is greater than 1,
1704    /// the value <b>1</b> is used.
1705    /// # Arguments
1706    ///
1707    /// * `opacity` - Indicates the opacity. Value range: [0, 1].
1708    ///
1709    /// # Returns
1710    ///
1711    /// * Returns the created opacity object for component transition.
1712    ///
1713    /// Available since API-level: 12
1714    #[cfg(feature = "api-12")]
1715    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1716    pub fn OH_ArkUI_CreateOpacityTransitionEffect(opacity: f32) -> *mut ArkUI_TransitionEffect;
1717    /// Creates a translation object for component transition.
1718    ///
1719    /// # Arguments
1720    ///
1721    /// * `translate` - Indicates the translation settings for component transition.
1722    ///
1723    /// # Returns
1724    ///
1725    /// * Returns the translation object created for component transition.
1726    /// Returns <b>NULL</b> if a parameter error occurs.
1727    ///
1728    /// Available since API-level: 12
1729    #[cfg(feature = "api-12")]
1730    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1731    pub fn OH_ArkUI_CreateTranslationTransitionEffect(
1732        translate: *mut ArkUI_TranslationOptions,
1733    ) -> *mut ArkUI_TransitionEffect;
1734    /// Creates a scaling object for component transition.
1735    ///
1736    /// # Arguments
1737    ///
1738    /// * `scale` - Indicates the scaling settings for component transition.
1739    ///
1740    /// # Returns
1741    ///
1742    /// * Returns the scaling object created for component transition.
1743    /// Returns <b>NULL</b> if a parameter error occurs.
1744    ///
1745    /// Available since API-level: 12
1746    #[cfg(feature = "api-12")]
1747    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1748    pub fn OH_ArkUI_CreateScaleTransitionEffect(
1749        scale: *mut ArkUI_ScaleOptions,
1750    ) -> *mut ArkUI_TransitionEffect;
1751    /// Creates a rotation object for component transition.
1752    ///
1753    /// # Arguments
1754    ///
1755    /// * `rotate` - Indicates the rotation settings for component transition.
1756    ///
1757    /// # Returns
1758    ///
1759    /// * Returns the rotation object created for component transition.
1760    /// Returns <b>NULL</b> if a parameter error occurs.
1761    ///
1762    /// Available since API-level: 12
1763    #[cfg(feature = "api-12")]
1764    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1765    pub fn OH_ArkUI_CreateRotationTransitionEffect(
1766        rotate: *mut ArkUI_RotationOptions,
1767    ) -> *mut ArkUI_TransitionEffect;
1768    /// Creates a movement object for component transition.
1769    ///
1770    /// # Arguments
1771    ///
1772    /// * `edge` - Indicates the movement type.
1773    ///
1774    /// # Returns
1775    ///
1776    /// * Returns the movement object created for component transition.
1777    /// Returns <b>NULL</b> if a parameter error occurs.
1778    ///
1779    /// Available since API-level: 12
1780    #[cfg(feature = "api-12")]
1781    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1782    pub fn OH_ArkUI_CreateMovementTransitionEffect(
1783        edge: ArkUI_TransitionEdge,
1784    ) -> *mut ArkUI_TransitionEffect;
1785    /// Creates an asymmetric transition effect.
1786    ///
1787    ///
1788    /// **Note:** If the <b>asymmetric</b> function is not used for <b>TransitionEffect</b>, the transition effect takes effect
1789    /// for both appearance and disappearance of the component.
1790    /// # Arguments
1791    ///
1792    /// * `appear` - Indicates the transition effect for appearance.
1793    ///
1794    /// * `disappear` - Indicates the transition effect for disappearance.
1795    ///
1796    /// # Returns
1797    ///
1798    /// * Returns the asymmetric transition effect.
1799    /// Returns <b>NULL</b> if a parameter error occurs.
1800    ///
1801    /// Available since API-level: 12
1802    #[cfg(feature = "api-12")]
1803    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1804    pub fn OH_ArkUI_CreateAsymmetricTransitionEffect(
1805        appear: *mut ArkUI_TransitionEffect,
1806        disappear: *mut ArkUI_TransitionEffect,
1807    ) -> *mut ArkUI_TransitionEffect;
1808    /// Disposes of a transition effect.
1809    ///
1810    /// # Arguments
1811    ///
1812    /// * `effect` - Indicates the transition effect to dispose of.
1813    ///
1814    /// Available since API-level: 12
1815    #[cfg(feature = "api-12")]
1816    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1817    pub fn OH_ArkUI_TransitionEffect_Dispose(effect: *mut ArkUI_TransitionEffect);
1818    /// Sets a combination of transition effects.
1819    ///
1820    /// # Arguments
1821    ///
1822    /// * `firstEffect` - Indicates the transition effect options.
1823    ///
1824    /// * `secondEffect` - Indicates the combination of transition effects.
1825    ///
1826    /// # Returns
1827    ///
1828    /// * Returns the error code.
1829    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1830    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1831    ///
1832    /// Available since API-level: 12
1833    #[cfg(feature = "api-12")]
1834    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1835    pub fn OH_ArkUI_TransitionEffect_Combine(
1836        firstEffect: *mut ArkUI_TransitionEffect,
1837        secondEffect: *mut ArkUI_TransitionEffect,
1838    ) -> i32;
1839    /// Sets transition effect animation settings.
1840    ///
1841    ///
1842    /// **Note:** If <b>combine</b> is used for combining transition effects, the animation settings of a transition effect are
1843    /// applicable to the one following it.
1844    /// # Arguments
1845    ///
1846    /// * `effect` - Indicates the transition effect options.
1847    ///
1848    /// * `animation` - Indicates the animation settings.
1849    ///
1850    /// # Returns
1851    ///
1852    /// * Returns the error code.
1853    /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1854    /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1855    ///
1856    /// Available since API-level: 12
1857    #[cfg(feature = "api-12")]
1858    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1859    pub fn OH_ArkUI_TransitionEffect_SetAnimation(
1860        effect: *mut ArkUI_TransitionEffect,
1861        animation: *mut ArkUI_AnimateOption,
1862    ) -> i32;
1863}