Make the signatures of functions passed to "register_tap_listener()"
[obnox/wireshark/wip.git] / gtk / menu.h
1 /* menu.h
2  * Menu definitions
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 __GTKGUIMENU_H__
26 #define __GTKGUIMENU_H__
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31
32 /** @file
33  *  Menubar and context menus.
34  *  @ingroup main_window_group
35  */
36
37 /** Write all recent capture filenames to the user's recent file.
38  * @param rf recent file
39  */
40 extern void menu_recent_file_write_all(FILE *rf);
41
42 /** User pushed a recent file submenu item.
43  *
44  * @param widget parent widget
45  */
46 extern void menu_open_recent_file_cmd(GtkWidget *widget);
47
48 /** The recent file read has finished, update the menu corresponding. */
49 extern void menu_recent_read_finished(void);
50
51 /** One of the name resolution menu items changed. */
52 extern void menu_name_resolution_changed(void);
53
54 /** Create a new menu.
55  *
56  * @param accel the created accelerator group
57  * @return the new menu
58  */
59 extern GtkWidget *main_menu_new(GtkAccelGroup **accel);
60
61 /** Set object data of menu, like OBJECT_SET_DATA().
62  *
63  * @param path the path of the menu item
64  * @param key the key to set
65  * @param data the data to set
66  */
67 extern void set_menu_object_data(gchar *path, gchar *key, gpointer data);
68
69 /** The popup menu handler.
70  *
71  * @param widget the parent widget
72  * @param event the GdkEvent
73  * @param data the corresponding menu 
74  */
75 extern gint popup_menu_handler(GtkWidget *widget, GdkEvent *event, gpointer data);
76
77 /** The packet history has changed, we need to update the menu.
78  *
79  * @param back_history some back history entries available
80  * @param forward_history some forward history entries available
81  */
82 extern void set_menus_for_packet_history(gboolean back_history, gboolean forward_history);
83
84 /** The popup menu. */
85 extern GtkWidget           *popup_menu_object;
86
87 #ifdef __cplusplus
88 }
89 #endif /* __cplusplus */
90
91 #endif /* __GTKGUIMENU_H__ */