Handle i4btrace captures if they're from a machine with the opposite
[obnox/wireshark/wip.git] / colors.h
1 /* colors.h
2  * Definitions for color structures and routines
3  *
4  * $Id: colors.h,v 1.7 1999/11/30 05:32:58 guy 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 #ifndef  __COLORS_H__
26 #define  __COLORS_H__
27
28 #ifndef   __DFILTER_H__
29 #include  "proto.h"
30 #include  "dfilter.h"
31 #endif
32
33 #ifndef __GTK_H__
34 #include <gtk/gtk.h>
35 #endif
36
37 #define MAXCOLORS       255
38 #define MAX_COLOR_FILTER_NAME_LEN 33
39 #define MAX_COLOR_FILTER_STRING_LEN 256
40
41 #define CFILTERS_CONTAINS_FILTER(filter) \
42         ((filter)->num_of_filters != 0)
43
44 extern GdkColor WHITE;
45 extern GdkColor BLACK;
46
47 /* This struct is used in the GtkCList which holds the filter information.
48  * The filter name and text string for the filter are the clist data
49  */
50
51 typedef struct _color_filter {
52         GdkColor bg_color;
53         GdkColor fg_color;
54         dfilter *c_colorfilter;
55 } color_filter_t;
56
57 typedef struct _colfilter  {
58         GtkWidget  *color_filters;
59         gint      num_of_filters;  /* first num_of_filters rows filled */
60         gint      row_selected;    /* row in color_filters that is selected */
61 } colfilter;
62
63 colfilter *colfilter_new(void);
64
65 color_filter_t *color_filter(colfilter *filter, gint n);
66
67 /* ===================== USER INTERFACE ====================== */
68
69 void
70 color_display_cb(GtkWidget *w, gpointer d);
71
72
73 #endif