Move the common parts of iface_lists.[ch] from ui/gtk/ to ui/. Leave the
[metze/wireshark/wip.git] / ui / gtk / new_packet_list.h
1 /* new_packet_list.h
2  *
3  * $Id$
4  *
5  * Wireshark - Network traffic analyzer
6  * By Gerald Combs <gerald@wireshark.org>
7  * Copyright 1998 Gerald Combs
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; either version 2
12  * of the License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
22  * USA.
23  */
24
25 #ifndef __NEW_PACKET_LIST_H__
26 #define __NEW_PACKET_LIST_H__
27
28 #include <gtk/gtk.h>
29
30 /** @file
31  *  @ingroup main_window_group
32  */
33
34 typedef enum {
35   COLUMN_SELECTED_SORT_ASCENDING,
36   COLUMN_SELECTED_SORT_DESCENDING,
37   COLUMN_SELECTED_SORT_NONE,
38   COLUMN_SELECTED_TOGGLE_RESOLVED,
39   COLUMN_SELECTED_ALIGN_LEFT,
40   COLUMN_SELECTED_ALIGN_CENTER,
41   COLUMN_SELECTED_ALIGN_RIGHT,
42   COLUMN_SELECTED_ALIGN_DEFAULT,
43   COLUMN_SELECTED_RESIZE,
44   COLUMN_SELECTED_CHANGE,
45   COLUMN_SELECTED_HIDE,
46   COLUMN_SELECTED_REMOVE
47 } COLUMN_SELECTED_E;
48
49 /** Create the packet list */
50 GtkWidget *new_packet_list_create(void);
51 /** Recreate the packetr list */
52 void new_packet_list_recreate(void);
53 void new_packet_list_toggle_visible_column (gint col_id);
54 void new_packet_list_set_all_columns_visible (void);
55 void new_packet_list_column_menu_cb (GtkWidget *w, gpointer data, COLUMN_SELECTED_E action);
56 void new_packet_list_resize_columns_cb(GtkWidget *widget _U_, gpointer data _U_);
57 gboolean new_packet_list_get_event_row_column(GdkEventButton *event_button, gint *physical_row, gint *row, gint *column);
58 guint new_packet_list_get_column_id (gint col_num);
59
60 /** Set the font of the packet list window.
61  *
62  * @param font new font
63  */
64 extern void new_packet_list_set_font(PangoFontDescription *font);
65
66 /** Mark the currently selected packet.
67  *
68  * @param widget parent widget (unused)
69  * @param data unused
70  */
71 extern void new_packet_list_mark_frame_cb(GtkWidget *widget, gpointer data);
72
73 /** Toggle Mark on all displayed packets.
74  *
75  * @param widget parent widget (unused)
76  * @param data unused
77  */
78 extern void new_packet_list_toggle_mark_all_displayed_frames_cb(GtkWidget *w _U_, gpointer data _U_);
79
80 /** Mark all displayed packets.
81  *
82  * @param widget parent widget (unused)
83  * @param data unused
84  */
85 extern void new_packet_list_mark_all_displayed_frames_cb(GtkWidget *w _U_, gpointer data _U_);
86
87 /** UnMark all packets in the capture.
88  *
89  * @param widget parent widget (unused)
90  * @param data unused
91  */
92 extern void new_packet_list_unmark_all_displayed_frames_cb(GtkWidget *w _U_, gpointer data _U_);
93
94 /** Ignore the currently selected packet.
95  *
96  * @param widget parent widget (unused)
97  * @param data unused
98  */
99 extern void new_packet_list_ignore_frame_cb(GtkWidget *widget, gpointer data);
100
101 /** Ignore/Unignore all displayed packets.
102  *
103  * @param widget parent widget (unused)
104  * @param data unused
105  */
106 extern void new_packet_list_ignore_all_displayed_frames_cb(GtkWidget *w _U_, gpointer data _U_);
107
108 /** Un-ignore all packets in the list.
109  *
110  * @param widget parent widget (unused)
111  * @param data unused
112  */
113 extern void new_packet_list_unignore_all_frames_cb(GtkWidget *w _U_, gpointer data _U_);
114
115 /** Un-Time Reference all packets in the capture.
116  *
117  * @param widget parent widget (unused)
118  * @param data unused
119  */
120 extern void new_packet_list_untime_reference_all_frames_cb(GtkWidget *w _U_, gpointer data _U_);
121
122 /** Different modes of copying summary data */
123 typedef enum {
124     CS_TEXT, /**< Packet summary data (tab separated) */
125     CS_CSV   /**< Packet summary data (comma separated) */
126 } copy_summary_type;
127
128 /** Called when user clicks on menu item to copy summary data.
129  *
130  *  @param w Not used.
131  *  @param data Not used.
132  *  @param copy_type Mode in which to copy data (e.g. tab-separated, CSV)
133  */
134 void new_packet_list_copy_summary_cb(gpointer data _U_, copy_summary_type copy_type);
135
136 gchar *new_packet_list_get_packet_comment(void);
137 void new_packet_list_update_packet_comment(gchar *new_packet_comment);
138
139 GtkWidget * new_packet_list_get_widget(void);
140 void new_packet_list_colorize_packets(void);
141
142 /** Set the selection mode of the packet list window.
143  *
144  * @param val TRUE for GTK_SELECTION_SINGLE, FALSE for GTK_SELECTION_BROWSE
145  * @param force_set TRUE to force setting of the selection mode even if it
146  *                  was already set (used within packet_list_recreate).
147  */
148 extern void new_packet_list_set_sel_browse(gboolean val, gboolean force_set);
149
150 #endif /* __NEW_PACKET_LIST_H__ */