| 1 |
/************************************************************ |
| 2 |
Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. |
| 3 |
|
| 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. |
| 15 |
|
| 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. |
| 24 |
|
| 25 |
********************************************************/ |
| 26 |
/* $XFree86$ */ |
| 27 |
|
| 28 |
#ifndef _XKMFORMAT_H_ |
| 29 |
#define _XKMFORMAT_H_ 1 |
| 30 |
|
| 31 |
#include <nx-X11/extensions/XKB.h> |
| 32 |
#include <nx-X11/extensions/XKBproto.h> |
| 33 |
#include <nx-X11/extensions/XKM.h> |
| 34 |
|
| 35 |
typedef struct _xkmFileInfo { |
| 36 |
CARD8 type; |
| 37 |
CARD8 min_kc; |
| 38 |
CARD8 max_kc; |
| 39 |
CARD8 num_toc; |
| 40 |
CARD16 present B16; |
| 41 |
CARD16 pad B16; |
| 42 |
} xkmFileInfo; |
| 43 |
#define sz_xkmFileInfo 8 |
| 44 |
|
| 45 |
typedef struct _xkmSectionInfo { |
| 46 |
CARD16 type B16; |
| 47 |
CARD16 format B16; |
| 48 |
CARD16 size B16; |
| 49 |
CARD16 offset B16; |
| 50 |
} xkmSectionInfo; |
| 51 |
#define sz_xkmSectionInfo 8 |
| 52 |
|
| 53 |
typedef struct _xkmKeyTypeDesc { |
| 54 |
CARD8 realMods; |
| 55 |
CARD8 numLevels; |
| 56 |
CARD16 virtualMods B16; |
| 57 |
CARD8 nMapEntries; |
| 58 |
CARD8 nLevelNames; |
| 59 |
CARD8 preserve; |
| 60 |
CARD8 pad; |
| 61 |
} xkmKeyTypeDesc; |
| 62 |
#define sz_xkmKeyTypeDesc 8 |
| 63 |
|
| 64 |
typedef struct _xkmKTMapEntryDesc { |
| 65 |
CARD8 level; |
| 66 |
CARD8 realMods; |
| 67 |
CARD16 virtualMods B16; |
| 68 |
} xkmKTMapEntryDesc; |
| 69 |
#define sz_xkmKTMapEntryDesc 4 |
| 70 |
|
| 71 |
typedef struct _xkmModsDesc { |
| 72 |
CARD8 realMods; |
| 73 |
CARD8 pad; |
| 74 |
CARD16 virtualMods B16; |
| 75 |
} xkmModsDesc; |
| 76 |
#define sz_xkmModsDesc 4 |
| 77 |
|
| 78 |
typedef struct _xkmVModMapDesc { |
| 79 |
CARD8 key; |
| 80 |
CARD8 pad; |
| 81 |
CARD16 vmods B16; |
| 82 |
} xkmVModMapDesc; |
| 83 |
#define sz_xkmVModMapDesc 4 |
| 84 |
|
| 85 |
typedef struct _xkmSymInterpretDesc { |
| 86 |
CARD32 sym B32; |
| 87 |
CARD8 mods; |
| 88 |
CARD8 match; |
| 89 |
CARD8 virtualMod; |
| 90 |
CARD8 flags; |
| 91 |
CARD8 actionType; |
| 92 |
CARD8 actionData[7]; |
| 93 |
} xkmSymInterpretDesc; |
| 94 |
#define sz_xkmSymInterpretDesc 16 |
| 95 |
|
| 96 |
typedef struct _xkmBehaviorDesc { |
| 97 |
CARD8 type; |
| 98 |
CARD8 data; |
| 99 |
CARD16 pad B16; |
| 100 |
} xkmBehaviorDesc; |
| 101 |
#define sz_xkmBehaviorDesc 4 |
| 102 |
|
| 103 |
typedef struct _xkmActionDesc { |
| 104 |
CARD8 type; |
| 105 |
CARD8 data[7]; |
| 106 |
} xkmActionDesc; |
| 107 |
#define sz_xkmActionDesc 8 |
| 108 |
|
| 109 |
#define XkmKeyHasTypes (0x0f) |
| 110 |
#define XkmKeyHasGroup1Type (1<<0) |
| 111 |
#define XkmKeyHasGroup2Type (1<<1) |
| 112 |
#define XkmKeyHasGroup3Type (1<<2) |
| 113 |
#define XkmKeyHasGroup4Type (1<<3) |
| 114 |
#define XkmKeyHasActions (1<<4) |
| 115 |
#define XkmKeyHasBehavior (1<<5) |
| 116 |
#define XkmRepeatingKey (1<<6) |
| 117 |
#define XkmNonRepeatingKey (1<<7) |
| 118 |
|
| 119 |
typedef struct _xkmKeySymMapDesc { |
| 120 |
CARD8 width; |
| 121 |
CARD8 num_groups; |
| 122 |
CARD8 modifier_map; |
| 123 |
CARD8 flags; |
| 124 |
} xkmKeySymMapDesc; |
| 125 |
#define sz_xkmKeySymMapDesc 4 |
| 126 |
|
| 127 |
typedef struct _xkmIndicatorMapDesc { |
| 128 |
CARD8 indicator; |
| 129 |
CARD8 flags; |
| 130 |
CARD8 which_mods; |
| 131 |
CARD8 real_mods; |
| 132 |
CARD16 vmods B16; |
| 133 |
CARD8 which_groups; |
| 134 |
CARD8 groups; |
| 135 |
CARD32 ctrls B32; |
| 136 |
} xkmIndicatorMapDesc; |
| 137 |
#define sz_xkmIndicatorMapDesc 12 |
| 138 |
|
| 139 |
typedef struct _xkmGeometryDesc { |
| 140 |
CARD16 width_mm B16; |
| 141 |
CARD16 height_mm B16; |
| 142 |
CARD8 base_color_ndx; |
| 143 |
CARD8 label_color_ndx; |
| 144 |
CARD16 num_properties B16; |
| 145 |
CARD16 num_colors B16; |
| 146 |
CARD16 num_shapes B16; |
| 147 |
CARD16 num_sections B16; |
| 148 |
CARD16 num_doodads B16; |
| 149 |
CARD16 num_key_aliases B16; |
| 150 |
CARD16 pad1 B16; |
| 151 |
} xkmGeometryDesc; |
| 152 |
#define sz_xkmGeometryDesc 20 |
| 153 |
|
| 154 |
typedef struct _xkmPointDesc { |
| 155 |
INT16 x B16; |
| 156 |
INT16 y B16; |
| 157 |
} xkmPointDesc; |
| 158 |
#define sz_xkmPointDesc 4 |
| 159 |
|
| 160 |
typedef struct _xkmOutlineDesc { |
| 161 |
CARD8 num_points; |
| 162 |
CARD8 corner_radius; |
| 163 |
CARD16 pad B16; |
| 164 |
} xkmOutlineDesc; |
| 165 |
#define sz_xkmOutlineDesc 4 |
| 166 |
|
| 167 |
typedef struct _xkmShapeDesc { |
| 168 |
CARD8 num_outlines; |
| 169 |
CARD8 primary_ndx; |
| 170 |
CARD8 approx_ndx; |
| 171 |
CARD8 pad; |
| 172 |
} xkmShapeDesc; |
| 173 |
#define sz_xkmShapeDesc 4 |
| 174 |
|
| 175 |
typedef struct _xkmSectionDesc { |
| 176 |
INT16 top B16; |
| 177 |
INT16 left B16; |
| 178 |
CARD16 width B16; |
| 179 |
CARD16 height B16; |
| 180 |
INT16 angle B16; |
| 181 |
CARD8 priority; |
| 182 |
CARD8 num_rows; |
| 183 |
CARD8 num_doodads; |
| 184 |
CARD8 num_overlays; |
| 185 |
CARD16 pad2 B16; |
| 186 |
} xkmSectionDesc; |
| 187 |
#define sz_xkmSectionDesc 16 |
| 188 |
|
| 189 |
typedef struct _xkmRowDesc { |
| 190 |
INT16 top B16; |
| 191 |
INT16 left B16; |
| 192 |
CARD8 num_keys; |
| 193 |
BOOL vertical; |
| 194 |
CARD16 pad B16; |
| 195 |
} xkmRowDesc; |
| 196 |
#define sz_xkmRowDesc 8 |
| 197 |
|
| 198 |
typedef struct _xkmKeyDesc { |
| 199 |
CARD8 name[XkbKeyNameLength]; |
| 200 |
INT16 gap B16; |
| 201 |
CARD8 shape_ndx; |
| 202 |
CARD8 color_ndx; |
| 203 |
} xkmKeyDesc; |
| 204 |
#define sz_xkmKeyDesc 8 |
| 205 |
|
| 206 |
typedef struct _xkmOverlayDesc { |
| 207 |
CARD8 num_rows; |
| 208 |
CARD8 pad1; |
| 209 |
CARD16 pad2 B16; |
| 210 |
} xkmOverlayDesc; |
| 211 |
#define sz_xkmOverlayDesc 4 |
| 212 |
|
| 213 |
typedef struct _xkmOverlayRowDesc { |
| 214 |
CARD8 row_under; |
| 215 |
CARD8 num_keys; |
| 216 |
CARD16 pad B16; |
| 217 |
} xkmOverlayRowDesc; |
| 218 |
#define sz_xkmOverlayRowDesc 4 |
| 219 |
|
| 220 |
typedef struct _xkmOverlayKeyDesc { |
| 221 |
char over[XkbKeyNameLength]; |
| 222 |
char under[XkbKeyNameLength]; |
| 223 |
} xkmOverlayKeyDesc; |
| 224 |
#define sz_xkmOverlayKeyDesc 8 |
| 225 |
|
| 226 |
typedef struct _xkmShapeDoodadDesc { |
| 227 |
CARD8 type; |
| 228 |
CARD8 priority; |
| 229 |
INT16 top B16; |
| 230 |
INT16 left B16; |
| 231 |
INT16 angle B16; |
| 232 |
CARD8 color_ndx; |
| 233 |
CARD8 shape_ndx; |
| 234 |
CARD16 pad B16; |
| 235 |
CARD32 pad1 B32; |
| 236 |
} xkmShapeDoodadDesc; |
| 237 |
#define sz_xkmShapeDoodadDesc 16 |
| 238 |
|
| 239 |
typedef struct _xkmTextDoodadDesc { |
| 240 |
CARD8 type; |
| 241 |
CARD8 priority; |
| 242 |
INT16 top B16; |
| 243 |
INT16 left B16; |
| 244 |
INT16 angle B16; |
| 245 |
CARD16 width B16; |
| 246 |
CARD16 height B16; |
| 247 |
CARD8 color_ndx; |
| 248 |
CARD8 pad1; |
| 249 |
CARD16 pad2 B16; |
| 250 |
} xkmTextDoodadDesc; |
| 251 |
#define sz_xkmTextDoodadDesc 16 |
| 252 |
|
| 253 |
typedef struct _xkmIndicatorDoodadDesc { |
| 254 |
CARD8 type; |
| 255 |
CARD8 priority; |
| 256 |
INT16 top B16; |
| 257 |
INT16 left B16; |
| 258 |
CARD8 shape_ndx; |
| 259 |
CARD8 on_color_ndx; |
| 260 |
CARD8 off_color_ndx; |
| 261 |
CARD8 pad1; |
| 262 |
CARD16 pad2 B16; |
| 263 |
CARD32 pad3 B32; |
| 264 |
} xkmIndicatorDoodadDesc; |
| 265 |
#define sz_xkmIndicatorDoodadDesc 16 |
| 266 |
|
| 267 |
typedef struct _xkmLogoDoodadDesc { |
| 268 |
CARD8 type; |
| 269 |
CARD8 priority; |
| 270 |
INT16 top B16; |
| 271 |
INT16 left B16; |
| 272 |
INT16 angle B16; |
| 273 |
CARD8 color_ndx; |
| 274 |
CARD8 shape_ndx; |
| 275 |
CARD16 pad B16; |
| 276 |
CARD32 pad1 B32; |
| 277 |
} xkmLogoDoodadDesc; |
| 278 |
#define sz_xkmLogoDoodadDesc 16 |
| 279 |
|
| 280 |
typedef struct _xkmAnyDoodadDesc { |
| 281 |
CARD8 type; |
| 282 |
CARD8 priority; |
| 283 |
INT16 top B16; |
| 284 |
INT16 left B16; |
| 285 |
CARD16 pad1 B16; |
| 286 |
CARD32 pad2 B32; |
| 287 |
CARD32 pad3 B32; |
| 288 |
} xkmAnyDoodadDesc; |
| 289 |
#define sz_xkmAnyDoodadDesc 16 |
| 290 |
|
| 291 |
typedef union _xkmDoodadDesc { |
| 292 |
xkmAnyDoodadDesc any; |
| 293 |
xkmShapeDoodadDesc shape; |
| 294 |
xkmTextDoodadDesc text; |
| 295 |
xkmIndicatorDoodadDesc indicator; |
| 296 |
xkmLogoDoodadDesc logo; |
| 297 |
} xkmDoodadDesc; |
| 298 |
#define sz_xkmDoodadDesc 16 |
| 299 |
|
| 300 |
#endif /* _XKMFORMAT_H_ */ |