/************************************************************
Copyright (c) 1993 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
documentation, and that the name of Silicon Graphics not be
used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
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
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
#include <X11/extensions/XKBstr.h>
#define XkbAddGeomKeyAlias SrvXkbAddGeomKeyAlias
#define XkbAddGeomColor SrvXkbAddGeomColor
#define XkbAddGeomDoodad SrvXkbAddGeomDoodad
#define XkbAddGeomKey SrvXkbAddGeomKey
#define XkbAddGeomOutline SrvXkbAddGeomOutline
#define XkbAddGeomOverlay SrvXkbAddGeomOverlay
#define XkbAddGeomOverlayRow SrvXkbAddGeomOverlayRow
#define XkbAddGeomOverlayKey SrvXkbAddGeomOverlayKey
#define XkbAddGeomProperty SrvXkbAddGeomProperty
#define XkbAddGeomRow SrvXkbAddGeomRow
#define XkbAddGeomSection SrvXkbAddGeomSection
#define XkbAddGeomShape SrvXkbAddGeomShape
#define XkbAllocGeomKeyAliases SrvXkbAllocGeomKeyAliases
#define XkbAllocGeomColors SrvXkbAllocGeomColors
#define XkbAllocGeomDoodads SrvXkbAllocGeomDoodads
#define XkbAllocGeomKeys SrvXkbAllocGeomKeys
#define XkbAllocGeomOutlines SrvXkbAllocGeomOutlines
#define XkbAllocGeomPoints SrvXkbAllocGeomPoints
#define XkbAllocGeomProps SrvXkbAllocGeomProps
#define XkbAllocGeomRows SrvXkbAllocGeomRows
#define XkbAllocGeomSectionDoodads SrvXkbAllocGeomSectionDoodads
#define XkbAllocGeomSections SrvXkbAllocGeomSections
#define XkbAllocGeomOverlays SrvXkbAllocGeomOverlays
#define XkbAllocGeomOverlayRows SrvXkbAllocGeomOverlayRows
#define XkbAllocGeomOverlayKeys SrvXkbAllocGeomOverlayKeys
#define XkbAllocGeomShapes SrvXkbAllocGeomShapes
#define XkbAllocGeometry SrvXkbAllocGeometry
#define XkbFreeGeomKeyAliases SrvXkbFreeGeomKeyAliases
#define XkbFreeGeomColors SrvXkbFreeGeomColors
#define XkbFreeGeomDoodads SrvXkbFreeGeomDoodads
#define XkbFreeGeomProperties SrvXkbFreeGeomProperties
#define XkbFreeGeomOverlayKeys SrvXkbFreeGeomOverlayKeys
#define XkbFreeGeomOverlayRows SrvXkbFreeGeomOverlayRows
#define XkbFreeGeomOverlays SrvXkbFreeGeomOverlays
#define XkbFreeGeomKeys SrvXkbFreeGeomKeys
#define XkbFreeGeomRows SrvXkbFreeGeomRows
#define XkbFreeGeomSections SrvXkbFreeGeomSections
#define XkbFreeGeomPoints SrvXkbFreeGeomPoints
#define XkbFreeGeomOutlines SrvXkbFreeGeomOutlines
#define XkbFreeGeomShapes SrvXkbFreeGeomShapes
#define XkbFreeGeometry SrvXkbFreeGeometry
typedef struct _XkbProperty {
} XkbPropertyRec,*XkbPropertyPtr;
typedef struct _XkbColor {
} XkbColorRec,*XkbColorPtr;
typedef struct _XkbPoint {
} XkbPointRec, *XkbPointPtr;
typedef struct _XkbBounds {
} XkbBoundsRec, *XkbBoundsPtr;
#define XkbBoundsWidth(b) (((b)->x2)-((b)->x1))
#define XkbBoundsHeight(b) (((b)->y2)-((b)->y1))
* In the following structs, this pattern is used for dynamically sized arrays:
* foo is an array for which sz_foo entries are allocated & num_foo are used
typedef struct _XkbOutline {
unsigned short num_points;
unsigned short sz_points;
unsigned short corner_radius;
} XkbOutlineRec, *XkbOutlinePtr;
typedef struct _XkbShape {
unsigned short num_outlines;
unsigned short sz_outlines;
} XkbShapeRec, *XkbShapePtr;
#define XkbOutlineIndex(s,o) ((int)((o)-&(s)->outlines[0]))
typedef struct _XkbShapeDoodad {
unsigned short color_ndx;
unsigned short shape_ndx;
} XkbShapeDoodadRec, *XkbShapeDoodadPtr;
#define XkbShapeDoodadColor(g,d) (&(g)->colors[(d)->color_ndx])
#define XkbShapeDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx])
#define XkbSetShapeDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
#define XkbSetShapeDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0])
typedef struct _XkbTextDoodad {
unsigned short color_ndx;
} XkbTextDoodadRec, *XkbTextDoodadPtr;
#define XkbTextDoodadColor(g,d) (&(g)->colors[(d)->color_ndx])
#define XkbSetTextDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
typedef struct _XkbIndicatorDoodad {
unsigned short shape_ndx;
unsigned short on_color_ndx;
unsigned short off_color_ndx;
} XkbIndicatorDoodadRec, *XkbIndicatorDoodadPtr;
#define XkbIndicatorDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx])
#define XkbIndicatorDoodadOnColor(g,d) (&(g)->colors[(d)->on_color_ndx])
#define XkbIndicatorDoodadOffColor(g,d) (&(g)->colors[(d)->off_color_ndx])
#define XkbSetIndicatorDoodadOnColor(g,d,c) \
((d)->on_color_ndx= (c)-&(g)->colors[0])
#define XkbSetIndicatorDoodadOffColor(g,d,c) \
((d)->off_color_ndx= (c)-&(g)->colors[0])
#define XkbSetIndicatorDoodadShape(g,d,s) \
((d)->shape_ndx= (s)-&(g)->shapes[0])
typedef struct _XkbLogoDoodad {
unsigned short color_ndx;
unsigned short shape_ndx;
} XkbLogoDoodadRec, *XkbLogoDoodadPtr;
#define XkbLogoDoodadColor(g,d) (&(g)->colors[(d)->color_ndx])
#define XkbLogoDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx])
#define XkbSetLogoDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
#define XkbSetLogoDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0])
typedef struct _XkbAnyDoodad {
} XkbAnyDoodadRec, *XkbAnyDoodadPtr;
typedef union _XkbDoodad {
XkbIndicatorDoodadRec indicator;
} XkbDoodadRec, *XkbDoodadPtr;
#define XkbUnknownDoodad 0
#define XkbOutlineDoodad 1
#define XkbIndicatorDoodad 4
#define XkbKeyShape(g,k) (&(g)->shapes[(k)->shape_ndx])
#define XkbKeyColor(g,k) (&(g)->colors[(k)->color_ndx])
#define XkbSetKeyShape(g,k,s) ((k)->shape_ndx= (s)-&(g)->shapes[0])
#define XkbSetKeyColor(g,k,c) ((k)->color_ndx= (c)-&(g)->colors[0])
typedef struct _XkbSection {
unsigned short num_doodads;
unsigned short num_overlays;
unsigned short sz_doodads;
unsigned short sz_overlays;
struct _XkbOverlay *overlays;
} XkbSectionRec, *XkbSectionPtr;
typedef struct _XkbOverlayKey {
} XkbOverlayKeyRec,*XkbOverlayKeyPtr;
typedef struct _XkbOverlayRow {
unsigned short row_under;
} XkbOverlayRowRec,*XkbOverlayRowPtr;
typedef struct _XkbOverlay {
XkbSectionPtr section_under;
} XkbOverlayRec,*XkbOverlayPtr;
typedef struct _XkbGeometry {
unsigned short height_mm;
unsigned short sz_properties;
unsigned short sz_colors;
unsigned short sz_shapes;
unsigned short sz_sections;
unsigned short sz_doodads;
unsigned short sz_key_aliases;
unsigned short num_properties;
unsigned short num_colors;
unsigned short num_shapes;
unsigned short num_sections;
unsigned short num_doodads;
unsigned short num_key_aliases;
XkbPropertyPtr properties;
XkbKeyAliasPtr key_aliases;
#define XkbGeomColorIndex(g,c) ((int)((c)-&(g)->colors[0]))
#define XkbGeomPropertiesMask (1<<0)
#define XkbGeomColorsMask (1<<1)
#define XkbGeomShapesMask (1<<2)
#define XkbGeomSectionsMask (1<<3)
#define XkbGeomDoodadsMask (1<<4)
#define XkbGeomKeyAliasesMask (1<<5)
#define XkbGeomAllMask (0x3f)
typedef struct _XkbGeometrySizes {
unsigned short num_properties;
unsigned short num_colors;
unsigned short num_shapes;
unsigned short num_sections;
unsigned short num_doodads;
unsigned short num_key_aliases;
} XkbGeometrySizesRec,*XkbGeometrySizesPtr;
XkbGeometryPtr /* geom */,
XkbGeometryPtr /* geom */,
XkbGeometryPtr /* geom */,
XkbGeometryPtr /* geom */,
XkbSectionPtr /* section */,
XkbGeometryPtr /* geom */,
XkbSectionPtr /* section */,
XkbOverlayPtr /* overlay */,
XkbOverlayPtr /* overlay */,
XkbOverlayRowPtr /* row */,
XkbGeometryPtr /* geom */,
XkbSectionPtr /* section */,
XkbGeometryPtr /* geom */,
XkbGeometryPtr /* geom */,
XkbDoodadPtr /* doodads */,
XkbGeometryPtr /* geom */,
XkbOverlayRowPtr /* row */,
XkbOverlayPtr /* overlay */,
XkbSectionPtr /* section */,
XkbSectionPtr /* section */,
XkbGeometryPtr /* geom */,
XkbOutlinePtr /* outline */,