#include <glib.h>
#include <stdbool.h>
Go to the source code of this file.
|
| void * | simple_dialog (ESD_TYPE_E type, int btn_mask, const char *msg_format,...) |
| |
| void * | simple_dialog_async (ESD_TYPE_E type, int btn_mask, const char *msg_format,...) |
| | Show a simple dialog asynchronously.
|
| |
| char * | simple_dialog_format_message (const char *msg) |
| |
| void | simple_message_box (ESD_TYPE_E type, bool *notagain, const char *secondary_msg, const char *msg_format,...) |
| | Show an Alert box, with optional "don't show this message again" variable and checkbox, and optional secondary text.
|
| |
| void | vsimple_error_message_box (const char *msg_format, va_list ap) |
| | Display an error alert box, taking a format and a va_list argument.
|
| |
| void | simple_error_message_box (const char *msg_format,...) |
| | Display an error alert box, taking a format and a list of arguments.
|
| |
| void | vsimple_warning_message_box (const char *msg_format, va_list ap) |
| | Display a warning alert box, taking a format and a va_list argument.
|
| |
Definitions for alert box routines with toolkit-independent APIs but toolkit-dependent implementations.
Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs
SPDX-License-Identifier: GPL-2.0-or-later
Simple dialog box.
◆ ESD_BTN_CANCEL
| #define ESD_BTN_CANCEL 0x02 |
display a "Cancel" button
◆ ESD_BTN_CLEAR
| #define ESD_BTN_CLEAR 0x10 |
◆ ESD_BTN_DONT_SAVE
| #define ESD_BTN_DONT_SAVE 0x40 |
display a "Continue without Saving" button
◆ ESD_BTN_NO
◆ ESD_BTN_NONE
| #define ESD_BTN_NONE 0x00 |
display no buttons at all
◆ ESD_BTN_OK
◆ ESD_BTN_QUIT_DONT_SAVE
| #define ESD_BTN_QUIT_DONT_SAVE 0x80 |
display a "Quit without Saving" button
◆ ESD_BTN_SAVE
| #define ESD_BTN_SAVE 0x20 |
◆ ESD_BTN_YES
◆ ESD_BTNS_OK_CANCEL
Standard button combination "Ok" + "Cancel".
◆ ESD_BTNS_QUIT_DONTSAVE_CANCEL
Standard button combination "Quit without saving" + "Cancel".
◆ ESD_BTNS_SAVE_DONTSAVE
Standard button combination "No" + "Cancel" + "Save".
◆ ESD_BTNS_SAVE_QUIT_DONTSAVE_CANCEL
Standard button combination "Quit without saving" + "Cancel" + "Save".
◆ ESD_BTNS_YES_NO
Standard button combination "Yes" + "No".
◆ ESD_BTNS_YES_NO_CANCEL
Standard button combination "Yes" + "No" + "Cancel".
◆ ESD_TYPE_E
Dialog types.
| Enumerator |
|---|
| ESD_TYPE_INFO | tells the user something they should know, but not requiring any action; the only button should be "OK"
|
| ESD_TYPE_WARN | tells the user about a problem; the only button should be "OK"
|
| ESD_TYPE_CONFIRMATION | asks the user for confirmation; there should be more than one button
|
| ESD_TYPE_ERROR | tells the user about a serious problem; the only button should be "OK"
|
| ESD_TYPE_STOP | tells the user a stop action is in progress, there should be no button
|
◆ simple_dialog()
| void * simple_dialog |
( |
ESD_TYPE_E |
type, |
|
|
int |
btn_mask, |
|
|
const char * |
msg_format, |
|
|
|
... |
|
) |
| |
|
extern |
Create and show a simple dialog.
- Parameters
-
| type | type of dialog, e.g. ESD_TYPE_WARN |
| btn_mask | The buttons to display, e.g. ESD_BTNS_OK_CANCEL |
| msg_format | Printf like message format. Text must be plain. |
| ... | Printf like parameters |
- Returns
- The newly created dialog
◆ simple_dialog_async()
| void * simple_dialog_async |
( |
ESD_TYPE_E |
type, |
|
|
int |
btn_mask, |
|
|
const char * |
msg_format, |
|
|
|
... |
|
) |
| |
|
extern |
Show a simple dialog asynchronously.
- Parameters
-
| type | Type of the dialog to show. |
| btn_mask | Bitmask defining which buttons to display on the dialog. |
| msg_format | Format string for the message to be displayed. |
- Returns
- void* Always returns NULL.
◆ simple_dialog_format_message()
| char * simple_dialog_format_message |
( |
const char * |
msg | ) |
|
|
extern |
Escape the message text, if it probably contains Pango escape sequences. For example html like tags starting with a <.
- Parameters
-
- Returns
- the escaped message text, must be freed with g_free() later
◆ simple_error_message_box()
| void simple_error_message_box |
( |
const char * |
msg_format, |
|
|
|
... |
|
) |
| |
|
extern |
Display an error alert box, taking a format and a list of arguments.
- Parameters
-
| msg_format | The format string for the message. |
| ... | Arguments for the format string. |
◆ simple_message_box()
| void simple_message_box |
( |
ESD_TYPE_E |
type, |
|
|
bool * |
notagain, |
|
|
const char * |
secondary_msg, |
|
|
const char * |
msg_format, |
|
|
|
... |
|
) |
| |
|
extern |
Show an Alert box, with optional "don't show this message again" variable and checkbox, and optional secondary text.
- Parameters
-
| type | Type of the alert box to show. |
| notagain | Pointer to a boolean variable that will be set to true if the user checks the "don't show this message again" checkbox, or false otherwise. |
| secondary_msg | Optional secondary message to display in the alert box, or NULL if no secondary message is needed. |
| msg_format | Format string for the primary message to be displayed in the alert box. |
| ... | Additional arguments for the format string of the primary message. |
◆ vsimple_error_message_box()
| void vsimple_error_message_box |
( |
const char * |
msg_format, |
|
|
va_list |
ap |
|
) |
| |
|
extern |
Display an error alert box, taking a format and a va_list argument.
- Parameters
-
| msg_format | The format string for the message. |
| ap | The va_list of arguments for the format string. |
◆ vsimple_warning_message_box()
| void vsimple_warning_message_box |
( |
const char * |
msg_format, |
|
|
va_list |
ap |
|
) |
| |
|
extern |
Display a warning alert box, taking a format and a va_list argument.
- Parameters
-
| msg_format | The format string for the message. |
| ap | The va_list of arguments for the format string. |