Add a dialog box for constructing expressions that test a field in the
[obnox/wireshark/wip.git] / gtk / color_utils.c
1 /* color_utils.c
2  * Utilities for converting between "toolkit-independent" and GDK
3  * notions of color
4  *
5  * $Id: color_utils.c,v 1.1 2000/11/21 23:54:09 guy Exp $
6  *
7  * Ethereal - Network traffic analyzer
8  * By Gerald Combs <gerald@zing.org>
9  * Copyright 1998 Gerald Combs
10  *
11  * 
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License
14  * as published by the Free Software Foundation; either version 2
15  * of the License, or (at your option) any later version.
16  * 
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  * 
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25  */
26
27 #ifdef HAVE_CONFIG_H
28 #include "config.h"
29 #endif
30
31 #include <glib.h>
32
33 #include <gtk/gtk.h>
34
35 #include "prefs.h"      /* to declare "color_t" */
36
37 void
38 color_t_to_gdkcolor(GdkColor *target, color_t *source)
39 {
40   target->pixel = source->pixel;
41   target->red   = source->red;
42   target->green = source->green;
43   target->blue  = source->blue;
44 }
45
46 void
47 gdkcolor_to_color_t(color_t *target, GdkColor *source)
48 {
49   target->pixel = source->pixel;
50   target->red   = source->red;
51   target->green = source->green;
52   target->blue  = source->blue;
53 }