/* -*- mode: C; c-file-style: "gnu" -*- */
/* Pango
 * pango-script.h: Script tag handling
 *
 * Copyright (C) 2002 Red Hat Software
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#ifndef __PANGO_SCRIPT_H__
#define __PANGO_SCRIPT_H__

#include <glib.h>

G_BEGIN_DECLS

typedef struct _PangoScriptIter PangoScriptIter;

typedef enum {
      PANGO_SCRIPT_INVALID_CODE = -1,
      PANGO_SCRIPT_COMMON       =  0 , /* Zyyy */
      PANGO_SCRIPT_INHERITED    =  1,  /* Qaai */
      PANGO_SCRIPT_ARABIC       =  2,  /* Arab */
      PANGO_SCRIPT_ARMENIAN     =  3,  /* Armn */
      PANGO_SCRIPT_BENGALI      =  4,  /* Beng */
      PANGO_SCRIPT_BOPOMOFO     =  5,  /* Bopo */
      PANGO_SCRIPT_CHEROKEE     =  6,  /* Cher */
      PANGO_SCRIPT_COPTIC       =  7,  /* Qaac */
      PANGO_SCRIPT_CYRILLIC     =  8,  /* Cyrl (Cyrs) */
      PANGO_SCRIPT_DESERET      =  9,  /* Dsrt */
      PANGO_SCRIPT_DEVANAGARI   = 10,  /* Deva */
      PANGO_SCRIPT_ETHIOPIC     = 11,  /* Ethi */
      PANGO_SCRIPT_GEORGIAN     = 12,  /* Geor (Geon, Geoa) */
      PANGO_SCRIPT_GOTHIC       = 13,  /* Goth */
      PANGO_SCRIPT_GREEK        = 14,  /* Grek */
      PANGO_SCRIPT_GUJARATI     = 15,  /* Gujr */
      PANGO_SCRIPT_GURMUKHI     = 16,  /* Guru */
      PANGO_SCRIPT_HAN          = 17,  /* Hani */
      PANGO_SCRIPT_HANGUL       = 18,  /* Hang */
      PANGO_SCRIPT_HEBREW       = 19,  /* Hebr */
      PANGO_SCRIPT_HIRAGANA     = 20,  /* Hira */
      PANGO_SCRIPT_KANNADA      = 21,  /* Knda */
      PANGO_SCRIPT_KATAKANA     = 22,  /* Kana */
      PANGO_SCRIPT_KHMER        = 23,  /* Khmr */
      PANGO_SCRIPT_LAO          = 24,  /* Laoo */
      PANGO_SCRIPT_LATIN        = 25,  /* Latn (Latf, Latg) */
      PANGO_SCRIPT_MALAYALAM    = 26,  /* Mlym */
      PANGO_SCRIPT_MONGOLIAN    = 27,  /* Mong */
      PANGO_SCRIPT_MYANMAR      = 28,  /* Mymr */
      PANGO_SCRIPT_OGHAM        = 29,  /* Ogam */
      PANGO_SCRIPT_OLD_ITALIC   = 30,  /* Ital */
      PANGO_SCRIPT_ORIYA        = 31,  /* Orya */
      PANGO_SCRIPT_RUNIC        = 32,  /* Runr */
      PANGO_SCRIPT_SINHALA      = 33,  /* Sinh */
      PANGO_SCRIPT_SYRIAC       = 34,  /* Syrc (Syrj, Syrn, Syre) */
      PANGO_SCRIPT_TAMIL        = 35,  /* Taml */
      PANGO_SCRIPT_TELUGU       = 36,  /* Telu */
      PANGO_SCRIPT_THAANA       = 37,  /* Thaa */
      PANGO_SCRIPT_THAI         = 38,  /* Thai */
      PANGO_SCRIPT_TIBETAN      = 39,  /* Tibt */
      PANGO_SCRIPT_UCAS         = 40,  /* Cans */
      PANGO_SCRIPT_YI           = 41,  /* Yiii */
      PANGO_SCRIPT_TAGALOG      = 42,  /* Tglg */
      PANGO_SCRIPT_HANUNOO      = 43,  /* Hano */
      PANGO_SCRIPT_BUHID        = 44,  /* Buhd */
      PANGO_SCRIPT_TAGBANWA     = 45   /* Tagb */
} PangoScript;

PangoScript pango_script_for_unichar         (gunichar             ch);

PangoScriptIter *pango_script_iter_new       (const char          *text,
					      int                  length);
void             pango_script_iter_get_range (PangoScriptIter      *iter,
					      G_CONST_RETURN char **start,
					      G_CONST_RETURN char **end,
					      PangoScript          *script);
gboolean         pango_script_iter_next      (PangoScriptIter      *iter);
void             pango_script_iter_free      (PangoScriptIter      *iter);

G_END_DECLS

#endif /* __PANGO_SCRIPT_H__ */
