mark the frame opened/closed fields for policy handles as GENERATED fields
[obnox/wireshark/wip.git] / ui_util.h
1 /* ui_util.h
2  * Definitions for UI utility routines
3  *
4  * $Id$
5  *
6  * Ethereal - Network traffic analyzer
7  * By Gerald Combs <gerald@ethereal.com>
8  * Copyright 1998 Gerald Combs
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23  */
24
25 #ifndef __UI_UTIL_H__
26 #define __UI_UTIL_H__
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31
32 /* Set the name of the top-level window and its icon. */
33 void set_main_window_name(gchar *);
34
35 /* update the main window */
36 extern void main_window_update(void);
37 /* exit the main window */
38 extern void main_window_exit(void);
39 /* quit a nested main window */
40 extern void main_window_nested_quit(void);
41 /* quit the main window */
42 extern void main_window_quit(void);
43
44 /* read from a pipe */
45 typedef gboolean (*pipe_input_cb_t) (gint source, gpointer user_data);
46 extern void pipe_input_set_handler(gint source, gpointer user_data, int *child_process, pipe_input_cb_t input_cb);
47
48 /* packet list related functions */
49 void packet_list_clear(void);
50 void packet_list_freeze(void);
51 void packet_list_thaw(void);
52 void packet_list_select_row(gint);
53 void packet_list_moveto_end(void);
54 gint packet_list_append(const gchar *text[], gpointer data);
55 void packet_list_set_colors(gint, color_t *, color_t *);
56 gint packet_list_find_row_from_data(gpointer);
57 void packet_list_set_text(gint, gint, const gchar *);
58 void packet_list_set_cls_time_width(gint);
59 gpointer packet_list_get_row_data(gint);
60 void packet_list_set_selected_row(gint);
61 gint packet_list_get_sort_column(void);
62
63 /* create byte views in the main window */
64 void add_main_byte_views(epan_dissect_t *edt);
65 /* display the protocol tree in the main window */
66 void main_proto_tree_draw(proto_tree *protocol_tree);
67
68 void clear_tree_and_hex_views(void);
69
70 /* Destroy all popup packet windows. */
71 void destroy_packet_wins(void);
72
73 /* Destroy the save as dialog */
74 void file_save_as_destroy(void);
75
76 #define destroy_cfile_wins() \
77     destroy_packet_wins(); \
78     file_save_as_destroy();
79
80 #ifdef __cplusplus
81 }
82 #endif /* __cplusplus */
83
84 #endif /* __UI_UTIL_H__ */