]> Pileus Git - ~andy/gtk/blob - modules/input/imti-er.c
Bug 99192 - Add --with-include-input-modules
[~andy/gtk] / modules / input / imti-er.c
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 2000 Red Hat Software
3  * Copyright (C) 2000 SuSE Linux Ltd
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  *
20  * Original author: Owen Taylor <otaylor@redhat.com>
21  * 
22  * Modified for Inuktitut - Robert Brady <robert@suse.co.uk>
23  * 
24  * Modified for Tigrigna - Daniel Yacob <locales@geez.org>
25  *
26  */
27
28 #include <config.h>
29 #include <stdio.h>
30 #include <string.h>
31
32 #include <gdk/gdkkeysyms.h>
33
34 #include "gtk/gtkintl.h"
35 #include "gtk/gtkimcontextsimple.h"
36 #include "gtk/gtkimmodule.h"
37
38 GType type_ti_er_translit = 0;
39
40 static void ti_er_class_init (GtkIMContextSimpleClass *class);
41 static void ti_er_init (GtkIMContextSimple *im_context);
42
43 static void
44 ti_er_register_type (GTypeModule *module)
45 {
46   static const GTypeInfo object_info =
47   {
48     sizeof (GtkIMContextSimpleClass),
49     (GBaseInitFunc) NULL,
50     (GBaseFinalizeFunc) NULL,
51     (GClassInitFunc) ti_er_class_init,
52     NULL,           /* class_finalize */
53     NULL,           /* class_data */
54     sizeof (GtkIMContextSimple),
55     0,
56     (GInstanceInitFunc) ti_er_init,
57   };
58
59   type_ti_er_translit = 
60     g_type_module_register_type (module,
61                                  GTK_TYPE_IM_CONTEXT_SIMPLE,
62                                  "GtkIMContextTigrignaEritrea",
63                                  &object_info, 0);
64 }
65
66 #define SYL(a,b) \
67   a,  0,  0, 0, 0, 0, b+5, \
68   a, 'A', 0, 0, 0, 0, b+3, \
69   a, 'E', 0, 0, 0, 0, b+4, \
70   a, 'I', 0, 0, 0, 0, b+2, \
71   a, 'O', 0, 0, 0, 0, b+6, \
72   a, 'U', 0, 0, 0, 0, b+1, \
73   a, 'a', 0, 0, 0, 0, b+3, \
74   a, 'e', 0, 0, 0, 0, b, \
75   a, 'e', 'e', 0, 0, 0, b+4, \
76   a, 'i', 0, 0, 0, 0, b+2, \
77   a, 'o', 0, 0, 0, 0, b+6, \
78   a, 'u', 0, 0, 0, 0, b+1,
79
80 #define SYLW1(a,b) \
81   a,  0,  0, 0, 0, 0, b+5, \
82   a, 'A', 0, 0, 0, 0, b+3, \
83   a, 'E', 0, 0, 0, 0, b+4, \
84   a, 'I', 0, 0, 0, 0, b+2, \
85   a, 'O', 0, 0, 0, 0, b+6, \
86   a, 'U', 0, 0, 0, 0, b+1, \
87   a, 'W', 0, 0, 0, 0, b+7, \
88   a, 'W', 'A', 0, 0, 0, b+7, \
89   a, 'W', 'a', 0, 0, 0, b+7,
90 #define SYLW2(a,b) \
91   a, 'a', 0, 0, 0, 0, b+3, \
92   a, 'e', 0, 0, 0, 0, b, \
93   a, 'e', 'e', 0, 0, 0, b+4, \
94   a, 'i', 0, 0, 0, 0, b+2, \
95   a, 'o', 0, 0, 0, 0, b+6, \
96   a, 'u', 0, 0, 0, 0, b+1, \
97   a, 'w', 'w',   0, 0, 0, b+7, \
98   a, 'w', 'w', 'a', 0, 0, b+7,
99
100 #define SYLW(a,b) \
101   SYLW1(a,b)\
102   SYLW2(a,b)
103
104 #define SYLWW(a,b) \
105   a,  0,  0, 0, 0, 0, b+5, \
106   a, 'A', 0, 0, 0, 0, b+3, \
107   a, 'E', 0, 0, 0, 0, b+4, \
108   a, 'I', 0, 0, 0, 0, b+2, \
109   a, 'O', 0, 0, 0, 0, b+6, \
110   a, 'O', 'O', 0, 0, 0, b+8, \
111   a, 'O', 'o', 0, 0, 0, b+8, \
112   a, 'U', 0, 0, 0, 0, b+1, \
113   a, 'W', 0, 0, 0, 0, b+11, \
114   a, 'W', '\'', 0, 0, 0, b+13, \
115   a, 'W', 'A', 0, 0, 0, b+11, \
116   a, 'W', 'E', 0, 0, 0, b+12, \
117   a, 'W', 'I', 0, 0, 0, b+10, \
118   a, 'W', 'U', 0, 0, 0, b+13, \
119   a, 'W', 'a', 0, 0, 0, b+11, \
120   a, 'W', 'e', 0, 0, 0, b+8, \
121   a, 'W', 'e', 'e', 0, 0, b+12, \
122   a, 'W', 'i', 0, 0, 0, b+10, \
123   a, 'W', 'u', 0, 0, 0, b+13, \
124   a, 'a', 0, 0, 0, 0, b+3, \
125   a, 'e', 0, 0, 0, 0, b, \
126   a, 'e', 'e', 0, 0, 0, b+4, \
127   a, 'i', 0, 0, 0, 0, b+2, \
128   a, 'o', 0, 0, 0, 0, b+6, \
129   a, 'o', 'o', 0, 0, 0, b+8, \
130   a, 'u', 0, 0, 0, 0, b+1, \
131   a, 'w', 'w', 0, 0, 0, b+11, \
132   a, 'w', 'w', '\'', 0, 0, b+13, \
133   a, 'w', 'w', 'E', 0, 0, b+12, \
134   a, 'w', 'w', 'a', 0, 0, b+11, \
135   a, 'w', 'w', 'e', 0, 0, b+8, \
136   a, 'w', 'w', 'e', 'e', 0, b+12, \
137   a, 'w', 'w', 'i', 0, 0, b+10, \
138   a, 'w', 'w', 'u', 0, 0, b+13,
139
140 static guint16 ti_er_compose_seqs[] = {
141   /* do punctuation and numerals here */
142
143   '\'',   0, 0, 0, 0, 0, GDK_dead_grave,  /* hopefully this has no side effects */
144   '\'', '\'', 0, 0, 0, 0, GDK_apostrophe,
145   '\'', '1', 0, 0, 0, 0, 0x1369,
146   '\'', '1', '0', 0, 0, 0, 0x1372,
147   '\'', '1', '0', '0', 0, 0, 0x137b,
148   '\'', '1', '0', 'k', 0, 0, 0x137c,
149   /* '\'', '1', '0', '0', '0',  0, 0x137b,
150   '\'', '1', '0', '0', '0', '0', 0, 0x137c, */
151   '\'', '2', 0, 0, 0, 0, 0x136a,
152   '\'', '2', '0', 0, 0, 0, 0x1373,
153   '\'', '3', 0, 0, 0, 0, 0x136b,
154   '\'', '3', '0', 0, 0, 0, 0x1374,
155   '\'', '4', 0, 0, 0, 0, 0x136c,
156   '\'', '4', '0', 0, 0, 0, 0x1375,
157   '\'', '5', 0, 0, 0, 0, 0x136d,
158   '\'', '5', '0', 0, 0, 0, 0x1376,
159   '\'', '6', 0, 0, 0, 0, 0x136e,
160   '\'', '6', '0', 0, 0, 0, 0x1377,
161   '\'', '7', 0, 0, 0, 0, 0x136f,
162   '\'', '7', '0', 0, 0, 0, 0x1378,
163   '\'', '8', 0, 0, 0, 0, 0x1370,
164   '\'', '8', '0', 0, 0, 0, 0x1379,
165   '\'', '9', 0, 0, 0, 0, 0x1371,
166   '\'', '9', '0', 0, 0, 0, 0x137a,
167   ',',  0,  0, 0, 0, 0, 0x1363,
168   ',',  ',',  0, 0, 0, 0, ',',
169   '-',  0,  0, 0, 0, 0, '-',
170   '-',  ':',  0, 0, 0, 0, 0x1365,
171   ':',  0,  0, 0, 0, 0, 0x1361,
172   ':',  '-',  0, 0, 0, 0, 0x1366,
173   ':',  ':',  0, 0, 0, 0, 0x1362,
174   ':',  ':',  ':', 0, 0, 0, ':',
175   ':',  '|',  ':', 0, 0, 0, 0x1368,
176   ';',  0,  0, 0, 0, 0, 0x1364,
177   ';',  ';',  0, 0, 0, 0, ';',
178   '<',  0,  0, 0, 0, 0, '<',
179   '<',  '<',  0, 0, 0, 0, 0x00AB,
180   '>',  0,  0, 0, 0, 0, '>',
181   '>',  '>',  0, 0, 0, 0, 0x00BB,
182   '?',  0,  0, 0, 0, 0, 0x1367,
183   '?',  '?',  0, 0, 0, 0, '?',
184   'A',  0,  0,  0,  0, 0, 0x12A0,
185   'A','A',  0,  0,  0, 0, 0x12D0,
186   SYLW('B', 0x1260)
187   SYLW('C', 0x1328)
188   SYLW('D', 0x12f8)
189   'E',  0,  0,  0,  0, 0, 0x12A4,
190   'E','E',  0,  0,  0, 0, 0x12D4,
191   SYLW1('F', 0x1348)
192   'F', 'Y',   0,  0,  0, 0, 0x135A,
193   'F', 'Y', 'A',  0,  0, 0, 0x135A,
194   'F', 'Y', 'a',  0,  0, 0, 0x135A,
195   SYLW2('F', 0x1348)
196   SYL('G', 0x1318)
197   SYLW('H', 0x1210)
198   'I',  0,  0,  0,  0, 0, 0x12A5,
199   'I','A',  0,  0,  0, 0, 0x12A3,
200   'I','E',  0,  0,  0, 0, 0x12A4,
201   'I','I',  0,  0,  0, 0, 0x12D5,
202   'I','I','E',  0,  0, 0, 0x12D4,
203   'I','I','a',  0,  0, 0, 0x12D3,
204   'I','I','e',  0,  0, 0, 0x12D0,
205   'I','I','i',  0,  0, 0, 0x12D2,
206   'I','I','o',  0,  0, 0, 0x12D6,
207   'I','I','u',  0,  0, 0, 0x12D1,
208   'I','O',  0,  0,  0, 0, 0x12A6,
209   'I','U',  0,  0,  0, 0, 0x12A1,
210   'I','W',  0,  0,  0, 0, 0x12A7,
211   'I','a',  0,  0,  0, 0, 0x12A3,
212   'I','e',  0,  0,  0, 0, 0x12A0,
213   'I','i',  0,  0,  0, 0, 0x12A2,
214   'I','o',  0,  0,  0, 0, 0x12A6,
215   'I','u',  0,  0,  0, 0, 0x12A1,
216   SYLWW('K', 0x12b8)
217   SYLW('L', 0x1208)
218   SYLW1('M', 0x1218)
219   'M', 'Y',   0,  0,  0, 0, 0x1359,
220   'M', 'Y', 'A',  0,  0, 0, 0x1359,
221   'M', 'Y', 'a',  0,  0, 0, 0x1359,
222   SYLW2('M', 0x1218)
223   SYLW('N', 0x1298)
224   'O',  0,  0,  0,  0, 0, 0x12A6,
225   'O','O',  0,  0,  0, 0, 0x12D6,
226   SYLW('P', 0x1330)
227   SYLWW('Q', 0x1250) 
228   SYLW1('R', 0x1228)
229   'R', 'Y',   0,  0,  0, 0, 0x1358,
230   'R', 'Y', 'A',  0,  0, 0, 0x1358,
231   'R', 'Y', 'a',  0,  0, 0, 0x1358,
232   SYLW2('R', 0x1228)
233   'S',  0,  0, 0, 0, 0, 0x1338+5,
234   'S', 'A', 0, 0, 0, 0, 0x1338+3,
235   'S', 'E', 0, 0, 0, 0, 0x1338+4,
236   'S', 'I', 0, 0, 0, 0, 0x1338+2,
237   'S', 'O', 0, 0, 0, 0, 0x1338+6,
238   'S', 'S', 0, 0, 0, 0, 0x1340+5,
239   'S', 'S', 'A', 0, 0, 0, 0x1340+3,
240   'S', 'S', 'E', 0, 0, 0, 0x1340+4,
241   'S', 'S', 'I', 0, 0, 0, 0x1340+2,
242   'S', 'S', 'O', 0, 0, 0, 0x1340+6,
243   'S', 'S', 'U', 0, 0, 0, 0x1340+1,
244   'S', 'S', 'a', 0, 0, 0, 0x1340+3,
245   'S', 'S', 'e', 0, 0, 0, 0x1340,
246   'S', 'S', 'e', 'e', 0, 0, 0x1340+4,
247   'S', 'S', 'i', 0, 0, 0, 0x1340+2,
248   'S', 'S', 'o', 0, 0, 0, 0x1340+6,
249   'S', 'S', 'u', 0, 0, 0, 0x1340+1,
250   'S', 'U', 0, 0, 0, 0, 0x1338+1,
251   'S', 'W', 0, 0, 0, 0, 0x1338+7,
252   'S', 'W', 'A', 0, 0, 0, 0x1338+7,
253   'S', 'W', 'a', 0, 0, 0, 0x1338+7,
254   'S', 'a', 0, 0, 0, 0, 0x1338+3,
255   'S', 'e', 0, 0, 0, 0, 0x1338,
256   'S', 'e', 'e', 0, 0, 0, 0x1338+4,
257   'S', 'i', 0, 0, 0, 0, 0x1338+2,
258   'S', 'o', 0, 0, 0, 0, 0x1338+6,
259   'S', 'u', 0, 0, 0, 0, 0x1338+1,
260   'S', 'w', 'w',   0, 0, 0, 0x1338+7,
261   'S', 'w', 'w', 'a', 0, 0, 0x1338+7,
262   SYLW('T', 0x1320)
263   'U',  0,  0,  0,  0, 0, 0x12A1,
264   'U','U',  0,  0,  0, 0, 0x12D1,
265   SYLW('V', 0x1268)
266   SYL('W', 0x12c8)
267   SYLW('X', 0x1238)
268   SYL('Y', 0x12e8)
269   SYLW('Z', 0x12e0)
270
271   /* much, much work to be done for lone vowels */
272   'a',  0,  0,  0,  0, 0, 0x12A3,
273   'a','a',  0,  0,  0, 0, 0x12D3,
274   'a','a','a',  0,  0, 0, 0x12D0,
275   'a','a','a','a',  0, 0, 0x12A0,
276   SYLW('b', 0x1260)
277   SYLW('c', 0x1278)
278   SYLW('d', 0x12f0)
279   'e',  0,  0,  0,  0, 0, 0x12A5,
280   'e','A',  0,  0,  0, 0, 0x12A3,
281   'e','E',  0,  0,  0, 0, 0x12A4,
282   'e','I',  0,  0,  0, 0, 0x12A2,
283   'e','O',  0,  0,  0, 0, 0x12A6,
284   'e','U',  0,  0,  0, 0, 0x12A1,
285   'e','W',  0,  0,  0, 0, 0x12A7,
286   'e','a',  0,  0,  0, 0, 0x12D0,
287   'e','e',  0,  0,  0, 0, 0x12D5,
288   'e','e','E',  0,  0, 0, 0x12D4,
289   'e','e','a',  0,  0, 0, 0x12D3,
290   'e','e','e',  0,  0, 0, 0x12D0,
291   'e','e','i',  0,  0, 0, 0x12D2,
292   'e','e','o',  0,  0, 0, 0x12D6,
293   'e','e','u',  0,  0, 0, 0x12D1,
294   'e','i',  0,  0,  0, 0, 0x12A2,
295   'e','o',  0,  0,  0, 0, 0x12A6,
296   'e','u',  0,  0,  0, 0, 0x12A1,
297   SYLW1('f', 0x1348)
298   'f', 'Y',   0,  0,  0, 0, 0x135A,
299   'f', 'Y', 'A',  0,  0, 0, 0x135A,
300   'f', 'Y', 'a',  0,  0, 0, 0x135A,
301   SYLW2('f', 0x1348)
302   SYLWW('g', 0x1308)
303   'h',  0,  0, 0, 0, 0, 0x1200+5,
304   'h', 'A', 0, 0, 0, 0, 0x1200+3,
305   'h', 'E', 0, 0, 0, 0, 0x1200+4,
306   'h', 'I', 0, 0, 0, 0, 0x1200+2,
307   'h', 'O', 0, 0, 0, 0, 0x1200+6,
308   'h', 'U', 0, 0, 0, 0, 0x1200+1,
309   'h', 'W', 0, 0, 0, 0, 0x1280+11,
310   'h', 'W', '\'', 0, 0, 0, 0x1280+13,
311   'h', 'W', 'A', 0, 0, 0, 0x1280+11,
312   'h', 'W', 'E', 0, 0, 0, 0x1280+12,
313   'h', 'W', 'I', 0, 0, 0, 0x1280+10,
314   'h', 'W', 'U', 0, 0, 0, 0x1280+13,
315   'h', 'W', 'a', 0, 0, 0, 0x1280+11,
316   'h', 'W', 'e', 0, 0, 0, 0x1280+8,
317   'h', 'W', 'e', 'e', 0, 0, 0x1280+12,
318   'h', 'W', 'i', 0, 0, 0, 0x1280+10,
319   'h', 'W', 'u', 0, 0, 0, 0x1280+13,
320   'h', 'a', 0, 0, 0, 0, 0x1200+3,
321   'h', 'e', 0, 0, 0, 0, 0x1200,
322   'h', 'e', 'e', 0, 0, 0, 0x1200+4,
323   'h', 'h', 0, 0, 0, 0, 0x1280+5,
324   'h', 'h', 'A', 0, 0, 0, 0x1280+3,
325   'h', 'h', 'E', 0, 0, 0, 0x1280+4,
326   'h', 'h', 'I', 0, 0, 0, 0x1280+2,
327   'h', 'h', 'O', 0, 0, 0, 0x1280+6,
328   'h', 'h', 'O', 'O', 0, 0, 0x1280+8,
329   'h', 'h', 'U', 0, 0, 0, 0x1280+1,
330   'h', 'h', 'W', 0, 0, 0, 0x1280+11,
331   'h', 'h', 'W', '\'', 0, 0, 0x1280+13,
332   'h', 'h', 'W', 'A', 0, 0, 0x1280+11,
333   'h', 'h', 'W', 'E', 0, 0, 0x1280+12,
334   'h', 'h', 'W', 'I', 0, 0, 0x1280+10,
335   'h', 'h', 'W', 'U', 0, 0, 0x1280+13,
336   'h', 'h', 'W', 'a', 0, 0, 0x1280+11,
337   'h', 'h', 'W', 'e', 0, 0, 0x1280+8,
338   'h', 'h', 'W', 'e', 'e', 0, 0x1280+12,
339   'h', 'h', 'W', 'i', 0, 0, 0x1280+10,
340   'h', 'h', 'W', 'u', 0, 0, 0x1280+13,
341   'h', 'h', 'a', 0, 0, 0, 0x1280+3,
342   'h', 'h', 'e', 0, 0, 0, 0x1280,
343   'h', 'h', 'e', 'e', 0, 0, 0x1280+4,
344   'h', 'h', 'i', 0, 0, 0, 0x1280+2,
345   'h', 'h', 'o', 0, 0, 0, 0x1280+6,
346   'h', 'h', 'o', 'o', 0, 0, 0x1280+8,
347   'h', 'h', 'u', 0, 0, 0, 0x1280+1,
348   'h', 'h', 'w', 'w',   0, 0, 0x1280+11,
349   'h', 'h', 'w', 'w', 'a', 0, 0x1280+11,
350   'h', 'h', 'w', 'w', 0, 0, 0x1280+11,
351   'h', 'h', 'w', 'w', '\'', 0, 0x1280+13,
352   'h', 'h', 'w', 'w', 'E', 0, 0x1280+12,
353   'h', 'h', 'w', 'w', 'a', 0, 0x1280+11,
354   'h', 'h', 'w', 'w', 'e', 0, 0x1280+8,
355   /* 'h', 'h', 'w', 'w', 'e', 'e', 0, 0x1280+12,  too long for now */
356   'h', 'h', 'w', 'w', 'i', 0, 0x1280+10,
357   'h', 'h', 'w', 'w', 'u', 0, 0x1280+13,
358   'h', 'i', 0, 0, 0, 0, 0x1200+2,
359   'h', 'o', 0, 0, 0, 0, 0x1200+6,
360   'h', 'u', 0, 0, 0, 0, 0x1200+1,
361   'h', 'w', 'w',   0, 0, 0, 0x1280+11,
362   'h', 'w', 'w', 'a', 0, 0, 0x1280+11,
363   'h', 'w', 'w', 0, 0, 0, 0x1280+11,
364   'h', 'w', 'w', '\'', 0, 0, 0x1280+13,
365   'h', 'w', 'w', 'E', 0, 0, 0x1280+12,
366   'h', 'w', 'w', 'a', 0, 0, 0x1280+11,
367   'h', 'w', 'w', 'e', 0, 0, 0x1280+8,
368   'h', 'w', 'w', 'e', 'e', 0, 0x1280+12,
369   'h', 'w', 'w', 'i', 0, 0, 0x1280+10,
370   'h', 'w', 'w', 'u', 0, 0, 0x1280+13,
371   'i',  0,  0,  0,  0, 0, 0x12A2,
372   'i', 'i', 0,  0,  0, 0, 0x12D2,
373   SYLW('j', 0x1300)
374   SYLWW('k', 0x12a8)
375   SYLW('l', 0x1208)
376   SYLW1('m', 0x1218)
377   'm', 'Y',   0,  0,  0, 0, 0x1359,
378   'm', 'Y', 'A',  0,  0, 0, 0x1359,
379   'm', 'Y', 'a',  0,  0, 0, 0x1359,
380   SYLW2('m', 0x1218)
381   SYLW('n', 0x1290)
382   'o',  0,  0,  0,  0, 0, 0x12A6,
383   'o','o',  0,  0,  0, 0, 0x12D6,
384   SYLW('p', 0x1350)
385   SYLWW('q', 0x1240)
386   SYLW1('r', 0x1228)
387   'r', 'Y',   0,  0,  0, 0, 0x1358,
388   'r', 'Y', 'A',  0,  0, 0, 0x1358,
389   'r', 'Y', 'a',  0,  0, 0, 0x1358,
390   SYLW2('r', 0x1228)
391   's',  0,  0, 0, 0, 0, 0x1230+5,
392   's', 'A', 0, 0, 0, 0, 0x1230+3,
393   's', 'E', 0, 0, 0, 0, 0x1230+4,
394   's', 'I', 0, 0, 0, 0, 0x1230+2,
395   's', 'O', 0, 0, 0, 0, 0x1230+6,
396   's', 'U', 0, 0, 0, 0, 0x1230+1,
397   's', 'W', 0, 0, 0, 0, 0x1230+7,
398   's', 'W', 'A', 0, 0, 0, 0x1230+7,
399   's', 'W', 'a', 0, 0, 0, 0x1230+7,
400   's', 'a', 0, 0, 0, 0, 0x1230+3,
401   's', 'e', 0, 0, 0, 0, 0x1230,
402   's', 'e', 'e', 0, 0, 0, 0x1230+4,
403   's', 'i', 0, 0, 0, 0, 0x1230+2,
404   's', 'o', 0, 0, 0, 0, 0x1230+6,
405   's', 's', 0, 0, 0, 0, 0x1220+5,
406   's', 's', 'A', 0, 0, 0, 0x1220+3,
407   's', 's', 'E', 0, 0, 0, 0x1220+4,
408   's', 's', 'I', 0, 0, 0, 0x1220+2,
409   's', 's', 'O', 0, 0, 0, 0x1220+6,
410   's', 's', 'U', 0, 0, 0, 0x1220+1,
411   's', 's', 'W', 0, 0, 0, 0x1220+7,
412   's', 's', 'W', 'A', 0, 0, 0x1220+7,
413   's', 's', 'W', 'a', 0, 0, 0x1220+7,
414   's', 's', 'a', 0, 0, 0, 0x1220+3,
415   's', 's', 'e', 0, 0, 0, 0x1220,
416   's', 's', 'e', 'e', 0, 0, 0x1220+4,
417   's', 's', 'i', 0, 0, 0, 0x1220+2,
418   's', 's', 'o', 0, 0, 0, 0x1220+6,
419   's', 's', 'u', 0, 0, 0, 0x1220+1,
420   's', 's', 'w', 'w', 0, 0, 0x1220+7,
421   's', 's', 'w', 'w', 'a', 0, 0x1220+7,
422   's', 'u', 0, 0, 0, 0, 0x1230+1,
423   's', 'w', 'w',   0, 0, 0, 0x1230+7,
424   's', 'w', 'w', 'a', 0, 0, 0x1230+7,
425   SYLW('t', 0x1270)
426   'u',  0,  0,  0,  0, 0, 0x12A1,
427   'u','u',  0,  0,  0, 0, 0x12D1,
428   SYLW('v', 0x1268)
429   SYL('w', 0x12c8)
430   SYLW('x', 0x1238)
431   SYL('y', 0x12e8)
432   SYLW('z', 0x12d8)
433   GDK_Shift_L, GDK_space, 0, 0, 0, 0, 0x1361,
434   GDK_Shift_R, GDK_space, 0, 0, 0, 0, 0x1361,
435 };
436
437 static void
438 ti_er_class_init (GtkIMContextSimpleClass *class)
439 {
440 }
441
442 static void
443 ti_er_init (GtkIMContextSimple *im_context)
444 {
445   gtk_im_context_simple_add_table (im_context,
446                                    ti_er_compose_seqs,
447                                    5,
448                                    G_N_ELEMENTS (ti_er_compose_seqs) / (5 + 2));
449 }
450
451 static const GtkIMContextInfo ti_er_info = { 
452   "ti_er",                 /* ID */
453   N_("Tigrigna-Eritrean (EZ+)"),         /* Human readable name */
454   GETTEXT_PACKAGE,         /* Translation domain */
455    GTK_LOCALEDIR,          /* Dir for bindtextdomain (not strictly needed for "gtk+") */
456   "ti"                     /* Languages for which this module is the default */
457 };
458
459 static const GtkIMContextInfo *info_list[] = {
460   &ti_er_info
461 };
462
463 #ifndef INCLUDE_IM_ti_er
464 #define MODULE_ENTRY(function) G_MODULE_EXPORT im_module_ ## function
465 #else
466 #define MODULE_ENTRY(function) _gtk_immodule_ti_er_ ## function
467 #endif
468
469 void
470 MODULE_ENTRY (init) (GTypeModule *module)
471 {
472   ti_er_register_type (module);
473 }
474
475 void 
476 MODULE_ENTRY (exit) (void)
477 {
478 }
479
480 void 
481 MODULE_ENTRY (list) (const GtkIMContextInfo ***contexts,
482                      int                      *n_contexts)
483 {
484   *contexts = info_list;
485   *n_contexts = G_N_ELEMENTS (info_list);
486 }
487
488 GtkIMContext *
489 MODULE_ENTRY (create) (const gchar *context_id)
490 {
491   if (strcmp (context_id, "ti_er") == 0)
492     return g_object_new (type_ti_er_translit, NULL);
493   else
494     return NULL;
495 }