pangomm r18 - in trunk: . pango/src
- From: murrayc svn gnome org
- To: svn-commits-list gnome org
- Subject: pangomm r18 - in trunk: . pango/src
- Date: Wed, 20 Aug 2008 08:04:23 +0000 (UTC)
Author: murrayc
Date: Wed Aug 20 08:04:23 2008
New Revision: 18
URL: http://svn.gnome.org/viewvc/pangomm?rev=18&view=rev
Log:
2008-08-20 Murray Cumming <murrayc murrayc com>
* pango/src/language.ccg:
* pango/src/language.hg: Added get_scripts().
Modified:
trunk/ChangeLog
trunk/pango/src/language.ccg
trunk/pango/src/language.hg
Modified: trunk/pango/src/language.ccg
==============================================================================
--- trunk/pango/src/language.ccg (original)
+++ trunk/pango/src/language.ccg Wed Aug 20 08:04:23 2008
@@ -62,4 +62,12 @@
return Glib::ustring();
}
+Glib::ArrayHandle<Script> Language::get_scripts() const
+{
+ int num_scripts = 0;
+ const PangoScript* carray = pango_language_get_scripts(const_cast<PangoLanguage*>(gobj()), &num_scripts);
+ return Glib::ArrayHandle<Script>((const Script*)carray, num_scripts, Glib::OWNERSHIP_NONE);
+}
+
+
} /* namespace Pango */
Modified: trunk/pango/src/language.hg
==============================================================================
--- trunk/pango/src/language.hg (original)
+++ trunk/pango/src/language.hg Wed Aug 20 08:04:23 2008
@@ -51,6 +51,25 @@
_WRAP_METHOD(bool matches(const Glib::ustring & range_list) const, pango_language_matches)
_WRAP_METHOD(bool includes_script(Script script) const, pango_language_includes_script)
+
+
+ /** Determines the scripts used to to write this language.
+ * If nothing is known about the language tag then an empty container is returned.
+ * The list of scripts returned starts with the script that the
+ * language uses most and continues to the one it uses least.
+ *
+ * Most languages use only one script for writing, but there are
+ * some that use two (Latin and Cyrillic for example), and a few
+ * use three (Japanese for example). Applications should not make
+ * any assumptions on the maximum number of scripts returned
+ * though, except that it is a small number.
+ *
+ * @result A container of Script values.
+ *
+ * @newin2p14
+ */
+ Glib::ArrayHandle<Script> get_scripts() const;
+ _IGNORE(pango_language_get_scripts)
};
} /* namespace Pango */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]