1/* Pango
2 * pango-script.h: Script tag handling
3 *
4 * Copyright (C) 2002 Red Hat Software
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
20 */
21
22#ifndef __PANGO_SCRIPT_H__
23#define __PANGO_SCRIPT_H__
24
25#include <glib-object.h>
26
27G_BEGIN_DECLS
28
29/**
30 * PangoScriptIter:
31 *
32 * A `PangoScriptIter` is used to iterate through a string
33 * and identify ranges in different scripts.
34 **/
35typedef struct _PangoScriptIter PangoScriptIter;
36
37/**
38 * PangoScript:
39 * @PANGO_SCRIPT_INVALID_CODE: a value never returned from pango_script_for_unichar()
40 * @PANGO_SCRIPT_COMMON: a character used by multiple different scripts
41 * @PANGO_SCRIPT_INHERITED: a mark glyph that takes its script from the
42 * base glyph to which it is attached
43 * @PANGO_SCRIPT_ARABIC: Arabic
44 * @PANGO_SCRIPT_ARMENIAN: Armenian
45 * @PANGO_SCRIPT_BENGALI: Bengali
46 * @PANGO_SCRIPT_BOPOMOFO: Bopomofo
47 * @PANGO_SCRIPT_CHEROKEE: Cherokee
48 * @PANGO_SCRIPT_COPTIC: Coptic
49 * @PANGO_SCRIPT_CYRILLIC: Cyrillic
50 * @PANGO_SCRIPT_DESERET: Deseret
51 * @PANGO_SCRIPT_DEVANAGARI: Devanagari
52 * @PANGO_SCRIPT_ETHIOPIC: Ethiopic
53 * @PANGO_SCRIPT_GEORGIAN: Georgian
54 * @PANGO_SCRIPT_GOTHIC: Gothic
55 * @PANGO_SCRIPT_GREEK: Greek
56 * @PANGO_SCRIPT_GUJARATI: Gujarati
57 * @PANGO_SCRIPT_GURMUKHI: Gurmukhi
58 * @PANGO_SCRIPT_HAN: Han
59 * @PANGO_SCRIPT_HANGUL: Hangul
60 * @PANGO_SCRIPT_HEBREW: Hebrew
61 * @PANGO_SCRIPT_HIRAGANA: Hiragana
62 * @PANGO_SCRIPT_KANNADA: Kannada
63 * @PANGO_SCRIPT_KATAKANA: Katakana
64 * @PANGO_SCRIPT_KHMER: Khmer
65 * @PANGO_SCRIPT_LAO: Lao
66 * @PANGO_SCRIPT_LATIN: Latin
67 * @PANGO_SCRIPT_MALAYALAM: Malayalam
68 * @PANGO_SCRIPT_MONGOLIAN: Mongolian
69 * @PANGO_SCRIPT_MYANMAR: Myanmar
70 * @PANGO_SCRIPT_OGHAM: Ogham
71 * @PANGO_SCRIPT_OLD_ITALIC: Old Italic
72 * @PANGO_SCRIPT_ORIYA: Oriya
73 * @PANGO_SCRIPT_RUNIC: Runic
74 * @PANGO_SCRIPT_SINHALA: Sinhala
75 * @PANGO_SCRIPT_SYRIAC: Syriac
76 * @PANGO_SCRIPT_TAMIL: Tamil
77 * @PANGO_SCRIPT_TELUGU: Telugu
78 * @PANGO_SCRIPT_THAANA: Thaana
79 * @PANGO_SCRIPT_THAI: Thai
80 * @PANGO_SCRIPT_TIBETAN: Tibetan
81 * @PANGO_SCRIPT_CANADIAN_ABORIGINAL: Canadian Aboriginal
82 * @PANGO_SCRIPT_YI: Yi
83 * @PANGO_SCRIPT_TAGALOG: Tagalog
84 * @PANGO_SCRIPT_HANUNOO: Hanunoo
85 * @PANGO_SCRIPT_BUHID: Buhid
86 * @PANGO_SCRIPT_TAGBANWA: Tagbanwa
87 * @PANGO_SCRIPT_BRAILLE: Braille
88 * @PANGO_SCRIPT_CYPRIOT: Cypriot
89 * @PANGO_SCRIPT_LIMBU: Limbu
90 * @PANGO_SCRIPT_OSMANYA: Osmanya
91 * @PANGO_SCRIPT_SHAVIAN: Shavian
92 * @PANGO_SCRIPT_LINEAR_B: Linear B
93 * @PANGO_SCRIPT_TAI_LE: Tai Le
94 * @PANGO_SCRIPT_UGARITIC: Ugaritic
95 * @PANGO_SCRIPT_NEW_TAI_LUE: New Tai Lue. Since 1.10
96 * @PANGO_SCRIPT_BUGINESE: Buginese. Since 1.10
97 * @PANGO_SCRIPT_GLAGOLITIC: Glagolitic. Since 1.10
98 * @PANGO_SCRIPT_TIFINAGH: Tifinagh. Since 1.10
99 * @PANGO_SCRIPT_SYLOTI_NAGRI: Syloti Nagri. Since 1.10
100 * @PANGO_SCRIPT_OLD_PERSIAN: Old Persian. Since 1.10
101 * @PANGO_SCRIPT_KHAROSHTHI: Kharoshthi. Since 1.10
102 * @PANGO_SCRIPT_UNKNOWN: an unassigned code point. Since 1.14
103 * @PANGO_SCRIPT_BALINESE: Balinese. Since 1.14
104 * @PANGO_SCRIPT_CUNEIFORM: Cuneiform. Since 1.14
105 * @PANGO_SCRIPT_PHOENICIAN: Phoenician. Since 1.14
106 * @PANGO_SCRIPT_PHAGS_PA: Phags-pa. Since 1.14
107 * @PANGO_SCRIPT_NKO: N'Ko. Since 1.14
108 * @PANGO_SCRIPT_KAYAH_LI: Kayah Li. Since 1.20.1
109 * @PANGO_SCRIPT_LEPCHA: Lepcha. Since 1.20.1
110 * @PANGO_SCRIPT_REJANG: Rejang. Since 1.20.1
111 * @PANGO_SCRIPT_SUNDANESE: Sundanese. Since 1.20.1
112 * @PANGO_SCRIPT_SAURASHTRA: Saurashtra. Since 1.20.1
113 * @PANGO_SCRIPT_CHAM: Cham. Since 1.20.1
114 * @PANGO_SCRIPT_OL_CHIKI: Ol Chiki. Since 1.20.1
115 * @PANGO_SCRIPT_VAI: Vai. Since 1.20.1
116 * @PANGO_SCRIPT_CARIAN: Carian. Since 1.20.1
117 * @PANGO_SCRIPT_LYCIAN: Lycian. Since 1.20.1
118 * @PANGO_SCRIPT_LYDIAN: Lydian. Since 1.20.1
119 * @PANGO_SCRIPT_BATAK: Batak. Since 1.32
120 * @PANGO_SCRIPT_BRAHMI: Brahmi. Since 1.32
121 * @PANGO_SCRIPT_MANDAIC: Mandaic. Since 1.32
122 * @PANGO_SCRIPT_CHAKMA: Chakma. Since: 1.32
123 * @PANGO_SCRIPT_MEROITIC_CURSIVE: Meroitic Cursive. Since: 1.32
124 * @PANGO_SCRIPT_MEROITIC_HIEROGLYPHS: Meroitic Hieroglyphs. Since: 1.32
125 * @PANGO_SCRIPT_MIAO: Miao. Since: 1.32
126 * @PANGO_SCRIPT_SHARADA: Sharada. Since: 1.32
127 * @PANGO_SCRIPT_SORA_SOMPENG: Sora Sompeng. Since: 1.32
128 * @PANGO_SCRIPT_TAKRI: Takri. Since: 1.32
129 * @PANGO_SCRIPT_BASSA_VAH: Bassa. Since: 1.40
130 * @PANGO_SCRIPT_CAUCASIAN_ALBANIAN: Caucasian Albanian. Since: 1.40
131 * @PANGO_SCRIPT_DUPLOYAN: Duployan. Since: 1.40
132 * @PANGO_SCRIPT_ELBASAN: Elbasan. Since: 1.40
133 * @PANGO_SCRIPT_GRANTHA: Grantha. Since: 1.40
134 * @PANGO_SCRIPT_KHOJKI: Kjohki. Since: 1.40
135 * @PANGO_SCRIPT_KHUDAWADI: Khudawadi, Sindhi. Since: 1.40
136 * @PANGO_SCRIPT_LINEAR_A: Linear A. Since: 1.40
137 * @PANGO_SCRIPT_MAHAJANI: Mahajani. Since: 1.40
138 * @PANGO_SCRIPT_MANICHAEAN: Manichaean. Since: 1.40
139 * @PANGO_SCRIPT_MENDE_KIKAKUI: Mende Kikakui. Since: 1.40
140 * @PANGO_SCRIPT_MODI: Modi. Since: 1.40
141 * @PANGO_SCRIPT_MRO: Mro. Since: 1.40
142 * @PANGO_SCRIPT_NABATAEAN: Nabataean. Since: 1.40
143 * @PANGO_SCRIPT_OLD_NORTH_ARABIAN: Old North Arabian. Since: 1.40
144 * @PANGO_SCRIPT_OLD_PERMIC: Old Permic. Since: 1.40
145 * @PANGO_SCRIPT_PAHAWH_HMONG: Pahawh Hmong. Since: 1.40
146 * @PANGO_SCRIPT_PALMYRENE: Palmyrene. Since: 1.40
147 * @PANGO_SCRIPT_PAU_CIN_HAU: Pau Cin Hau. Since: 1.40
148 * @PANGO_SCRIPT_PSALTER_PAHLAVI: Psalter Pahlavi. Since: 1.40
149 * @PANGO_SCRIPT_SIDDHAM: Siddham. Since: 1.40
150 * @PANGO_SCRIPT_TIRHUTA: Tirhuta. Since: 1.40
151 * @PANGO_SCRIPT_WARANG_CITI: Warang Citi. Since: 1.40
152 * @PANGO_SCRIPT_AHOM: Ahom. Since: 1.40
153 * @PANGO_SCRIPT_ANATOLIAN_HIEROGLYPHS: Anatolian Hieroglyphs. Since: 1.40
154 * @PANGO_SCRIPT_HATRAN: Hatran. Since: 1.40
155 * @PANGO_SCRIPT_MULTANI: Multani. Since: 1.40
156 * @PANGO_SCRIPT_OLD_HUNGARIAN: Old Hungarian. Since: 1.40
157 * @PANGO_SCRIPT_SIGNWRITING: Signwriting. Since: 1.40
158 *
159 * The `PangoScript` enumeration identifies different writing
160 * systems.
161 *
162 * The values correspond to the names as defined in the Unicode standard. See
163 * [Unicode Standard Annex 24: Script names](http://www.unicode.org/reports/tr24/)
164 *
165 * Note that this enumeration is deprecated and will not be updated to include values
166 * in newer versions of the Unicode standard. Applications should use the
167 * [enum@GLib.UnicodeScript] enumeration instead,
168 * whose values are interchangeable with `PangoScript`.
169 */
170typedef enum { /* ISO 15924 code */
171 PANGO_SCRIPT_INVALID_CODE = -1,
172 PANGO_SCRIPT_COMMON = 0, /* Zyyy */
173 PANGO_SCRIPT_INHERITED, /* Qaai */
174 PANGO_SCRIPT_ARABIC, /* Arab */
175 PANGO_SCRIPT_ARMENIAN, /* Armn */
176 PANGO_SCRIPT_BENGALI, /* Beng */
177 PANGO_SCRIPT_BOPOMOFO, /* Bopo */
178 PANGO_SCRIPT_CHEROKEE, /* Cher */
179 PANGO_SCRIPT_COPTIC, /* Qaac */
180 PANGO_SCRIPT_CYRILLIC, /* Cyrl (Cyrs) */
181 PANGO_SCRIPT_DESERET, /* Dsrt */
182 PANGO_SCRIPT_DEVANAGARI, /* Deva */
183 PANGO_SCRIPT_ETHIOPIC, /* Ethi */
184 PANGO_SCRIPT_GEORGIAN, /* Geor (Geon, Geoa) */
185 PANGO_SCRIPT_GOTHIC, /* Goth */
186 PANGO_SCRIPT_GREEK, /* Grek */
187 PANGO_SCRIPT_GUJARATI, /* Gujr */
188 PANGO_SCRIPT_GURMUKHI, /* Guru */
189 PANGO_SCRIPT_HAN, /* Hani */
190 PANGO_SCRIPT_HANGUL, /* Hang */
191 PANGO_SCRIPT_HEBREW, /* Hebr */
192 PANGO_SCRIPT_HIRAGANA, /* Hira */
193 PANGO_SCRIPT_KANNADA, /* Knda */
194 PANGO_SCRIPT_KATAKANA, /* Kana */
195 PANGO_SCRIPT_KHMER, /* Khmr */
196 PANGO_SCRIPT_LAO, /* Laoo */
197 PANGO_SCRIPT_LATIN, /* Latn (Latf, Latg) */
198 PANGO_SCRIPT_MALAYALAM, /* Mlym */
199 PANGO_SCRIPT_MONGOLIAN, /* Mong */
200 PANGO_SCRIPT_MYANMAR, /* Mymr */
201 PANGO_SCRIPT_OGHAM, /* Ogam */
202 PANGO_SCRIPT_OLD_ITALIC, /* Ital */
203 PANGO_SCRIPT_ORIYA, /* Orya */
204 PANGO_SCRIPT_RUNIC, /* Runr */
205 PANGO_SCRIPT_SINHALA, /* Sinh */
206 PANGO_SCRIPT_SYRIAC, /* Syrc (Syrj, Syrn, Syre) */
207 PANGO_SCRIPT_TAMIL, /* Taml */
208 PANGO_SCRIPT_TELUGU, /* Telu */
209 PANGO_SCRIPT_THAANA, /* Thaa */
210 PANGO_SCRIPT_THAI, /* Thai */
211 PANGO_SCRIPT_TIBETAN, /* Tibt */
212 PANGO_SCRIPT_CANADIAN_ABORIGINAL, /* Cans */
213 PANGO_SCRIPT_YI, /* Yiii */
214 PANGO_SCRIPT_TAGALOG, /* Tglg */
215 PANGO_SCRIPT_HANUNOO, /* Hano */
216 PANGO_SCRIPT_BUHID, /* Buhd */
217 PANGO_SCRIPT_TAGBANWA, /* Tagb */
218
219 /* Unicode-4.0 additions */
220 PANGO_SCRIPT_BRAILLE, /* Brai */
221 PANGO_SCRIPT_CYPRIOT, /* Cprt */
222 PANGO_SCRIPT_LIMBU, /* Limb */
223 PANGO_SCRIPT_OSMANYA, /* Osma */
224 PANGO_SCRIPT_SHAVIAN, /* Shaw */
225 PANGO_SCRIPT_LINEAR_B, /* Linb */
226 PANGO_SCRIPT_TAI_LE, /* Tale */
227 PANGO_SCRIPT_UGARITIC, /* Ugar */
228
229 /* Unicode-4.1 additions */
230 PANGO_SCRIPT_NEW_TAI_LUE, /* Talu */
231 PANGO_SCRIPT_BUGINESE, /* Bugi */
232 PANGO_SCRIPT_GLAGOLITIC, /* Glag */
233 PANGO_SCRIPT_TIFINAGH, /* Tfng */
234 PANGO_SCRIPT_SYLOTI_NAGRI, /* Sylo */
235 PANGO_SCRIPT_OLD_PERSIAN, /* Xpeo */
236 PANGO_SCRIPT_KHAROSHTHI, /* Khar */
237
238 /* Unicode-5.0 additions */
239 PANGO_SCRIPT_UNKNOWN, /* Zzzz */
240 PANGO_SCRIPT_BALINESE, /* Bali */
241 PANGO_SCRIPT_CUNEIFORM, /* Xsux */
242 PANGO_SCRIPT_PHOENICIAN, /* Phnx */
243 PANGO_SCRIPT_PHAGS_PA, /* Phag */
244 PANGO_SCRIPT_NKO, /* Nkoo */
245
246 /* Unicode-5.1 additions */
247 PANGO_SCRIPT_KAYAH_LI, /* Kali */
248 PANGO_SCRIPT_LEPCHA, /* Lepc */
249 PANGO_SCRIPT_REJANG, /* Rjng */
250 PANGO_SCRIPT_SUNDANESE, /* Sund */
251 PANGO_SCRIPT_SAURASHTRA, /* Saur */
252 PANGO_SCRIPT_CHAM, /* Cham */
253 PANGO_SCRIPT_OL_CHIKI, /* Olck */
254 PANGO_SCRIPT_VAI, /* Vaii */
255 PANGO_SCRIPT_CARIAN, /* Cari */
256 PANGO_SCRIPT_LYCIAN, /* Lyci */
257 PANGO_SCRIPT_LYDIAN, /* Lydi */
258
259 /* Unicode-6.0 additions */
260 PANGO_SCRIPT_BATAK, /* Batk */
261 PANGO_SCRIPT_BRAHMI, /* Brah */
262 PANGO_SCRIPT_MANDAIC, /* Mand */
263
264 /* Unicode-6.1 additions */
265 PANGO_SCRIPT_CHAKMA, /* Cakm */
266 PANGO_SCRIPT_MEROITIC_CURSIVE, /* Merc */
267 PANGO_SCRIPT_MEROITIC_HIEROGLYPHS,/* Mero */
268 PANGO_SCRIPT_MIAO, /* Plrd */
269 PANGO_SCRIPT_SHARADA, /* Shrd */
270 PANGO_SCRIPT_SORA_SOMPENG, /* Sora */
271 PANGO_SCRIPT_TAKRI, /* Takr */
272
273 /* Unicode 7.0 additions */
274 PANGO_SCRIPT_BASSA_VAH, /* Bass */
275 PANGO_SCRIPT_CAUCASIAN_ALBANIAN, /* Aghb */
276 PANGO_SCRIPT_DUPLOYAN, /* Dupl */
277 PANGO_SCRIPT_ELBASAN, /* Elba */
278 PANGO_SCRIPT_GRANTHA, /* Gran */
279 PANGO_SCRIPT_KHOJKI, /* Khoj */
280 PANGO_SCRIPT_KHUDAWADI, /* Sind */
281 PANGO_SCRIPT_LINEAR_A, /* Lina */
282 PANGO_SCRIPT_MAHAJANI, /* Mahj */
283 PANGO_SCRIPT_MANICHAEAN, /* Manu */
284 PANGO_SCRIPT_MENDE_KIKAKUI, /* Mend */
285 PANGO_SCRIPT_MODI, /* Modi */
286 PANGO_SCRIPT_MRO, /* Mroo */
287 PANGO_SCRIPT_NABATAEAN, /* Nbat */
288 PANGO_SCRIPT_OLD_NORTH_ARABIAN, /* Narb */
289 PANGO_SCRIPT_OLD_PERMIC, /* Perm */
290 PANGO_SCRIPT_PAHAWH_HMONG, /* Hmng */
291 PANGO_SCRIPT_PALMYRENE, /* Palm */
292 PANGO_SCRIPT_PAU_CIN_HAU, /* Pauc */
293 PANGO_SCRIPT_PSALTER_PAHLAVI, /* Phlp */
294 PANGO_SCRIPT_SIDDHAM, /* Sidd */
295 PANGO_SCRIPT_TIRHUTA, /* Tirh */
296 PANGO_SCRIPT_WARANG_CITI, /* Wara */
297
298 /* Unicode 8.0 additions */
299 PANGO_SCRIPT_AHOM, /* Ahom */
300 PANGO_SCRIPT_ANATOLIAN_HIEROGLYPHS, /* Hluw */
301 PANGO_SCRIPT_HATRAN, /* Hatr */
302 PANGO_SCRIPT_MULTANI, /* Mult */
303 PANGO_SCRIPT_OLD_HUNGARIAN, /* Hung */
304 PANGO_SCRIPT_SIGNWRITING /* Sgnw */
305} PangoScript;
306
307#include <pango/pango-version-macros.h>
308
309PANGO_DEPRECATED_IN_1_44_FOR(g_unichar_get_script)
310PangoScript pango_script_for_unichar (gunichar ch) G_GNUC_CONST;
311
312PANGO_AVAILABLE_IN_1_44
313GType pango_script_iter_get_type (void) G_GNUC_CONST;
314
315PANGO_AVAILABLE_IN_1_4
316PangoScriptIter *pango_script_iter_new (const char *text,
317 int length);
318PANGO_AVAILABLE_IN_1_4
319void pango_script_iter_get_range (PangoScriptIter *iter,
320 const char **start,
321 const char **end,
322 PangoScript *script);
323PANGO_AVAILABLE_IN_1_4
324gboolean pango_script_iter_next (PangoScriptIter *iter);
325PANGO_AVAILABLE_IN_1_4
326void pango_script_iter_free (PangoScriptIter *iter);
327
328#include <pango/pango-language.h>
329
330PANGO_AVAILABLE_IN_1_4
331PangoLanguage *pango_script_get_sample_language (PangoScript script) G_GNUC_PURE;
332
333G_END_DECLS
334
335#endif /* __PANGO_SCRIPT_H__ */
336

source code of include/pango-1.0/pango/pango-script.h