Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Macros | Enumerations | Functions
simple_dialog.h File Reference
#include <glib.h>
#include <stdbool.h>

Go to the source code of this file.

Macros

#define ESD_BTN_NONE   0x00
 
#define ESD_BTN_OK   0x01
 
#define ESD_BTN_CANCEL   0x02
 
#define ESD_BTN_YES   0x04
 
#define ESD_BTN_NO   0x08
 
#define ESD_BTN_CLEAR   0x10
 
#define ESD_BTN_SAVE   0x20
 
#define ESD_BTN_DONT_SAVE   0x40
 
#define ESD_BTN_QUIT_DONT_SAVE   0x80
 
#define ESD_BTNS_OK_CANCEL   (ESD_BTN_OK|ESD_BTN_CANCEL)
 
#define ESD_BTNS_YES_NO   (ESD_BTN_YES|ESD_BTN_NO)
 
#define ESD_BTNS_YES_NO_CANCEL   (ESD_BTN_YES|ESD_BTN_NO|ESD_BTN_CANCEL)
 
#define ESD_BTNS_SAVE_DONTSAVE   (ESD_BTN_SAVE|ESD_BTN_DONT_SAVE)
 
#define ESD_BTNS_SAVE_DONTSAVE_CANCEL   (ESD_BTN_DONT_SAVE|ESD_BTN_CANCEL|ESD_BTN_SAVE)
 
#define ESD_BTNS_SAVE_QUIT_DONTSAVE_CANCEL   (ESD_BTN_QUIT_DONT_SAVE|ESD_BTN_CANCEL|ESD_BTN_SAVE)
 
#define ESD_BTNS_QUIT_DONTSAVE_CANCEL   (ESD_BTN_QUIT_DONT_SAVE|ESD_BTN_CANCEL)
 

Enumerations

enum  ESD_TYPE_E {
  ESD_TYPE_INFO , ESD_TYPE_WARN , ESD_TYPE_CONFIRMATION , ESD_TYPE_ERROR ,
  ESD_TYPE_STOP
}
 

Functions

void * simple_dialog (ESD_TYPE_E type, int btn_mask, const char *msg_format,...) G_GNUC_PRINTF(3
 
void void * simple_dialog_async (ESD_TYPE_E type, int btn_mask, const char *msg_format,...) G_GNUC_PRINTF(3
 
void void 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,...) G_GNUC_PRINTF(4
 
void void vsimple_error_message_box (const char *msg_format, va_list ap)
 
void simple_error_message_box (const char *msg_format,...) G_GNUC_PRINTF(1
 
void void vsimple_warning_message_box (const char *msg_format, va_list ap)
 

Detailed Description

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.

Macro Definition Documentation

◆ ESD_BTN_CANCEL

#define ESD_BTN_CANCEL   0x02

display a "Cancel" button

◆ ESD_BTN_CLEAR

#define ESD_BTN_CLEAR   0x10

display a "Clear" button

◆ ESD_BTN_DONT_SAVE

#define ESD_BTN_DONT_SAVE   0x40

display a "Continue without Saving" button

◆ ESD_BTN_NO

#define ESD_BTN_NO   0x08

display a "No" button

◆ ESD_BTN_NONE

#define ESD_BTN_NONE   0x00

display no buttons at all

◆ ESD_BTN_OK

#define ESD_BTN_OK   0x01

display an "Ok" button

◆ 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

display a "Save" button

◆ ESD_BTN_YES

#define ESD_BTN_YES   0x04

display a "Yes" button

◆ ESD_BTNS_OK_CANCEL

#define ESD_BTNS_OK_CANCEL   (ESD_BTN_OK|ESD_BTN_CANCEL)

Standard button combination "Ok" + "Cancel".

◆ ESD_BTNS_QUIT_DONTSAVE_CANCEL

#define ESD_BTNS_QUIT_DONTSAVE_CANCEL   (ESD_BTN_QUIT_DONT_SAVE|ESD_BTN_CANCEL)

Standard button combination "Quit without saving" + "Cancel".

◆ ESD_BTNS_SAVE_DONTSAVE

#define ESD_BTNS_SAVE_DONTSAVE   (ESD_BTN_SAVE|ESD_BTN_DONT_SAVE)

Standard button combination "No" + "Cancel" + "Save".

◆ ESD_BTNS_SAVE_QUIT_DONTSAVE_CANCEL

#define ESD_BTNS_SAVE_QUIT_DONTSAVE_CANCEL   (ESD_BTN_QUIT_DONT_SAVE|ESD_BTN_CANCEL|ESD_BTN_SAVE)

Standard button combination "Quit without saving" + "Cancel" + "Save".

◆ ESD_BTNS_YES_NO

#define ESD_BTNS_YES_NO   (ESD_BTN_YES|ESD_BTN_NO)

Standard button combination "Yes" + "No".

◆ ESD_BTNS_YES_NO_CANCEL

#define ESD_BTNS_YES_NO_CANCEL   (ESD_BTN_YES|ESD_BTN_NO|ESD_BTN_CANCEL)

Standard button combination "Yes" + "No" + "Cancel".

Enumeration Type Documentation

◆ ESD_TYPE_E

enum 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

Function Documentation

◆ simple_dialog()

void * simple_dialog ( ESD_TYPE_E type  ,
int btn_mask  ,
const char *  msg_format,
  ... 
)
extern

Create and show a simple dialog.

Parameters
typetype of dialog, e.g. ESD_TYPE_WARN
btn_maskThe buttons to display, e.g. ESD_BTNS_OK_CANCEL
msg_formatPrintf like message format. Text must be plain.
...Printf like parameters
Returns
The newly created dialog

◆ simple_dialog_format_message()

void void 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
msgthe string to escape
Returns
the escaped message text, must be freed with g_free() later