Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
ws_ui_util.h
1 /* ws_ui_util.h
2  * Declarations of UI utility routines; these routines have GUI-independent
3  * APIs, but GUI-dependent implementations, so that they can be called by
4  * GUI-independent code to affect the GUI.
5  *
6  * Wireshark - Network traffic analyzer
7  * By Gerald Combs <gerald@wireshark.org>
8  * Copyright 1998 Gerald Combs
9  *
10  * SPDX-License-Identifier: GPL-2.0-or-later
11  */
12 
13 #ifndef __UI_UTIL_H__
14 #define __UI_UTIL_H__
15 
16 #include <stdint.h>
17 
18 #include <wsutil/processes.h>
19 
20 #include "epan/packet_info.h"
21 #include "epan/column-utils.h"
22 #include "epan/color_filters.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif /* __cplusplus */
27 
29 typedef struct window_geometry_s {
30  gchar *key;
31  gboolean set_pos;
32  gint x;
33  gint y;
34  gboolean set_size;
35  gint width;
36  gint height;
37  gboolean set_maximized;
38  gboolean maximized;
40 
41 /* update the main window */
42 extern void main_window_update(void);
43 /* quit the main window */
44 extern void main_window_quit(void);
45 
46 /* Exit routine provided by UI-specific code. */
47 extern void exit_application(int status);
48 
49 /* read from a pipe (callback) */
50 typedef gboolean (*pipe_input_cb_t) (gint source, gpointer user_data);
51 /* install callback function, called if pipe input is available */
52 extern void pipe_input_set_handler(gint source, gpointer user_data, ws_process_id *child_process, pipe_input_cb_t input_cb);
53 
54 /* packet_list.c */
55 
56 void packet_list_clear(void);
57 void packet_list_freeze(void);
58 void packet_list_recreate_visible_rows(void);
59 void packet_list_thaw(void);
60 void packet_list_next(void);
61 void packet_list_prev(void);
62 guint packet_list_append(column_info *cinfo, frame_data *fdata);
63 frame_data *packet_list_get_row_data(gint row);
64 void packet_list_set_selected_row(gint row);
65 void packet_list_recolor_packets(void);
66 void packet_list_queue_draw(void);
67 void packet_list_select_first_row(void);
68 void packet_list_moveto_end(void);
69 gboolean packet_list_select_row_from_data(frame_data *fdata_needle);
70 void packet_list_resize_column(gint col);
71 
72 /* XXX - Yes this isn't the best place, but they are used by file_dlg_win32.c, which is supposed
73  to be GUI independent, but has lots of GTK leanings. But if you put these in a GTK UI
74  header file, file_dlg_win32.c complains about all of the GTK structures also in the header
75  files
76  Function names make it clear where they are coming from
77 */
78 void color_filter_add_cb(color_filter_t *colorf, gpointer user_data);
79 
80 #ifdef __cplusplus
81 }
82 #endif /* __cplusplus */
83 
84 #endif /* __UI_UTIL_H__ */
85 
86 /*
87  * Editor modelines
88  *
89  * Local Variables:
90  * c-basic-offset: 4
91  * tab-width: 8
92  * indent-tabs-mode: nil
93  * End:
94  *
95  * ex: set shiftwidth=4 tabstop=8 expandtab:
96  * :indentSize=4:tabSize=8:noTabs=true:
97  */
gint y
Definition: ws_ui_util.h:33
gchar * key
Definition: ws_ui_util.h:30
gboolean set_maximized
Definition: ws_ui_util.h:37
Definition: column-info.h:51
gint height
Definition: ws_ui_util.h:36
Definition: ws_ui_util.h:29
gint width
Definition: ws_ui_util.h:35
Definition: color_filters.h:29
Definition: frame_data.h:53
gboolean set_pos
Definition: ws_ui_util.h:31
gboolean maximized
Definition: ws_ui_util.h:38
gboolean set_size
Definition: ws_ui_util.h:34
gint x
Definition: ws_ui_util.h:32