2006-11-25 11:24:24 -07:00
|
|
|
/************************************************************
|
|
|
|
Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
|
|
|
|
|
|
|
|
Permission to use, copy, modify, and distribute this
|
|
|
|
software and its documentation for any purpose and without
|
|
|
|
fee is hereby granted, provided that the above copyright
|
|
|
|
notice appear in all copies and that both that copyright
|
|
|
|
notice and this permission notice appear in supporting
|
2012-03-10 10:16:24 -07:00
|
|
|
documentation, and that the name of Silicon Graphics not be
|
|
|
|
used in advertising or publicity pertaining to distribution
|
2006-11-25 11:24:24 -07:00
|
|
|
of the software without specific prior written permission.
|
2012-03-10 10:16:24 -07:00
|
|
|
Silicon Graphics makes no representation about the suitability
|
2006-11-25 11:24:24 -07:00
|
|
|
of this software for any purpose. It is provided "as is"
|
|
|
|
without any express or implied warranty.
|
2012-03-10 10:16:24 -07:00
|
|
|
|
|
|
|
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
|
|
|
|
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
2006-11-25 11:24:24 -07:00
|
|
|
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
|
2012-03-10 10:16:24 -07:00
|
|
|
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
|
|
|
|
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
|
|
|
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
2006-11-25 11:24:24 -07:00
|
|
|
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
|
|
|
|
THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
|
|
|
|
********************************************************/
|
|
|
|
|
|
|
|
#ifndef _XKMFORMAT_H_
|
|
|
|
#define _XKMFORMAT_H_ 1
|
|
|
|
|
|
|
|
#include <X11/extensions/XKB.h>
|
|
|
|
#include <X11/extensions/XKBproto.h>
|
|
|
|
#include <X11/extensions/XKM.h>
|
|
|
|
|
|
|
|
typedef struct _xkmFileInfo {
|
|
|
|
CARD8 type;
|
|
|
|
CARD8 min_kc;
|
|
|
|
CARD8 max_kc;
|
|
|
|
CARD8 num_toc;
|
2020-01-04 10:58:47 -07:00
|
|
|
CARD16 present;
|
|
|
|
CARD16 pad;
|
2006-11-25 11:24:24 -07:00
|
|
|
} xkmFileInfo;
|
|
|
|
#define sz_xkmFileInfo 8
|
|
|
|
|
|
|
|
typedef struct _xkmSectionInfo {
|
2020-01-04 10:58:47 -07:00
|
|
|
CARD16 type;
|
|
|
|
CARD16 format;
|
|
|
|
CARD16 size;
|
|
|
|
CARD16 offset;
|
2006-11-25 11:24:24 -07:00
|
|
|
} xkmSectionInfo;
|
|
|
|
#define sz_xkmSectionInfo 8
|
|
|
|
|
|
|
|
typedef struct _xkmKeyTypeDesc {
|
|
|
|
CARD8 realMods;
|
|
|
|
CARD8 numLevels;
|
2020-01-04 10:58:47 -07:00
|
|
|
CARD16 virtualMods;
|
2006-11-25 11:24:24 -07:00
|
|
|
CARD8 nMapEntries;
|
|
|
|
CARD8 nLevelNames;
|
|
|
|
CARD8 preserve;
|
|
|
|
CARD8 pad;
|
|
|
|
} xkmKeyTypeDesc;
|
|
|
|
#define sz_xkmKeyTypeDesc 8
|
|
|
|
|
|
|
|
typedef struct _xkmKTMapEntryDesc {
|
|
|
|
CARD8 level;
|
|
|
|
CARD8 realMods;
|
2020-01-04 10:58:47 -07:00
|
|
|
CARD16 virtualMods;
|
2006-11-25 11:24:24 -07:00
|
|
|
} xkmKTMapEntryDesc;
|
|
|
|
#define sz_xkmKTMapEntryDesc 4
|
|
|
|
|
|
|
|
typedef struct _xkmModsDesc {
|
|
|
|
CARD8 realMods;
|
|
|
|
CARD8 pad;
|
2020-01-04 10:58:47 -07:00
|
|
|
CARD16 virtualMods;
|
2006-11-25 11:24:24 -07:00
|
|
|
} xkmModsDesc;
|
|
|
|
#define sz_xkmModsDesc 4
|
|
|
|
|
|
|
|
typedef struct _xkmVModMapDesc {
|
|
|
|
CARD8 key;
|
|
|
|
CARD8 pad;
|
2020-01-04 10:58:47 -07:00
|
|
|
CARD16 vmods;
|
2006-11-25 11:24:24 -07:00
|
|
|
} xkmVModMapDesc;
|
|
|
|
#define sz_xkmVModMapDesc 4
|
|
|
|
|
|
|
|
typedef struct _xkmSymInterpretDesc {
|
2020-01-04 10:58:47 -07:00
|
|
|
CARD32 sym;
|
2006-11-25 11:24:24 -07:00
|
|
|
CARD8 mods;
|
|
|
|
CARD8 match;
|
|
|
|
CARD8 virtualMod;
|
|
|
|
CARD8 flags;
|
|
|
|
CARD8 actionType;
|
|
|
|
CARD8 actionData[7];
|
|
|
|
} xkmSymInterpretDesc;
|
|
|
|
#define sz_xkmSymInterpretDesc 16
|
|
|
|
|
|
|
|
typedef struct _xkmBehaviorDesc {
|
|
|
|
CARD8 type;
|
|
|
|
CARD8 data;
|
2020-01-04 10:58:47 -07:00
|
|
|
CARD16 pad;
|
2006-11-25 11:24:24 -07:00
|
|
|
} xkmBehaviorDesc;
|
|
|
|
#define sz_xkmBehaviorDesc 4
|
|
|
|
|
|
|
|
typedef struct _xkmActionDesc {
|
|
|
|
CARD8 type;
|
|
|
|
CARD8 data[7];
|
|
|
|
} xkmActionDesc;
|
|
|
|
#define sz_xkmActionDesc 8
|
|
|
|
|
|
|
|
#define XkmKeyHasTypes (0x0f)
|
|
|
|
#define XkmKeyHasGroup1Type (1<<0)
|
|
|
|
#define XkmKeyHasGroup2Type (1<<1)
|
|
|
|
#define XkmKeyHasGroup3Type (1<<2)
|
|
|
|
#define XkmKeyHasGroup4Type (1<<3)
|
|
|
|
#define XkmKeyHasActions (1<<4)
|
|
|
|
#define XkmKeyHasBehavior (1<<5)
|
|
|
|
#define XkmRepeatingKey (1<<6)
|
|
|
|
#define XkmNonRepeatingKey (1<<7)
|
|
|
|
|
|
|
|
typedef struct _xkmKeySymMapDesc {
|
|
|
|
CARD8 width;
|
|
|
|
CARD8 num_groups;
|
|
|
|
CARD8 modifier_map;
|
|
|
|
CARD8 flags;
|
|
|
|
} xkmKeySymMapDesc;
|
|
|
|
#define sz_xkmKeySymMapDesc 4
|
|
|
|
|
|
|
|
typedef struct _xkmIndicatorMapDesc {
|
|
|
|
CARD8 indicator;
|
|
|
|
CARD8 flags;
|
|
|
|
CARD8 which_mods;
|
|
|
|
CARD8 real_mods;
|
2020-01-04 10:58:47 -07:00
|
|
|
CARD16 vmods;
|
2006-11-25 11:24:24 -07:00
|
|
|
CARD8 which_groups;
|
|
|
|
CARD8 groups;
|
2020-01-04 10:58:47 -07:00
|
|
|
CARD32 ctrls;
|
2006-11-25 11:24:24 -07:00
|
|
|
} xkmIndicatorMapDesc;
|
|
|
|
#define sz_xkmIndicatorMapDesc 12
|
|
|
|
|
|
|
|
typedef struct _xkmGeometryDesc {
|
2020-01-04 10:58:47 -07:00
|
|
|
CARD16 width_mm;
|
|
|
|
CARD16 height_mm;
|
2006-11-25 11:24:24 -07:00
|
|
|
CARD8 base_color_ndx;
|
|
|
|
CARD8 label_color_ndx;
|
2020-01-04 10:58:47 -07:00
|
|
|
CARD16 num_properties;
|
|
|
|
CARD16 num_colors;
|
|
|
|
CARD16 num_shapes;
|
|
|
|
CARD16 num_sections;
|
|
|
|
CARD16 num_doodads;
|
|
|
|
CARD16 num_key_aliases;
|
|
|
|
CARD16 pad1;
|
2006-11-25 11:24:24 -07:00
|
|
|
} xkmGeometryDesc;
|
|
|
|
#define sz_xkmGeometryDesc 20
|
|
|
|
|
|
|
|
typedef struct _xkmPointDesc {
|
2020-01-04 10:58:47 -07:00
|
|
|
INT16 x;
|
|
|
|
INT16 y;
|
2006-11-25 11:24:24 -07:00
|
|
|
} xkmPointDesc;
|
|
|
|
#define sz_xkmPointDesc 4
|
|
|
|
|
|
|
|
typedef struct _xkmOutlineDesc {
|
|
|
|
CARD8 num_points;
|
|
|
|
CARD8 corner_radius;
|
2020-01-04 10:58:47 -07:00
|
|
|
CARD16 pad;
|
2006-11-25 11:24:24 -07:00
|
|
|
} xkmOutlineDesc;
|
|
|
|
#define sz_xkmOutlineDesc 4
|
|
|
|
|
|
|
|
typedef struct _xkmShapeDesc {
|
|
|
|
CARD8 num_outlines;
|
|
|
|
CARD8 primary_ndx;
|
|
|
|
CARD8 approx_ndx;
|
|
|
|
CARD8 pad;
|
2012-03-10 10:16:24 -07:00
|
|
|
} xkmShapeDesc;
|
2006-11-25 11:24:24 -07:00
|
|
|
#define sz_xkmShapeDesc 4
|
|
|
|
|
|
|
|
typedef struct _xkmSectionDesc {
|
2020-01-04 10:58:47 -07:00
|
|
|
INT16 top;
|
|
|
|
INT16 left;
|
|
|
|
CARD16 width;
|
|
|
|
CARD16 height;
|
|
|
|
INT16 angle;
|
2006-11-25 11:24:24 -07:00
|
|
|
CARD8 priority;
|
|
|
|
CARD8 num_rows;
|
|
|
|
CARD8 num_doodads;
|
|
|
|
CARD8 num_overlays;
|
2020-01-04 10:58:47 -07:00
|
|
|
CARD16 pad2;
|
2006-11-25 11:24:24 -07:00
|
|
|
} xkmSectionDesc;
|
|
|
|
#define sz_xkmSectionDesc 16
|
|
|
|
|
|
|
|
typedef struct _xkmRowDesc {
|
2020-01-04 10:58:47 -07:00
|
|
|
INT16 top;
|
|
|
|
INT16 left;
|
2006-11-25 11:24:24 -07:00
|
|
|
CARD8 num_keys;
|
|
|
|
BOOL vertical;
|
2020-01-04 10:58:47 -07:00
|
|
|
CARD16 pad;
|
2006-11-25 11:24:24 -07:00
|
|
|
} xkmRowDesc;
|
|
|
|
#define sz_xkmRowDesc 8
|
|
|
|
|
|
|
|
typedef struct _xkmKeyDesc {
|
|
|
|
CARD8 name[XkbKeyNameLength];
|
2020-01-04 10:58:47 -07:00
|
|
|
INT16 gap;
|
2006-11-25 11:24:24 -07:00
|
|
|
CARD8 shape_ndx;
|
|
|
|
CARD8 color_ndx;
|
|
|
|
} xkmKeyDesc;
|
|
|
|
#define sz_xkmKeyDesc 8
|
|
|
|
|
|
|
|
typedef struct _xkmOverlayDesc {
|
|
|
|
CARD8 num_rows;
|
|
|
|
CARD8 pad1;
|
2020-01-04 10:58:47 -07:00
|
|
|
CARD16 pad2;
|
2006-11-25 11:24:24 -07:00
|
|
|
} xkmOverlayDesc;
|
|
|
|
#define sz_xkmOverlayDesc 4
|
|
|
|
|
|
|
|
typedef struct _xkmOverlayRowDesc {
|
|
|
|
CARD8 row_under;
|
|
|
|
CARD8 num_keys;
|
2020-01-04 10:58:47 -07:00
|
|
|
CARD16 pad;
|
2006-11-25 11:24:24 -07:00
|
|
|
} xkmOverlayRowDesc;
|
|
|
|
#define sz_xkmOverlayRowDesc 4
|
|
|
|
|
|
|
|
typedef struct _xkmOverlayKeyDesc {
|
|
|
|
char over[XkbKeyNameLength];
|
|
|
|
char under[XkbKeyNameLength];
|
|
|
|
} xkmOverlayKeyDesc;
|
|
|
|
#define sz_xkmOverlayKeyDesc 8
|
|
|
|
|
|
|
|
typedef struct _xkmShapeDoodadDesc {
|
|
|
|
CARD8 type;
|
|
|
|
CARD8 priority;
|
2020-01-04 10:58:47 -07:00
|
|
|
INT16 top;
|
|
|
|
INT16 left;
|
|
|
|
INT16 angle;
|
2006-11-25 11:24:24 -07:00
|
|
|
CARD8 color_ndx;
|
|
|
|
CARD8 shape_ndx;
|
2020-01-04 10:58:47 -07:00
|
|
|
CARD16 pad;
|
|
|
|
CARD32 pad1;
|
2006-11-25 11:24:24 -07:00
|
|
|
} xkmShapeDoodadDesc;
|
|
|
|
#define sz_xkmShapeDoodadDesc 16
|
|
|
|
|
|
|
|
typedef struct _xkmTextDoodadDesc {
|
|
|
|
CARD8 type;
|
|
|
|
CARD8 priority;
|
2020-01-04 10:58:47 -07:00
|
|
|
INT16 top;
|
|
|
|
INT16 left;
|
|
|
|
INT16 angle;
|
|
|
|
CARD16 width;
|
|
|
|
CARD16 height;
|
2006-11-25 11:24:24 -07:00
|
|
|
CARD8 color_ndx;
|
|
|
|
CARD8 pad1;
|
2020-01-04 10:58:47 -07:00
|
|
|
CARD16 pad2;
|
2006-11-25 11:24:24 -07:00
|
|
|
} xkmTextDoodadDesc;
|
|
|
|
#define sz_xkmTextDoodadDesc 16
|
|
|
|
|
|
|
|
typedef struct _xkmIndicatorDoodadDesc {
|
|
|
|
CARD8 type;
|
|
|
|
CARD8 priority;
|
2020-01-04 10:58:47 -07:00
|
|
|
INT16 top;
|
|
|
|
INT16 left;
|
2006-11-25 11:24:24 -07:00
|
|
|
CARD8 shape_ndx;
|
|
|
|
CARD8 on_color_ndx;
|
|
|
|
CARD8 off_color_ndx;
|
|
|
|
CARD8 pad1;
|
2020-01-04 10:58:47 -07:00
|
|
|
CARD16 pad2;
|
|
|
|
CARD32 pad3;
|
2006-11-25 11:24:24 -07:00
|
|
|
} xkmIndicatorDoodadDesc;
|
|
|
|
#define sz_xkmIndicatorDoodadDesc 16
|
|
|
|
|
|
|
|
typedef struct _xkmLogoDoodadDesc {
|
|
|
|
CARD8 type;
|
|
|
|
CARD8 priority;
|
2020-01-04 10:58:47 -07:00
|
|
|
INT16 top;
|
|
|
|
INT16 left;
|
|
|
|
INT16 angle;
|
2006-11-25 11:24:24 -07:00
|
|
|
CARD8 color_ndx;
|
|
|
|
CARD8 shape_ndx;
|
2020-01-04 10:58:47 -07:00
|
|
|
CARD16 pad;
|
|
|
|
CARD32 pad1;
|
2006-11-25 11:24:24 -07:00
|
|
|
} xkmLogoDoodadDesc;
|
|
|
|
#define sz_xkmLogoDoodadDesc 16
|
|
|
|
|
|
|
|
typedef struct _xkmAnyDoodadDesc {
|
|
|
|
CARD8 type;
|
|
|
|
CARD8 priority;
|
2020-01-04 10:58:47 -07:00
|
|
|
INT16 top;
|
|
|
|
INT16 left;
|
|
|
|
CARD16 pad1;
|
|
|
|
CARD32 pad2;
|
|
|
|
CARD32 pad3;
|
2006-11-25 11:24:24 -07:00
|
|
|
} xkmAnyDoodadDesc;
|
|
|
|
#define sz_xkmAnyDoodadDesc 16
|
|
|
|
|
|
|
|
typedef union _xkmDoodadDesc {
|
|
|
|
xkmAnyDoodadDesc any;
|
|
|
|
xkmShapeDoodadDesc shape;
|
|
|
|
xkmTextDoodadDesc text;
|
|
|
|
xkmIndicatorDoodadDesc indicator;
|
|
|
|
xkmLogoDoodadDesc logo;
|
|
|
|
} xkmDoodadDesc;
|
|
|
|
#define sz_xkmDoodadDesc 16
|
|
|
|
|
|
|
|
#endif /* _XKMFORMAT_H_ */
|