| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
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
18extern "C" {
19#endif /* __cplusplus */
20
21typedef 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
29typedef 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;
42} iface_toolbar_value;
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;
58} iface_toolbar_control;
59
60 typedef struct _iface_toolbar {
61 char *menu_title;
62 char *help;
63 GList *ifnames;
64 GList *controls;
65} iface_toolbar;
66
67typedef void (*iface_toolbar_add_cb_t)(const iface_toolbar *);
68typedef void (*iface_toolbar_remove_cb_t)(const char *);
69
70void iface_toolbar_add(const iface_toolbar *toolbar);
71
72void iface_toolbar_remove(const char *menu_title);
73
74bool iface_toolbar_use(void);
75
76void 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__ */
_iface_toolbar_control
Definition iface_toolbar.h:44
_iface_toolbar_value
Definition iface_toolbar.h:37
_iface_toolbar
Definition iface_toolbar.h:60