2 * Definitions for color structures and routines
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
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.
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.
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.
29 * Definitions for color structures and routines
32 /** The color white. */
33 extern GdkColor WHITE;
35 /** The color light-grey. */
36 extern GdkColor LTGREY;
38 /** The color black. */
39 extern GdkColor BLACK;
41 /** Initialize the colors. */
42 void colors_init(void);
44 /** Allocate a color from the color map.
46 * @param new_color the new color
47 * @return TRUE if the allocation succeeded
50 gboolean get_color(GdkColor *new_color);
52 /** Convert color_t to GdkColor.
54 * @param target the GdkColor to be filled
55 * @param source the source color_t
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);
61 /** Convert GdkColor to color_t.
63 * @param target the source color_t
64 * @param source the GdkColor to be filled
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);
70 #endif /* __COLORS_H__ */