summaryrefslogtreecommitdiff
path: root/pango/pango-language.h
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2008-08-20 03:07:28 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2008-08-20 03:07:28 +0000
commit6a788868a78636e6f1760b18e0b732288aecc6f3 (patch)
treef95ea1f0bf957d742f622650e440a37301c30fb9 /pango/pango-language.h
parent938ae8d796f402c5538f6a911d1b698e53a134bf (diff)
downloadpango-6a788868a78636e6f1760b18e0b732288aecc6f3.tar.gz
Bug 473805 – Add API enumerating scripts for a language
2008-08-18 Behdad Esfahbod <behdad@gnome.org> Bug 473805 – Add API enumerating scripts for a language * docs/Makefile.am: * docs/pango-sections.txt: * docs/tmpl/scripts.sgml: * docs/tmpl/text-attributes.sgml: * docs/tmpl/utils.sgml: * pango/pango-language.c (pango_language_get_scripts), (pango_language_includes_script), (pango_script_get_sample_language): * pango/pango-language.h: * pango/pango-script.c: * pango/pango.def: Add a minor new public API: pango_language_get_scripts() This is what pango_language_includes_script() has been using internally. Previously one had to call that function over all possible script values to determine which scripts a language uses. The new API makes that much easier. svn path=/trunk/; revision=2693
Diffstat (limited to 'pango/pango-language.h')
-rw-r--r--pango/pango-language.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/pango/pango-language.h b/pango/pango-language.h
index b807c4c0..37cdc164 100644
--- a/pango/pango-language.h
+++ b/pango/pango-language.h
@@ -35,6 +35,7 @@ GType pango_language_get_type (void) G_GNUC_CONST;
PangoLanguage *pango_language_from_string (const char *language);
G_CONST_RETURN char *pango_language_to_string (PangoLanguage *language) G_GNUC_CONST;
+/* For back compat. Will have to keep indefinitely. */
#define pango_language_to_string(language) ((const char *)language)
G_CONST_RETURN char *pango_language_get_sample_string (PangoLanguage *language) G_GNUC_CONST;
@@ -45,8 +46,10 @@ gboolean pango_language_matches (PangoLanguage *language,
#include <pango/pango-script.h>
-gboolean pango_language_includes_script (PangoLanguage *language,
- PangoScript script) G_GNUC_PURE;
+gboolean pango_language_includes_script (PangoLanguage *language,
+ PangoScript script) G_GNUC_PURE;
+G_CONST_RETURN PangoScript *pango_language_get_scripts (PangoLanguage *language,
+ int *num_scripts);
G_END_DECLS