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