2000-08-11 13:37:21 +00:00
|
|
|
/* main.h
|
1998-09-16 02:39:15 +00:00
|
|
|
* Global defines, etc.
|
|
|
|
*
|
2004-05-04 20:49:33 +00:00
|
|
|
* $Id: main.h,v 1.46 2004/05/04 20:49:33 guy Exp $
|
1998-09-16 03:22:19 +00:00
|
|
|
*
|
1998-09-16 02:39:15 +00:00
|
|
|
* Ethereal - Network traffic analyzer
|
2001-10-22 22:59:26 +00:00
|
|
|
* By Gerald Combs <gerald@ethereal.com>
|
1998-09-16 02:39:15 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
1998-09-16 02:39:15 +00:00
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
1999-10-08 07:29:42 +00:00
|
|
|
#ifndef __MAIN_H__
|
|
|
|
#define __MAIN_H__
|
1998-09-16 02:39:15 +00:00
|
|
|
|
1999-09-09 03:32:03 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
1998-09-16 02:39:15 +00:00
|
|
|
#include "config.h"
|
1999-09-09 03:32:03 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "globals.h"
|
1998-09-16 02:39:15 +00:00
|
|
|
|
2001-10-22 22:59:26 +00:00
|
|
|
/*
|
|
|
|
* File under personal preferences directory in which GTK settings for
|
|
|
|
* Ethereal are stored.
|
|
|
|
*/
|
|
|
|
#define RC_FILE "gtkrc"
|
|
|
|
|
1999-07-13 02:53:26 +00:00
|
|
|
#ifdef HAVE_LIBPCAP
|
1998-09-16 02:39:15 +00:00
|
|
|
#define DEF_READY_MESSAGE " Ready to load or capture"
|
1999-07-13 02:53:26 +00:00
|
|
|
#else
|
|
|
|
#define DEF_READY_MESSAGE " Ready to load file"
|
|
|
|
#endif
|
1998-09-16 02:39:15 +00:00
|
|
|
|
2002-01-11 08:21:02 +00:00
|
|
|
#define MATCH_SELECTED_REPLACE 0
|
|
|
|
#define MATCH_SELECTED_AND 1
|
|
|
|
#define MATCH_SELECTED_OR 2
|
|
|
|
#define MATCH_SELECTED_NOT 3
|
|
|
|
#define MATCH_SELECTED_AND_NOT 4
|
|
|
|
#define MATCH_SELECTED_OR_NOT 5
|
|
|
|
|
|
|
|
#define MATCH_SELECTED_MASK 0x0ff
|
|
|
|
#define MATCH_SELECTED_APPLY_NOW 0x100
|
|
|
|
|
1998-09-16 02:39:15 +00:00
|
|
|
typedef struct _selection_info {
|
|
|
|
GtkWidget *tree;
|
|
|
|
GtkWidget *text;
|
|
|
|
} selection_info;
|
|
|
|
|
2002-11-03 17:38:45 +00:00
|
|
|
#if GTK_MAJOR_VERSION < 2
|
1998-12-29 04:05:38 +00:00
|
|
|
extern GtkStyle *item_style;
|
2002-11-03 17:38:45 +00:00
|
|
|
#endif
|
1998-12-29 04:05:38 +00:00
|
|
|
|
1998-10-16 01:18:35 +00:00
|
|
|
void about_ethereal( GtkWidget *, gpointer);
|
2002-12-19 02:58:53 +00:00
|
|
|
void goto_framenum_cb(GtkWidget *, gpointer);
|
2004-01-20 18:47:25 +00:00
|
|
|
void goto_top_frame_cb(GtkWidget *w _U_, gpointer d _U_);
|
|
|
|
void goto_bottom_frame_cb(GtkWidget *w _U_, gpointer d _U_);
|
|
|
|
void view_zoom_in_cb(GtkWidget *w _U_, gpointer d _U_);
|
|
|
|
void view_zoom_out_cb(GtkWidget *w _U_, gpointer d _U_);
|
|
|
|
void view_zoom_100_cb(GtkWidget *w _U_, gpointer d _U_);
|
2002-08-24 01:17:09 +00:00
|
|
|
void match_selected_cb_replace_ptree( GtkWidget *, gpointer);
|
|
|
|
void match_selected_cb_and_ptree( GtkWidget *, gpointer);
|
|
|
|
void match_selected_cb_or_ptree( GtkWidget *, gpointer);
|
|
|
|
void match_selected_cb_not_ptree( GtkWidget *, gpointer);
|
|
|
|
void match_selected_cb_and_ptree_not( GtkWidget *, gpointer);
|
|
|
|
void match_selected_cb_or_ptree_not( GtkWidget *, gpointer);
|
|
|
|
void prepare_selected_cb_replace_ptree( GtkWidget *, gpointer);
|
|
|
|
void prepare_selected_cb_and_ptree( GtkWidget *, gpointer);
|
|
|
|
void prepare_selected_cb_or_ptree( GtkWidget *, gpointer);
|
|
|
|
void prepare_selected_cb_not_ptree( GtkWidget *, gpointer);
|
|
|
|
void prepare_selected_cb_and_ptree_not( GtkWidget *, gpointer);
|
|
|
|
void prepare_selected_cb_or_ptree_not( GtkWidget *, gpointer);
|
|
|
|
void match_selected_cb_replace_plist( GtkWidget *, gpointer);
|
|
|
|
void match_selected_cb_and_plist( GtkWidget *, gpointer);
|
|
|
|
void match_selected_cb_or_plist( GtkWidget *, gpointer);
|
|
|
|
void match_selected_cb_not_plist( GtkWidget *, gpointer);
|
|
|
|
void match_selected_cb_and_plist_not( GtkWidget *, gpointer);
|
|
|
|
void match_selected_cb_or_plist_not( GtkWidget *, gpointer);
|
|
|
|
void prepare_selected_cb_replace_plist( GtkWidget *, gpointer);
|
|
|
|
void prepare_selected_cb_and_plist( GtkWidget *, gpointer);
|
|
|
|
void prepare_selected_cb_or_plist( GtkWidget *, gpointer);
|
|
|
|
void prepare_selected_cb_not_plist( GtkWidget *, gpointer);
|
|
|
|
void prepare_selected_cb_and_plist_not( GtkWidget *, gpointer);
|
|
|
|
void prepare_selected_cb_or_plist_not( GtkWidget *, gpointer);
|
1998-09-16 02:39:15 +00:00
|
|
|
void file_quit_cmd_cb(GtkWidget *, gpointer);
|
|
|
|
void file_print_cmd_cb(GtkWidget *, gpointer);
|
2004-04-25 16:04:13 +00:00
|
|
|
void export_text_cmd_cb(GtkWidget *, gpointer);
|
|
|
|
void export_ps_cmd_cb(GtkWidget *, gpointer);
|
|
|
|
void export_psml_cmd_cb(GtkWidget *, gpointer);
|
|
|
|
void export_pdml_cmd_cb(GtkWidget *, gpointer);
|
1999-12-09 20:43:38 +00:00
|
|
|
void tools_plugins_cmd_cb(GtkWidget *, gpointer);
|
2004-03-19 06:23:38 +00:00
|
|
|
void expand_tree_cb(GtkWidget *, gpointer);
|
1999-09-11 12:38:18 +00:00
|
|
|
void expand_all_cb(GtkWidget *, gpointer);
|
|
|
|
void collapse_all_cb(GtkWidget *, gpointer);
|
2000-02-20 14:52:28 +00:00
|
|
|
void resolve_name_cb(GtkWidget *, gpointer);
|
2003-10-10 08:39:24 +00:00
|
|
|
void reftime_frame_cb(GtkWidget *, gpointer, guint);
|
1998-09-16 02:39:15 +00:00
|
|
|
|
2004-01-19 00:42:12 +00:00
|
|
|
extern gboolean dfilter_combo_add_recent(gchar *s);
|
2004-01-25 18:51:26 +00:00
|
|
|
extern void dfilter_combo_add_empty(void);
|
2004-01-19 00:42:12 +00:00
|
|
|
extern void dfilter_recent_combo_write_all(FILE *rf);
|
2003-12-13 18:01:30 +00:00
|
|
|
|
2004-01-29 23:11:38 +00:00
|
|
|
extern gboolean main_do_quit(void);
|
2004-01-19 00:42:12 +00:00
|
|
|
extern void main_widgets_rearrange(void);
|
2004-05-04 20:49:33 +00:00
|
|
|
extern void main_widgets_show_or_hide(void);
|
2004-02-23 22:48:52 +00:00
|
|
|
extern gboolean main_filter_packets(capture_file *cf, const gchar *dftext,
|
|
|
|
gboolean force);
|
2004-01-31 18:32:37 +00:00
|
|
|
extern void dnd_open_file_cmd(gpointer cf_name);
|
2004-02-03 00:16:59 +00:00
|
|
|
extern void packets_bar_update(void);
|
|
|
|
|
2003-12-13 18:01:30 +00:00
|
|
|
|
2004-01-24 01:02:54 +00:00
|
|
|
typedef enum {
|
|
|
|
FA_SUCCESS,
|
|
|
|
FA_FONT_NOT_RESIZEABLE,
|
|
|
|
FA_FONT_NOT_AVAILABLE
|
|
|
|
} fa_ret_t;
|
|
|
|
extern fa_ret_t font_apply(void);
|
2002-11-03 17:38:45 +00:00
|
|
|
#if GTK_MAJOR_VERSION < 2
|
2004-01-20 18:47:25 +00:00
|
|
|
char *font_boldify(const char *);
|
2001-03-02 23:10:12 +00:00
|
|
|
void set_fonts(GdkFont *regular, GdkFont *bold);
|
2002-11-03 17:38:45 +00:00
|
|
|
#else
|
|
|
|
void set_fonts(PangoFontDescription *regular, PangoFontDescription *bold);
|
|
|
|
#endif
|
2001-04-09 22:35:23 +00:00
|
|
|
void set_last_open_dir(char *dirname);
|
2000-09-08 10:59:21 +00:00
|
|
|
|
1999-10-08 07:29:42 +00:00
|
|
|
#endif /* __MAIN_H__ */
|