2 * Definitions for color structures and routines
4 * $Id: colors.h,v 1.11 1999/12/19 10:39:35 guy Exp $
6 * Ethereal - Network traffic analyzer
7 * By Gerald Combs <gerald@zing.org>
8 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
38 #define MAX_COLOR_FILTER_NAME_LEN 33
39 #define MAX_COLOR_FILTER_STRING_LEN 256
41 #define CFILTERS_CONTAINS_FILTER(filter) \
42 ((filter)->num_of_filters != 0)
44 extern GdkColor WHITE;
45 extern GdkColor BLACK;
47 /* Data for a color filter. */
48 typedef struct _color_filter {
49 gchar *filter_name; /* name of the filter */
50 gchar *filter_text; /* text of the filter expression */
51 GdkColor bg_color; /* background color for packets that match */
52 GdkColor fg_color; /* foreground color for packets that match */
53 dfilter *c_colorfilter; /* compiled filter expression */
54 GtkWidget *edit_dialog; /* if filter is being edited, dialog box for it */
57 /* List of all color filters. */
58 extern GSList *filter_list;
60 typedef struct _colfilter {
61 gint num_of_filters; /* first num_of_filters rows filled */
62 gint row_selected; /* row in color_filters that is selected */
65 colfilter *colfilter_new(void);
67 /* ===================== USER INTERFACE ====================== */
70 color_display_cb(GtkWidget *w, gpointer d);