Navigation C API Pages Python bindings Applications

Message dialogs

Message dialogs shows an user a message with a OK button or buttons to confirm or cancel an action.

enum gp_dialog_msg_type {
        GP_DIALOG_MSG_INFO,
        GP_DIALOG_MSG_WARN,
        GP_DIALOG_MSG_ERR,
        GP_DIALOG_MSG_QUESTION,
};

enum gp_dialog_msg_retval {
        GP_DIALOG_EXIT,
        GP_DIALOG_YES,
        GP_DIALOG_NO,
        GP_DIALOG_ERR,
};

int gp_dialog_msg_run(enum gp_dialog_msg_type type, const char *title, const char *msg);

int gp_dialog_msg_printf_run(enum gp_dialog_msg_type type, const char *title, const char *fmt, ...)

Creates and runs a message dialog. The title is the dialog frame title. The msg is the dialog message.

Message dialogs return either GP_DIALOG_EXIT or in a case of internal error GP_DIALOG_ERR i.e. allocation failure, JSON layout couldn’t be loaded, etc.

Question dialog returns GP_DIALOG_YES, GP_DIALOG_NO or GP_DIALOG_ERR in a case of an internal error.

An info dialog

Info message dialog

A warning dialog

Warning message dialog

An error dialog

Error message dialog

A question dialog

Question dialog