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 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif /* __cplusplus */
17 
18 typedef enum {
19  INTERFACE_TYPE_UNKNOWN,
20  INTERFACE_TYPE_BOOLEAN,
21  INTERFACE_TYPE_BUTTON,
22  INTERFACE_TYPE_SELECTOR,
23  INTERFACE_TYPE_STRING
24 } iface_toolbar_ctrl_type;
25 
26 typedef enum {
27  INTERFACE_ROLE_UNKNOWN,
28  INTERFACE_ROLE_CONTROL,
29  INTERFACE_ROLE_HELP,
30  INTERFACE_ROLE_LOGGER,
31  INTERFACE_ROLE_RESTORE
32 } iface_toolbar_ctrl_role;
33 
34 typedef struct _iface_toolbar_value {
35  int num;
36  gchar *value;
37  gchar *display;
38  gboolean is_default;
40 
41 typedef struct _iface_toolbar_control {
42  int num;
43  iface_toolbar_ctrl_type ctrl_type;
44  iface_toolbar_ctrl_role ctrl_role;
45  gchar *display;
46  gchar *validation;
47  gboolean is_required;
48  gchar *tooltip;
49  gchar *placeholder;
50  union {
51  gboolean boolean;
52  gchar *string;
53  } default_value;
54  GList *values;
56 
57 typedef struct _iface_toolbar {
58  gchar *menu_title;
59  gchar *help;
60  GList *ifnames;
61  GList *controls;
63 
64 typedef void (*iface_toolbar_add_cb_t)(const iface_toolbar *);
65 typedef void (*iface_toolbar_remove_cb_t)(const gchar *);
66 
67 void iface_toolbar_add(const iface_toolbar *toolbar);
68 
69 void iface_toolbar_remove(const gchar *menu_title);
70 
71 gboolean iface_toolbar_use(void);
72 
73 void iface_toolbar_register_cb(iface_toolbar_add_cb_t, iface_toolbar_remove_cb_t);
74 
75 #ifdef __cplusplus
76 }
77 #endif /* __cplusplus */
78 
79 #endif /* __IFACE_TOOLBAR_H__ */
Definition: iface_toolbar.h:41
Definition: iface_toolbar.h:34
Definition: iface_toolbar.h:57