From Mark C. Brown:
[obnox/wireshark/wip.git] / menu.h
1 /* menu.h
2  * Definitions for menu routines with toolkit-independent APIs but
3  * toolkit-dependent implementations.
4  *
5  * $Id$
6  *
7  * Wireshark - Network traffic analyzer
8  * By Gerald Combs <gerald@wireshark.org>
9  * Copyright 1998 Gerald Combs
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
24  */
25
26 #ifndef __MENU_H__
27 #define __MENU_H__
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif /* __cplusplus */
32
33
34 /* Add a new recent capture filename to the "Recent Files" submenu
35    (duplicates will be ignored) */
36 void add_menu_recent_capture_file(gchar *file);
37
38 /* Routines to enable or disable sets of menu items. */
39
40 /* Enable or disable menu items based on whether you have a capture file
41    you've finished reading. */
42 void set_menus_for_capture_file(gboolean);
43
44 /* Enable or disable menu items based on whether you have an unsaved
45    capture file you've finished reading. */
46 void set_menus_for_unsaved_capture_file(gboolean);
47
48 /* Enable or disable menu items based on whether there's a capture in
49    progress. */
50 void set_menus_for_capture_in_progress(gboolean);
51
52 /* Enable or disable menu items based on whether you have some captured
53    packets. */
54 void set_menus_for_captured_packets(gboolean);
55
56 /* Enable or disable menu items based on whether a packet is selected. */
57 void set_menus_for_selected_packet(capture_file *cf);
58
59 /* Enable or disable menu items based on whether a tree row is selected
60    and and on whether a "Match Selected" can be done. */
61 void set_menus_for_selected_tree_row(capture_file *cf);
62
63 #ifdef __cplusplus
64 }
65 #endif /* __cplusplus */
66
67 #endif /* __MENU_H__ */