From Alejandro Vaquero.
[obnox/wireshark/wip.git] / gtk / packet_list.h
1 /* packet_list.h
2  * Declarations of GTK+-specific routines for managing the packet list.
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 __PACKET_LIST_H__
26 #define __PACKET_LIST_H__
27
28 /** @file
29  *  Packet list pane.
30  *  @ingroup main_window_group
31  */
32
33 /** Create a new packet list.
34  *
35  * @param prefs current preferences
36  * @return the new packet list
37  */
38 extern GtkWidget *packet_list_new(e_prefs *prefs);
39
40 /** Fill in column titles.  This must be done after the top level window
41  *  is displayed.
42  *
43  * @todo is that still true, with fixed-width columns?
44  */
45 extern void packet_list_set_column_titles(void);
46
47 /** Resize columns
48  *
49  * @param widget parent widget (unused)
50  * @param data unused
51  */
52 extern void packet_list_resize_columns_cb(GtkWidget *widget, gpointer data);
53
54 /** Mark the currently selected packet.
55  * 
56  * @param widget parent widget (unused)
57  * @param data unused
58  */
59 extern void mark_frame_cb(GtkWidget *widget, gpointer data);
60
61 /** Mark all packets in the list.
62  * 
63  * @param widget parent widget (unused)
64  * @param data unused
65  */
66 extern void mark_all_frames_cb(GtkWidget *widget, gpointer data);
67
68 /** Unmark all packets in the list.
69  * 
70  * @param widget parent widget (unused)
71  * @param data unused
72  */
73 extern void unmark_all_frames_cb(GtkWidget *widget, gpointer data);
74
75 /** Update packet marks. */
76 extern void update_marked_frames(void);
77
78 /** Gdk button click appeared, get row and column number in packet list from that position.
79  * 
80  * @param widget the packet list widget from packet_list_new()
81  * @param event_button the button event clicked
82  * @param row the row in the packet list
83  * @param column the column in the packet list
84  * @return TRUE if row/column is returned and in range
85  */
86 extern gboolean packet_list_get_event_row_column(GtkWidget *widget,
87     GdkEventButton *event_button, gint *row, gint *column);
88
89 /** Set the font of the packet list.
90  *
91  * @param font the new font
92  */
93 extern void set_plist_font(FONT_TYPE *font);
94
95 /** Set the selection mode of the packet list window.
96  *
97  * @param val TRUE for GTK_SELECTION_SINGLE, FALSE for GTK_SELECTION_BROWSE
98  */
99 extern void set_plist_sel_browse(gboolean val);
100
101 #endif /* __PACKET_LIST_H__ */