2 Copyright 1985, 1987, 1990, 1998 The Open Group
3 Copyright 2008 Dan Nicholson
5 Permission is hereby granted, free of charge, to any person obtaining a
6 copy of this software and associated documentation files (the "Software"),
7 to deal in the Software without restriction, including without limitation
8 the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 and/or sell copies of the Software, and to permit persons to whom the
10 Software is furnished to do so, subject to the following conditions:
12 The above copyright notice and this permission notice shall be included in
13 all copies or substantial portions of the Software.
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 Except as contained in this notice, the names of the authors or their
23 institutions shall not be used in advertising or otherwise to promote the
24 sale, use or other dealings in this Software without prior written
25 authorization from the authors.
31 #include <X11/Xfuncproto.h>
33 /* Action structures used in the server */
34 typedef struct _XkbcModAction {
38 unsigned char real_mods;
42 typedef struct _XkbcISOAction {
46 unsigned char real_mods;
47 /* FIXME: Make this an int. */
53 typedef struct _XkbcPtrAction {
60 typedef struct _XkbcCtrlsAction {
66 typedef struct _XkbcRedirectKeyAction {
68 unsigned char new_key;
69 unsigned char mods_mask;
71 unsigned int vmods_mask;
73 } XkbcRedirectKeyAction;
75 typedef union _XkbcAction {
82 XkbPtrDfltAction dflt;
83 XkbSwitchScreenAction screen;
84 XkbcCtrlsAction ctrls;
86 XkbcRedirectKeyAction redirect;
87 XkbDeviceBtnAction devbtn;
88 XkbDeviceValuatorAction devval;
92 typedef struct _XkbcServerMapRec {
93 unsigned short num_acts;
94 unsigned short size_acts;
97 XkbBehavior * behaviors;
98 unsigned short * key_acts;
99 #if defined(__cplusplus) || defined(c_plusplus)
100 /* explicit is a C++ reserved word */
101 unsigned char * c_explicit;
103 unsigned char * explicit;
105 unsigned char vmods[XkbNumVirtualMods];
106 unsigned short * vmodmap;
107 } XkbcServerMapRec, *XkbcServerMapPtr;
109 /* Common keyboard description structure */
110 typedef struct _XkbcDesc {
111 unsigned int defined;
112 unsigned short flags;
113 unsigned short device_spec;
114 KeyCode min_key_code;
115 KeyCode max_key_code;
117 XkbControlsPtr ctrls;
118 XkbcServerMapPtr server;
120 XkbIndicatorPtr indicators;
122 XkbCompatMapPtr compat;
124 } XkbcDescRec, *XkbcDescPtr;
132 XkbcCompileKeymapFromRules(const XkbRMLVOSet *rmlvo);
135 XkbcCompileKeymapFromComponents(const XkbComponentNamesPtr ktcsg);
139 #endif /* _XKBCOMMON_H_ */