diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index bbb0842341ff6bfdf4d568e1d6325131ed55dce6..b6860d666b6f18e5c67b378bf6a88400fcd22a2c 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -3203,6 +3203,10 @@ "first_introduced": "19", "name": "OH_ArkUI_CustomDialog_RegisterOnDidDisappearCallback" }, + { + "first_introduced": "20", + "name": "OH_ArkUI_CustomDialog_GetState" + }, { "first_introduced": "19", "name": "OH_ArkUI_TextPickerRangeContentArray_Create" diff --git a/arkui/ace_engine/native/native_dialog.h b/arkui/ace_engine/native/native_dialog.h index f6ffbeb685a44b212ab9248aa5907278f6ec6da8..5bdde7f9d1eb5b35d572b87e21c62971d6b8d7cb 100644 --- a/arkui/ace_engine/native/native_dialog.h +++ b/arkui/ace_engine/native/native_dialog.h @@ -61,6 +61,52 @@ typedef enum { DIALOG_DISMISS_SLIDE_DOWN, } ArkUI_DismissReason; +/** +* @brief Enumerates the state of dialog. +* +* @syscap SystemCapability.ArkUI.ArkUI.Full +* +* @since 20 +*/ +typedef enum { + /** + * @brief Uninitialized. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + DIALOG_UNINITIALIZED = 0, + /** + * @brief Initialized. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + DIALOG_INITIALIZED, + /** + * @brief Appearing. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + DIALOG_APPEARING, + /** + * @brief Appeared. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + DIALOG_APPEARED, + /** + * @brief Disappearing. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + DIALOG_DISAPPEARING, + /** + * @brief Disappeared. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + DIALOG_DISAPPEARED, +} ArkUI_DialogState; + /** * @brief Enumerates the level mode. * @@ -1136,6 +1182,18 @@ int32_t OH_ArkUI_CustomDialog_RegisterOnWillDisappearCallback( int32_t OH_ArkUI_CustomDialog_RegisterOnDidDisappearCallback( ArkUI_CustomDialogOptions* options, void* userData, void (*callback)(void* userData)); +/** + * @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 20 + */ +int32_t OH_ArkUI_CustomDialog_GetState(ArkUI_NativeDialogHandle handle, ArkUI_DialogState* state); + /** * @brief Sets the background blur effect for a dialog box. *