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 __GTKGUIMENU_H__
26 #define __GTKGUIMENU_H__
30 #endif /* __cplusplus */
33 * Menubar and context menus.
34 * @ingroup main_window_group
37 /** Write all recent capture filenames to the user's recent file.
38 * @param rf recent file
40 extern void menu_recent_file_write_all(FILE *rf);
42 /** User pushed a recent file submenu item.
44 * @param widget parent widget
46 extern void menu_open_recent_file_cmd(GtkWidget *widget);
48 /** The recent file read has finished, update the menu corresponding. */
49 extern void menu_recent_read_finished(void);
51 /** One of the name resolution menu items changed. */
52 extern void menu_name_resolution_changed(void);
54 /** Create a new menu.
56 * @param accel the created accelerator group
57 * @return the new menu
59 extern GtkWidget *main_menu_new(GtkAccelGroup **accel);
61 /** Set object data of menu, like OBJECT_SET_DATA().
63 * @param path the path of the menu item
64 * @param key the key to set
65 * @param data the data to set
67 extern void set_menu_object_data(gchar *path, gchar *key, gpointer data);
69 /** The popup menu handler.
71 * @param widget the parent widget
72 * @param event the GdkEvent
73 * @param data the corresponding menu
75 extern gint popup_menu_handler(GtkWidget *widget, GdkEvent *event, gpointer data);
77 /** The packet history has changed, we need to update the menu.
79 * @param back_history some back history entries available
80 * @param forward_history some forward history entries available
82 extern void set_menus_for_packet_history(gboolean back_history, gboolean forward_history);
84 /** The popup menu. */
85 extern GtkWidget *popup_menu_object;
89 #endif /* __cplusplus */
91 #endif /* __GTKGUIMENU_H__ */