2 * Declarations of GTK+-specific routines for managing the packet list.
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
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 __PACKET_LIST_H__
26 #define __PACKET_LIST_H__
28 #ifndef NEW_PACKET_LIST
30 #define RECENT_KEY_COL_WIDTH "column.width"
34 * @ingroup main_window_group
37 /** Create a new packet list.
39 * @param prefs current preferences
40 * @return the new packet list
42 extern GtkWidget *packet_list_new(e_prefs *prefs);
44 /** Recreate the packet list (for use after columns are changed) */
45 extern void packet_list_recreate(void);
47 /** Fill in column titles. This must be done after the top level window
50 * @todo is that still true, with fixed-width columns?
52 extern void packet_list_set_column_titles(void);
56 * @param widget parent widget (unused)
59 extern void packet_list_resize_columns_cb(GtkWidget *widget, gpointer data);
61 /** Mark the currently selected packet.
63 * @param widget parent widget (unused)
66 extern void packet_list_mark_frame_cb(GtkWidget *widget, gpointer data);
68 /** Mark all packets in the list.
70 * @param widget parent widget (unused)
73 extern void packet_list_mark_all_frames_cb(GtkWidget *widget, gpointer data);
75 /** Unmark all packets in the list.
77 * @param widget parent widget (unused)
80 extern void packet_list_unmark_all_frames_cb(GtkWidget *widget, gpointer data);
82 /** Update packet marks. */
83 extern void packet_list_update_marked_frames(void);
85 /** Gdk button click appeared, get row and column number in packet list from that position.
87 * @param widget the packet list widget from packet_list_new()
88 * @param event_button the button event clicked
89 * @param row the row in the packet list
90 * @param column the column in the packet list
91 * @return TRUE if row/column is returned and in range
93 extern gboolean packet_list_get_event_row_column(GtkWidget *widget,
94 GdkEventButton *event_button, gint *row, gint *column);
96 /** Set the font of the packet list.
98 * @param font the new font
100 extern void packet_list_set_font(PangoFontDescription *font);
102 /** Set the selection mode of the packet list window.
104 * @param val TRUE for GTK_SELECTION_SINGLE, FALSE for GTK_SELECTION_BROWSE
105 * @param force_set TRUE to force setting of the selection mode even if it
106 * was already set (used within packet_list_recreate).
108 extern void packet_list_set_sel_browse(gboolean val, gboolean force_set);
110 /** Move to the next packet
112 extern void packet_list_next(void);
114 /** Move to the previous packet
116 extern void packet_list_prev(void);
118 /** Check to see if the packet list is at its end. Toggles automatic
119 * scrolling if needed.
121 * @return TRUE if packet list is scrolled to greater than 90% of its total length.
123 extern gboolean packet_list_check_end(void);
125 /* Different modes of copying summary data */
127 CS_TEXT, /* Packet summary data (tab separated) */
128 CS_CSV /* Packet summary data (comma separated) */
131 /** Called when user clicks on menu item to copy summary data.
134 * @param data Not used.
135 * @param copy_type Mode in which to copy data (e.g. tab-separated, CSV)
137 extern void packet_list_copy_summary_cb(GtkWidget * w _U_, gpointer data _U_, copy_summary_type copy_type);
139 /** Write all packet list geometry values to the recent file.
141 * @param rf recent file handle from caller
143 extern void packet_list_recent_write_all(FILE *rf);
145 #endif /* NEW_PACKET_LIST */
147 #endif /* __PACKET_LIST_H__ */