1 /************************************************************
2 * Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
4 * Permission to use, copy, modify, and distribute this
5 * software and its documentation for any purpose and without
6 * fee is hereby granted, provided that the above copyright
7 * notice appear in all copies and that both that copyright
8 * notice and this permission notice appear in supporting
9 * documentation, and that the name of Silicon Graphics not be
10 * used in advertising or publicity pertaining to distribution
11 * of the software without specific prior written permission.
12 * Silicon Graphics makes no representation about the suitability
13 * of this software for any purpose. It is provided "as is"
14 * without any express or implied warranty.
16 * SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
17 * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
18 * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
19 * GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
20 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
21 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
22 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
23 * THE USE OR PERFORMANCE OF THIS SOFTWARE.
25 ********************************************************/
31 /* Component files, by order of compilation. */
32 FILE_TYPE_KEYCODES = 0,
35 FILE_TYPE_SYMBOLS = 3,
36 /* Geometry is not compiled any more. */
37 FILE_TYPE_GEOMETRY = 4,
39 /* A top level file which includes the above files. */
42 /* File types which must be found in a keymap file. */
43 #define FIRST_KEYMAP_FILE_TYPE FILE_TYPE_KEYCODES
44 #define LAST_KEYMAP_FILE_TYPE FILE_TYPE_SYMBOLS
46 /* This one doesn't mix with the others, but useful here as well. */
49 _FILE_TYPE_NUM_ENTRIES
71 enum expr_value_type {
72 EXPR_TYPE_UNKNOWN = 0,
112 xkb_file_type_to_string(enum xkb_file_type type);
115 stmt_type_to_string(enum stmt_type type);
118 expr_op_type_to_string(enum expr_op_type type);
121 expr_value_type_to_string(enum expr_value_type type);
123 typedef struct _ParseCommon {
125 struct _ParseCommon *next;
128 typedef struct _IncludeStmt {
130 enum merge_mode merge;
135 struct _IncludeStmt *next_incl;
138 typedef struct _Expr {
140 enum expr_op_type op;
141 enum expr_value_type value_type;
162 darray(int) symsMapIndex;
163 darray(unsigned int) symsNumEntries;
169 char keyName[XkbKeyNameLength];
173 typedef struct _VarDef {
175 enum merge_mode merge;
180 typedef struct _VModDef {
182 enum merge_mode merge;
187 typedef struct _KeycodeDef {
189 enum merge_mode merge;
190 char name[XkbKeyNameLength];
194 typedef struct _KeyAliasDef {
196 enum merge_mode merge;
197 char alias[XkbKeyNameLength];
198 char real[XkbKeyNameLength];
201 typedef struct _KeyTypeDef {
203 enum merge_mode merge;
208 typedef struct _SymbolsDef {
210 enum merge_mode merge;
211 char keyName[XkbKeyNameLength];
215 typedef struct _ModMapDef {
217 enum merge_mode merge;
222 typedef struct _GroupCompatDef {
224 enum merge_mode merge;
229 typedef struct _InterpDef {
231 enum merge_mode merge;
237 typedef struct _IndicatorNameDef {
239 enum merge_mode merge;
245 typedef struct _IndicatorMapDef {
247 enum merge_mode merge;
252 typedef struct _XkbFile {
254 enum xkb_file_type file_type;