Git init
[external/pango1.0.git] / modules / thai / thai-shaper.h
1 /* Pango
2  * thai-shaper.h:
3  *
4  * Copyright (C) 1999 Red Hat Software
5  * Author: Owen Taylor <otaylor@redhat.com>
6  *
7  * Copyright (C) 2004 Theppitak Karoonboonyanan
8  * Copyright (C) 2002 Software and Language Engineering Laboratory, NECTEC
9  * Author: Theppitak Karoonboonyanan <thep@linux.thai.net>
10  *
11  * Copyright (c) 1996-2000 by Sun Microsystems, Inc.
12  * Author: Chookij Vanatham <Chookij.Vanatham@Eng.Sun.COM>
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Library General Public
16  * License as published by the Free Software Foundation; either
17  * version 2 of the License, or (at your option) any later version.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22  * Library General Public License for more details.
23  *
24  * You should have received a copy of the GNU Library General Public
25  * License along with this library; if not, write to the
26  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
27  * Boston, MA 02111-1307, USA.
28  */
29
30 #ifndef __THAI_SHAPER_H__
31 #define __THAI_SHAPER_H__
32
33 typedef struct _ThaiFontInfo ThaiFontInfo;
34
35 /* Font encodings we will use
36  */
37 typedef enum {
38   THAI_FONT_NONE,
39   THAI_FONT_TIS,
40   THAI_FONT_TIS_MAC,
41   THAI_FONT_TIS_WIN
42 } ThaiFontSet;
43
44 typedef enum {
45   THAI_FONTINFO_X,
46   THAI_FONTINFO_XFT
47 } ThaiFontInfoType;
48
49 struct _ThaiFontInfo
50 {
51   PangoFont       *font;
52   ThaiFontSet      font_set;
53 };
54
55 /*
56  * Abstract methods (implemented by each shaper module)
57  */
58 PangoGlyph
59 thai_get_glyph_tis (ThaiFontInfo *font_info, guchar c);
60
61 PangoGlyph
62 thai_make_glyph_tis (ThaiFontInfo *font_info, guchar c);
63
64 PangoGlyph
65 thai_get_glyph_uni (ThaiFontInfo *font_info, gunichar uc);
66
67 PangoGlyph
68 thai_make_glyph_uni (ThaiFontInfo *font_info, gunichar uc);
69
70 PangoGlyph
71 thai_make_unknown_glyph (ThaiFontInfo *font_info, gunichar uc);
72
73 void
74 thai_set_glyphs (ThaiFontInfo     *font_info,
75                  const char       *text,
76                  gint              length,
77                  PangoScript       script,
78                  PangoGlyphString *glyphs);
79
80 #endif /* __THAI_SHAPER_H__ */