diff --git a/arkui/ace_engine/native/drawable_descriptor.h b/arkui/ace_engine/native/drawable_descriptor.h index ba221641f4f94079f3ff2a0d765dda3e2029628b..eadfc25c07024a04e69b667a2659f09bb6255e4c 100644 --- a/arkui/ace_engine/native/drawable_descriptor.h +++ b/arkui/ace_engine/native/drawable_descriptor.h @@ -64,6 +64,30 @@ struct OH_PixelmapNative; */ typedef struct OH_PixelmapNative* OH_PixelmapNativeHandle; +/** + * @brief Defines the ArkUI native component object. + * + * @since 12 + */ +struct ArkUI_Node; + +/** + * @brief Defines the pointer to the ArkUI native component object. + * + * @since 12 + */ +typedef struct ArkUI_Node* ArkUI_NodeHandle; + +/** + * @brief Defines the interval of the drawable descriptor. + * + * @since 22 + */ +typedef struct ArkUIDrawableDescriptorInterval { + int32_t* intervalArray; + int32_t intervalSize; +} ArkUIDrawableDescriptorInterval; + /** * @brief Creates a DrawableDescriptor from a Pixelmap. * @@ -156,6 +180,43 @@ void OH_ArkUI_DrawableDescriptor_SetAnimationIteration( * @since 12 */ int32_t OH_ArkUI_DrawableDescriptor_GetAnimationIteration(ArkUI_DrawableDescriptor* drawableDescriptor); + +/** + * @brief Set duration and size of interval. + * + * @param drawableDescriptor Indicates the pointer to the drawableDescriptor. + * @param IntervalArray Indicates array. + * @param size Indicates size. + * @since 22 +*/ +void OH_ArkUI_DrawableDescriptor_SetAnimationIntervalArray(ArkUI_DrawableDescriptor* drawableDescriptor, int32_t IntervalArray[], int32_t size); + +/** + * @brief Obtains duration and size of interval. + * + * @param drawableDescriptor Indicates the pointer to the drawableDescriptor. + * @return Returns duration and size of interval. + * @since 22 +*/ +ArkUIDrawableDescriptorInterval OH_ArkUI_DrawableDescriptor_GetAnimationIntervalArray(ArkUI_DrawableDescriptor* drawableDescriptor); + +/** + * @brief animation start. + * + * @param drawableDescriptor Indicates the pointer to the drawableDescriptor. + * @param node ArkUI_NodeHandle. + * @since 22 +*/ +void OH_ArkUI_DrawableDescriptor_AnimationStart(ArkUI_DrawableDescriptor* drawableDescriptor, ArkUI_NodeHandle node); + +/** + * @brief animation stop. + * + * @param drawableDescriptor Indicates the pointer to the drawableDescriptor. + * @param node ArkUI_NodeHandle. + * @since 22 +*/ +void OH_ArkUI_DrawableDescriptor_AnimationStop(ArkUI_DrawableDescriptor* drawableDescriptor, ArkUI_NodeHandle node); #ifdef __cplusplus }; #endif diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 3c739a283d083bc3ec54e71cbce89094a70bce10..d43849415dfd18855b638f2f5959983bd1bb9a7c 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -1367,6 +1367,22 @@ "first_introduced": "12", "name": "OH_ArkUI_DrawableDescriptor_GetAnimationIteration" }, + { + "first_introduced": "21", + "name": "OH_ArkUI_DrawableDescriptor_SetAnimationIntervalArray" + }, + { + "first_introduced": "21", + "name": "OH_ArkUI_DrawableDescriptor_GetAnimationIntervalArray" + }, + { + "first_introduced": "21", + "name": "OH_ArkUI_DrawableDescriptor_AnimationStart" + }, + { + "first_introduced": "21", + "name": "OH_ArkUI_DrawableDescriptor_AnimationStop" + }, { "first_introduced": "12", "name": "OH_ArkUI_GetDrawableDescriptorFromNapiValue"