Wireshark  4.3.0
The Wireshark network protocol analyzer
iface_toolbar.h
Go to the documentation of this file.
1 
10 #ifndef __IFACE_TOOLBAR_H__
11 #define __IFACE_TOOLBAR_H__
12 
13 #include <stdbool.h>
14 
15 #include <glib.h>
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif /* __cplusplus */
20 
21 typedef enum {
22  INTERFACE_TYPE_UNKNOWN,
23  INTERFACE_TYPE_BOOLEAN,
24  INTERFACE_TYPE_BUTTON,
25  INTERFACE_TYPE_SELECTOR,
26  INTERFACE_TYPE_STRING
27 } iface_toolbar_ctrl_type;
28 
29 typedef enum {
30  INTERFACE_ROLE_UNKNOWN,
31  INTERFACE_ROLE_CONTROL,
32  INTERFACE_ROLE_HELP,
33  INTERFACE_ROLE_LOGGER,
34  INTERFACE_ROLE_RESTORE
35 } iface_toolbar_ctrl_role;
36 
37 typedef struct _iface_toolbar_value {
38  int num;
39  char *value;
40  char *display;
41  bool is_default;
43 
44 typedef struct _iface_toolbar_control {
45  int num;
46  iface_toolbar_ctrl_type ctrl_type;
47  iface_toolbar_ctrl_role ctrl_role;
48  char *display;
49  char *validation;
50  bool is_required;
51  char *tooltip;
52  char *placeholder;
53  union {
54  bool boolean;
55  char *string;
56  } default_value;
57  GList *values;
59 
60 typedef struct _iface_toolbar {
61  char *menu_title;
62  char *help;
63  GList *ifnames;
64  GList *controls;
66 
67 typedef void (*iface_toolbar_add_cb_t)(const iface_toolbar *);
68 typedef void (*iface_toolbar_remove_cb_t)(const char *);
69 
70 void iface_toolbar_add(const iface_toolbar *toolbar);
71 
72 void iface_toolbar_remove(const char *menu_title);
73 
74 bool iface_toolbar_use(void);
75 
76 void iface_toolbar_register_cb(iface_toolbar_add_cb_t, iface_toolbar_remove_cb_t);
77 
78 #ifdef __cplusplus
79 }
80 #endif /* __cplusplus */
81 
82 #endif /* __IFACE_TOOLBAR_H__ */
Definition: iface_toolbar.h:44
Definition: iface_toolbar.h:37
Definition: iface_toolbar.h:60