1 /* input.h -- header file for the input method module.
2 Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
3 National Institute of Advanced Industrial Science and Technology (AIST)
4 Registration Number H15PRO112
6 This file is part of the m17n library.
8 The m17n library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public License
10 as published by the Free Software Foundation; either version 2.1 of
11 the License, or (at your option) any later version.
13 The m17n library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
18 You should have received a copy of the GNU Lesser General Public
19 License along with the m17n library; if not, write to the Free
20 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23 #ifndef _M17N_INPUT_H_
24 #define _M17N_INPUT_H_
26 typedef struct _MInputMethodInfo MInputMethodInfo;
28 struct _MInputMethodInfo
31 MSymbol language, name, extra;
32 MPlist *cmds, *configured_cmds, *bc_cmds;
33 MPlist *vars, *configured_vars, *bc_vars;
43 typedef struct MIMState MIMState;
45 typedef struct MIMMap MIMMap;
49 /** The current state. */
52 /** The previous state. */
55 /** The current map. */
58 /** Table of typed keys. */
62 /** Index of the key handled firstly in the current state. */
65 /** Index of the key not yet handled. */
68 /** Index of the key at the time of committing. */
71 /** Saved M-text when entered in the current state. */
74 /** The insertion position when shifted to the current state. */
77 /** List of markers. */
80 /** List of variables. */
85 MText *preceding_text, *following_text;
89 /** Used by minput_win_driver (input-win.c). */
95 #define MINPUT_KEY_SHIFT_MODIFIER (1 << 0)
96 #define MINPUT_KEY_CONTROL_MODIFIER (1 << 1)
97 #define MINPUT_KEY_META_MODIFIER (1 << 2)
98 #define MINPUT_KEY_ALT_MODIFIER (1 << 3)
99 #define MINPUT_KEY_SUPER_MODIFIER (1 << 4)
100 #define MINPUT_KEY_HYPER_MODIFIER (1 << 5)
102 extern MSymbol minput__char_to_key (int c);
104 #endif /* not _M17N_INPUT_H_ */