summaryrefslogtreecommitdiff
path: root/pango/pango-attributes.h
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2001-01-26 21:11:13 +0000
committerHavoc Pennington <hp@src.gnome.org>2001-01-26 21:11:13 +0000
commit2246697fe6b423b8837dcf49e237db8ade8ea2ff (patch)
tree6b6f12b7ef51fad7139b82d10797b0412da400a8 /pango/pango-attributes.h
parent0ac9b1e4914f1ff01575fd9889e739a1b14c320a (diff)
downloadpango-2246697fe6b423b8837dcf49e237db8ade8ea2ff.tar.gz
take a PangoColor not a PangoAttrColor
2001-01-26 Havoc Pennington <hp@redhat.com> * pango/pangox.h (PangoGetGCFunc): take a PangoColor not a PangoAttrColor * pango/pango-attributes.h: add PangoColor, add PANGO_ATTR_INVALID as a placeholder for zero in the PangoAttrType enum, corresponds to G_TYPE_INVALID. * pango/pango-attributes.c: Add PangoColor type, use for PangoAttrColor (pango_color_get_type): new function (pango_color_copy): new function (pango_color_free): new function
Diffstat (limited to 'pango/pango-attributes.h')
-rw-r--r--pango/pango-attributes.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/pango/pango-attributes.h b/pango/pango-attributes.h
index d7859441..59012cc3 100644
--- a/pango/pango-attributes.h
+++ b/pango/pango-attributes.h
@@ -23,11 +23,31 @@
#define __PANGO_ATTRIBUTES_H__
#include <pango/pango-font.h>
+#include <glib-object.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
+/* PangoColor */
+
+typedef struct _PangoColor PangoColor;
+
+struct _PangoColor
+{
+ guint16 red;
+ guint16 green;
+ guint16 blue;
+};
+
+#define PANGO_TYPE_COLOR pango_color_get_type ()
+GType pango_color_get_type (void) G_GNUC_CONST;
+
+PangoColor *pango_color_copy (const PangoColor *src);
+void pango_color_free (PangoColor *color);
+
+/* Attributes */
+
typedef struct _PangoAttribute PangoAttribute;
typedef struct _PangoAttrClass PangoAttrClass;
@@ -43,6 +63,7 @@ typedef struct _PangoAttrIterator PangoAttrIterator;
typedef enum
{
+ PANGO_ATTR_INVALID, /* 0 is an invalid attribute type */
PANGO_ATTR_LANG, /* PangoAttrString */
PANGO_ATTR_FAMILY, /* PangoAttrString */
PANGO_ATTR_STYLE, /* PangoAttrInt */
@@ -103,9 +124,7 @@ struct _PangoAttrFloat
struct _PangoAttrColor
{
PangoAttribute attr;
- guint16 red;
- guint16 green;
- guint16 blue;
+ PangoColor color;
};
struct _PangoAttrShape