HACK: pinfo->private_data points to smb_info again
[wireshark-wip.git] / ui / gtk / menus.h
bloba56248489b56ee246ce7eb0450f5ade8971c7c0e
1 /* menus.h
2 * Menu definitions
4 * $Id$
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 #ifndef __MENUS_H__
26 #define __MENUS_H__
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
32 /* Open a file(name)
33 (will not ask to close existing capture file!) */
34 extern void menu_open_filename(gchar *cf_name);
36 /** @file
37 * Menubar and context menus.
38 * @ingroup main_window_group
41 /** One of the name resolution menu items changed. */
42 extern void menu_name_resolution_changed(void);
44 /* Reset preferences menu on profile or preference change. */
45 extern void menu_prefs_reset(void);
47 extern void rebuild_visible_columns_menu (void);
49 /** Create a new menu.
51 * @param accel the created accelerator group
52 * @return the new menu
54 extern GtkWidget *main_menu_new(GtkAccelGroup **accel);
56 /** Set object data of menu, like g_object_set_data().
58 * @param path the path of the menu item
59 * @param key the key to set
60 * @param data the data to set
62 extern void set_menu_object_data(const gchar *path, const gchar *key, gpointer data);
64 /** The popup menu handler.
66 * @param widget the parent widget
67 * @param event the GdkEvent
68 * @param data the corresponding menu
70 extern gboolean popup_menu_handler(GtkWidget *widget, GdkEvent *event, gpointer data);
72 /** The current file has changed, we need to update the file set menu items.
74 * @param file_set the current file is part of a file set
75 * @param previous_file the previous file set (or NULL)
76 * @param next_file the next file set (or NULL)
78 extern void set_menus_for_file_set(gboolean file_set, gboolean previous_file, gboolean next_file);
80 /** The popup menu. */
81 extern GtkWidget *popup_menu_object;
83 /* Update the packet list heading menu to indicate default
84 column justification. */
85 void menus_set_column_align_default (gboolean right_justify);
87 /* Update the packet list heading menu to indicate if column can be resolved. */
88 void menus_set_column_resolved (gboolean resolved, gboolean can_resolve);
90 /* Fetch the statusbar profiles edit submenu */
91 extern GtkWidget *menus_get_profiles_rename_menu (void);
93 /* Fetch the statusbar profiles delete submenu */
94 extern GtkWidget *menus_get_profiles_delete_menu (void);
96 /* Fetch the statusbar profiles change submenu */
97 extern GtkWidget *menus_get_profiles_change_menu (void);
99 /* Enable or disable menu items based on whether a tree row is selected
100 and and on whether a "Match Selected" can be done. */
101 void set_menus_for_selected_tree_row(capture_file *cf);
103 /* Enable or disable menu items based on whether a packet is selected. */
104 void set_menus_for_selected_packet(capture_file *cf);
106 /* Enable or disable menu items based on configuration profile */
107 void set_menus_for_profiles(gboolean default_profile);
109 #ifdef __cplusplus
111 #endif /* __cplusplus */
113 #endif /* __MENUS_H__ */