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