1/* Pango
2 * pango-color.h: A color struct
3 *
4 * Copyright (C) 2000 Red Hat Software
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
20 */
21
22#ifndef __PANGO_COLOR_H__
23#define __PANGO_COLOR_H__
24
25#include <pango/pango-types.h>
26#include <glib-object.h>
27
28G_BEGIN_DECLS
29
30
31typedef struct _PangoColor PangoColor;
32
33/**
34 * PangoColor:
35 * @red: value of red component
36 * @green: value of green component
37 * @blue: value of blue component
38 *
39 * The `PangoColor` structure is used to
40 * represent a color in an uncalibrated RGB color-space.
41 */
42struct _PangoColor
43{
44 guint16 red;
45 guint16 green;
46 guint16 blue;
47};
48
49#define PANGO_TYPE_COLOR (pango_color_get_type ())
50
51PANGO_AVAILABLE_IN_ALL
52GType pango_color_get_type (void) G_GNUC_CONST;
53
54PANGO_AVAILABLE_IN_ALL
55PangoColor *pango_color_copy (const PangoColor *src);
56
57PANGO_AVAILABLE_IN_ALL
58void pango_color_free (PangoColor *color);
59
60PANGO_AVAILABLE_IN_ALL
61gboolean pango_color_parse (PangoColor *color,
62 const char *spec);
63
64PANGO_AVAILABLE_IN_1_46
65gboolean pango_color_parse_with_alpha (PangoColor *color,
66 guint16 *alpha,
67 const char *spec);
68
69PANGO_AVAILABLE_IN_1_16
70char *pango_color_to_string (const PangoColor *color);
71
72
73G_END_DECLS
74
75#endif /* __PANGO_COLOR_H__ */
76

source code of include/pango-1.0/pango/pango-color.h