In GTK+ 2.x, "gtk_entry_get_text()" returns a "const gchar *"; assign
[obnox/wireshark/wip.git] / gtk / main.h
1 /* main.h
2  * Global defines, etc.
3  *
4  * $Id: main.h,v 1.32 2003/10/10 08:39:24 sahlberg Exp $
5  *
6  * Ethereal - Network traffic analyzer
7  * By Gerald Combs <gerald@ethereal.com>
8  * Copyright 1998 Gerald Combs
9  *
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.
14  *
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.
19  *
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.
23  */
24
25 #ifndef __MAIN_H__
26 #define __MAIN_H__
27
28 #ifdef HAVE_CONFIG_H
29 #include "config.h"
30 #endif
31
32 #include "globals.h"
33
34 /*
35  * File under personal preferences directory in which GTK settings for
36  * Ethereal are stored.
37  */
38 #define RC_FILE "gtkrc"
39
40 #ifdef HAVE_LIBPCAP
41 #define DEF_READY_MESSAGE " Ready to load or capture"
42 #else
43 #define DEF_READY_MESSAGE " Ready to load file"
44 #endif
45
46 #define MATCH_SELECTED_REPLACE          0
47 #define MATCH_SELECTED_AND              1
48 #define MATCH_SELECTED_OR               2
49 #define MATCH_SELECTED_NOT              3
50 #define MATCH_SELECTED_AND_NOT          4
51 #define MATCH_SELECTED_OR_NOT           5
52
53 #define MATCH_SELECTED_MASK             0x0ff
54 #define MATCH_SELECTED_APPLY_NOW        0x100
55
56 typedef struct _selection_info {
57   GtkWidget *tree;
58   GtkWidget *text;
59 } selection_info;
60
61 #if GTK_MAJOR_VERSION < 2
62 extern GtkStyle *item_style;
63 #endif
64
65 void about_ethereal( GtkWidget *, gpointer);
66 void goto_framenum_cb(GtkWidget *, gpointer);
67 void match_selected_cb_replace_ptree( GtkWidget *, gpointer);
68 void match_selected_cb_and_ptree( GtkWidget *, gpointer);
69 void match_selected_cb_or_ptree( GtkWidget *, gpointer);
70 void match_selected_cb_not_ptree( GtkWidget *, gpointer);
71 void match_selected_cb_and_ptree_not( GtkWidget *, gpointer);
72 void match_selected_cb_or_ptree_not( GtkWidget *, gpointer);
73 void prepare_selected_cb_replace_ptree( GtkWidget *, gpointer);
74 void prepare_selected_cb_and_ptree( GtkWidget *, gpointer);
75 void prepare_selected_cb_or_ptree( GtkWidget *, gpointer);
76 void prepare_selected_cb_not_ptree( GtkWidget *, gpointer);
77 void prepare_selected_cb_and_ptree_not( GtkWidget *, gpointer);
78 void prepare_selected_cb_or_ptree_not( GtkWidget *, gpointer);
79 void match_selected_cb_replace_plist( GtkWidget *, gpointer);
80 void match_selected_cb_and_plist( GtkWidget *, gpointer);
81 void match_selected_cb_or_plist( GtkWidget *, gpointer);
82 void match_selected_cb_not_plist( GtkWidget *, gpointer);
83 void match_selected_cb_and_plist_not( GtkWidget *, gpointer);
84 void match_selected_cb_or_plist_not( GtkWidget *, gpointer);
85 void prepare_selected_cb_replace_plist( GtkWidget *, gpointer);
86 void prepare_selected_cb_and_plist( GtkWidget *, gpointer);
87 void prepare_selected_cb_or_plist( GtkWidget *, gpointer);
88 void prepare_selected_cb_not_plist( GtkWidget *, gpointer);
89 void prepare_selected_cb_and_plist_not( GtkWidget *, gpointer);
90 void prepare_selected_cb_or_plist_not( GtkWidget *, gpointer);
91 void file_quit_cmd_cb(GtkWidget *, gpointer);
92 void file_print_cmd_cb(GtkWidget *, gpointer);
93 void file_print_packet_cmd_cb(GtkWidget *, gpointer);
94 void tools_plugins_cmd_cb(GtkWidget *, gpointer);
95 void expand_all_cb(GtkWidget *, gpointer);
96 void collapse_all_cb(GtkWidget *, gpointer);
97 void resolve_name_cb(GtkWidget *, gpointer);
98 void reftime_frame_cb(GtkWidget *, gpointer, guint);
99 void mark_frame_cb(GtkWidget *, gpointer);
100 void mark_all_frames_cb(GtkWidget *w, gpointer);
101 void unmark_all_frames_cb(GtkWidget *w, gpointer);
102 void update_marked_frames(void);
103
104 char *boldify(const char *);
105 #if GTK_MAJOR_VERSION < 2
106 void set_fonts(GdkFont *regular, GdkFont *bold);
107 #else
108 void set_fonts(PangoFontDescription *regular, PangoFontDescription *bold);
109 #endif
110 void set_last_open_dir(char *dirname);
111
112 #endif /* __MAIN_H__ */