diff --git a/arkui/ace_engine/native/native_dialog.h b/arkui/ace_engine/native/native_dialog.h index 95b1a6cbefda04982a2e908f85bc796178a4954b..533f9ae76b827cb1b5c2ad515b8f4f044f957134 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.