]> Pileus Git - ~andy/gtk/blob - modules/input/gtkimcontextthai.h
Change FSF Address
[~andy/gtk] / modules / input / gtkimcontextthai.h
1 /* GTK - The GIMP Toolkit
2  *
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public
5  * License as published by the Free Software Foundation; either
6  * version 2 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Author:  Theppitak Karoonboonyanan <thep@linux.thai.net>
17  *
18  */
19
20 #ifndef __GTK_IM_CONTEXT_THAI_H__
21 #define __GTK_IM_CONTEXT_THAI_H__
22
23 #include <gtk/gtk.h>
24
25 G_BEGIN_DECLS
26
27 extern GType gtk_type_im_context_thai;
28
29 #define GTK_TYPE_IM_CONTEXT_THAI            (gtk_type_im_context_thai)
30 #define GTK_IM_CONTEXT_THAI(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_IM_CONTEXT_THAI, GtkIMContextThai))
31 #define GTK_IM_CONTEXT_THAI_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_IM_CONTEXT_THAI, GtkIMContextThaiClass))
32 #define GTK_IS_IM_CONTEXT_THAI(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_IM_CONTEXT_THAI))
33 #define GTK_IS_IM_CONTEXT_THAI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_IM_CONTEXT_THAI))
34 #define GTK_IM_CONTEXT_THAI_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_IM_CONTEXT_THAI, GtkIMContextThaiClass))
35
36
37 typedef struct _GtkIMContextThai       GtkIMContextThai;
38 typedef struct _GtkIMContextThaiClass  GtkIMContextThaiClass;
39
40 typedef enum
41 {
42   ISC_PASSTHROUGH,
43   ISC_BASICCHECK,
44   ISC_STRICT
45 } GtkIMContextThaiISCMode;
46 #define GTK_IM_CONTEXT_THAI_BUFF_SIZE 2
47
48 struct _GtkIMContextThai
49 {
50   GtkIMContext object;
51
52 #ifndef GTK_IM_CONTEXT_THAI_NO_FALLBACK
53   gunichar                char_buff[GTK_IM_CONTEXT_THAI_BUFF_SIZE];
54 #endif /* !GTK_IM_CONTEXT_THAI_NO_FALLBACK */
55   GtkIMContextThaiISCMode isc_mode;
56 };
57
58 struct _GtkIMContextThaiClass
59 {
60   GtkIMContextClass parent_class;
61 };
62
63 void gtk_im_context_thai_register_type (GTypeModule *type_module);
64 GtkIMContext *gtk_im_context_thai_new (void);
65
66 GtkIMContextThaiISCMode
67   gtk_im_context_thai_get_isc_mode (GtkIMContextThai *context_thai);
68
69 GtkIMContextThaiISCMode
70   gtk_im_context_thai_set_isc_mode (GtkIMContextThai *context_thai,
71                                     GtkIMContextThaiISCMode mode);
72
73 G_END_DECLS
74
75 #endif /* __GTK_IM_CONTEXT_THAI_H__ */