Witness: enum witness_notifyResponse_type
[wireshark-wip.git] / ui / gtk / filter_dlg.h
blob979e9a4f4954e8f1d1e1262dce6d2748af569bdd
1 /* filter_dlg.h
2 * Definitions for dialog boxes for filter editing
4 * $Id$
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
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.
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.
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 #ifndef __FILTER_DLG_H__
26 #define __FILTER_DLG_H__
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
35 /**
36 * Structure giving properties of the filter editing dialog box to be
37 * created.
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;
48 /** Create a "Capture Filter" dialog box caused by a button click.
50 * @param widget parent widget
51 * @param user_data unused
53 void capture_filter_construct_cb(GtkWidget *widget, gpointer user_data);
55 /** Create a "Display Filter" dialog box caused by a button click.
57 * @param widget parent widget
58 * @param construct_args_ptr parameters to construct the dialog (construct_args_t)
60 void display_filter_construct_cb(GtkWidget *widget, gpointer construct_args_ptr);
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.
65 * @param widget parent widget
66 * @param user_data unused
68 void filter_button_destroy_cb(GtkWidget *widget, gpointer user_data);
70 /** User requested the "Capture Filter" dialog box by menu or toolbar.
72 * @param widget parent widget
74 void cfilter_dialog_cb(GtkWidget *widget);
76 /** User requested the "Display Filter" dialog box by menu or toolbar.
78 * @param widget parent widget
80 void dfilter_dialog_cb(GtkWidget *widget);
82 /** Create an "Add expression" dialog box caused by a button click.
84 * @param widget unused
85 * @param main_w_arg parent widget
87 void filter_add_expr_bt_cb(GtkWidget *widget, gpointer main_w_arg);
89 /** Colorize a text entry as empty.
91 * @param widget the text entry to colorize
93 void colorize_filter_te_as_empty(GtkWidget *widget);
95 /** Colorize a text entry as a invalid.
97 * @param widget the text entry to colorize
99 void colorize_filter_te_as_invalid(GtkWidget *widget);
101 /** Colorize a text entry as a valid.
103 * @param widget the text entry to colorize
105 void colorize_filter_te_as_valid(GtkWidget *widget);
107 /** Colorize a filter text entry depending on "validity".
109 * @param widget the text entry to colorize
110 * @param user_data Callback User Data pointer (unused)
112 void filter_te_syntax_check_cb(GtkWidget *widget, gpointer user_data _U_);
114 /** The filter button of the top_level window. */
115 #define E_FILT_BT_PTR_KEY "filter_bt_ptr"
117 /** The filter text entry. */
118 #define E_FILT_TE_PTR_KEY "filter_te_ptr"
120 /** The filter text entry.
121 * @todo Check the usage of all the text entry keys.
123 #define E_FILT_FILTER_TE_KEY "filter_filter_te"
125 /** Only validate a single field entry. */
126 #define E_FILT_FIELD_NAME_ONLY_KEY "filter_field_name_only"
128 /** Update statusbar when changing the filter entry. */
129 #define E_FILT_FIELD_USE_STATUSBAR_KEY "filter_field_use_statusbar"
131 #endif /* filter_dlg.h */