| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
simple_dialog.h
Go to the documentation of this file.
1
13#ifndef __SIMPLE_DIALOG_UI_H__
14#define __SIMPLE_DIALOG_UI_H__
15
16#include <glib.h>
17
18#include <stdbool.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif /* __cplusplus */
23
31 typedef enum {
32 ESD_TYPE_INFO,
34 ESD_TYPE_WARN,
35 ESD_TYPE_CONFIRMATION,
37 ESD_TYPE_ERROR,
38 ESD_TYPE_STOP
39} ESD_TYPE_E;
40
42#define ESD_BTN_NONE 0x00
44#define ESD_BTN_OK 0x01
46#define ESD_BTN_CANCEL 0x02
48#define ESD_BTN_YES 0x04
50#define ESD_BTN_NO 0x08
52#define ESD_BTN_CLEAR 0x10
54#define ESD_BTN_SAVE 0x20
56#define ESD_BTN_DONT_SAVE 0x40
58#define ESD_BTN_QUIT_DONT_SAVE 0x80
59
61#define ESD_BTNS_OK_CANCEL (ESD_BTN_OK|ESD_BTN_CANCEL)
63#define ESD_BTNS_YES_NO (ESD_BTN_YES|ESD_BTN_NO)
65#define ESD_BTNS_YES_NO_CANCEL (ESD_BTN_YES|ESD_BTN_NO|ESD_BTN_CANCEL)
67#define ESD_BTNS_SAVE_DONTSAVE (ESD_BTN_SAVE|ESD_BTN_DONT_SAVE)
68#define ESD_BTNS_SAVE_DONTSAVE_CANCEL (ESD_BTN_DONT_SAVE|ESD_BTN_CANCEL|ESD_BTN_SAVE)
70#define ESD_BTNS_SAVE_QUIT_DONTSAVE_CANCEL (ESD_BTN_QUIT_DONT_SAVE|ESD_BTN_CANCEL|ESD_BTN_SAVE)
72#define ESD_BTNS_QUIT_DONTSAVE_CANCEL (ESD_BTN_QUIT_DONT_SAVE|ESD_BTN_CANCEL)
73
82 extern void *simple_dialog(ESD_TYPE_E type, int btn_mask,
83 const char *msg_format, ...)
84 G_GNUC_PRINTF(3, 4);
85
86extern void *simple_dialog_async(ESD_TYPE_E type, int btn_mask,
87 const char *msg_format, ...)
88 G_GNUC_PRINTF(3, 4);
89
96extern char *simple_dialog_format_message(const char *msg);
97
98/*
99 * Alert box, with optional "don't show this message again" variable
100 * and checkbox, and optional secondary text.
101 */
102extern void simple_message_box(ESD_TYPE_E type, bool *notagain,
103 const char *secondary_msg,
104 const char *msg_format, ...) G_GNUC_PRINTF(4, 5);
105
106/*
107 * Error alert box, taking a format and a va_list argument.
108 */
109extern void vsimple_error_message_box(const char *msg_format, va_list ap);
110
111/*
112 * Error alert box, taking a format and a list of arguments.
113 */
114extern void simple_error_message_box(const char *msg_format, ...) G_GNUC_PRINTF(1, 2);
115
116/*
117 * Warning alert box, taking a format and a va_list argument.
118 */
119extern void vsimple_warning_message_box(const char *msg_format, va_list ap);
120
121#ifdef __cplusplus
122}
123#endif /* __cplusplus */
124
125#endif /* __SIMPLE_DIALOG_UI_H__ */
ESD_TYPE_E
ESD_TYPE_E
Definition simple_dialog.h:31
ESD_TYPE_CONFIRMATION
@ ESD_TYPE_CONFIRMATION
Definition simple_dialog.h:35
ESD_TYPE_STOP
@ ESD_TYPE_STOP
Definition simple_dialog.h:38
ESD_TYPE_WARN
@ ESD_TYPE_WARN
Definition simple_dialog.h:34
ESD_TYPE_INFO
@ ESD_TYPE_INFO
Definition simple_dialog.h:32
ESD_TYPE_ERROR
@ ESD_TYPE_ERROR
Definition simple_dialog.h:37
simple_dialog
void * simple_dialog(ESD_TYPE_E type, int btn_mask, const char *msg_format,...) G_GNUC_PRINTF(3
simple_dialog_format_message
void void char * simple_dialog_format_message(const char *msg)
Definition simple_dialog.cpp:78