1998-09-16 02:39:15 +00:00
|
|
|
/* menu.h
|
|
|
|
* Menu definitions
|
|
|
|
*
|
2004-01-19 00:42:12 +00:00
|
|
|
* $Id: menu.h,v 1.14 2004/01/19 00:42:10 ulfl Exp $
|
1998-09-16 03:22:19 +00:00
|
|
|
*
|
1998-09-16 02:39:15 +00:00
|
|
|
* Ethereal - Network traffic analyzer
|
2003-09-19 07:24:39 +00:00
|
|
|
* By Gerald Combs <gerald@ethereal.com>
|
1998-09-16 02:39:15 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
1998-09-16 02:39:15 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
1998-09-16 02:39:15 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2000-01-03 03:57:04 +00:00
|
|
|
#ifndef __GTKGUIMENU_H__
|
|
|
|
#define __GTKGUIMENU_H__
|
1998-09-16 02:39:15 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2003-12-13 18:01:30 +00:00
|
|
|
/* Write all recent capture filenames to the user's recent file */
|
|
|
|
void menu_recent_file_write_all(FILE *rf);
|
|
|
|
|
2004-01-19 00:42:12 +00:00
|
|
|
GtkWidget *main_menu_new(GtkAccelGroup **);
|
1998-10-12 01:40:57 +00:00
|
|
|
void set_menu_object_data (gchar *path, gchar *key, gpointer data);
|
2000-08-21 12:33:22 +00:00
|
|
|
gint popup_menu_handler(GtkWidget *widget, GdkEvent *event, gpointer data);
|
2000-01-18 08:38:18 +00:00
|
|
|
|
2003-09-19 07:24:39 +00:00
|
|
|
|
2003-04-23 03:13:16 +00:00
|
|
|
/*
|
2003-09-19 07:24:39 +00:00
|
|
|
* Add a new menu item for a tap.
|
2003-04-23 03:13:16 +00:00
|
|
|
* This must be called after we've created the main menu, so it can't
|
|
|
|
* be called from the routine that registers taps - we have to introduce
|
|
|
|
* another per-tap registration routine.
|
2003-09-19 07:24:39 +00:00
|
|
|
*
|
|
|
|
* "callback" gets called when the menu item is selected; it should do
|
|
|
|
* the work of creating the tap window.
|
|
|
|
*
|
|
|
|
* "selected_packet_enabled" gets called by "set_menus_for_selected_packet()";
|
2003-09-24 02:36:35 +00:00
|
|
|
* it's passed a pointer to the "frame_data" structure for the current frame,
|
|
|
|
* if any, and to the "epan_dissect_t" structure for that frame, if any, and
|
|
|
|
* should return TRUE if the tap will work now (which might depend on whether
|
|
|
|
* a frame is selected and, if one is, on the frame) and FALSE if not.
|
2003-09-19 07:24:39 +00:00
|
|
|
*
|
|
|
|
* "selected_tree_row_enabled" gets called by
|
2003-09-24 02:36:35 +00:00
|
|
|
* "set_menus_for_selected_tree_row()"; it's passed a pointer to the
|
|
|
|
* "field_info" structure for the currently selected field, if any,
|
|
|
|
* and should return TRUE if the tap will work now (which might depend on
|
|
|
|
* whether a tree row is selected and, if one is, on the tree row) and
|
|
|
|
* FALSE if not.
|
2003-04-23 03:13:16 +00:00
|
|
|
*/
|
2003-09-19 07:24:39 +00:00
|
|
|
extern void register_tap_menu_item(char *name, GtkItemFactoryCallback callback,
|
2003-09-24 02:36:35 +00:00
|
|
|
gboolean (*selected_packet_enabled)(frame_data *, epan_dissect_t *),
|
2003-12-17 22:13:08 +00:00
|
|
|
gboolean (*selected_tree_row_enabled)(field_info *),
|
|
|
|
gpointer callback_data);
|
2003-04-23 03:13:16 +00:00
|
|
|
|
2000-04-06 06:52:10 +00:00
|
|
|
extern GtkWidget *popup_menu_object;
|
1998-09-16 02:39:15 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2000-01-03 03:57:04 +00:00
|
|
|
#endif /* __GTKGUIMENU_H__ */
|