Add pinfo to new_packet_list_append() this should give us the abillity
[obnox/wireshark/wip.git] / ui_util.h
1 /* 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  * $Id$
7  *
8  * Wireshark - Network traffic analyzer
9  * By Gerald Combs <gerald@wireshark.org>
10  * Copyright 1998 Gerald Combs
11  *
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License
14  * as published by the Free Software Foundation; either version 2
15  * of the License, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25  */
26
27 #ifndef __UI_UTIL_H__
28 #define __UI_UTIL_H__
29
30 #ifndef NEW_PACKET_LIST
31 #include "color.h"
32 #endif
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif /* __cplusplus */
37
38 /* gui_utils.c */
39
40 /* Set the name of the top-level window and its icon. */
41 void set_main_window_name(const gchar *);
42 /* Update the name of the main window if the user-specified decoration
43    changed. */
44 void update_main_window_name(void);
45 /* update the main window */
46 extern void main_window_update(void);
47 /* exit the main window */
48 extern void main_window_exit(void);
49 /* quit a nested main window */
50 extern void main_window_nested_quit(void);
51 /* quit the main window */
52 extern void main_window_quit(void);
53
54 /* read from a pipe (callback) */
55 typedef gboolean (*pipe_input_cb_t) (gint source, gpointer user_data);
56 /* install callback function, called if pipe input is available */
57 extern void pipe_input_set_handler(gint source, gpointer user_data, int *child_process, pipe_input_cb_t input_cb);
58
59 /* packet_list.c */
60
61 #ifdef NEW_PACKET_LIST
62 void new_packet_list_clear(void);
63 void new_packet_list_freeze(void);
64 void new_packet_list_thaw(void);
65 void new_packet_list_next(void);
66 void new_packet_list_prev(void);
67 guint new_packet_list_append(column_info *cinfo, frame_data *fdata, packet_info *pinfo);
68 frame_data * new_packet_list_get_row_data(gint row);
69 void new_packet_list_set_selected_row(gint row);
70 void new_packet_list_enable_color(gboolean enable);
71 void new_packet_list_queue_draw(void);
72 void new_packet_list_select_first_row(void);
73 void new_packet_list_select_last_row(void);
74 gint new_packet_list_find_row_from_data(gpointer data, gboolean select);
75 #else
76 /* packet list related functions */
77 void packet_list_clear(void);
78 void packet_list_freeze(void);
79 void packet_list_thaw(void);
80 void packet_list_next(void);
81 void packet_list_prev(void);
82 void packet_list_select_row(gint);
83 void packet_list_moveto_end(void);
84 gint packet_list_append(const gchar *text[], gpointer data);
85 void packet_list_set_colors(gint, color_t *, color_t *);
86 gint packet_list_find_row_from_data(gpointer);
87 void packet_list_set_text(gint, gint, const gchar *);
88 void packet_list_set_time_width(gint, gint);
89 gpointer packet_list_get_row_data(gint);
90 void packet_list_set_selected_row(gint);
91 gint packet_list_get_sort_column(void);
92 void packet_list_set_sort_column(void);
93 gboolean packet_list_check_end(void);
94
95 #endif /* NEW_PACKET_LIST */
96
97 #ifdef __cplusplus
98 }
99 #endif /* __cplusplus */
100
101 #endif /* __UI_UTIL_H__ */