123b3eb3cSopenharmony_ci/*
223b3eb3cSopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd.
323b3eb3cSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
423b3eb3cSopenharmony_ci * you may not use this file except in compliance with the License.
523b3eb3cSopenharmony_ci * You may obtain a copy of the License at
623b3eb3cSopenharmony_ci *
723b3eb3cSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
823b3eb3cSopenharmony_ci *
923b3eb3cSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1023b3eb3cSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1123b3eb3cSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1223b3eb3cSopenharmony_ci * See the License for the specific language governing permissions and
1323b3eb3cSopenharmony_ci * limitations under the License.
1423b3eb3cSopenharmony_ci */
1523b3eb3cSopenharmony_ci
1623b3eb3cSopenharmony_ci#ifndef ARKUI_NATIVE_ANIMATE_H
1723b3eb3cSopenharmony_ci#define ARKUI_NATIVE_ANIMATE_H
1823b3eb3cSopenharmony_ci
1923b3eb3cSopenharmony_ci#include <cstdint>
2023b3eb3cSopenharmony_ci
2123b3eb3cSopenharmony_ci#include "native_type.h"
2223b3eb3cSopenharmony_ci
2323b3eb3cSopenharmony_ci#ifdef __cplusplus
2423b3eb3cSopenharmony_ciextern "C" {
2523b3eb3cSopenharmony_ci#endif
2623b3eb3cSopenharmony_ci
2723b3eb3cSopenharmony_ci/**
2823b3eb3cSopenharmony_ci* @brief Defines the expected frame rate range of the animation.
2923b3eb3cSopenharmony_ci*
3023b3eb3cSopenharmony_ci* @since 12
3123b3eb3cSopenharmony_ci*/
3223b3eb3cSopenharmony_citypedef struct {
3323b3eb3cSopenharmony_ci    /** Expected minimum frame rate. */
3423b3eb3cSopenharmony_ci    uint32_t min;
3523b3eb3cSopenharmony_ci    /** Expected maximum frame rate. */
3623b3eb3cSopenharmony_ci    uint32_t max;
3723b3eb3cSopenharmony_ci    /** Expected optimal frame rate. */
3823b3eb3cSopenharmony_ci    uint32_t expected;
3923b3eb3cSopenharmony_ci} ArkUI_ExpectedFrameRateRange;
4023b3eb3cSopenharmony_ci
4123b3eb3cSopenharmony_ci/**
4223b3eb3cSopenharmony_ci* @brief Defines the callback type for when the animation playback is complete.
4323b3eb3cSopenharmony_ci*
4423b3eb3cSopenharmony_ci* @since 12
4523b3eb3cSopenharmony_ci*/
4623b3eb3cSopenharmony_citypedef struct {
4723b3eb3cSopenharmony_ci    /** Type of the <b>onFinish</b> callback. */
4823b3eb3cSopenharmony_ci    ArkUI_FinishCallbackType type;
4923b3eb3cSopenharmony_ci    /** Callback invoked when the animation playback is complete. */
5023b3eb3cSopenharmony_ci    void (*callback)(void* userData);
5123b3eb3cSopenharmony_ci    /** Custom type. */
5223b3eb3cSopenharmony_ci    void* userData;
5323b3eb3cSopenharmony_ci} ArkUI_AnimateCompleteCallback;
5423b3eb3cSopenharmony_ci
5523b3eb3cSopenharmony_ci/**
5623b3eb3cSopenharmony_ci* @brief Defines the animation configuration.
5723b3eb3cSopenharmony_ci*
5823b3eb3cSopenharmony_ci* @since 12
5923b3eb3cSopenharmony_ci*/
6023b3eb3cSopenharmony_citypedef struct ArkUI_AnimateOption ArkUI_AnimateOption;
6123b3eb3cSopenharmony_ci
6223b3eb3cSopenharmony_citypedef struct ArkUI_Curve ArkUI_Curve;
6323b3eb3cSopenharmony_citypedef struct ArkUI_Curve* ArkUI_CurveHandle;
6423b3eb3cSopenharmony_ci
6523b3eb3cSopenharmony_citypedef struct ArkUI_KeyframeAnimateOption ArkUI_KeyframeAnimateOption;
6623b3eb3cSopenharmony_citypedef struct ArkUI_AnimatorOption ArkUI_AnimatorOption;
6723b3eb3cSopenharmony_citypedef struct ArkUI_Animator* ArkUI_AnimatorHandle;
6823b3eb3cSopenharmony_ci
6923b3eb3cSopenharmony_citypedef struct ArkUI_AnimatorEvent ArkUI_AnimatorEvent;
7023b3eb3cSopenharmony_citypedef struct ArkUI_AnimatorOnFrameEvent ArkUI_AnimatorOnFrameEvent;
7123b3eb3cSopenharmony_ci
7223b3eb3cSopenharmony_ci
7323b3eb3cSopenharmony_citypedef struct ArkUI_TransitionEffect ArkUI_TransitionEffect;
7423b3eb3cSopenharmony_ci
7523b3eb3cSopenharmony_ci/**
7623b3eb3cSopenharmony_ci * @brief Implements the native animation APIs provided by ArkUI.
7723b3eb3cSopenharmony_ci *
7823b3eb3cSopenharmony_ci * @version 1
7923b3eb3cSopenharmony_ci * @since 12
8023b3eb3cSopenharmony_ci */
8123b3eb3cSopenharmony_citypedef struct {
8223b3eb3cSopenharmony_ci    /**
8323b3eb3cSopenharmony_ci    * @brief Defines an explicit animation.
8423b3eb3cSopenharmony_ci    *
8523b3eb3cSopenharmony_ci    * @note Make sure the component attributes to be set in the event closure have been set before.
8623b3eb3cSopenharmony_ci    *
8723b3eb3cSopenharmony_ci    * @param context UIContext。
8823b3eb3cSopenharmony_ci    * @param option Indicates the pointer to an animation configuration.
8923b3eb3cSopenharmony_ci    * @param update Indicates the animation closure. The system automatically inserts a transition animation
9023b3eb3cSopenharmony_ci    * for the state change caused by the closure.
9123b3eb3cSopenharmony_ci    * @param complete Indicates the callback to be invoked when the animation playback is complete.
9223b3eb3cSopenharmony_ci    * @return Returns <b>0</b> if the operation is successful; returns <b>401</b> if a parameter error occurs.
9323b3eb3cSopenharmony_ci    */
9423b3eb3cSopenharmony_ci    int32_t (*animateTo)(ArkUI_ContextHandle context, ArkUI_AnimateOption* option, ArkUI_ContextCallback* update,
9523b3eb3cSopenharmony_ci        ArkUI_AnimateCompleteCallback* complete);
9623b3eb3cSopenharmony_ci
9723b3eb3cSopenharmony_ci    int32_t (*keyframeAnimateTo)(ArkUI_ContextHandle context, ArkUI_KeyframeAnimateOption* option);
9823b3eb3cSopenharmony_ci    ArkUI_AnimatorHandle (*createAnimator)(ArkUI_ContextHandle context, ArkUI_AnimatorOption* option);
9923b3eb3cSopenharmony_ci    void (*disposeAnimator)(ArkUI_AnimatorHandle animator);
10023b3eb3cSopenharmony_ci} ArkUI_NativeAnimateAPI_1;
10123b3eb3cSopenharmony_ci
10223b3eb3cSopenharmony_ci/**
10323b3eb3cSopenharmony_ci* @brief Creates an animation configuration.
10423b3eb3cSopenharmony_ci*
10523b3eb3cSopenharmony_ci* @return Returns the pointer to the created animation configuration.
10623b3eb3cSopenharmony_ci* @since 12
10723b3eb3cSopenharmony_ci*/
10823b3eb3cSopenharmony_ciArkUI_AnimateOption* OH_ArkUI_AnimateOption_Create(void);
10923b3eb3cSopenharmony_ci
11023b3eb3cSopenharmony_ci/**
11123b3eb3cSopenharmony_ci* @brief Destroys an animation configuration.
11223b3eb3cSopenharmony_ci*
11323b3eb3cSopenharmony_ci* @since 12
11423b3eb3cSopenharmony_ci*/
11523b3eb3cSopenharmony_civoid OH_ArkUI_AnimateOption_Dispose(ArkUI_AnimateOption* option);
11623b3eb3cSopenharmony_ci
11723b3eb3cSopenharmony_ci/**
11823b3eb3cSopenharmony_ci* @brief Obtains the animation duration, in milliseconds.
11923b3eb3cSopenharmony_ci*
12023b3eb3cSopenharmony_ci* @param option Indicates the pointer to an animation configuration.
12123b3eb3cSopenharmony_ci* @return Returns the duration.
12223b3eb3cSopenharmony_ci* @since 12
12323b3eb3cSopenharmony_ci*/
12423b3eb3cSopenharmony_ciuint32_t OH_ArkUI_AnimateOption_GetDuration(ArkUI_AnimateOption* option);
12523b3eb3cSopenharmony_ci
12623b3eb3cSopenharmony_ci/**
12723b3eb3cSopenharmony_ci* @brief Obtains the animation playback speed.
12823b3eb3cSopenharmony_ci*
12923b3eb3cSopenharmony_ci* @param option Indicates the pointer to an animation configuration.
13023b3eb3cSopenharmony_ci* @return Returns the animation playback speed.
13123b3eb3cSopenharmony_ci* @since 12
13223b3eb3cSopenharmony_ci*/
13323b3eb3cSopenharmony_cifloat OH_ArkUI_AnimateOption_GetTempo(ArkUI_AnimateOption* option);
13423b3eb3cSopenharmony_ci
13523b3eb3cSopenharmony_ci/**
13623b3eb3cSopenharmony_ci* @brief Obtains the animation curve.
13723b3eb3cSopenharmony_ci*
13823b3eb3cSopenharmony_ci* @param option Indicates the pointer to an animation configuration.
13923b3eb3cSopenharmony_ci* @return Returns the animated curve.
14023b3eb3cSopenharmony_ci* @since 12
14123b3eb3cSopenharmony_ci*/
14223b3eb3cSopenharmony_ciArkUI_AnimationCurve OH_ArkUI_AnimateOption_GetCurve(ArkUI_AnimateOption* option);
14323b3eb3cSopenharmony_ci
14423b3eb3cSopenharmony_ci/**
14523b3eb3cSopenharmony_ci* @brief Obtains the animation delay, in milliseconds.
14623b3eb3cSopenharmony_ci*
14723b3eb3cSopenharmony_ci* @param option Indicates the pointer to an animation configuration.
14823b3eb3cSopenharmony_ci* @return Returns the animation delay.
14923b3eb3cSopenharmony_ci* @since 12
15023b3eb3cSopenharmony_ci*/
15123b3eb3cSopenharmony_ciint32_t OH_ArkUI_AnimateOption_GetDelay(ArkUI_AnimateOption* option);
15223b3eb3cSopenharmony_ci
15323b3eb3cSopenharmony_ci/**
15423b3eb3cSopenharmony_ci* @brief Obtains the number of times that an animation is played.
15523b3eb3cSopenharmony_ci*
15623b3eb3cSopenharmony_ci* @param option Indicates the pointer to an animation configuration.
15723b3eb3cSopenharmony_ci* @return Returns the number of times that the animation is played.
15823b3eb3cSopenharmony_ci* @since 12
15923b3eb3cSopenharmony_ci*/
16023b3eb3cSopenharmony_ciint32_t OH_ArkUI_AnimateOption_GetIterations(ArkUI_AnimateOption* option);
16123b3eb3cSopenharmony_ci
16223b3eb3cSopenharmony_ci/**
16323b3eb3cSopenharmony_ci* @brief Obtains the animation playback mode.
16423b3eb3cSopenharmony_ci*
16523b3eb3cSopenharmony_ci* @param option Indicates the pointer to an animation configuration.
16623b3eb3cSopenharmony_ci* @return Returns the animation playback mode.
16723b3eb3cSopenharmony_ci* @since 12
16823b3eb3cSopenharmony_ci*/
16923b3eb3cSopenharmony_ciArkUI_AnimationPlayMode OH_ArkUI_AnimateOption_GetPlayMode(ArkUI_AnimateOption* option);
17023b3eb3cSopenharmony_ci
17123b3eb3cSopenharmony_ci/**
17223b3eb3cSopenharmony_ci* @brief Obtains the expected frame rate range of an animation.
17323b3eb3cSopenharmony_ci*
17423b3eb3cSopenharmony_ci* @param option Indicates the pointer to an animation configuration.
17523b3eb3cSopenharmony_ci* @return Returns the expected frame rate range.
17623b3eb3cSopenharmony_ci* @since 12
17723b3eb3cSopenharmony_ci*/
17823b3eb3cSopenharmony_ciArkUI_ExpectedFrameRateRange* OH_ArkUI_AnimateOption_GetExpectedFrameRateRange(ArkUI_AnimateOption* option);
17923b3eb3cSopenharmony_ci
18023b3eb3cSopenharmony_ci/**
18123b3eb3cSopenharmony_ci* @brief Sets the animation duration.
18223b3eb3cSopenharmony_ci*
18323b3eb3cSopenharmony_ci* @param option Indicates the pointer to an animation configuration.
18423b3eb3cSopenharmony_ci* @param value Indicates the duration, in milliseconds.
18523b3eb3cSopenharmony_ci* @since 12
18623b3eb3cSopenharmony_ci*/
18723b3eb3cSopenharmony_civoid OH_ArkUI_AnimateOption_SetDuration(ArkUI_AnimateOption* option, int32_t value);
18823b3eb3cSopenharmony_ci
18923b3eb3cSopenharmony_ci/**
19023b3eb3cSopenharmony_ci* @brief Sets the animation playback speed.
19123b3eb3cSopenharmony_ci*
19223b3eb3cSopenharmony_ci* @param option Indicates the pointer to an animation configuration.
19323b3eb3cSopenharmony_ci* @param value Indicates the animation playback speed.
19423b3eb3cSopenharmony_ci* @since 12
19523b3eb3cSopenharmony_ci*/
19623b3eb3cSopenharmony_civoid OH_ArkUI_AnimateOption_SetTempo(ArkUI_AnimateOption* option, float value);
19723b3eb3cSopenharmony_ci
19823b3eb3cSopenharmony_ci/**
19923b3eb3cSopenharmony_ci* @brief Sets the animation curve.
20023b3eb3cSopenharmony_ci*
20123b3eb3cSopenharmony_ci* @param option Indicates the pointer to an animation configuration.
20223b3eb3cSopenharmony_ci* @param value Indicates the animated curve.
20323b3eb3cSopenharmony_ci* @since 12
20423b3eb3cSopenharmony_ci*/
20523b3eb3cSopenharmony_civoid OH_ArkUI_AnimateOption_SetCurve(ArkUI_AnimateOption* option, ArkUI_AnimationCurve value);
20623b3eb3cSopenharmony_ci
20723b3eb3cSopenharmony_ci/**
20823b3eb3cSopenharmony_ci* @brief Sets the animation delay.
20923b3eb3cSopenharmony_ci*
21023b3eb3cSopenharmony_ci* @param option Indicates the pointer to an animation configuration.
21123b3eb3cSopenharmony_ci* @param value Indicates the animation delay.
21223b3eb3cSopenharmony_ci* @since 12
21323b3eb3cSopenharmony_ci*/
21423b3eb3cSopenharmony_civoid OH_ArkUI_AnimateOption_SetDelay(ArkUI_AnimateOption* option, int32_t value);
21523b3eb3cSopenharmony_ci
21623b3eb3cSopenharmony_ci/**
21723b3eb3cSopenharmony_ci* @brief Sets the number of times that an animation is played.
21823b3eb3cSopenharmony_ci*
21923b3eb3cSopenharmony_ci* @param option Indicates the pointer to an animation configuration.
22023b3eb3cSopenharmony_ci* @param value Indicates the number of times that the animation is played.
22123b3eb3cSopenharmony_ci* @since 12
22223b3eb3cSopenharmony_ci*/
22323b3eb3cSopenharmony_civoid OH_ArkUI_AnimateOption_SetIterations(ArkUI_AnimateOption* option, int32_t value);
22423b3eb3cSopenharmony_ci
22523b3eb3cSopenharmony_ci/**
22623b3eb3cSopenharmony_ci* @brief Sets the animation playback mode.
22723b3eb3cSopenharmony_ci*
22823b3eb3cSopenharmony_ci* @param option Indicates the pointer to an animation configuration.
22923b3eb3cSopenharmony_ci* @param value Indicates the animation playback mode.
23023b3eb3cSopenharmony_ci* @since 12
23123b3eb3cSopenharmony_ci*/
23223b3eb3cSopenharmony_civoid OH_ArkUI_AnimateOption_SetPlayMode(ArkUI_AnimateOption* option, ArkUI_AnimationPlayMode value);
23323b3eb3cSopenharmony_ci
23423b3eb3cSopenharmony_ci/**
23523b3eb3cSopenharmony_ci* @brief Sets the expected frame rate range of an animation.
23623b3eb3cSopenharmony_ci*
23723b3eb3cSopenharmony_ci* @param option Indicates the pointer to an animation configuration.
23823b3eb3cSopenharmony_ci* @param value Indicates the expected frame rate range.
23923b3eb3cSopenharmony_ci* @since 12
24023b3eb3cSopenharmony_ci*/
24123b3eb3cSopenharmony_civoid OH_ArkUI_AnimateOption_SetExpectedFrameRateRange(ArkUI_AnimateOption* option, ArkUI_ExpectedFrameRateRange* value);
24223b3eb3cSopenharmony_ci
24323b3eb3cSopenharmony_civoid OH_ArkUI_AnimateOption_SetICurve(ArkUI_AnimateOption* option, ArkUI_CurveHandle value);
24423b3eb3cSopenharmony_ciArkUI_CurveHandle OH_ArkUI_AnimateOption_GetICurve(ArkUI_AnimateOption* option);
24523b3eb3cSopenharmony_ci
24623b3eb3cSopenharmony_ciArkUI_KeyframeAnimateOption* OH_ArkUI_KeyframeAnimateOption_Create(int32_t size);
24723b3eb3cSopenharmony_civoid OH_ArkUI_KeyframeAnimateOption_Dispose(ArkUI_KeyframeAnimateOption* option);
24823b3eb3cSopenharmony_ciint32_t OH_ArkUI_KeyframeAnimateOption_SetDelay(ArkUI_KeyframeAnimateOption* option, int32_t value);
24923b3eb3cSopenharmony_ciint32_t OH_ArkUI_KeyframeAnimateOption_SetIterations(ArkUI_KeyframeAnimateOption* option, int32_t value);
25023b3eb3cSopenharmony_ciint32_t OH_ArkUI_KeyframeAnimateOption_RegisterOnFinishCallback(
25123b3eb3cSopenharmony_ci    ArkUI_KeyframeAnimateOption* option, void* userData, void (*onFinish)(void* userData));
25223b3eb3cSopenharmony_ciint32_t OH_ArkUI_KeyframeAnimateOption_SetDuration(ArkUI_KeyframeAnimateOption* option, int32_t value, int32_t index);
25323b3eb3cSopenharmony_ciint32_t OH_ArkUI_KeyframeAnimateOption_SetCurve(
25423b3eb3cSopenharmony_ci    ArkUI_KeyframeAnimateOption* option, ArkUI_CurveHandle value, int32_t index);
25523b3eb3cSopenharmony_ciint32_t OH_ArkUI_KeyframeAnimateOption_RegisterOnEventCallback(
25623b3eb3cSopenharmony_ci    ArkUI_KeyframeAnimateOption* option, void* userData, void (*event)(void* userData), int32_t index);
25723b3eb3cSopenharmony_ciint32_t OH_ArkUI_KeyframeAnimateOption_GetDelay(ArkUI_KeyframeAnimateOption* option);
25823b3eb3cSopenharmony_ciint32_t OH_ArkUI_KeyframeAnimateOption_GetIterations(ArkUI_KeyframeAnimateOption* option);
25923b3eb3cSopenharmony_ciint32_t OH_ArkUI_KeyframeAnimateOption_GetDuration(ArkUI_KeyframeAnimateOption* option, int32_t index);
26023b3eb3cSopenharmony_ciArkUI_CurveHandle OH_ArkUI_KeyframeAnimateOption_GetCurve(ArkUI_KeyframeAnimateOption* option, int32_t index);
26123b3eb3cSopenharmony_ciArkUI_AnimatorOption* OH_ArkUI_AnimatorOption_Create(int32_t keyframeSize);
26223b3eb3cSopenharmony_civoid OH_ArkUI_AnimatorOption_Dispose(ArkUI_AnimatorOption* option);
26323b3eb3cSopenharmony_ciint32_t OH_ArkUI_AnimatorOption_SetDuration(ArkUI_AnimatorOption* option, int32_t value);
26423b3eb3cSopenharmony_ciint32_t OH_ArkUI_AnimatorOption_SetDelay(ArkUI_AnimatorOption* option, int32_t value);
26523b3eb3cSopenharmony_ciint32_t OH_ArkUI_AnimatorOption_SetIterations(ArkUI_AnimatorOption* option, int32_t value);
26623b3eb3cSopenharmony_ciint32_t OH_ArkUI_AnimatorOption_SetFill(ArkUI_AnimatorOption* option, ArkUI_AnimationFillMode value);
26723b3eb3cSopenharmony_ciint32_t OH_ArkUI_AnimatorOption_SetDirection(ArkUI_AnimatorOption* option, ArkUI_AnimationDirection value);
26823b3eb3cSopenharmony_ciint32_t OH_ArkUI_AnimatorOption_SetCurve(ArkUI_AnimatorOption* option, ArkUI_CurveHandle value);
26923b3eb3cSopenharmony_ciint32_t OH_ArkUI_AnimatorOption_SetBegin(ArkUI_AnimatorOption* option, float value);
27023b3eb3cSopenharmony_ciint32_t OH_ArkUI_AnimatorOption_SetEnd(ArkUI_AnimatorOption* option, float value);
27123b3eb3cSopenharmony_ciint32_t OH_ArkUI_AnimatorOption_SetExpectedFrameRateRange(
27223b3eb3cSopenharmony_ci    ArkUI_AnimatorOption* option, ArkUI_ExpectedFrameRateRange* value);
27323b3eb3cSopenharmony_ciint32_t OH_ArkUI_AnimatorOption_SetKeyframe(ArkUI_AnimatorOption* option, float time, float value, int32_t index);
27423b3eb3cSopenharmony_ciint32_t OH_ArkUI_AnimatorOption_SetKeyframeCurve(ArkUI_AnimatorOption* option, ArkUI_CurveHandle value, int32_t index);
27523b3eb3cSopenharmony_ciint32_t OH_ArkUI_AnimatorOption_GetDuration(ArkUI_AnimatorOption* option);
27623b3eb3cSopenharmony_ciint32_t OH_ArkUI_AnimatorOption_GetDelay(ArkUI_AnimatorOption* option);
27723b3eb3cSopenharmony_ciint32_t OH_ArkUI_AnimatorOption_GetIterations(ArkUI_AnimatorOption* option);
27823b3eb3cSopenharmony_ciArkUI_AnimationFillMode OH_ArkUI_AnimatorOption_GetFill(ArkUI_AnimatorOption* option);
27923b3eb3cSopenharmony_ciArkUI_AnimationDirection OH_ArkUI_AnimatorOption_GetDirection(ArkUI_AnimatorOption* option);
28023b3eb3cSopenharmony_ciArkUI_CurveHandle OH_ArkUI_AnimatorOption_GetCurve(ArkUI_AnimatorOption* option);
28123b3eb3cSopenharmony_cifloat OH_ArkUI_AnimatorOption_GetBegin(ArkUI_AnimatorOption* option);
28223b3eb3cSopenharmony_cifloat OH_ArkUI_AnimatorOption_GetEnd(ArkUI_AnimatorOption* option);
28323b3eb3cSopenharmony_ciArkUI_ExpectedFrameRateRange* OH_ArkUI_AnimatorOption_GetExpectedFrameRateRange(ArkUI_AnimatorOption* option);
28423b3eb3cSopenharmony_cifloat OH_ArkUI_AnimatorOption_GetKeyframeTime(ArkUI_AnimatorOption* option, int32_t index);
28523b3eb3cSopenharmony_cifloat OH_ArkUI_AnimatorOption_GetKeyframeValue(ArkUI_AnimatorOption* option, int32_t index);
28623b3eb3cSopenharmony_ciArkUI_CurveHandle OH_ArkUI_AnimatorOption_GetKeyframeCurve(ArkUI_AnimatorOption* option, int32_t index);
28723b3eb3cSopenharmony_civoid* OH_ArkUI_AnimatorEvent_GetUserData(ArkUI_AnimatorEvent* event);
28823b3eb3cSopenharmony_civoid* OH_ArkUI_AnimatorOnFrameEvent_GetUserData(ArkUI_AnimatorOnFrameEvent* event);
28923b3eb3cSopenharmony_cifloat OH_ArkUI_AnimatorOnFrameEvent_GetValue(ArkUI_AnimatorOnFrameEvent* event);
29023b3eb3cSopenharmony_ciint32_t OH_ArkUI_AnimatorOption_RegisterOnFrameCallback(
29123b3eb3cSopenharmony_ci    ArkUI_AnimatorOption* option, void* userData, void (*callback)(ArkUI_AnimatorOnFrameEvent* event));
29223b3eb3cSopenharmony_ciint32_t OH_ArkUI_AnimatorOption_RegisterOnFinishCallback(
29323b3eb3cSopenharmony_ci    ArkUI_AnimatorOption* option, void* userData, void (*callback)(ArkUI_AnimatorEvent* event));
29423b3eb3cSopenharmony_ciint32_t OH_ArkUI_AnimatorOption_RegisterOnCancelCallback(
29523b3eb3cSopenharmony_ci    ArkUI_AnimatorOption* option, void* userData, void (*callback)(ArkUI_AnimatorEvent* event));
29623b3eb3cSopenharmony_ciint32_t OH_ArkUI_AnimatorOption_RegisterOnRepeatCallback(
29723b3eb3cSopenharmony_ci    ArkUI_AnimatorOption* option, void* userData, void (*callback)(ArkUI_AnimatorEvent* event));
29823b3eb3cSopenharmony_ciint32_t OH_ArkUI_Animator_ResetAnimatorOption(ArkUI_AnimatorHandle animator, ArkUI_AnimatorOption* option);
29923b3eb3cSopenharmony_ciint32_t OH_ArkUI_Animator_Play(ArkUI_AnimatorHandle animator);
30023b3eb3cSopenharmony_ciint32_t OH_ArkUI_Animator_Finish(ArkUI_AnimatorHandle animator);
30123b3eb3cSopenharmony_ciint32_t OH_ArkUI_Animator_Pause(ArkUI_AnimatorHandle animator);
30223b3eb3cSopenharmony_ciint32_t OH_ArkUI_Animator_Cancel(ArkUI_AnimatorHandle animator);
30323b3eb3cSopenharmony_ciint32_t OH_ArkUI_Animator_Reverse(ArkUI_AnimatorHandle animator);
30423b3eb3cSopenharmony_ciArkUI_CurveHandle OH_ArkUI_Curve_CreateCurveByType(ArkUI_AnimationCurve curve);
30523b3eb3cSopenharmony_ciArkUI_CurveHandle OH_ArkUI_Curve_CreateStepsCurve(int32_t count, bool end);
30623b3eb3cSopenharmony_ciArkUI_CurveHandle OH_ArkUI_Curve_CreateCubicBezierCurve(float x1, float y1, float x2, float y2);
30723b3eb3cSopenharmony_ciArkUI_CurveHandle OH_ArkUI_Curve_CreateSpringCurve(float velocity, float mass, float stiffness, float damping);
30823b3eb3cSopenharmony_ciArkUI_CurveHandle OH_ArkUI_Curve_CreateSpringMotion(float response, float dampingFraction, float overlapDuration);
30923b3eb3cSopenharmony_ciArkUI_CurveHandle OH_ArkUI_Curve_CreateResponsiveSpringMotion(
31023b3eb3cSopenharmony_ci    float response, float dampingFraction, float overlapDuration);
31123b3eb3cSopenharmony_ciArkUI_CurveHandle OH_ArkUI_Curve_CreateInterpolatingSpring(float velocity, float mass, float stiffness, float damping);
31223b3eb3cSopenharmony_ciArkUI_CurveHandle OH_ArkUI_Curve_CreateCustomCurve(
31323b3eb3cSopenharmony_ci    void* userData, float (*interpolate)(float fraction, void* userdata));
31423b3eb3cSopenharmony_civoid OH_ArkUI_Curve_DisposeCurve(ArkUI_CurveHandle curveHandle);
31523b3eb3cSopenharmony_ci
31623b3eb3cSopenharmony_ciArkUI_TransitionEffect* OH_ArkUI_CreateOpacityTransitionEffect(float opacity);
31723b3eb3cSopenharmony_ciArkUI_TransitionEffect* OH_ArkUI_CreateTranslationTransitionEffect(ArkUI_TranslationOptions* translate);
31823b3eb3cSopenharmony_ciArkUI_TransitionEffect* OH_ArkUI_CreateScaleTransitionEffect(ArkUI_ScaleOptions* scale);
31923b3eb3cSopenharmony_ciArkUI_TransitionEffect* OH_ArkUI_CreateRotationTransitionEffect(ArkUI_RotationOptions* rotate);
32023b3eb3cSopenharmony_ciArkUI_TransitionEffect* OH_ArkUI_CreateMovementTransitionEffect(ArkUI_TransitionEdge move);
32123b3eb3cSopenharmony_ciArkUI_TransitionEffect* OH_ArkUI_CreateAsymmetricTransitionEffect(
32223b3eb3cSopenharmony_ci    ArkUI_TransitionEffect* appear, ArkUI_TransitionEffect* disappear);
32323b3eb3cSopenharmony_civoid OH_ArkUI_TransitionEffect_Dispose(ArkUI_TransitionEffect* effect);
32423b3eb3cSopenharmony_ciint32_t OH_ArkUI_TransitionEffect_Combine(ArkUI_TransitionEffect* effect, ArkUI_TransitionEffect* combine);
32523b3eb3cSopenharmony_ciint32_t OH_ArkUI_TransitionEffect_SetAnimation(ArkUI_TransitionEffect* effect, ArkUI_AnimateOption* animation);
32623b3eb3cSopenharmony_ci#ifdef __cplusplus
32723b3eb3cSopenharmony_ci};
32823b3eb3cSopenharmony_ci#endif
32923b3eb3cSopenharmony_ci
33023b3eb3cSopenharmony_ci#endif // ARKUI_NATIVE_ANIMATE_H