From d6941c2e669e82c5191e3194e86edd383e302b3f Mon Sep 17 00:00:00 2001 From: zhanghang Date: Thu, 6 Mar 2025 11:27:41 +0800 Subject: [PATCH] =?UTF-8?q?dialog-backgroundBlurStyleOptions-backgroundEff?= =?UTF-8?q?ect=E5=A4=B4=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhanghang --- arkui/ace_engine/native/libace.ndk.json | 8 ++++ arkui/ace_engine/native/native_dialog.h | 51 +++++++++++++++++++++++++ 2 files changed, 59 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 9d3932dcb..794e8af05 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -3290,5 +3290,13 @@ { "first_introduced": "18", "name": "OH_ArkUI_XComponent_IsInitialized" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_SetBackgroundBlurStyleOptions" + }, + { + "first_introduced": "18", + "name": "OH_ArkUI_CustomDialog_SetBackgroundEffect" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_dialog.h b/arkui/ace_engine/native/native_dialog.h index d0ca71fea..46fc8e045 100644 --- a/arkui/ace_engine/native/native_dialog.h +++ b/arkui/ace_engine/native/native_dialog.h @@ -218,6 +218,30 @@ typedef struct { * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. */ int32_t (*setBackgroundColor)(ArkUI_NativeDialogHandle handle, uint32_t backgroundColor); + /** + * @brief Sets the blur effect of the current component between the backgroud and the content. + * + * @note This method must be called before the show method. + * @param userData Indicates the pointer to the custom data. + * @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 18 + */ + int32_t (*setBackgroundBlurStyleOptions)(ArkUI_NativeDialogHandle handle, void* userData); + /** + * @brief Sets the background properties of the component, including background blur radius, brightness, + * saturation, color and other parameters. + * + * @note This method must be called before the show method. + * @param handle Indicates the pointer to the custom dialog box controller. + * @param userData Indicates the pointer to the custom data. + * @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 18 + */ + int32_t (*setBackgroundEffect)(ArkUI_NativeDialogHandle handle, void* userData); /** * @brief Sets the background corner radius for a custom dialog box. * @@ -1075,6 +1099,33 @@ int32_t OH_ArkUI_CustomDialog_RegisterOnWillDisappearCallback( int32_t OH_ArkUI_CustomDialog_RegisterOnDidDisappearCallback( ArkUI_CustomDialogOptions* options, void* userData, void (*callback)(void* userData)); +/** + * @brief Sets the blur effect of the current component between the backgroud and the content. + * + * @note This method must be called before the show method. + * @param handle Indicates the pointer to the custom dialog box controller. + * @param userData Indicates the pointer to the custom data. + * @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 18 + */ +int32_t OH_ArkUI_CustomDialog_SetBackgroundBlurStyleOptions(ArkUI_CustomDialogOptions* options, void* userData); + +/** + * @brief Sets the background properties of the component, including background blur radius, brightness, + * saturation, color and other parameters. + * + * @note This method must be called before the show method. + * @param handle Indicates the pointer to the custom dialog box controller. + * @param userData Indicates the pointer to the custom data. + * @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 18 + */ +int32_t OH_ArkUI_CustomDialog_SetBackgroundEffect(ArkUI_CustomDialogOptions* options, void* userData); + #ifdef __cplusplus }; #endif -- Gitee