remove some warnings
[obnox/wireshark/wip.git] / gtk / filter_dlg.h
1 /* filter_dlg.h
2  * Definitions for dialog boxes for filter editing
3  *
4  * $Id$
5  *
6  * Wireshark - Network traffic analyzer
7  * By Gerald Combs <gerald@wireshark.org>
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 __FILTER_H__
26 #define __FILTER_H__
27
28 /** @file
29  * "Capture Filter" / "Display Filter" / "Add expression" dialog boxes.
30  * (This used to be a notebook page under "Preferences", hence the
31  * "prefs" in the file name.)
32  * @ingroup dialog_group
33  */
34
35 /**
36  * Structure giving properties of the filter editing dialog box to be
37  * created.
38  */
39 typedef struct {
40     const gchar    *title;          /**< title of dialog box */
41     gboolean wants_apply_button;    /**< dialog should have an Apply button */
42     gboolean activate_on_ok;        /**< if parent text widget should be
43                                         activated on "Ok" or "Apply" */
44     gboolean modal_and_transient;   /**< dialog is modal and transient to the
45                                         parent window (e.g. to gtk_file_chooser) */
46 } construct_args_t;
47
48 /** Create a "Capture Filter" dialog box caused by a button click.
49  *
50  * @param widget parent widget
51  * @param user_data unused
52  */
53 void capture_filter_construct_cb(GtkWidget *widget, gpointer user_data);
54
55 /** Create a "Display Filter" dialog box caused by a button click.
56  *
57  * @param widget parent widget
58  * @param construct_args_ptr parameters to construct the dialog (construct_args_t)
59  */
60 void display_filter_construct_cb(GtkWidget *widget, gpointer construct_args_ptr);
61
62 /** Should be called when the widget (usually a button) that creates filters
63  *  is destroyed. It destroys any filter dialog created by that widget.
64  *
65  * @param widget parent widget
66  * @param user_data unused
67  */
68 void filter_button_destroy_cb(GtkWidget *widget, gpointer user_data);
69
70 /** User requested the "Capture Filter" dialog box by menu or toolbar.
71  *
72  * @param widget parent widget
73  */
74 void cfilter_dialog_cb(GtkWidget *widget);
75
76 /** User requested the "Display Filter" dialog box by menu or toolbar.
77  *
78  * @param widget parent widget
79  */
80 void dfilter_dialog_cb(GtkWidget *widget);
81
82 /** Create an "Add expression" dialog box caused by a button click.
83  *
84  * @param widget unused
85  * @param main_w_arg parent widget
86  */
87 void filter_add_expr_bt_cb(GtkWidget *widget, gpointer main_w_arg);
88
89 /** Colorize a text entry as empty.
90  *
91  * @param widget the text entry to colorize
92  */
93 void colorize_filter_te_as_empty(GtkWidget *widget);
94
95 /** Colorize a text entry as a invalid.
96  *
97  * @param widget the text entry to colorize
98  */
99 void colorize_filter_te_as_invalid(GtkWidget *widget);
100
101 /** Colorize a text entry as a valid.
102  *
103  * @param widget the text entry to colorize
104  */
105 void colorize_filter_te_as_valid(GtkWidget *widget);
106
107 /** Colorize a filter text entry depending on "validity".
108  *
109  * @param widget the text entry to colorize
110  */
111 void filter_te_syntax_check_cb(GtkWidget *widget);
112
113 /** The filter button of the top_level window. */
114 #define E_FILT_BT_PTR_KEY           "filter_bt_ptr"
115
116 /** The filter text entry. */
117 #define E_FILT_TE_PTR_KEY           "filter_te_ptr"
118
119 /** The filter text entry.
120  *  @todo Check the usage of all the text entry keys.
121  */
122 #define E_FILT_FILTER_TE_KEY    "filter_filter_te"
123
124 #endif /* filter.h */