Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-18 10:28:14

0001 /* Pango
0002  * pango-color.h: A color struct
0003  *
0004  * Copyright (C) 2000 Red Hat Software
0005  *
0006  * This library is free software; you can redistribute it and/or
0007  * modify it under the terms of the GNU Library General Public
0008  * License as published by the Free Software Foundation; either
0009  * version 2 of the License, or (at your option) any later version.
0010  *
0011  * This library is distributed in the hope that it will be useful,
0012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0014  * Library General Public License for more details.
0015  *
0016  * You should have received a copy of the GNU Library General Public
0017  * License along with this library; if not, write to the
0018  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
0019  * Boston, MA 02111-1307, USA.
0020  */
0021 
0022 #ifndef __PANGO_COLOR_H__
0023 #define __PANGO_COLOR_H__
0024 
0025 #include <pango/pango-types.h>
0026 #include <glib-object.h>
0027 
0028 G_BEGIN_DECLS
0029 
0030 
0031 typedef struct _PangoColor PangoColor;
0032 
0033 /**
0034  * PangoColor:
0035  * @red: value of red component
0036  * @green: value of green component
0037  * @blue: value of blue component
0038  *
0039  * The `PangoColor` structure is used to
0040  * represent a color in an uncalibrated RGB color-space.
0041  */
0042 struct _PangoColor
0043 {
0044   guint16 red;
0045   guint16 green;
0046   guint16 blue;
0047 };
0048 
0049 #define PANGO_TYPE_COLOR (pango_color_get_type ())
0050 
0051 PANGO_AVAILABLE_IN_ALL
0052 GType       pango_color_get_type         (void) G_GNUC_CONST;
0053 
0054 PANGO_AVAILABLE_IN_ALL
0055 PangoColor *pango_color_copy             (const PangoColor *src);
0056 
0057 PANGO_AVAILABLE_IN_ALL
0058 void        pango_color_free             (PangoColor       *color);
0059 
0060 PANGO_AVAILABLE_IN_ALL
0061 gboolean    pango_color_parse            (PangoColor       *color,
0062                                           const char       *spec);
0063 
0064 PANGO_AVAILABLE_IN_1_46
0065 gboolean    pango_color_parse_with_alpha (PangoColor       *color,
0066                                           guint16          *alpha,
0067                                           const char       *spec);
0068 
0069 PANGO_AVAILABLE_IN_1_16
0070 char       *pango_color_to_string        (const PangoColor *color);
0071 
0072 
0073 G_END_DECLS
0074 
0075 #endif /* __PANGO_COLOR_H__ */