native_dialog.h

Overview

Declares a set of custom dialog box APIs of ArkUI on the native side.

Library: libace_ndk.z.so

System capability: SystemCapability.ArkUI.ArkUI.Full

Since: 12

Related module: ArkUI_NativeModule

Summary

Structs

Name Description
struct  ArkUI_NativeDialogAPI_1 Defines a struct for the custom dialog box APIs on the native side.

Types

Name Description
typedef bool(* ArkUI_OnWillDismissEvent) (int32_t reason) Invoked when the dialog box is closed.
typedef struct ArkUI_DialogDismissEvent ArkUI_DialogDismissEvent Defines a struct for a dialog box dismiss event.

Enums

Name Description
ArkUI_DismissReason { DIALOG_DISMISS_BACK_PRESS = 0, DIALOG_DISMISS_TOUCH_OUTSIDE, DIALOG_DISMISS_CLOSE_BUTTON, DIALOG_DISMISS_SLIDE_DOWN } Enumerates the actions for triggering closure of the dialog box.

Functions

Name Description
void OH_ArkUI_DialogDismissEvent_SetShouldBlockDismiss (ArkUI_DialogDismissEvent *event, bool shouldBlockDismiss) Sets whether to block the system behavior of dismissing a dialog box.
void * OH_ArkUI_DialogDismissEvent_GetUserData (ArkUI_DialogDismissEvent *event) Obtains the pointer to user data in a dialog box dismiss event object.
int32_t OH_ArkUI_DialogDismissEvent_GetDismissReason (ArkUI_DialogDismissEvent *event) Obtains the dismissal reason from a dialog box dismiss event object.