9562a32a5d5f49ab574a12a1d1369f61ad277434
[metze/wireshark/wip.git] / gtk / color_utils.h
1 /* colors.h
2  * Definitions for color structures and routines
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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23  */
24
25 #ifndef  __COLORS_H__
26 #define  __COLORS_H__
27
28 /** @file
29  *  Definitions for color structures and routines
30  */
31
32 /** The color white. */
33 extern GdkColor WHITE;
34
35 /** The color light-grey. */
36 extern GdkColor LTGREY;
37
38 /** The color black. */
39 extern GdkColor BLACK;
40
41 /** Initialize the colors. */
42 void colors_init(void);
43
44 /** Allocate a color from the color map.
45  *
46  * @param new_color the new color
47  * @return TRUE if the allocation succeeded
48  */
49 #if 0
50 gboolean get_color(GdkColor *new_color);
51 #endif
52 /** Convert color_t to GdkColor.
53  *
54  * @param target the GdkColor to be filled
55  * @param source the source color_t
56  */
57 void color_t_to_gdkcolor(GdkColor *target, const color_t *source);
58 #if GTK_CHECK_VERSION(3,0,0)
59 void color_t_to_gdkRGBAcolor(GdkRGBA *target, const color_t *source);
60 #endif
61 /** Convert GdkColor to color_t.
62  *
63  * @param target the source color_t
64  * @param source the GdkColor to be filled
65  */
66 void gdkcolor_to_color_t(color_t *target, const GdkColor *source);
67 #if GTK_CHECK_VERSION(3,0,0)
68 void gdkRGBAcolor_to_color_t(color_t *target, const GdkRGBA *source);
69 #endif
70 #endif /* __COLORS_H__ */