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 ********************************************************/
30 typedef union _ExprResult
35 XkbKeyNameRec keyName;
38 typedef Bool(*IdentLookupFunc) (XPointer /* priv */ ,
42 ExprResult * /* val_rtrn */
45 extern char *exprTypeText(unsigned /* type */
48 extern int ExprResolveLhs(ExprDef * /* expr */ ,
49 ExprResult * /* elem_rtrn */ ,
50 ExprResult * /* field_rtrn */ ,
51 ExprDef ** /* index_rtrn */
54 typedef struct _LookupPriv
57 IdentLookupFunc chain;
61 typedef struct _LookupEntry
67 typedef struct _LookupTable
71 struct _LookupTable *nextElement;
75 extern char *exprOpText(unsigned /* type */
78 extern int RadioLookup(XPointer /* priv */ ,
82 ExprResult * /* val_rtrn */
85 extern int SimpleLookup(XPointer /* priv */ ,
89 ExprResult * /* val_rtrn */
92 extern int TableLookup(XPointer /* priv */ ,
96 ExprResult * /* val_rtrn */
99 extern int LookupModIndex(XPointer /* priv */ ,
102 unsigned /* type */ ,
103 ExprResult * /* val_rtrn */
106 extern int LookupModMask(XPointer /* priv */ ,
109 unsigned /* type */ ,
110 ExprResult * /* val_rtrn */
113 extern int ExprResolveModIndex(ExprDef * /* expr */ ,
114 ExprResult * /* val_rtrn */ ,
115 IdentLookupFunc /* lookup */ ,
116 XPointer /* lookupPriv */
119 extern int ExprResolveModMask(ExprDef * /* expr */ ,
120 ExprResult * /* val_rtrn */ ,
121 IdentLookupFunc /* lookup */ ,
125 extern int ExprResolveBoolean(ExprDef * /* expr */ ,
126 ExprResult * /* val_rtrn */ ,
127 IdentLookupFunc /* lookup */ ,
128 XPointer /* lookupPriv */
131 extern int ExprResolveInteger(ExprDef * /* expr */ ,
132 ExprResult * /* val_rtrn */ ,
133 IdentLookupFunc /* lookup */ ,
134 XPointer /* lookupPriv */
137 extern int ExprResolveFloat(ExprDef * /* expr */ ,
138 ExprResult * /* val_rtrn */ ,
139 IdentLookupFunc /* lookup */ ,
140 XPointer /* lookupPriv */
143 extern int ExprResolveString(ExprDef * /* expr */ ,
144 ExprResult * /* val_rtrn */ ,
145 IdentLookupFunc /* lookup */ ,
146 XPointer /* lookupPriv */
149 extern int ExprResolveKeyName(ExprDef * /* expr */ ,
150 ExprResult * /* val_rtrn */ ,
151 IdentLookupFunc /* lookup */ ,
152 XPointer /* lookupPriv */
155 extern int ExprResolveEnum(ExprDef * /* expr */ ,
156 ExprResult * /* val_rtrn */ ,
157 LookupEntry * /* values */
160 extern int ExprResolveMask(ExprDef * /* expr */ ,
161 ExprResult * /* val_rtrn */ ,
162 IdentLookupFunc /* lookup */ ,
163 XPointer /* lookupPriv */
166 extern int ExprResolveKeySym(ExprDef * /* expr */ ,
167 ExprResult * /* val_rtrn */ ,
168 IdentLookupFunc /* lookup */ ,
169 XPointer /* lookupPriv */