| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
simple_dialog.h
Go to the documentation of this file.
1
12
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
21 extern "C" {
22#endif /* __cplusplus */
23
28
29
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
94extern void *simple_dialog_async(ESD_TYPE_E type, int btn_mask,
95 const char *msg_format, ...)
96 G_GNUC_PRINTF(3, 4);
97
104extern char *simple_dialog_format_message(const char *msg);
105
116extern void simple_message_box(ESD_TYPE_E type, bool *notagain,
117 const char *secondary_msg,
118 const char *msg_format, ...) G_GNUC_PRINTF(4, 5);
119
126extern void vsimple_error_message_box(const char *msg_format, va_list ap);
127
128
135extern void simple_error_message_box(const char *msg_format, ...) G_GNUC_PRINTF(1, 2);
136
137
144extern void vsimple_warning_message_box(const char *msg_format, va_list ap);
145
146#ifdef __cplusplus
147}
148#endif /* __cplusplus */
149
150#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,...)
Definition simple_dialog.c:25