You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

145 regels
5.9 KiB

  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. #ifndef __PANGO_SCRIPT_H__
  22. #define __PANGO_SCRIPT_H__
  23. #include <glib.h>
  24. G_BEGIN_DECLS
  25. /**
  26. * PangoScriptIter:
  27. *
  28. * A #PangoScriptIter is used to iterate through a string
  29. * and identify ranges in different scripts.
  30. **/
  31. typedef struct _PangoScriptIter PangoScriptIter;
  32. typedef enum { /* ISO 15924 code */
  33. PANGO_SCRIPT_INVALID_CODE = -1,
  34. PANGO_SCRIPT_COMMON = 0, /* Zyyy */
  35. PANGO_SCRIPT_INHERITED, /* Qaai */
  36. PANGO_SCRIPT_ARABIC, /* Arab */
  37. PANGO_SCRIPT_ARMENIAN, /* Armn */
  38. PANGO_SCRIPT_BENGALI, /* Beng */
  39. PANGO_SCRIPT_BOPOMOFO, /* Bopo */
  40. PANGO_SCRIPT_CHEROKEE, /* Cher */
  41. PANGO_SCRIPT_COPTIC, /* Qaac */
  42. PANGO_SCRIPT_CYRILLIC, /* Cyrl (Cyrs) */
  43. PANGO_SCRIPT_DESERET, /* Dsrt */
  44. PANGO_SCRIPT_DEVANAGARI, /* Deva */
  45. PANGO_SCRIPT_ETHIOPIC, /* Ethi */
  46. PANGO_SCRIPT_GEORGIAN, /* Geor (Geon, Geoa) */
  47. PANGO_SCRIPT_GOTHIC, /* Goth */
  48. PANGO_SCRIPT_GREEK, /* Grek */
  49. PANGO_SCRIPT_GUJARATI, /* Gujr */
  50. PANGO_SCRIPT_GURMUKHI, /* Guru */
  51. PANGO_SCRIPT_HAN, /* Hani */
  52. PANGO_SCRIPT_HANGUL, /* Hang */
  53. PANGO_SCRIPT_HEBREW, /* Hebr */
  54. PANGO_SCRIPT_HIRAGANA, /* Hira */
  55. PANGO_SCRIPT_KANNADA, /* Knda */
  56. PANGO_SCRIPT_KATAKANA, /* Kana */
  57. PANGO_SCRIPT_KHMER, /* Khmr */
  58. PANGO_SCRIPT_LAO, /* Laoo */
  59. PANGO_SCRIPT_LATIN, /* Latn (Latf, Latg) */
  60. PANGO_SCRIPT_MALAYALAM, /* Mlym */
  61. PANGO_SCRIPT_MONGOLIAN, /* Mong */
  62. PANGO_SCRIPT_MYANMAR, /* Mymr */
  63. PANGO_SCRIPT_OGHAM, /* Ogam */
  64. PANGO_SCRIPT_OLD_ITALIC, /* Ital */
  65. PANGO_SCRIPT_ORIYA, /* Orya */
  66. PANGO_SCRIPT_RUNIC, /* Runr */
  67. PANGO_SCRIPT_SINHALA, /* Sinh */
  68. PANGO_SCRIPT_SYRIAC, /* Syrc (Syrj, Syrn, Syre) */
  69. PANGO_SCRIPT_TAMIL, /* Taml */
  70. PANGO_SCRIPT_TELUGU, /* Telu */
  71. PANGO_SCRIPT_THAANA, /* Thaa */
  72. PANGO_SCRIPT_THAI, /* Thai */
  73. PANGO_SCRIPT_TIBETAN, /* Tibt */
  74. PANGO_SCRIPT_CANADIAN_ABORIGINAL, /* Cans */
  75. PANGO_SCRIPT_YI, /* Yiii */
  76. PANGO_SCRIPT_TAGALOG, /* Tglg */
  77. PANGO_SCRIPT_HANUNOO, /* Hano */
  78. PANGO_SCRIPT_BUHID, /* Buhd */
  79. PANGO_SCRIPT_TAGBANWA, /* Tagb */
  80. /* Unicode-4.0 additions */
  81. PANGO_SCRIPT_BRAILLE, /* Brai */
  82. PANGO_SCRIPT_CYPRIOT, /* Cprt */
  83. PANGO_SCRIPT_LIMBU, /* Limb */
  84. PANGO_SCRIPT_OSMANYA, /* Osma */
  85. PANGO_SCRIPT_SHAVIAN, /* Shaw */
  86. PANGO_SCRIPT_LINEAR_B, /* Linb */
  87. PANGO_SCRIPT_TAI_LE, /* Tale */
  88. PANGO_SCRIPT_UGARITIC, /* Ugar */
  89. /* Unicode-4.1 additions */
  90. PANGO_SCRIPT_NEW_TAI_LUE, /* Talu */
  91. PANGO_SCRIPT_BUGINESE, /* Bugi */
  92. PANGO_SCRIPT_GLAGOLITIC, /* Glag */
  93. PANGO_SCRIPT_TIFINAGH, /* Tfng */
  94. PANGO_SCRIPT_SYLOTI_NAGRI, /* Sylo */
  95. PANGO_SCRIPT_OLD_PERSIAN, /* Xpeo */
  96. PANGO_SCRIPT_KHAROSHTHI, /* Khar */
  97. /* Unicode-5.0 additions */
  98. PANGO_SCRIPT_UNKNOWN, /* Zzzz */
  99. PANGO_SCRIPT_BALINESE, /* Bali */
  100. PANGO_SCRIPT_CUNEIFORM, /* Xsux */
  101. PANGO_SCRIPT_PHOENICIAN, /* Phnx */
  102. PANGO_SCRIPT_PHAGS_PA, /* Phag */
  103. PANGO_SCRIPT_NKO, /* Nkoo */
  104. /* Unicode-5.1 additions */
  105. PANGO_SCRIPT_KAYAH_LI, /* Kali */
  106. PANGO_SCRIPT_LEPCHA, /* Lepc */
  107. PANGO_SCRIPT_REJANG, /* Rjng */
  108. PANGO_SCRIPT_SUNDANESE, /* Sund */
  109. PANGO_SCRIPT_SAURASHTRA, /* Saur */
  110. PANGO_SCRIPT_CHAM, /* Cham */
  111. PANGO_SCRIPT_OL_CHIKI, /* Olck */
  112. PANGO_SCRIPT_VAI, /* Vaii */
  113. PANGO_SCRIPT_CARIAN, /* Cari */
  114. PANGO_SCRIPT_LYCIAN, /* Lyci */
  115. PANGO_SCRIPT_LYDIAN /* Lydi */
  116. } PangoScript;
  117. PangoScript pango_script_for_unichar (gunichar ch) G_GNUC_CONST;
  118. PangoScriptIter *pango_script_iter_new (const char *text,
  119. int length);
  120. void pango_script_iter_get_range (PangoScriptIter *iter,
  121. G_CONST_RETURN char **start,
  122. G_CONST_RETURN char **end,
  123. PangoScript *script);
  124. gboolean pango_script_iter_next (PangoScriptIter *iter);
  125. void pango_script_iter_free (PangoScriptIter *iter);
  126. #include <pango/pango-language.h>
  127. PangoLanguage *pango_script_get_sample_language (PangoScript script) G_GNUC_PURE;
  128. G_END_DECLS
  129. #endif /* __PANGO_SCRIPT_H__ */