diff --git a/arkui/ace_engine/native/native_dialog.h b/arkui/ace_engine/native/native_dialog.h index 95b1a6cbefda04982a2e908f85bc796178a4954b..df4324d7000db6ff02936d5372e10e9350c7917d 100644 --- a/arkui/ace_engine/native/native_dialog.h +++ b/arkui/ace_engine/native/native_dialog.h @@ -60,6 +60,52 @@ typedef enum { DIALOG_DISMISS_SLIDE_DOWN, } ArkUI_DismissReason; +/** +* @brief Enumerates the state of dialog. +* +* @syscap SystemCapability.ArkUI.ArkUI.Full +* +* @since 16 +*/ +typedef enum { + /** + * @brief Uninitialized. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 16 + */ + DIALOG_UNINITIALIZED = 0, + /** + * @brief Initialized. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 16 + */ + DIALOG_INITIALIZED, + /** + * @brief Appearing. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 16 + */ + DIALOG_APPEARING, + /** + * @brief Appeared. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 16 + */ + DIALOG_APPEARED, + /** + * @brief Disappearing. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 16 + */ + DIALOG_DISAPPEARING, + /** + * @brief Disappeared. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 16 + */ + DIALOG_DISAPPEARED, +} ArkUI_DialogState; + /** * @brief Invoked when the dialog box is closed. * @@ -271,6 +317,18 @@ typedef struct { * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. */ int32_t (*close)(ArkUI_NativeDialogHandle handle); + /** + * @brief Get state of dialog. + * + * @param handle Indicates the pointer to the custom dialog box controller. + * @param state Dialog state object. + * @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 (*getState)(ArkUI_NativeDialogHandle handle, ArkUI_DialogState* state); + /** * @brief Registers a listener for the dismiss event of the custom dialog box. *