diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-06-14 20:38:25 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-06-14 20:38:25 +0000 |
commit | 5ee19fca3c7c3da53ef4f000efdb3bbf4dcb1a04 (patch) | |
tree | 17a70e18597aae753e36a983150500bd9362dcfd /pango/pango-attributes.h | |
parent | 3a42444e7f2449598106338be7e6ec9468bb7946 (diff) | |
download | pango-5ee19fca3c7c3da53ef4f000efdb3bbf4dcb1a04.tar.gz |
Add a new PangoLanguage type to represent language tags; these can
Sat Jun 9 17:36:09 2001 Owen Taylor <otaylor@redhat.com>
* pango/pango-types.h pango/pango-utils.c: Add a new PangoLanguage
type to represent language tags; these can efficiently be compared
and don't need to be copied. Also add pango_language_matches()
to match a language tag against a pattern.
* pango/pango-item.[ch] pango/pango-layout.c: Move extra_attrs
from PangoItem to PangoAnalysis. Add a language tag field to
PangoAnalysis. (#55894)
* pango/pango-attributes.[ch] (pango_attr_iterator_get_font): Return
the language tag as well.
* pango/pango-attributes.[ch]: Rename PangoAttrLang to PangoAttrLanguage,
and make it hold a PangoLanguage.
* pango/pango-context.[ch]: Rename pango_context_{get,set}_lang() to
pango_context_{get,set}_language().
* **.[ch]: Adapt to PangoLanguage and s/lang/language/ changes.
* modules/basic/basic-x.c modules/basic/tables-big.i: Add support
for ordering character sets differently for different language
tags.
* pango/itemize.c: Remove old, unused file.
* pango/pango-context.c (pango_itemize): Reduce number of mallocs
by allocating one array of PangoAnalysis instead of many arrays.
Diffstat (limited to 'pango/pango-attributes.h')
-rw-r--r-- | pango/pango-attributes.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pango/pango-attributes.h b/pango/pango-attributes.h index dc1d887a..ffdbdb2a 100644 --- a/pango/pango-attributes.h +++ b/pango/pango-attributes.h @@ -52,6 +52,7 @@ typedef struct _PangoAttribute PangoAttribute; typedef struct _PangoAttrClass PangoAttrClass; typedef struct _PangoAttrString PangoAttrString; +typedef struct _PangoAttrLanguage PangoAttrLanguage; typedef struct _PangoAttrInt PangoAttrInt; typedef struct _PangoAttrFloat PangoAttrFloat; typedef struct _PangoAttrColor PangoAttrColor; @@ -65,7 +66,7 @@ typedef struct _PangoAttrIterator PangoAttrIterator; typedef enum { PANGO_ATTR_INVALID, /* 0 is an invalid attribute type */ - PANGO_ATTR_LANG, /* PangoAttrString */ + PANGO_ATTR_LANGUAGE, /* PangoAttrLanguage */ PANGO_ATTR_FAMILY, /* PangoAttrString */ PANGO_ATTR_STYLE, /* PangoAttrInt */ PANGO_ATTR_WEIGHT, /* PangoAttrInt */ @@ -110,6 +111,12 @@ struct _PangoAttrString char *value; }; +struct _PangoAttrLanguage +{ + PangoAttribute attr; + PangoLanguage *value; +}; + struct _PangoAttrInt { PangoAttribute attr; @@ -148,7 +155,7 @@ void pango_attribute_destroy (PangoAttribute *attr); gboolean pango_attribute_equal (const PangoAttribute *attr1, const PangoAttribute *attr2); -PangoAttribute *pango_attr_lang_new (const char *lang); +PangoAttribute *pango_attr_language_new (PangoLanguage *language); PangoAttribute *pango_attr_family_new (const char *family); PangoAttribute *pango_attr_foreground_new (guint16 red, guint16 green, @@ -197,6 +204,7 @@ PangoAttribute * pango_attr_iterator_get (PangoAttrIterator *iterator void pango_attr_iterator_get_font (PangoAttrIterator *iterator, PangoFontDescription *base, PangoFontDescription *current, + PangoLanguage **language, GSList **extra_attrs); |