openharmony 鸿蒙 capi-arkui-nativemodule-arkui-nativeanimateapi-1

2026-08-25 浏览 (1)

ArkUI_NativeAnimateAPI_1

typedef struct {...} ArkUI_NativeAnimateAPI_1

Overview

Declares the native animation APIs provided by ArkUI.

Since: 12

Related module: ArkUI_NativeModule

Header file: native_animate.h

Summary

Member Functions

NameDescription
int32_t (*animateTo)(ArkUI_ContextHandle context, ArkUI_AnimateOption* option, ArkUI_ContextCallback* update,ArkUI_AnimateCompleteCallback* complete)Defines an explicit animation.
int32_t (*keyframeAnimateTo)(ArkUI_ContextHandle context, ArkUI_KeyframeAnimateOption* option)Defines a keyframe animation.
ArkUI_AnimatorHandle (*createAnimator)(ArkUI_ContextHandle context, ArkUI_AnimatorOption* option)Creates an animator object.
void (*disposeAnimator)(ArkUI_AnimatorHandle animatorHandle)Disposes of an animator object.

Member Function Description

animateTo()

int32_t (*animateTo)(ArkUI_ContextHandle context, ArkUI_AnimateOption* option, ArkUI_ContextCallback* update,ArkUI_AnimateCompleteCallback* complete)

Description

Defines an explicit animation.

Parameters

NameDescription
ArkUI_ContextHandle contextUIContext instance.
ArkUI_AnimateOption* optionDefines the animation configuration.
ArkUI_ContextCallback* updateClosure function for the animation. The system automatically inserts the transition animation if the state changes in the closure function.
Note: Make sure the component attributes to be set in the closure function have been set before.
ArkUI_AnimateCompleteCallback* completeCallback invoked when the animation playback is complete.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

keyframeAnimateTo()

int32_t (*keyframeAnimateTo)(ArkUI_ContextHandle context, ArkUI_KeyframeAnimateOption* option)

Description

Defines a keyframe animation.

Parameters

NameDescription
ArkUI_ContextHandle contextUIContext instance.
ArkUI_KeyframeAnimateOption* optionKeyframe animation parameter.

Returns

TypeDescription
int32_tResult code.
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.
Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

createAnimator()

ArkUI_AnimatorHandle (*createAnimator)(ArkUI_ContextHandle context, ArkUI_AnimatorOption* option)

Description

Creates an animator object.

Parameters

NameDescription
ArkUI_ContextHandle contextUIContext instance.
ArkUI_AnimatorOption* optionAnimator parameter.

Returns

TypeDescription
ArkUI_AnimatorHandleReturns the pointer to the animator object; returns NULL if a parameter error occurs.

disposeAnimator()

void (*disposeAnimator)(ArkUI_AnimatorHandle animatorHandle)

Description

Disposes of an animator object.

Parameters

NameDescription
ArkUI_AnimatorHandle animatorHandleAnimator object.

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 arkts-apis-uicontext-contextmenucontroller

openharmony 鸿蒙 errorcode-canvas

openharmony 鸿蒙 capi-oh-nativexcomponent-native-xcomponent-oh-nativexcomponent

openharmony 鸿蒙 errorcode-bindSheet

openharmony 鸿蒙 js-apis-arkui-uiExtension-sys

openharmony 鸿蒙 capi-arkui-accessibility-arkui-accessibilityeventinfo

openharmony 鸿蒙 capi-arkui-rendernodeutils

openharmony 鸿蒙 js-apis-arkui-node

openharmony 鸿蒙 capi-native-node-h

openharmony 鸿蒙 capi-arkui-nativemodule-arkui-listitemswipeactionitem

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/RdhsDFRq