2 * Definitions for GTK+ packet display structures and routines
4 * $Id: proto_draw.h,v 1.14 2001/11/20 10:37:16 guy Exp $
6 * Ethereal - Network traffic analyzer
7 * By Gerald Combs <gerald@ethereal.com>
8 * Copyright 1998 Gerald Combs
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.
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.
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.
26 #ifndef __GTKPACKET_H__
27 #define __GTKPACKET_H__
28 #define E_BYTE_VIEW_TREE_PTR "byte_view_tree_ptr"
29 #define E_BYTE_VIEW_TREE_VIEW_PTR "byte_view_tree_view_ptr"
30 #define E_BYTE_VIEW_TEXT_INFO_KEY "byte_view_win"
31 #define E_BYTE_VIEW_DATA_PTR_KEY "byte_view_data"
32 #define E_BYTE_VIEW_DATA_LEN_KEY "byte_view_len"
33 #define E_BYTE_VIEW_START_KEY "byte_view_start"
34 #define E_BYTE_VIEW_END_KEY "byte_view_end"
35 #define E_BYTE_VIEW_ENCODE_KEY "byte_view_encode"
36 #define E_BYTE_VIEW_NAME_KEY "byte_view_name"
38 void add_byte_views(frame_data *frame, proto_tree *tree, GtkWidget *tree_view,
39 GtkWidget *byte_nb_ptr);
41 void set_notebook_page( GtkWidget *nb_ptr, int num);
42 int find_notebook_page( GtkWidget *nb_ptr, gchar *label);
45 GtkWidget *get_byte_view( GtkWidget *byte_view_notebook);
46 int get_byte_view_data( GtkWidget *byte_view_notebook, guint8 **data_ptr);
47 int get_byte_view_and_data( GtkWidget *byte_view_notebook, GtkWidget **byte_view, guint8 **data_ptr);
49 void redraw_hex_dump(GtkWidget *nb, frame_data *fd, field_info *finfo);
51 void redraw_hex_dump_all(void);
52 void create_byte_view(gint bv_size, GtkWidget *pane, GtkWidget **byte_view_p,
53 GtkWidget **bv_scrollw_p, int pos);
54 void packet_hex_print(GtkText *, guint8 *, frame_data *, field_info *, int);
55 void packet_hex_reprint(GtkText *);
57 void create_tree_view(gint tv_size, e_prefs *prefs, GtkWidget *pane,
58 GtkWidget **tv_scrollw_p, GtkWidget **tree_view_p, int pos);
59 void proto_tree_draw(proto_tree *protocol_tree, GtkWidget *tree_view);
60 void expand_all_tree(proto_tree *protocol_tree, GtkWidget *tree_view);
61 void collapse_all_tree(proto_tree *protocol_tree, GtkWidget *tree_view);
63 void set_ptree_sel_browse_all(gboolean);
64 void set_ptree_line_style_all(gint style);
65 void set_ptree_expander_style_all(gint style);
66 void set_ptree_font_all(GdkFont *font);
68 void clear_tree_and_hex_views(void);