2 * Definitions for GTK+ packet display structures and routines
4 * $Id: proto_draw.h,v 1.24 2004/01/27 20:36:48 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.
25 #ifndef __GTKPACKET_H__
26 #define __GTKPACKET_H__
28 /* Get the current text window for the notebook. */
29 extern GtkWidget *get_notebook_bv_ptr(GtkWidget *nb_ptr);
32 * Get the data and length for a byte view, given the byte view page.
33 * Return the pointer, or NULL on error, and set "*data_len" to the length.
35 extern const guint8 *get_byte_view_data_and_length(GtkWidget *byte_view,
39 * Set the current text window for the notebook to the window that
40 * refers to a particular tvbuff.
42 extern void set_notebook_page(GtkWidget *nb_ptr, tvbuff_t *tvb);
44 /* Redraw a given byte view window. */
45 extern void redraw_hex_dump(GtkWidget *nb, frame_data *fd, field_info *finfo);
47 /* Redraw all byte view windows. */
48 extern void redraw_hex_dump_all(void);
50 extern GtkWidget *byte_view_new(void);
52 extern void add_byte_views(epan_dissect_t *edt, GtkWidget *tree_view,
53 GtkWidget *byte_nb_ptr);
55 extern gboolean byte_view_select(GtkWidget *widget, GdkEventButton *event);
57 #if GTK_MAJOR_VERSION < 2
58 void packet_hex_print(GtkText *, const guint8 *, frame_data *, field_info *,
60 void packet_hex_reprint(GtkText *);
61 void set_ptree_font_all(GdkFont *font);
63 void packet_hex_print(GtkTextView *, const guint8 *, frame_data *, field_info *,
65 void packet_hex_reprint(GtkTextView *);
66 void set_ptree_font_all(PangoFontDescription *font);
69 extern GtkWidget * main_tree_view_new(e_prefs *prefs, GtkWidget **tree_view_p);
70 void proto_tree_draw(proto_tree *protocol_tree, GtkWidget *tree_view);
71 void expand_all_tree(proto_tree *protocol_tree, GtkWidget *tree_view);
72 void collapse_all_tree(proto_tree *protocol_tree, GtkWidget *tree_view);
74 extern gboolean tree_view_select(GtkWidget *widget, GdkEventButton *event);
76 void set_ptree_sel_browse_all(gboolean);