]> Pileus Git - ~andy/gtk/blob - modules/input/gtkimcontextthai.h
Merge branch 'master' into broadway
[~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, write to the
15  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16  * Boston, MA 02111-1307, USA.
17  *
18  * Author:  Theppitak Karoonboonyanan <thep@linux.thai.net>
19  *
20  */
21
22 #ifndef __GTK_IM_CONTEXT_THAI_H__
23 #define __GTK_IM_CONTEXT_THAI_H__
24
25 #include <gtk/gtk.h>
26
27 G_BEGIN_DECLS
28
29 extern GType gtk_type_im_context_thai;
30
31 #define GTK_TYPE_IM_CONTEXT_THAI            (gtk_type_im_context_thai)
32 #define GTK_IM_CONTEXT_THAI(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_IM_CONTEXT_THAI, GtkIMContextThai))
33 #define GTK_IM_CONTEXT_THAI_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_IM_CONTEXT_THAI, GtkIMContextThaiClass))
34 #define GTK_IS_IM_CONTEXT_THAI(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_IM_CONTEXT_THAI))
35 #define GTK_IS_IM_CONTEXT_THAI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_IM_CONTEXT_THAI))
36 #define GTK_IM_CONTEXT_THAI_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_IM_CONTEXT_THAI, GtkIMContextThaiClass))
37
38
39 typedef struct _GtkIMContextThai       GtkIMContextThai;
40 typedef struct _GtkIMContextThaiClass  GtkIMContextThaiClass;
41
42 typedef enum
43 {
44   ISC_PASSTHROUGH,
45   ISC_BASICCHECK,
46   ISC_STRICT
47 } GtkIMContextThaiISCMode;
48 #define GTK_IM_CONTEXT_THAI_BUFF_SIZE 2
49
50 struct _GtkIMContextThai
51 {
52   GtkIMContext object;
53
54 #ifndef GTK_IM_CONTEXT_THAI_NO_FALLBACK
55   gunichar                char_buff[GTK_IM_CONTEXT_THAI_BUFF_SIZE];
56 #endif /* !GTK_IM_CONTEXT_THAI_NO_FALLBACK */
57   GtkIMContextThaiISCMode isc_mode;
58 };
59
60 struct _GtkIMContextThaiClass
61 {
62   GtkIMContextClass parent_class;
63 };
64
65 void gtk_im_context_thai_register_type (GTypeModule *type_module);
66 GtkIMContext *gtk_im_context_thai_new (void);
67
68 GtkIMContextThaiISCMode
69   gtk_im_context_thai_get_isc_mode (GtkIMContextThai *context_thai);
70
71 GtkIMContextThaiISCMode
72   gtk_im_context_thai_set_isc_mode (GtkIMContextThai *context_thai,
73                                     GtkIMContextThaiISCMode mode);
74
75 G_END_DECLS
76
77 #endif /* __GTK_IM_CONTEXT_THAI_H__ */