1 /* AbiWord
2 * Copyright (C) 1998 AbiSource, Inc.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 * 02110-1301 USA.
18 */
19
20
21 // ********************************************************************************
22 // ********************************************************************************
23 // *** THIS FILE DEFINES THE BINDINGS TO HANG OFF THE DeadOgonek PREFIX KEY IN ***
24 // *** THE DEFAULT BINDINGS TABLE. ***
25 // ********************************************************************************
26 // ********************************************************************************
27
28 #include "ut_assert.h"
29 #include "ut_types.h"
30 #include "ev_EditBits.h"
31 #include "ev_EditBinding.h"
32 #include "ev_EditMethod.h"
33 #include "ev_NamedVirtualKey.h"
34 #include "ap_LoadBindings.h"
35 #include "ap_LB_DeadOgonek.h"
36
37 #define _S | EV_EMS_SHIFT
38 #define _C | EV_EMS_CONTROL
39 #define _A | EV_EMS_ALT
40
41 /*****************************************************************
42 ******************************************************************
43 ** load bindings for the non-nvk
44 ** (character keys). note that SHIFT-state is implicit in the
45 ** character value and is not included in the table. note that
46 ** we do not include the ASCII control characters (\x00 -- \x1f
47 ** and others) since we don't map keystrokes into them.
48 ******************************************************************
49 *****************************************************************/
50
51 static struct ap_bs_Char s_CharTable[] =
52 {
53 // {char, /* desc */ { none, _C, _A, _A_C }},
54
55 // Latin-[24] characters
56 {0x41, /* A */ { "insertOgonekData", "", "", "" }},
57 {0x45, /* E */ { "insertOgonekData", "", "", "" }},
58 {0x49, /* I */ { "insertOgonekData", "", "", "" }},
59 {0x55, /* U */ { "insertOgonekData", "", "", "" }},
60 {0x61, /* a */ { "insertOgonekData", "", "", "" }},
61 {0x65, /* e */ { "insertOgonekData", "", "", "" }},
62 {0x69, /* i */ { "insertOgonekData", "", "", "" }},
63 {0x75, /* u */ { "insertOgonekData", "", "", "" }},
64 };
65
66
67 /*****************************************************************
68 ******************************************************************
69 ** put it all together and load the default bindings.
70 ******************************************************************
71 *****************************************************************/
72
ap_LoadBindings_DeadOgonek(AP_BindingSet * pThis,EV_EditBindingMap * pebm)73 bool ap_LoadBindings_DeadOgonek(AP_BindingSet * pThis,
74 EV_EditBindingMap * pebm)
75 {
76 pThis->_loadChar(pebm,s_CharTable,G_N_ELEMENTS(s_CharTable),NULL,0);
77
78 return true;
79 }
80