From a4aab8b12f9c4fa6d9027f96c7fde07025115d1c Mon Sep 17 00:00:00 2001 From: zhanghang Date: Tue, 12 Aug 2025 09:22:59 +0800 Subject: [PATCH] =?UTF-8?q?drawabledescriptor=E5=A2=9E=E5=8A=A0=E5=B8=A7?= =?UTF-8?q?=E9=97=B4=E9=9A=94=E3=80=81=E4=B8=BB=E5=8A=A8=E6=92=AD=E6=94=BE?= =?UTF-8?q?=E3=80=81=E5=81=9C=E6=AD=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhanghang --- arkui/ace_engine/native/drawable_descriptor.h | 44 +++++++++++++++++++ arkui/ace_engine/native/libace.ndk.json | 16 +++++++ 2 files changed, 60 insertions(+) diff --git a/arkui/ace_engine/native/drawable_descriptor.h b/arkui/ace_engine/native/drawable_descriptor.h index ba221641f4f..d36e07f947d 100644 --- a/arkui/ace_engine/native/drawable_descriptor.h +++ b/arkui/ace_engine/native/drawable_descriptor.h @@ -64,6 +64,13 @@ struct OH_PixelmapNative; */ typedef struct OH_PixelmapNative* OH_PixelmapNativeHandle; +struct ArkUI_Node; +typedef struct ArkUI_Node* ArkUI_NodeHandle; +typedef struct ArkUIDrawableDescriptorInterval { + int32_t* intervalArray; + int32_t intervalSize; +} ArkUIDrawableDescriptorInterval; + /** * @brief Creates a DrawableDescriptor from a Pixelmap. * @@ -156,6 +163,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 21 +*/ +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 21 +*/ +ArkUIDrawableDescriptorInterval OH_ArkUI_DrawableDescriptor_GetAnimationIntervalArray(ArkUI_DrawableDescriptor* drawableDescriptor); + +/** + * @brief animation start. + * + * @param drawableDescriptor Indicates the pointer to the drawableDescriptor. + * @param node ArkUI_NodeHandle. + * @since 21 +*/ +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 21 +*/ +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 3c739a283d0..d43849415df 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" -- Gitee