From 0a9c29909086c103b596b8e532125892c85e2991 Mon Sep 17 00:00:00 2001 From: zhanghaibo Date: Thu, 21 Nov 2024 15:17:23 +0800 Subject: [PATCH] support level mode Signed-off-by: zhanghaibo Change-Id: Iaf37ed567729814003f470798e3d82c9adb5dcc2 --- arkui/ace_engine/native/native_dialog.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arkui/ace_engine/native/native_dialog.h b/arkui/ace_engine/native/native_dialog.h index 95b1a6cbe..533f9ae76 100644 --- a/arkui/ace_engine/native/native_dialog.h +++ b/arkui/ace_engine/native/native_dialog.h @@ -60,6 +60,18 @@ typedef enum { DIALOG_DISMISS_SLIDE_DOWN, } ArkUI_DismissReason; +/** +* @brief Enumerates the level mode. +* +* @since 16 +*/ +typedef enum { + /** overlay mode. */ + OVERLAY = 0, + /** embedded mode. */ + EMBEDDED, +} ArkUI_LevelMode; + /** * @brief Invoked when the dialog box is closed. * @@ -253,6 +265,17 @@ typedef struct { */ int32_t (*registerOnWillDismiss)(ArkUI_NativeDialogHandle handle, ArkUI_OnWillDismissEvent eventHandler); /** + * @brief Sets the level mode for a custom dialog box. + * + * @note This method must be called before the show method. + * @param handle Indicates the pointer to the custom dialog box controller. + * @param levelMode Indicates the level mode. The parameter type is {@link ArkUI_LevelMode}. + * @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. + */ + int32_t (*setLevelMode)(ArkUI_NativeDialogHandle handle, ArkUI_LevelMode levelMode); + /** * @brief Shows a custom dialog box. * * @param handle Indicates the pointer to the custom dialog box controller. -- Gitee