9eef8f8eddfff3262ffb72ac793117a811f8e433
[obnox/wireshark/wip.git] / color.h
1 /* color.h
2  * Definitions for "toolkit-independent" colors
3  *
4  * $Id: color.h,v 1.3 2002/09/23 19:09:47 oabad Exp $
5  *
6  * Ethereal - Network traffic analyzer
7  * By Gerald Combs <gerald@zing.org>
8  * Copyright 1998 Gerald Combs
9  *
10  *
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.
15  *
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.
20  *
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.
24  */
25
26 #ifndef __COLOR_H__
27 #define __COLOR_H__
28
29 #include "epan/dfilter/dfilter.h"
30
31 /*
32  * Data structure holding RGB value for a color.
33  *
34  * XXX - yes, I know, there's a "pixel" value in there as well; for
35  * now, it's intended to look just like a GdkColor but not to require
36  * that any GTK+ header files be included in order to use it.
37  * The way we handle colors needs to be cleaned up somewhat, in order
38  * to keep toolkit-specific stuff separate from toolkit-independent stuff.
39  */
40 typedef struct {
41         guint32 pixel;
42         guint16 red;
43         guint16 green;
44         guint16 blue;
45 } color_t;
46
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         color_t    bg_color;      /* background color for packets that match */
52         color_t    fg_color;      /* foreground color for packets that match */
53         dfilter_t *c_colorfilter; /* compiled filter expression */
54         void      *edit_dialog;   /* if filter is being edited, dialog
55                                    * box for it */
56 } color_filter_t;
57
58 /* List of all color filters. */
59 extern GSList *filter_list;
60
61 void
62 filter_list_prime_edt(epan_dissect_t *edt);
63
64 #endif