PageRenderTime 34ms CodeModel.GetById 15ms app.highlight 15ms RepoModel.GetById 1ms app.codeStats 0ms

/binding/pango/script.d

http://github.com/wilkie/djehuty
D | 143 lines | 87 code | 17 blank | 39 comment | 0 complexity | 6dd3db4cdb3ec536b8432ca7eda8bd27 MD5 | raw file
  1/*
  2 * script.d
  3 *
  4 * This file holds bindings to pango's pango-script.h. The original
  5 * copyright is displayed below.
  6 *
  7 * Author: Dave Wilkinson
  8 *
  9 */
 10
 11module binding.pango.script;
 12
 13import binding.pango.types;
 14
 15/* Pango
 16 * pango-script.h: Script tag handling
 17 *
 18 * Copyright (C) 2002 Red Hat Software
 19 *
 20 * This library is free software; you can redistribute it and/or
 21 * modify it under the terms of the GNU Library General Public
 22 * License as published by the Free Software Foundation; either
 23 * version 2 of the License, or (at your option) any later version.
 24 *
 25 * This library is distributed in the hope that it will be useful,
 26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
 28 * Library General Public License for more details.
 29 *
 30 * You should have received a copy of the GNU Library General Public
 31 * License along with this library; if not, write to the
 32 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 33 * Boston, MA 02111-1307, USA.
 34 */
 35
 36/**
 37 * PangoScriptIter:
 38 *
 39 * A #PangoScriptIter is used to iterate through a string
 40 * and identify ranges in different scripts.
 41 **/
 42extern(C) struct _PangoScriptIter;
 43
 44extern(C):
 45
 46alias _PangoScriptIter PangoScriptIter;
 47
 48enum PangoScript {                         /* ISO 15924 code */
 49      PANGO_SCRIPT_INVALID_CODE = -1,
 50      PANGO_SCRIPT_COMMON       = 0,   /* Zyyy */
 51      PANGO_SCRIPT_INHERITED,          /* Qaai */
 52      PANGO_SCRIPT_ARABIC,             /* Arab */
 53      PANGO_SCRIPT_ARMENIAN,           /* Armn */
 54      PANGO_SCRIPT_BENGALI,            /* Beng */
 55      PANGO_SCRIPT_BOPOMOFO,           /* Bopo */
 56      PANGO_SCRIPT_CHEROKEE,           /* Cher */
 57      PANGO_SCRIPT_COPTIC,             /* Qaac */
 58      PANGO_SCRIPT_CYRILLIC,           /* Cyrl (Cyrs) */
 59      PANGO_SCRIPT_DESERET,            /* Dsrt */
 60      PANGO_SCRIPT_DEVANAGARI,         /* Deva */
 61      PANGO_SCRIPT_ETHIOPIC,           /* Ethi */
 62      PANGO_SCRIPT_GEORGIAN,           /* Geor (Geon, Geoa) */
 63      PANGO_SCRIPT_GOTHIC,             /* Goth */
 64      PANGO_SCRIPT_GREEK,              /* Grek */
 65      PANGO_SCRIPT_GUJARATI,           /* Gujr */
 66      PANGO_SCRIPT_GURMUKHI,           /* Guru */
 67      PANGO_SCRIPT_HAN,                /* Hani */
 68      PANGO_SCRIPT_HANGUL,             /* Hang */
 69      PANGO_SCRIPT_HEBREW,             /* Hebr */
 70      PANGO_SCRIPT_HIRAGANA,           /* Hira */
 71      PANGO_SCRIPT_KANNADA,            /* Knda */
 72      PANGO_SCRIPT_KATAKANA,           /* Kana */
 73      PANGO_SCRIPT_KHMER,              /* Khmr */
 74      PANGO_SCRIPT_LAO,                /* Laoo */
 75      PANGO_SCRIPT_LATIN,              /* Latn (Latf, Latg) */
 76      PANGO_SCRIPT_MALAYALAM,          /* Mlym */
 77      PANGO_SCRIPT_MONGOLIAN,          /* Mong */
 78      PANGO_SCRIPT_MYANMAR,            /* Mymr */
 79      PANGO_SCRIPT_OGHAM,              /* Ogam */
 80      PANGO_SCRIPT_OLD_ITALIC,         /* Ital */
 81      PANGO_SCRIPT_ORIYA,              /* Orya */
 82      PANGO_SCRIPT_RUNIC,              /* Runr */
 83      PANGO_SCRIPT_SINHALA,            /* Sinh */
 84      PANGO_SCRIPT_SYRIAC,             /* Syrc (Syrj, Syrn, Syre) */
 85      PANGO_SCRIPT_TAMIL,              /* Taml */
 86      PANGO_SCRIPT_TELUGU,             /* Telu */
 87      PANGO_SCRIPT_THAANA,             /* Thaa */
 88      PANGO_SCRIPT_THAI,               /* Thai */
 89      PANGO_SCRIPT_TIBETAN,            /* Tibt */
 90      PANGO_SCRIPT_CANADIAN_ABORIGINAL, /* Cans */
 91      PANGO_SCRIPT_YI,                 /* Yiii */
 92      PANGO_SCRIPT_TAGALOG,            /* Tglg */
 93      PANGO_SCRIPT_HANUNOO,            /* Hano */
 94      PANGO_SCRIPT_BUHID,              /* Buhd */
 95      PANGO_SCRIPT_TAGBANWA,           /* Tagb */
 96
 97      /* Unicode-4.0 additions */
 98      PANGO_SCRIPT_BRAILLE,            /* Brai */
 99      PANGO_SCRIPT_CYPRIOT,            /* Cprt */
100      PANGO_SCRIPT_LIMBU,              /* Limb */
101      PANGO_SCRIPT_OSMANYA,            /* Osma */
102      PANGO_SCRIPT_SHAVIAN,            /* Shaw */
103      PANGO_SCRIPT_LINEAR_B,           /* Linb */
104      PANGO_SCRIPT_TAI_LE,             /* Tale */
105      PANGO_SCRIPT_UGARITIC,           /* Ugar */
106
107      /* Unicode-4.1 additions */
108      PANGO_SCRIPT_NEW_TAI_LUE,        /* Talu */
109      PANGO_SCRIPT_BUGINESE,           /* Bugi */
110      PANGO_SCRIPT_GLAGOLITIC,         /* Glag */
111      PANGO_SCRIPT_TIFINAGH,           /* Tfng */
112      PANGO_SCRIPT_SYLOTI_NAGRI,       /* Sylo */
113      PANGO_SCRIPT_OLD_PERSIAN,        /* Xpeo */
114      PANGO_SCRIPT_KHAROSHTHI,         /* Khar */
115
116      /* Unicode-5.0 additions */
117      PANGO_SCRIPT_UNKNOWN,            /* Zzzz */
118      PANGO_SCRIPT_BALINESE,           /* Bali */
119      PANGO_SCRIPT_CUNEIFORM,          /* Xsux */
120      PANGO_SCRIPT_PHOENICIAN,         /* Phnx */
121      PANGO_SCRIPT_PHAGS_PA,           /* Phag */
122      PANGO_SCRIPT_NKO                 /* Nkoo */
123}
124
125//#include <pango/pango-types.h>
126
127PangoScript pango_script_for_unichar         (gunichar             ch);
128
129PangoScriptIter *pango_script_iter_new       (char          *text,
130					      int                  length);
131
132void             pango_script_iter_get_range (PangoScriptIter      *iter,
133					      char **start,
134					      char **end,
135					      PangoScript          *script);
136
137gboolean         pango_script_iter_next      (PangoScriptIter      *iter);
138void             pango_script_iter_free      (PangoScriptIter      *iter);
139
140PangoLanguage *pango_script_get_sample_language (PangoScript    script);
141
142gboolean       pango_language_includes_script   (PangoLanguage *language,
143						 PangoScript    script);