Bluetooth: Use dissector data instead of pinfo->private_data. Bug 7893 (https:/...
[metze/wireshark/wip.git] / color.h
1 /* color.h
2  * Definitions for "toolkit-independent" colors
3  *
4  * $Id$
5  *
6  * Wireshark - Network traffic analyzer
7  * By Gerald Combs <gerald@wireshark.org>
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23  */
24
25 #ifndef __COLOR_H__
26 #define __COLOR_H__
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31
32 /*
33  * Data structure holding RGB value for a color.
34  *
35  * XXX - yes, I know, there's a "pixel" value in there as well; for
36  * now, it's intended to look just like a GdkColor but not to require
37  * that any GTK+ header files be included in order to use it.
38  * The way we handle colors needs to be cleaned up somewhat, in order
39  * to keep toolkit-specific stuff separate from toolkit-independent stuff.
40  */
41 typedef struct {
42         guint32 pixel;
43         guint16 red;
44         guint16 green;
45         guint16 blue;
46 } color_t;
47
48 /** Initialize a color with R, G, and B values, including any toolkit-dependent
49  ** work that needs to be done.
50  *
51  * @param color the color_t to be filled
52  * @param red the red value for the color
53  * @param green the green value for the color
54  * @param blue the blue value for the color
55  * @return TRUE if it succeeds, FALSE if it fails
56  */
57 gboolean initialize_color(color_t *color, guint16 red, guint16 green, guint16 blue);
58
59 #ifdef __cplusplus
60 }
61 #endif /* __cplusplus */
62
63 #endif /* __COLOR_H__ */