diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 1d822febf19e96061bd901ce00ee3268610c5be3..09a613d0269e1cd2bb0b6b6249e184ec1c2fc8a9 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2470,5 +2470,13 @@ { "first_introduced": "14", "name": "OH_ArkUI_KeyEvent_SetConsumed" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_KeyframeAnimateOption_SetExpectedFrameRate" + }, + { + "first_introduced": "16", + "name": "OH_ArkUI_KeyframeAnimateOption_GetExpectedFrameRate" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_animate.h b/arkui/ace_engine/native/native_animate.h index bd5c9303e31241f36620e2550916ebbb85cf4f65..77831c48096a093ea3c6bad9a2ea587f37123fc1 100644 --- a/arkui/ace_engine/native/native_animate.h +++ b/arkui/ace_engine/native/native_animate.h @@ -413,6 +413,19 @@ int32_t OH_ArkUI_KeyframeAnimateOption_SetIterations(ArkUI_KeyframeAnimateOption int32_t OH_ArkUI_KeyframeAnimateOption_RegisterOnFinishCallback( ArkUI_KeyframeAnimateOption* option, void* userData, void (*onFinish)(void* userData)); +/** + * @brief Sets the expected frame rate range of a keyframe animation. + * + * @param option Indicates the pointer to a keyframe animation configuration. + * @param frameRate Indicates the expected frame rate range. + * @return Returns the error code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. + * @since 16 + */ +int32_t OH_ArkUI_KeyframeAnimateOption_SetExpectedFrameRate( + ArkUI_KeyframeAnimateOption* option, ArkUI_ExpectedFrameRateRange* frameRate); + /** * @brief Sets the duration of a keyframe animation, in milliseconds. * @@ -476,6 +489,15 @@ int32_t OH_ArkUI_KeyframeAnimateOption_GetDelay(ArkUI_KeyframeAnimateOption* opt */ int32_t OH_ArkUI_KeyframeAnimateOption_GetIterations(ArkUI_KeyframeAnimateOption* option); +/** + * @brief Obtains the expected frame rate range of a keyframe animation configuration. + * + * @param option Indicates the pointer to a keyframe animation configuration. + * @return Returns the expected frame rate range of the keyframe animation. + * @since 16 + */ +ArkUI_ExpectedFrameRateRange* OH_ArkUI_KeyframeAnimateOption_GetExpectedFrameRate(ArkUI_KeyframeAnimateOption* option); + /** * @brief Obtains the duration of a specific state in a keyframe animation. *