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.
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * SPDX-License-Identifier: GPL-2.0-or-later
18 #include <wsutil/processes.h>
20 #include "epan/packet_info.h"
21 #include "epan/column-utils.h"
22 #include "epan/color_filters.h"
26 #endif /* __cplusplus */
28 /** geometry values for use in window_get_geometry() and window_set_geometry() */
29 typedef struct window_geometry_s {
30 gchar *key; /**< current key in hashtable (internally used only) */
31 gboolean set_pos; /**< set the x and y position values */
32 gint x; /**< the windows x position */
33 gint y; /**< the windows y position */
34 gboolean set_size; /**< set the width and height values */
35 gint width; /**< the windows width */
36 gint height; /**< the windows height */
37 gboolean set_maximized; /**< set the maximized state */
38 gboolean maximized; /**< the windows maximized state */
41 /* update the main window */
42 extern void main_window_update(void);
43 /* quit the main window */
44 extern void main_window_quit(void);
46 /* Exit routine provided by UI-specific code. */
47 extern void exit_application(int status);
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);
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);
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
76 Function names make it clear where they are coming from
78 void color_filter_add_cb(color_filter_t *colorf, gpointer user_data);
82 #endif /* __cplusplus */
84 #endif /* __UI_UTIL_H__ */
92 * indent-tabs-mode: nil
95 * ex: set shiftwidth=4 tabstop=8 expandtab:
96 * :indentSize=4:tabSize=8:noTabs=true: