Implement DVMRP_V3_NEIGHBORS_2 presentation.
[obnox/wireshark/wip.git] / color.h
1 /* color.h
2  * Definitions for "toolkit-independent" colors
3  *
4  * $Id$
5  *
6  * Ethereal - Network traffic analyzer
7  * By Gerald Combs <gerald@ethereal.com>
8  * Copyright 1998 Gerald Combs
9  *
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.
14  *
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.
19  *
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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23  */
24
25 #ifndef __COLOR_H__
26 #define __COLOR_H__
27
28 /*
29  * Data structure holding RGB value for a color.
30  *
31  * XXX - yes, I know, there's a "pixel" value in there as well; for
32  * now, it's intended to look just like a GdkColor but not to require
33  * that any GTK+ header files be included in order to use it.
34  * The way we handle colors needs to be cleaned up somewhat, in order
35  * to keep toolkit-specific stuff separate from toolkit-independent stuff.
36  */
37 typedef struct {
38         guint32 pixel;
39         guint16 red;
40         guint16 green;
41         guint16 blue;
42 } color_t;
43
44 /** Initialize a color with R, G, and B values, including any toolkit-dependent
45  ** work that needs to be done.
46  *
47  * @param color the color_t to be filled
48  * @param red the red value for the color
49  * @param green the green value for the color
50  * @param blue the blue value for the color
51  * @return TRUE if it succeeds, FALSE if it fails
52  */
53 gboolean initialize_color(color_t *color, guint16 red, guint16 green, guint16 blue);
54
55 #endif