Use CARD32 instead of Atom, move geom headers in
Use CARD32 instead of Atom/KeySym/et al to avoid type size confusion between server and non-server code; relatedly, move the geometry headers in from kbproto, so every non-simple type (i.e. structs containing nothing more than basic types) is now copied into xkbcommon. Signed-off-by: Daniel Stone <daniel@fooishbar.org>master
parent
b38525421f
commit
7257d4c89e
|
@ -25,18 +25,43 @@ sale, use or other dealings in this Software without prior written
|
|||
authorization from the authors.
|
||||
*/
|
||||
|
||||
/************************************************************
|
||||
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.
|
||||
|
||||
********************************************************/
|
||||
|
||||
|
||||
#ifndef _XKBCOMMON_H_
|
||||
#define _XKBCOMMON_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <X11/Xfuncproto.h>
|
||||
#include <X11/Xmd.h>
|
||||
#include <X11/extensions/XKBstrcommon.h>
|
||||
#include <X11/extensions/XKBrulescommon.h>
|
||||
|
||||
#define KeySym CARD32
|
||||
#define Atom CARD32
|
||||
|
||||
/* Action structures used in the server */
|
||||
|
||||
#define XkbcAnyActionDataSize 18
|
||||
|
@ -121,17 +146,27 @@ typedef union _XkbcAction {
|
|||
XkbPtrAction ptr; /* XXX delete for DeviceValuator */
|
||||
XkbPtrBtnAction btn; /* XXX delete for DeviceBtn */
|
||||
XkbMessageAction msg; /* XXX just delete */
|
||||
unsigned char type;
|
||||
unsigned char type;
|
||||
} XkbcAction;
|
||||
|
||||
typedef struct _XkbcKeyType {
|
||||
XkbModsRec mods;
|
||||
unsigned char num_levels;
|
||||
unsigned char map_count;
|
||||
XkbKTMapEntryPtr map;
|
||||
XkbModsPtr preserve;
|
||||
CARD32 name;
|
||||
CARD32 *level_names;
|
||||
} XkbcKeyTypeRec, *XkbcKeyTypePtr;
|
||||
|
||||
typedef struct _XkbcSymInterpretRec {
|
||||
CARD32 sym;
|
||||
unsigned char flags;
|
||||
unsigned char match;
|
||||
unsigned char mods;
|
||||
unsigned char virtual_mod;
|
||||
XkbcAnyAction act;
|
||||
} XkbcSymInterpretRec,*XkbcSymInterpretPtr;
|
||||
XkbcAnyAction act;
|
||||
} XkbcSymInterpretRec, *XkbcSymInterpretPtr;
|
||||
|
||||
typedef struct _XkbcCompatMapRec {
|
||||
XkbcSymInterpretPtr sym_interpret;
|
||||
|
@ -143,7 +178,7 @@ typedef struct _XkbcCompatMapRec {
|
|||
typedef struct _XkbcClientMapRec {
|
||||
unsigned char size_types;
|
||||
unsigned char num_types;
|
||||
XkbKeyTypePtr types;
|
||||
XkbcKeyTypePtr types;
|
||||
|
||||
unsigned short size_syms;
|
||||
unsigned short num_syms;
|
||||
|
@ -172,6 +207,265 @@ typedef struct _XkbcServerMapRec {
|
|||
uint32_t *vmodmap;
|
||||
} XkbcServerMapRec, *XkbcServerMapPtr;
|
||||
|
||||
typedef struct _XkbcNamesRec {
|
||||
CARD32 keycodes;
|
||||
CARD32 geometry;
|
||||
CARD32 symbols;
|
||||
CARD32 types;
|
||||
CARD32 compat;
|
||||
CARD32 vmods[XkbNumVirtualMods];
|
||||
CARD32 indicators[XkbNumIndicators];
|
||||
CARD32 groups[XkbNumKbdGroups];
|
||||
XkbKeyNamePtr keys;
|
||||
XkbKeyAliasPtr key_aliases;
|
||||
CARD32 *radio_groups;
|
||||
CARD32 phys_symbols;
|
||||
|
||||
unsigned char num_keys;
|
||||
unsigned char num_key_aliases;
|
||||
unsigned short num_rg;
|
||||
} XkbcNamesRec, *XkbcNamesPtr;
|
||||
|
||||
typedef struct _XkbcProperty {
|
||||
char *name;
|
||||
char *value;
|
||||
} XkbcPropertyRec, *XkbcPropertyPtr;
|
||||
|
||||
typedef struct _XkbcColor {
|
||||
unsigned int pixel;
|
||||
char * spec;
|
||||
} XkbcColorRec, *XkbcColorPtr;
|
||||
|
||||
typedef struct _XkbcPoint {
|
||||
short x;
|
||||
short y;
|
||||
} XkbcPointRec, *XkbcPointPtr;
|
||||
|
||||
typedef struct _XkbcBounds {
|
||||
short x1,y1;
|
||||
short x2,y2;
|
||||
} XkbcBoundsRec, *XkbcBoundsPtr;
|
||||
#define XkbBoundsWidth(b) (((b)->x2)-((b)->x1))
|
||||
#define XkbBoundsHeight(b) (((b)->y2)-((b)->y1))
|
||||
|
||||
typedef struct _XkbcOutline {
|
||||
unsigned short num_points;
|
||||
unsigned short sz_points;
|
||||
unsigned short corner_radius;
|
||||
XkbcPointPtr points;
|
||||
} XkbcOutlineRec, *XkbcOutlinePtr;
|
||||
|
||||
typedef struct _XkbcShape {
|
||||
CARD32 name;
|
||||
unsigned short num_outlines;
|
||||
unsigned short sz_outlines;
|
||||
XkbcOutlinePtr outlines;
|
||||
XkbcOutlinePtr approx;
|
||||
XkbcOutlinePtr primary;
|
||||
XkbcBoundsRec bounds;
|
||||
} XkbcShapeRec, *XkbcShapePtr;
|
||||
#define XkbOutlineIndex(s,o) ((int)((o)-&(s)->outlines[0]))
|
||||
|
||||
typedef struct _XkbcShapeDoodad {
|
||||
CARD32 name;
|
||||
unsigned char type;
|
||||
unsigned char priority;
|
||||
short top;
|
||||
short left;
|
||||
short angle;
|
||||
unsigned short color_ndx;
|
||||
unsigned short shape_ndx;
|
||||
} XkbcShapeDoodadRec, *XkbcShapeDoodadPtr;
|
||||
#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 _XkbcTextDoodad {
|
||||
CARD32 name;
|
||||
unsigned char type;
|
||||
unsigned char priority;
|
||||
short top;
|
||||
short left;
|
||||
short angle;
|
||||
short width;
|
||||
short height;
|
||||
unsigned short color_ndx;
|
||||
char * text;
|
||||
char * font;
|
||||
} XkbcTextDoodadRec, *XkbcTextDoodadPtr;
|
||||
#define XkbTextDoodadColor(g,d) (&(g)->colors[(d)->color_ndx])
|
||||
#define XkbSetTextDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
|
||||
|
||||
typedef struct _XkbcIndicatorDoodad {
|
||||
CARD32 name;
|
||||
unsigned char type;
|
||||
unsigned char priority;
|
||||
short top;
|
||||
short left;
|
||||
short angle;
|
||||
unsigned short shape_ndx;
|
||||
unsigned short on_color_ndx;
|
||||
unsigned short off_color_ndx;
|
||||
} XkbcIndicatorDoodadRec, *XkbcIndicatorDoodadPtr;
|
||||
#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 _XkbcLogoDoodad {
|
||||
CARD32 name;
|
||||
unsigned char type;
|
||||
unsigned char priority;
|
||||
short top;
|
||||
short left;
|
||||
short angle;
|
||||
unsigned short color_ndx;
|
||||
unsigned short shape_ndx;
|
||||
char * logo_name;
|
||||
} XkbcLogoDoodadRec, *XkbcLogoDoodadPtr;
|
||||
#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 _XkbcAnyDoodad {
|
||||
CARD32 name;
|
||||
unsigned char type;
|
||||
unsigned char priority;
|
||||
short top;
|
||||
short left;
|
||||
short angle;
|
||||
} XkbcAnyDoodadRec, *XkbcAnyDoodadPtr;
|
||||
|
||||
typedef union _XkbcDoodad {
|
||||
XkbcAnyDoodadRec any;
|
||||
XkbcShapeDoodadRec shape;
|
||||
XkbcTextDoodadRec text;
|
||||
XkbcIndicatorDoodadRec indicator;
|
||||
XkbcLogoDoodadRec logo;
|
||||
} XkbcDoodadRec, *XkbcDoodadPtr;
|
||||
|
||||
#define XkbUnknownDoodad 0
|
||||
#define XkbOutlineDoodad 1
|
||||
#define XkbSolidDoodad 2
|
||||
#define XkbTextDoodad 3
|
||||
#define XkbIndicatorDoodad 4
|
||||
#define XkbLogoDoodad 5
|
||||
|
||||
typedef struct _XkbcKey {
|
||||
XkbKeyNameRec name;
|
||||
short gap;
|
||||
unsigned char shape_ndx;
|
||||
unsigned char color_ndx;
|
||||
} XkbcKeyRec, *XkbcKeyPtr;
|
||||
#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 _XkbRow {
|
||||
short top;
|
||||
short left;
|
||||
unsigned short num_keys;
|
||||
unsigned short sz_keys;
|
||||
int vertical;
|
||||
XkbcKeyPtr keys;
|
||||
XkbcBoundsRec bounds;
|
||||
} XkbcRowRec, *XkbcRowPtr;
|
||||
|
||||
typedef struct _XkbcSection {
|
||||
CARD32 name;
|
||||
unsigned char priority;
|
||||
short top;
|
||||
short left;
|
||||
unsigned short width;
|
||||
unsigned short height;
|
||||
short angle;
|
||||
unsigned short num_rows;
|
||||
unsigned short num_doodads;
|
||||
unsigned short num_overlays;
|
||||
unsigned short sz_rows;
|
||||
unsigned short sz_doodads;
|
||||
unsigned short sz_overlays;
|
||||
XkbcRowPtr rows;
|
||||
XkbcDoodadPtr doodads;
|
||||
XkbcBoundsRec bounds;
|
||||
struct _XkbOverlay *overlays;
|
||||
} XkbcSectionRec, *XkbcSectionPtr;
|
||||
|
||||
typedef struct _XkbcOverlayKey {
|
||||
XkbKeyNameRec over;
|
||||
XkbKeyNameRec under;
|
||||
} XkbcOverlayKeyRec, *XkbcOverlayKeyPtr;
|
||||
|
||||
typedef struct _XkbOverlayRow {
|
||||
unsigned short row_under;
|
||||
unsigned short num_keys;
|
||||
unsigned short sz_keys;
|
||||
XkbcOverlayKeyPtr keys;
|
||||
} XkbcOverlayRowRec, *XkbcOverlayRowPtr;
|
||||
|
||||
typedef struct _XkbOverlay {
|
||||
CARD32 name;
|
||||
XkbcSectionPtr section_under;
|
||||
unsigned short num_rows;
|
||||
unsigned short sz_rows;
|
||||
XkbcOverlayRowPtr rows;
|
||||
XkbcBoundsPtr bounds;
|
||||
} XkbcOverlayRec, *XkbcOverlayPtr;
|
||||
|
||||
typedef struct _XkbcGeometry {
|
||||
CARD32 name;
|
||||
unsigned short width_mm;
|
||||
unsigned short height_mm;
|
||||
char * label_font;
|
||||
XkbcColorPtr label_color;
|
||||
XkbcColorPtr base_color;
|
||||
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;
|
||||
XkbcPropertyPtr properties;
|
||||
XkbcColorPtr colors;
|
||||
XkbcShapePtr shapes;
|
||||
XkbcSectionPtr sections;
|
||||
XkbcDoodadPtr doodads;
|
||||
XkbKeyAliasPtr key_aliases;
|
||||
} XkbcGeometryRec, *XkbcGeometryPtr;
|
||||
#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 _XkbcGeometrySizes {
|
||||
unsigned int which;
|
||||
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;
|
||||
} XkbcGeometrySizesRec, *XkbcGeometrySizesPtr;
|
||||
|
||||
/* Common keyboard description structure */
|
||||
typedef struct _XkbcDesc {
|
||||
unsigned int defined;
|
||||
|
@ -184,9 +478,9 @@ typedef struct _XkbcDesc {
|
|||
XkbcServerMapPtr server;
|
||||
XkbcClientMapPtr map;
|
||||
XkbIndicatorPtr indicators;
|
||||
XkbNamesPtr names;
|
||||
XkbcNamesPtr names;
|
||||
XkbcCompatMapPtr compat;
|
||||
XkbGeometryPtr geom;
|
||||
XkbcGeometryPtr geom;
|
||||
} XkbcDescRec, *XkbcDescPtr;
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
@ -250,7 +544,4 @@ XkbcStringToKeysym(const char *s);
|
|||
|
||||
_XFUNCPROTOEND
|
||||
|
||||
#undef KeySym
|
||||
#undef Atom
|
||||
|
||||
#endif /* _XKBCOMMON_H_ */
|
||||
|
|
10
src/alloc.c
10
src/alloc.c
|
@ -117,13 +117,13 @@ XkbcFreeCompatMap(XkbcDescPtr xkb, unsigned which, Bool freeMap)
|
|||
int
|
||||
XkbcAllocNames(XkbcDescPtr xkb, unsigned which, int nTotalRG, int nTotalAliases)
|
||||
{
|
||||
XkbNamesPtr names;
|
||||
XkbcNamesPtr names;
|
||||
|
||||
if (!xkb)
|
||||
return BadMatch;
|
||||
|
||||
if (!xkb->names) {
|
||||
xkb->names = _XkbTypedCalloc(1, XkbNamesRec);
|
||||
xkb->names = _XkbTypedCalloc(1, XkbcNamesRec);
|
||||
if (!xkb->names)
|
||||
return BadAlloc;
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ XkbcAllocNames(XkbcDescPtr xkb, unsigned which, int nTotalRG, int nTotalAliases)
|
|||
|
||||
if ((which & XkbKTLevelNamesMask) && xkb->map && xkb->map->types) {
|
||||
int i;
|
||||
XkbKeyTypePtr type;
|
||||
XkbcKeyTypePtr type;
|
||||
|
||||
type = xkb->map->types;
|
||||
for (i = 0; i < xkb->map->num_types; i++, type++) {
|
||||
|
@ -206,7 +206,7 @@ XkbcAllocNames(XkbcDescPtr xkb, unsigned which, int nTotalRG, int nTotalAliases)
|
|||
void
|
||||
XkbcFreeNames(XkbcDescPtr xkb, unsigned which, Bool freeMap)
|
||||
{
|
||||
XkbNamesPtr names;
|
||||
XkbcNamesPtr names;
|
||||
|
||||
if (!xkb || !xkb->names)
|
||||
return;
|
||||
|
@ -220,7 +220,7 @@ XkbcFreeNames(XkbcDescPtr xkb, unsigned which, Bool freeMap)
|
|||
|
||||
if (map && map->types) {
|
||||
int i;
|
||||
XkbKeyTypePtr type = map->types;
|
||||
XkbcKeyTypePtr type = map->types;
|
||||
|
||||
for (i = 0; i < map->num_types; i++, type++) {
|
||||
if (type->level_names) {
|
||||
|
|
216
src/galloc.c
216
src/galloc.c
|
@ -115,7 +115,7 @@ _XkbFreeGeomNonLeafElems(Bool freeAll, int first, int count,
|
|||
static void
|
||||
_XkbClearProperty(char *prop_in)
|
||||
{
|
||||
XkbPropertyPtr prop = (XkbPropertyPtr)prop_in;
|
||||
XkbcPropertyPtr prop = (XkbcPropertyPtr)prop_in;
|
||||
|
||||
if (prop->name) {
|
||||
_XkbFree(prop->name);
|
||||
|
@ -128,17 +128,17 @@ _XkbClearProperty(char *prop_in)
|
|||
}
|
||||
|
||||
void
|
||||
XkbcFreeGeomProperties(XkbGeometryPtr geom, int first, int count, Bool freeAll)
|
||||
XkbcFreeGeomProperties(XkbcGeometryPtr geom, int first, int count, Bool freeAll)
|
||||
{
|
||||
_XkbFreeGeomNonLeafElems(freeAll, first, count,
|
||||
&geom->num_properties, &geom->sz_properties,
|
||||
(char **)&geom->properties,
|
||||
sizeof(XkbPropertyRec),
|
||||
sizeof(XkbcPropertyRec),
|
||||
_XkbClearProperty);
|
||||
}
|
||||
|
||||
void
|
||||
XkbcFreeGeomKeyAliases(XkbGeometryPtr geom, int first, int count, Bool freeAll)
|
||||
XkbcFreeGeomKeyAliases(XkbcGeometryPtr geom, int first, int count, Bool freeAll)
|
||||
{
|
||||
_XkbFreeGeomLeafElems(freeAll, first, count,
|
||||
&geom->num_key_aliases, &geom->sz_key_aliases,
|
||||
|
@ -149,92 +149,92 @@ XkbcFreeGeomKeyAliases(XkbGeometryPtr geom, int first, int count, Bool freeAll)
|
|||
static void
|
||||
_XkbClearColor(char *color_in)
|
||||
{
|
||||
XkbColorPtr color = (XkbColorPtr)color_in;
|
||||
XkbcColorPtr color = (XkbcColorPtr)color_in;
|
||||
|
||||
if (color->spec)
|
||||
_XkbFree(color->spec);
|
||||
}
|
||||
|
||||
void
|
||||
XkbcFreeGeomColors(XkbGeometryPtr geom, int first, int count, Bool freeAll)
|
||||
XkbcFreeGeomColors(XkbcGeometryPtr geom, int first, int count, Bool freeAll)
|
||||
{
|
||||
_XkbFreeGeomNonLeafElems(freeAll, first, count,
|
||||
&geom->num_colors, &geom->sz_colors,
|
||||
(char **)&geom->colors, sizeof(XkbColorRec),
|
||||
(char **)&geom->colors, sizeof(XkbcColorRec),
|
||||
_XkbClearColor);
|
||||
}
|
||||
|
||||
void
|
||||
XkbcFreeGeomPoints(XkbOutlinePtr outline, int first, int count, Bool freeAll)
|
||||
XkbcFreeGeomPoints(XkbcOutlinePtr outline, int first, int count, Bool freeAll)
|
||||
{
|
||||
_XkbFreeGeomLeafElems(freeAll, first, count,
|
||||
&outline->num_points, &outline->sz_points,
|
||||
(char **)&outline->points, sizeof(XkbPointRec));
|
||||
(char **)&outline->points, sizeof(XkbcPointRec));
|
||||
}
|
||||
|
||||
static void
|
||||
_XkbClearOutline(char *outline_in)
|
||||
{
|
||||
XkbOutlinePtr outline = (XkbOutlinePtr)outline_in;
|
||||
XkbcOutlinePtr outline = (XkbcOutlinePtr)outline_in;
|
||||
|
||||
if (outline->points)
|
||||
XkbcFreeGeomPoints(outline, 0, outline->num_points, True);
|
||||
}
|
||||
|
||||
void
|
||||
XkbcFreeGeomOutlines(XkbShapePtr shape, int first, int count, Bool freeAll)
|
||||
XkbcFreeGeomOutlines(XkbcShapePtr shape, int first, int count, Bool freeAll)
|
||||
{
|
||||
_XkbFreeGeomNonLeafElems(freeAll, first, count,
|
||||
&shape->num_outlines, &shape->sz_outlines,
|
||||
(char **)&shape->outlines, sizeof(XkbOutlineRec),
|
||||
(char **)&shape->outlines, sizeof(XkbcOutlineRec),
|
||||
_XkbClearOutline);
|
||||
}
|
||||
|
||||
static void
|
||||
_XkbClearShape(char *shape_in)
|
||||
{
|
||||
XkbShapePtr shape = (XkbShapePtr)shape_in;
|
||||
XkbcShapePtr shape = (XkbcShapePtr)shape_in;
|
||||
|
||||
if (shape->outlines)
|
||||
XkbcFreeGeomOutlines(shape, 0, shape->num_outlines, True);
|
||||
}
|
||||
|
||||
void
|
||||
XkbcFreeGeomShapes(XkbGeometryPtr geom, int first, int count, Bool freeAll)
|
||||
XkbcFreeGeomShapes(XkbcGeometryPtr geom, int first, int count, Bool freeAll)
|
||||
{
|
||||
_XkbFreeGeomNonLeafElems(freeAll, first, count,
|
||||
&geom->num_shapes, &geom->sz_shapes,
|
||||
(char **)&geom->shapes, sizeof(XkbShapeRec),
|
||||
(char **)&geom->shapes, sizeof(XkbcShapeRec),
|
||||
_XkbClearShape);
|
||||
}
|
||||
|
||||
void
|
||||
XkbcFreeGeomOverlayKeys(XkbOverlayRowPtr row, int first, int count,
|
||||
XkbcFreeGeomOverlayKeys(XkbcOverlayRowPtr row, int first, int count,
|
||||
Bool freeAll)
|
||||
{
|
||||
_XkbFreeGeomLeafElems(freeAll, first, count,
|
||||
&row->num_keys, &row->sz_keys,
|
||||
(char **)&row->keys, sizeof(XkbOverlayKeyRec));
|
||||
(char **)&row->keys, sizeof(XkbcOverlayKeyRec));
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
_XkbClearOverlayRow(char *row_in)
|
||||
{
|
||||
XkbOverlayRowPtr row = (XkbOverlayRowPtr)row_in;
|
||||
XkbcOverlayRowPtr row = (XkbcOverlayRowPtr)row_in;
|
||||
|
||||
if (row->keys)
|
||||
XkbcFreeGeomOverlayKeys(row, 0, row->num_keys, True);
|
||||
}
|
||||
|
||||
void
|
||||
XkbcFreeGeomOverlayRows(XkbOverlayPtr overlay, int first, int count,
|
||||
XkbcFreeGeomOverlayRows(XkbcOverlayPtr overlay, int first, int count,
|
||||
Bool freeAll)
|
||||
{
|
||||
_XkbFreeGeomNonLeafElems(freeAll, first, count,
|
||||
&overlay->num_rows, &overlay->sz_rows,
|
||||
(char **)&overlay->rows,
|
||||
sizeof(XkbOverlayRowRec),
|
||||
sizeof(XkbcOverlayRowRec),
|
||||
_XkbClearOverlayRow);
|
||||
}
|
||||
|
||||
|
@ -242,47 +242,47 @@ XkbcFreeGeomOverlayRows(XkbOverlayPtr overlay, int first, int count,
|
|||
static void
|
||||
_XkbClearOverlay(char *overlay_in)
|
||||
{
|
||||
XkbOverlayPtr overlay = (XkbOverlayPtr)overlay_in;
|
||||
XkbcOverlayPtr overlay = (XkbcOverlayPtr)overlay_in;
|
||||
|
||||
if (overlay->rows)
|
||||
XkbcFreeGeomOverlayRows(overlay, 0, overlay->num_rows, True);
|
||||
}
|
||||
|
||||
void
|
||||
XkbcFreeGeomOverlays(XkbSectionPtr section, int first, int count, Bool freeAll)
|
||||
XkbcFreeGeomOverlays(XkbcSectionPtr section, int first, int count, Bool freeAll)
|
||||
{
|
||||
_XkbFreeGeomNonLeafElems(freeAll, first, count,
|
||||
§ion->num_overlays, §ion->sz_overlays,
|
||||
(char **)§ion->overlays,
|
||||
sizeof(XkbOverlayRec),
|
||||
sizeof(XkbcOverlayRec),
|
||||
_XkbClearOverlay);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
XkbcFreeGeomKeys(XkbRowPtr row, int first, int count, Bool freeAll)
|
||||
XkbcFreeGeomKeys(XkbcRowPtr row, int first, int count, Bool freeAll)
|
||||
{
|
||||
_XkbFreeGeomLeafElems(freeAll, first, count,
|
||||
&row->num_keys, &row->sz_keys,
|
||||
(char **)&row->keys, sizeof(XkbKeyRec));
|
||||
(char **)&row->keys, sizeof(XkbcKeyRec));
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
_XkbClearRow(char *row_in)
|
||||
{
|
||||
XkbRowPtr row = (XkbRowPtr)row_in;
|
||||
XkbcRowPtr row = (XkbcRowPtr)row_in;
|
||||
|
||||
if (row->keys)
|
||||
XkbcFreeGeomKeys(row, 0, row->num_keys, True);
|
||||
}
|
||||
|
||||
void
|
||||
XkbcFreeGeomRows(XkbSectionPtr section, int first, int count, Bool freeAll)
|
||||
XkbcFreeGeomRows(XkbcSectionPtr section, int first, int count, Bool freeAll)
|
||||
{
|
||||
_XkbFreeGeomNonLeafElems(freeAll, first, count,
|
||||
§ion->num_rows, §ion->sz_rows,
|
||||
(char **)§ion->rows, sizeof(XkbRowRec),
|
||||
(char **)§ion->rows, sizeof(XkbcRowRec),
|
||||
_XkbClearRow);
|
||||
}
|
||||
|
||||
|
@ -290,7 +290,7 @@ XkbcFreeGeomRows(XkbSectionPtr section, int first, int count, Bool freeAll)
|
|||
static void
|
||||
_XkbClearSection(char *section_in)
|
||||
{
|
||||
XkbSectionPtr section = (XkbSectionPtr)section_in;
|
||||
XkbcSectionPtr section = (XkbcSectionPtr)section_in;
|
||||
|
||||
if (section->rows)
|
||||
XkbcFreeGeomRows(section, 0, section->num_rows, True);
|
||||
|
@ -301,11 +301,11 @@ _XkbClearSection(char *section_in)
|
|||
}
|
||||
|
||||
void
|
||||
XkbcFreeGeomSections(XkbGeometryPtr geom, int first, int count, Bool freeAll)
|
||||
XkbcFreeGeomSections(XkbcGeometryPtr geom, int first, int count, Bool freeAll)
|
||||
{
|
||||
_XkbFreeGeomNonLeafElems(freeAll, first, count,
|
||||
&geom->num_sections, &geom->sz_sections,
|
||||
(char **)&geom->sections, sizeof(XkbSectionRec),
|
||||
(char **)&geom->sections, sizeof(XkbcSectionRec),
|
||||
_XkbClearSection);
|
||||
}
|
||||
|
||||
|
@ -313,7 +313,7 @@ XkbcFreeGeomSections(XkbGeometryPtr geom, int first, int count, Bool freeAll)
|
|||
static void
|
||||
_XkbClearDoodad(char *doodad_in)
|
||||
{
|
||||
XkbDoodadPtr doodad = (XkbDoodadPtr)doodad_in;
|
||||
XkbcDoodadPtr doodad = (XkbcDoodadPtr)doodad_in;
|
||||
|
||||
switch (doodad->any.type) {
|
||||
case XkbTextDoodad:
|
||||
|
@ -337,10 +337,10 @@ _XkbClearDoodad(char *doodad_in)
|
|||
}
|
||||
|
||||
void
|
||||
XkbcFreeGeomDoodads(XkbDoodadPtr doodads, int nDoodads, Bool freeAll)
|
||||
XkbcFreeGeomDoodads(XkbcDoodadPtr doodads, int nDoodads, Bool freeAll)
|
||||
{
|
||||
int i;
|
||||
XkbDoodadPtr doodad;
|
||||
XkbcDoodadPtr doodad;
|
||||
|
||||
if (doodads) {
|
||||
for (i = 0, doodad = doodads; i < nDoodads; i++, doodad++)
|
||||
|
@ -351,7 +351,7 @@ XkbcFreeGeomDoodads(XkbDoodadPtr doodads, int nDoodads, Bool freeAll)
|
|||
}
|
||||
|
||||
void
|
||||
XkbcFreeGeometry(XkbGeometryPtr geom, unsigned which, Bool freeMap)
|
||||
XkbcFreeGeometry(XkbcGeometryPtr geom, unsigned which, Bool freeMap)
|
||||
{
|
||||
if (!geom)
|
||||
return;
|
||||
|
@ -424,23 +424,23 @@ _XkbGeomAlloc(char **old, unsigned short *num, unsigned short *total,
|
|||
#define _XkbAllocProps(g, n) _XkbGeomAlloc((char **)&(g)->properties, \
|
||||
&(g)->num_properties, \
|
||||
&(g)->sz_properties, \
|
||||
(n), sizeof(XkbPropertyRec))
|
||||
(n), sizeof(XkbcPropertyRec))
|
||||
#define _XkbAllocColors(g, n) _XkbGeomAlloc((char **)&(g)->colors, \
|
||||
&(g)->num_colors, \
|
||||
&(g)->sz_colors, \
|
||||
(n), sizeof(XkbColorRec))
|
||||
(n), sizeof(XkbcColorRec))
|
||||
#define _XkbAllocShapes(g, n) _XkbGeomAlloc((char **)&(g)->shapes, \
|
||||
&(g)->num_shapes, \
|
||||
&(g)->sz_shapes, \
|
||||
(n), sizeof(XkbShapeRec))
|
||||
(n), sizeof(XkbcShapeRec))
|
||||
#define _XkbAllocSections(g, n) _XkbGeomAlloc((char **)&(g)->sections, \
|
||||
&(g)->num_sections, \
|
||||
&(g)->sz_sections, \
|
||||
(n), sizeof(XkbSectionRec))
|
||||
(n), sizeof(XkbcSectionRec))
|
||||
#define _XkbAllocDoodads(g, n) _XkbGeomAlloc((char **)&(g)->doodads, \
|
||||
&(g)->num_doodads, \
|
||||
&(g)->sz_doodads, \
|
||||
(n), sizeof(XkbDoodadRec))
|
||||
(n), sizeof(XkbcDoodadRec))
|
||||
#define _XkbAllocKeyAliases(g, n) _XkbGeomAlloc((char **)&(g)->key_aliases, \
|
||||
&(g)->num_key_aliases, \
|
||||
&(g)->sz_key_aliases, \
|
||||
|
@ -449,112 +449,112 @@ _XkbGeomAlloc(char **old, unsigned short *num, unsigned short *total,
|
|||
#define _XkbAllocOutlines(s, n) _XkbGeomAlloc((char **)&(s)->outlines, \
|
||||
&(s)->num_outlines, \
|
||||
&(s)->sz_outlines, \
|
||||
(n), sizeof(XkbOutlineRec))
|
||||
(n), sizeof(XkbcOutlineRec))
|
||||
#define _XkbAllocRows(s, n) _XkbGeomAlloc((char **)&(s)->rows, \
|
||||
&(s)->num_rows, \
|
||||
&(s)->sz_rows, \
|
||||
(n), sizeof(XkbRowRec))
|
||||
(n), sizeof(XkbcRowRec))
|
||||
#define _XkbAllocPoints(o, n) _XkbGeomAlloc((char **)&(o)->points, \
|
||||
&(o)->num_points, \
|
||||
&(o)->sz_points, \
|
||||
(n), sizeof(XkbPointRec))
|
||||
(n), sizeof(XkbcPointRec))
|
||||
#define _XkbAllocKeys(r, n) _XkbGeomAlloc((char **)&(r)->keys, \
|
||||
&(r)->num_keys, \
|
||||
&(r)->sz_keys, \
|
||||
(n), sizeof(XkbKeyRec))
|
||||
(n), sizeof(XkbcKeyRec))
|
||||
#define _XkbAllocOverlays(s, n) _XkbGeomAlloc((char **)&(s)->overlays, \
|
||||
&(s)->num_overlays, \
|
||||
&(s)->sz_overlays, \
|
||||
(n), sizeof(XkbOverlayRec))
|
||||
(n), sizeof(XkbcOverlayRec))
|
||||
#define _XkbAllocOverlayRows(o, n) _XkbGeomAlloc((char **)&(o)->rows, \
|
||||
&(o)->num_rows, \
|
||||
&(o)->sz_rows, \
|
||||
(n), sizeof(XkbOverlayRowRec))
|
||||
(n), sizeof(XkbcOverlayRowRec))
|
||||
#define _XkbAllocOverlayKeys(r, n) _XkbGeomAlloc((char **)&(r)->keys, \
|
||||
&(r)->num_keys, \
|
||||
&(r)->sz_keys, \
|
||||
(n), sizeof(XkbOverlayKeyRec))
|
||||
(n), sizeof(XkbcOverlayKeyRec))
|
||||
|
||||
int
|
||||
XkbcAllocGeomProps(XkbGeometryPtr geom, int nProps)
|
||||
XkbcAllocGeomProps(XkbcGeometryPtr geom, int nProps)
|
||||
{
|
||||
return _XkbAllocProps(geom, nProps);
|
||||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeomColors(XkbGeometryPtr geom, int nColors)
|
||||
XkbcAllocGeomColors(XkbcGeometryPtr geom, int nColors)
|
||||
{
|
||||
return _XkbAllocColors(geom, nColors);
|
||||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeomKeyAliases(XkbGeometryPtr geom, int nKeyAliases)
|
||||
XkbcAllocGeomKeyAliases(XkbcGeometryPtr geom, int nKeyAliases)
|
||||
{
|
||||
return _XkbAllocKeyAliases(geom, nKeyAliases);
|
||||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeomShapes(XkbGeometryPtr geom, int nShapes)
|
||||
XkbcAllocGeomShapes(XkbcGeometryPtr geom, int nShapes)
|
||||
{
|
||||
return _XkbAllocShapes(geom, nShapes);
|
||||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeomSections(XkbGeometryPtr geom, int nSections)
|
||||
XkbcAllocGeomSections(XkbcGeometryPtr geom, int nSections)
|
||||
{
|
||||
return _XkbAllocSections(geom, nSections);
|
||||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeomOverlays(XkbSectionPtr section, int nOverlays)
|
||||
XkbcAllocGeomOverlays(XkbcSectionPtr section, int nOverlays)
|
||||
{
|
||||
return _XkbAllocOverlays(section, nOverlays);
|
||||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeomOverlayRows(XkbOverlayPtr overlay, int nRows)
|
||||
XkbcAllocGeomOverlayRows(XkbcOverlayPtr overlay, int nRows)
|
||||
{
|
||||
return _XkbAllocOverlayRows(overlay, nRows);
|
||||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeomOverlayKeys(XkbOverlayRowPtr row, int nKeys)
|
||||
XkbcAllocGeomOverlayKeys(XkbcOverlayRowPtr row, int nKeys)
|
||||
{
|
||||
return _XkbAllocOverlayKeys(row, nKeys);
|
||||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeomDoodads(XkbGeometryPtr geom, int nDoodads)
|
||||
XkbcAllocGeomDoodads(XkbcGeometryPtr geom, int nDoodads)
|
||||
{
|
||||
return _XkbAllocDoodads(geom, nDoodads);
|
||||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeomSectionDoodads(XkbSectionPtr section, int nDoodads)
|
||||
XkbcAllocGeomSectionDoodads(XkbcSectionPtr section, int nDoodads)
|
||||
{
|
||||
return _XkbAllocDoodads(section, nDoodads);
|
||||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeomOutlines(XkbShapePtr shape, int nOL)
|
||||
XkbcAllocGeomOutlines(XkbcShapePtr shape, int nOL)
|
||||
{
|
||||
return _XkbAllocOutlines(shape, nOL);
|
||||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeomRows(XkbSectionPtr section, int nRows)
|
||||
XkbcAllocGeomRows(XkbcSectionPtr section, int nRows)
|
||||
{
|
||||
return _XkbAllocRows(section, nRows);
|
||||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeomPoints(XkbOutlinePtr ol, int nPts)
|
||||
XkbcAllocGeomPoints(XkbcOutlinePtr ol, int nPts)
|
||||
{
|
||||
return _XkbAllocPoints(ol, nPts);
|
||||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeomKeys(XkbRowPtr row, int nKeys)
|
||||
XkbcAllocGeomKeys(XkbcRowPtr row, int nKeys)
|
||||
{
|
||||
int ret = _XkbAllocKeys(row, nKeys);
|
||||
fprintf(stderr, "!!! allocated %d keys at %p\n", nKeys, row->keys);
|
||||
|
@ -562,13 +562,13 @@ XkbcAllocGeomKeys(XkbRowPtr row, int nKeys)
|
|||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeometry(XkbcDescPtr xkb, XkbGeometrySizesPtr sizes)
|
||||
XkbcAllocGeometry(XkbcDescPtr xkb, XkbcGeometrySizesPtr sizes)
|
||||
{
|
||||
XkbGeometryPtr geom;
|
||||
XkbcGeometryPtr geom;
|
||||
int rtrn;
|
||||
|
||||
if (!xkb->geom) {
|
||||
xkb->geom = _XkbTypedCalloc(1, XkbGeometryRec);
|
||||
xkb->geom = _XkbTypedCalloc(1, XkbcGeometryRec);
|
||||
if (!xkb->geom)
|
||||
return BadAlloc;
|
||||
}
|
||||
|
@ -605,11 +605,11 @@ bail:
|
|||
return rtrn;
|
||||
}
|
||||
|
||||
XkbPropertyPtr
|
||||
XkbcAddGeomProperty(XkbGeometryPtr geom,char *name,char *value)
|
||||
XkbcPropertyPtr
|
||||
XkbcAddGeomProperty(XkbcGeometryPtr geom,char *name,char *value)
|
||||
{
|
||||
register int i;
|
||||
register XkbPropertyPtr prop;
|
||||
register XkbcPropertyPtr prop;
|
||||
|
||||
if ((!geom)||(!name)||(!value))
|
||||
return NULL;
|
||||
|
@ -644,7 +644,7 @@ register XkbPropertyPtr prop;
|
|||
}
|
||||
|
||||
XkbKeyAliasPtr
|
||||
XkbcAddGeomKeyAlias(XkbGeometryPtr geom,char *aliasStr,char *realStr)
|
||||
XkbcAddGeomKeyAlias(XkbcGeometryPtr geom,char *aliasStr,char *realStr)
|
||||
{
|
||||
register int i;
|
||||
register XkbKeyAliasPtr alias;
|
||||
|
@ -670,11 +670,11 @@ register XkbKeyAliasPtr alias;
|
|||
return alias;
|
||||
}
|
||||
|
||||
XkbColorPtr
|
||||
XkbcAddGeomColor(XkbGeometryPtr geom,char *spec,unsigned int pixel)
|
||||
XkbcColorPtr
|
||||
XkbcAddGeomColor(XkbcGeometryPtr geom,char *spec,unsigned int pixel)
|
||||
{
|
||||
register int i;
|
||||
register XkbColorPtr color;
|
||||
register XkbcColorPtr color;
|
||||
|
||||
if ((!geom)||(!spec))
|
||||
return NULL;
|
||||
|
@ -698,10 +698,10 @@ register XkbColorPtr color;
|
|||
return color;
|
||||
}
|
||||
|
||||
XkbOutlinePtr
|
||||
XkbcAddGeomOutline(XkbShapePtr shape,int sz_points)
|
||||
XkbcOutlinePtr
|
||||
XkbcAddGeomOutline(XkbcShapePtr shape,int sz_points)
|
||||
{
|
||||
XkbOutlinePtr outline;
|
||||
XkbcOutlinePtr outline;
|
||||
|
||||
if ((!shape)||(sz_points<0))
|
||||
return NULL;
|
||||
|
@ -710,17 +710,17 @@ XkbOutlinePtr outline;
|
|||
return NULL;
|
||||
}
|
||||
outline= &shape->outlines[shape->num_outlines];
|
||||
bzero(outline,sizeof(XkbOutlineRec));
|
||||
bzero(outline,sizeof(XkbcOutlineRec));
|
||||
if ((sz_points>0)&&(_XkbAllocPoints(outline,sz_points)!=Success))
|
||||
return NULL;
|
||||
shape->num_outlines++;
|
||||
return outline;
|
||||
}
|
||||
|
||||
XkbShapePtr
|
||||
XkbcAddGeomShape(XkbGeometryPtr geom,Atom name,int sz_outlines)
|
||||
XkbcShapePtr
|
||||
XkbcAddGeomShape(XkbcGeometryPtr geom,CARD32 name,int sz_outlines)
|
||||
{
|
||||
XkbShapePtr shape;
|
||||
XkbcShapePtr shape;
|
||||
register int i;
|
||||
|
||||
if ((!geom)||(!name)||(sz_outlines<0))
|
||||
|
@ -735,7 +735,7 @@ register int i;
|
|||
(_XkbAllocShapes(geom,1)!=Success))
|
||||
return NULL;
|
||||
shape= &geom->shapes[geom->num_shapes];
|
||||
bzero(shape,sizeof(XkbShapeRec));
|
||||
bzero(shape,sizeof(XkbcShapeRec));
|
||||
if ((sz_outlines>0)&&(_XkbAllocOutlines(shape,sz_outlines)!=Success))
|
||||
return NULL;
|
||||
shape->name= name;
|
||||
|
@ -744,23 +744,23 @@ register int i;
|
|||
return shape;
|
||||
}
|
||||
|
||||
XkbKeyPtr
|
||||
XkbcAddGeomKey(XkbRowPtr row)
|
||||
XkbcKeyPtr
|
||||
XkbcAddGeomKey(XkbcRowPtr row)
|
||||
{
|
||||
XkbKeyPtr key;
|
||||
XkbcKeyPtr key;
|
||||
if (!row)
|
||||
return NULL;
|
||||
if ((row->num_keys>=row->sz_keys)&&(_XkbAllocKeys(row,1)!=Success))
|
||||
return NULL;
|
||||
key= &row->keys[row->num_keys++];
|
||||
bzero(key,sizeof(XkbKeyRec));
|
||||
bzero(key,sizeof(XkbcKeyRec));
|
||||
return key;
|
||||
}
|
||||
|
||||
XkbRowPtr
|
||||
XkbcAddGeomRow(XkbSectionPtr section,int sz_keys)
|
||||
XkbcRowPtr
|
||||
XkbcAddGeomRow(XkbcSectionPtr section,int sz_keys)
|
||||
{
|
||||
XkbRowPtr row;
|
||||
XkbcRowPtr row;
|
||||
|
||||
if ((!section)||(sz_keys<0))
|
||||
return NULL;
|
||||
|
@ -768,22 +768,22 @@ XkbRowPtr row;
|
|||
(_XkbAllocRows(section,1)!=Success))
|
||||
return NULL;
|
||||
row= §ion->rows[section->num_rows];
|
||||
bzero(row,sizeof(XkbRowRec));
|
||||
bzero(row,sizeof(XkbcRowRec));
|
||||
if ((sz_keys>0)&&(_XkbAllocKeys(row,sz_keys)!=Success))
|
||||
return NULL;
|
||||
section->num_rows++;
|
||||
return row;
|
||||
}
|
||||
|
||||
XkbSectionPtr
|
||||
XkbcAddGeomSection( XkbGeometryPtr geom,
|
||||
Atom name,
|
||||
XkbcSectionPtr
|
||||
XkbcAddGeomSection( XkbcGeometryPtr geom,
|
||||
CARD32 name,
|
||||
int sz_rows,
|
||||
int sz_doodads,
|
||||
int sz_over)
|
||||
{
|
||||
register int i;
|
||||
XkbSectionPtr section;
|
||||
XkbcSectionPtr section;
|
||||
|
||||
if ((!geom)||(name==None)||(sz_rows<0))
|
||||
return NULL;
|
||||
|
@ -815,10 +815,10 @@ XkbSectionPtr section;
|
|||
return section;
|
||||
}
|
||||
|
||||
XkbDoodadPtr
|
||||
XkbcAddGeomDoodad(XkbGeometryPtr geom,XkbSectionPtr section,Atom name)
|
||||
XkbcDoodadPtr
|
||||
XkbcAddGeomDoodad(XkbcGeometryPtr geom,XkbcSectionPtr section,CARD32 name)
|
||||
{
|
||||
XkbDoodadPtr old,doodad;
|
||||
XkbcDoodadPtr old,doodad;
|
||||
register int i,nDoodads;
|
||||
|
||||
if ((!geom)||(name==None))
|
||||
|
@ -848,21 +848,21 @@ register int i,nDoodads;
|
|||
return NULL;
|
||||
doodad= &geom->doodads[geom->num_doodads++];
|
||||
}
|
||||
bzero(doodad,sizeof(XkbDoodadRec));
|
||||
bzero(doodad,sizeof(XkbcDoodadRec));
|
||||
doodad->any.name= name;
|
||||
return doodad;
|
||||
}
|
||||
|
||||
XkbOverlayKeyPtr
|
||||
XkbcAddGeomOverlayKey( XkbOverlayPtr overlay,
|
||||
XkbOverlayRowPtr row,
|
||||
XkbcOverlayKeyPtr
|
||||
XkbcAddGeomOverlayKey( XkbcOverlayPtr overlay,
|
||||
XkbcOverlayRowPtr row,
|
||||
char * over,
|
||||
char * under)
|
||||
{
|
||||
register int i;
|
||||
XkbOverlayKeyPtr key;
|
||||
XkbSectionPtr section;
|
||||
XkbRowPtr row_under;
|
||||
XkbcOverlayKeyPtr key;
|
||||
XkbcSectionPtr section;
|
||||
XkbcRowPtr row_under;
|
||||
Bool found;
|
||||
|
||||
if ((!overlay)||(!row)||(!over)||(!under))
|
||||
|
@ -888,11 +888,11 @@ Bool found;
|
|||
return key;
|
||||
}
|
||||
|
||||
XkbOverlayRowPtr
|
||||
XkbcAddGeomOverlayRow(XkbOverlayPtr overlay,int row_under,int sz_keys)
|
||||
XkbcOverlayRowPtr
|
||||
XkbcAddGeomOverlayRow(XkbcOverlayPtr overlay,int row_under,int sz_keys)
|
||||
{
|
||||
register int i;
|
||||
XkbOverlayRowPtr row;
|
||||
XkbcOverlayRowPtr row;
|
||||
|
||||
if ((!overlay)||(sz_keys<0))
|
||||
return NULL;
|
||||
|
@ -912,7 +912,7 @@ XkbOverlayRowPtr row;
|
|||
(_XkbAllocOverlayRows(overlay,1)!=Success))
|
||||
return NULL;
|
||||
row= &overlay->rows[overlay->num_rows];
|
||||
bzero(row,sizeof(XkbOverlayRowRec));
|
||||
bzero(row,sizeof(XkbcOverlayRowRec));
|
||||
if ((sz_keys>0)&&(_XkbAllocOverlayKeys(row,sz_keys)!=Success))
|
||||
return NULL;
|
||||
row->row_under= row_under;
|
||||
|
@ -920,11 +920,11 @@ XkbOverlayRowPtr row;
|
|||
return row;
|
||||
}
|
||||
|
||||
XkbOverlayPtr
|
||||
XkbcAddGeomOverlay(XkbSectionPtr section,Atom name,int sz_rows)
|
||||
XkbcOverlayPtr
|
||||
XkbcAddGeomOverlay(XkbcSectionPtr section,CARD32 name,int sz_rows)
|
||||
{
|
||||
register int i;
|
||||
XkbOverlayPtr overlay;
|
||||
XkbcOverlayPtr overlay;
|
||||
|
||||
if ((!section)||(name==None)||(sz_rows==0))
|
||||
return NULL;
|
||||
|
|
36
src/geom.c
36
src/geom.c
|
@ -40,7 +40,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#endif
|
||||
|
||||
static void
|
||||
_XkbCheckBounds(XkbBoundsPtr bounds, int x, int y)
|
||||
_XkbCheckBounds(XkbcBoundsPtr bounds, int x, int y)
|
||||
{
|
||||
if (x < bounds->x1)
|
||||
bounds->x1 = x;
|
||||
|
@ -53,11 +53,11 @@ _XkbCheckBounds(XkbBoundsPtr bounds, int x, int y)
|
|||
}
|
||||
|
||||
Bool
|
||||
XkbcComputeShapeBounds(XkbShapePtr shape)
|
||||
XkbcComputeShapeBounds(XkbcShapePtr shape)
|
||||
{
|
||||
int o, p;
|
||||
XkbOutlinePtr outline;
|
||||
XkbPointPtr pt;
|
||||
XkbcOutlinePtr outline;
|
||||
XkbcPointPtr pt;
|
||||
|
||||
if ((!shape) || (shape->num_outlines < 1))
|
||||
return False;
|
||||
|
@ -77,11 +77,11 @@ XkbcComputeShapeBounds(XkbShapePtr shape)
|
|||
}
|
||||
|
||||
Bool
|
||||
XkbcComputeShapeTop(XkbShapePtr shape, XkbBoundsPtr bounds)
|
||||
XkbcComputeShapeTop(XkbcShapePtr shape, XkbcBoundsPtr bounds)
|
||||
{
|
||||
int p;
|
||||
XkbOutlinePtr outline;
|
||||
XkbPointPtr pt;
|
||||
XkbcOutlinePtr outline;
|
||||
XkbcPointPtr pt;
|
||||
|
||||
if ((!shape) || (shape->num_outlines < 1))
|
||||
return False;
|
||||
|
@ -107,18 +107,18 @@ XkbcComputeShapeTop(XkbShapePtr shape, XkbBoundsPtr bounds)
|
|||
}
|
||||
|
||||
Bool
|
||||
XkbcComputeRowBounds(XkbGeometryPtr geom, XkbSectionPtr section, XkbRowPtr row)
|
||||
XkbcComputeRowBounds(XkbcGeometryPtr geom, XkbcSectionPtr section, XkbcRowPtr row)
|
||||
{
|
||||
int k, pos;
|
||||
XkbKeyPtr key;
|
||||
XkbBoundsPtr bounds, sbounds;
|
||||
XkbcKeyPtr key;
|
||||
XkbcBoundsPtr bounds, sbounds;
|
||||
|
||||
if (!geom || !section || !row)
|
||||
return False;
|
||||
|
||||
pos = 0;
|
||||
bounds = &row->bounds;
|
||||
bzero(bounds, sizeof(XkbBoundsRec));
|
||||
bzero(bounds, sizeof(XkbcBoundsRec));
|
||||
|
||||
for (key = row->keys, pos = k = 0; k < row->num_keys; k++, key++) {
|
||||
sbounds = &XkbKeyShape(geom, key)->bounds;
|
||||
|
@ -148,19 +148,19 @@ XkbcComputeRowBounds(XkbGeometryPtr geom, XkbSectionPtr section, XkbRowPtr row)
|
|||
}
|
||||
|
||||
Bool
|
||||
XkbcComputeSectionBounds(XkbGeometryPtr geom, XkbSectionPtr section)
|
||||
XkbcComputeSectionBounds(XkbcGeometryPtr geom, XkbcSectionPtr section)
|
||||
{
|
||||
int i;
|
||||
XkbShapePtr shape;
|
||||
XkbRowPtr row;
|
||||
XkbDoodadPtr doodad;
|
||||
XkbBoundsPtr bounds, rbounds = NULL;
|
||||
XkbcShapePtr shape;
|
||||
XkbcRowPtr row;
|
||||
XkbcDoodadPtr doodad;
|
||||
XkbcBoundsPtr bounds, rbounds = NULL;
|
||||
|
||||
if (!geom || !section)
|
||||
return False;
|
||||
|
||||
bounds = §ion->bounds;
|
||||
bzero(bounds, sizeof(XkbBoundsRec));
|
||||
bzero(bounds, sizeof(XkbcBoundsRec));
|
||||
|
||||
for (i = 0, row = section->rows; i < section->num_rows; i++, row++) {
|
||||
if (!XkbcComputeRowBounds(geom, section, row))
|
||||
|
@ -175,7 +175,7 @@ XkbcComputeSectionBounds(XkbGeometryPtr geom, XkbSectionPtr section)
|
|||
for (i = 0, doodad = section->doodads; i < section->num_doodads;
|
||||
i++, doodad++)
|
||||
{
|
||||
static XkbBoundsRec tbounds;
|
||||
static XkbcBoundsRec tbounds;
|
||||
|
||||
switch (doodad->any.type) {
|
||||
case XkbOutlineDoodad:
|
||||
|
|
16
src/malloc.c
16
src/malloc.c
|
@ -59,7 +59,7 @@ XkbcAllocClientMap(XkbcDescPtr xkb, unsigned which, unsigned nTotalTypes)
|
|||
|
||||
if ((which & XkbKeyTypesMask) && (nTotalTypes > 0)) {
|
||||
if (!map->types) {
|
||||
map->types = _XkbTypedCalloc(nTotalTypes, XkbKeyTypeRec);
|
||||
map->types = _XkbTypedCalloc(nTotalTypes, XkbcKeyTypeRec);
|
||||
if (!map->types)
|
||||
return BadAlloc;
|
||||
|
||||
|
@ -67,10 +67,10 @@ XkbcAllocClientMap(XkbcDescPtr xkb, unsigned which, unsigned nTotalTypes)
|
|||
map->size_types = nTotalTypes;
|
||||
}
|
||||
else if (map->size_types < nTotalTypes) {
|
||||
XkbKeyTypeRec *prev_types = map->types;
|
||||
XkbcKeyTypeRec *prev_types = map->types;
|
||||
|
||||
map->types = _XkbTypedRealloc(map->types, nTotalTypes,
|
||||
XkbKeyTypeRec);
|
||||
XkbcKeyTypeRec);
|
||||
if (!map->types) {
|
||||
_XkbFree(prev_types);
|
||||
map->num_types = map->size_types = 0;
|
||||
|
@ -79,7 +79,7 @@ XkbcAllocClientMap(XkbcDescPtr xkb, unsigned which, unsigned nTotalTypes)
|
|||
|
||||
map->size_types = nTotalTypes;
|
||||
bzero(&map->types[map->num_types],
|
||||
(map->size_types - map->num_types) * sizeof(XkbKeyTypeRec));
|
||||
(map->size_types - map->num_types) * sizeof(XkbcKeyTypeRec));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -231,7 +231,7 @@ XkbcAllocServerMap(XkbcDescPtr xkb, unsigned which, unsigned nNewActions)
|
|||
}
|
||||
|
||||
int
|
||||
XkbcCopyKeyType(XkbKeyTypePtr from, XkbKeyTypePtr into)
|
||||
XkbcCopyKeyType(XkbcKeyTypePtr from, XkbcKeyTypePtr into)
|
||||
{
|
||||
if (!from || !into)
|
||||
return BadMatch;
|
||||
|
@ -279,7 +279,7 @@ XkbcCopyKeyType(XkbKeyTypePtr from, XkbKeyTypePtr into)
|
|||
}
|
||||
|
||||
int
|
||||
XkbcCopyKeyTypes(XkbKeyTypePtr from, XkbKeyTypePtr into, int num_types)
|
||||
XkbcCopyKeyTypes(XkbcKeyTypePtr from, XkbcKeyTypePtr into, int num_types)
|
||||
{
|
||||
int i, rtrn;
|
||||
|
||||
|
@ -298,7 +298,7 @@ int
|
|||
XkbcResizeKeyType(XkbcDescPtr xkb, int type_ndx, int map_count,
|
||||
Bool want_preserve, int new_num_lvls)
|
||||
{
|
||||
XkbKeyTypePtr type;
|
||||
XkbcKeyTypePtr type;
|
||||
KeyCode matchingKeys[XkbMaxKeyCount], nMatchingKeys;
|
||||
|
||||
if ((type_ndx < 0) || (type_ndx >= xkb->map->num_types) ||
|
||||
|
@ -891,7 +891,7 @@ XkbcFreeClientMap(XkbcDescPtr xkb, unsigned what, Bool freeMap)
|
|||
if (map->types) {
|
||||
if (map->num_types > 0) {
|
||||
int i;
|
||||
XkbKeyTypePtr type;
|
||||
XkbcKeyTypePtr type;
|
||||
|
||||
for (i = 0, type = map->types; i < map->num_types; i++, type++) {
|
||||
if (type->map) {
|
||||
|
|
|
@ -56,7 +56,7 @@ static XkbKTMapEntryRec mapKeypad[]= {
|
|||
{ False, 0, { 1, 0, NL_VMOD_MASK } }
|
||||
};
|
||||
|
||||
static XkbKeyTypeRec canonicalTypes[XkbNumRequiredTypes] = {
|
||||
static XkbcKeyTypeRec canonicalTypes[XkbNumRequiredTypes] = {
|
||||
{ { 0, 0, 0 },
|
||||
1, /* num_levels */
|
||||
0, /* map_count */
|
||||
|
@ -87,7 +87,7 @@ int
|
|||
XkbcInitCanonicalKeyTypes(XkbcDescPtr xkb, unsigned which, int keypadVMod)
|
||||
{
|
||||
XkbcClientMapPtr map;
|
||||
XkbKeyTypePtr from,to;
|
||||
XkbcKeyTypePtr from,to;
|
||||
int rtrn;
|
||||
|
||||
if (!xkb)
|
||||
|
@ -116,7 +116,7 @@ XkbcInitCanonicalKeyTypes(XkbcDescPtr xkb, unsigned which, int keypadVMod)
|
|||
&to[XkbAlphabeticIndex]);
|
||||
|
||||
if ((which & XkbKeypadMask) && (rtrn == Success)) {
|
||||
XkbKeyTypePtr type;
|
||||
XkbcKeyTypePtr type;
|
||||
|
||||
rtrn = XkbcCopyKeyType(&from[XkbKeypadIndex], &to[XkbKeypadIndex]);
|
||||
type = &to[XkbKeypadIndex];
|
||||
|
|
|
@ -98,7 +98,7 @@ XkbcCanonicaliseComponents(XkbComponentNamesPtr names,
|
|||
}
|
||||
|
||||
Bool
|
||||
XkbcComputeEffectiveMap(XkbcDescPtr xkb, XkbKeyTypePtr type,
|
||||
XkbcComputeEffectiveMap(XkbcDescPtr xkb, XkbcKeyTypePtr type,
|
||||
unsigned char *map_rtrn)
|
||||
{
|
||||
int i;
|
||||
|
|
|
@ -73,10 +73,10 @@ extern int
|
|||
XkbcAllocServerMap(XkbcDescPtr xkb, unsigned which, unsigned nNewActions);
|
||||
|
||||
extern int
|
||||
XkbcCopyKeyType(XkbKeyTypePtr from, XkbKeyTypePtr into);
|
||||
XkbcCopyKeyType(XkbcKeyTypePtr from, XkbcKeyTypePtr into);
|
||||
|
||||
extern int
|
||||
XkbcCopyKeyTypes(XkbKeyTypePtr from, XkbKeyTypePtr into, int num_types);
|
||||
XkbcCopyKeyTypes(XkbcKeyTypePtr from, XkbcKeyTypePtr into, int num_types);
|
||||
|
||||
extern int
|
||||
XkbcResizeKeyType(XkbcDescPtr xkb, int type_ndx, int map_count,
|
||||
|
|
|
@ -32,8 +32,6 @@
|
|||
#include "alias.h"
|
||||
#include "keycodes.h"
|
||||
|
||||
#include <X11/extensions/XKBgeomcommon.h>
|
||||
|
||||
static void
|
||||
HandleCollision(AliasInfo * old, AliasInfo * new)
|
||||
{
|
||||
|
@ -237,8 +235,8 @@ ApplyAliases(XkbcDescPtr xkb, Bool toGeom, AliasInfo ** info_in)
|
|||
{
|
||||
if (!xkb->geom)
|
||||
{
|
||||
XkbGeometrySizesRec sizes;
|
||||
bzero((char *) &sizes, sizeof(XkbGeometrySizesRec));
|
||||
XkbcGeometrySizesRec sizes;
|
||||
bzero((char *) &sizes, sizeof(XkbcGeometrySizesRec));
|
||||
sizes.which = XkbGeomKeyAliasesMask;
|
||||
sizes.num_key_aliases = nOld + nNew;
|
||||
status = XkbcAllocGeometry(xkb, &sizes);
|
||||
|
|
|
@ -156,7 +156,7 @@ ExprResolveLhs(ExprDef * expr,
|
|||
|
||||
Bool
|
||||
SimpleLookup(char * priv,
|
||||
Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
|
||||
CARD32 elem, CARD32 field, unsigned type, ExprResult * val_rtrn)
|
||||
{
|
||||
LookupEntry *entry;
|
||||
register char *str;
|
||||
|
@ -184,7 +184,7 @@ SimpleLookup(char * priv,
|
|||
|
||||
Bool
|
||||
RadioLookup(char * priv,
|
||||
Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
|
||||
CARD32 elem, CARD32 field, unsigned type, ExprResult * val_rtrn)
|
||||
{
|
||||
register char *str;
|
||||
int rg;
|
||||
|
@ -212,7 +212,7 @@ RadioLookup(char * priv,
|
|||
|
||||
int
|
||||
TableLookup(char * priv,
|
||||
Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
|
||||
CARD32 elem, CARD32 field, unsigned type, ExprResult * val_rtrn)
|
||||
{
|
||||
LookupTable *tbl = (LookupTable *) priv;
|
||||
register char *str;
|
||||
|
@ -233,7 +233,7 @@ TableLookup(char * priv,
|
|||
if (tbl == NULL) /* didn't find a matching element */
|
||||
return False;
|
||||
priv = (char *) tbl->entries;
|
||||
return SimpleLookup(priv, (Atom) None, field, type, val_rtrn);
|
||||
return SimpleLookup(priv, (CARD32) None, field, type, val_rtrn);
|
||||
}
|
||||
|
||||
static LookupEntry modIndexNames[] = {
|
||||
|
@ -251,7 +251,7 @@ static LookupEntry modIndexNames[] = {
|
|||
|
||||
int
|
||||
LookupModIndex(char * priv,
|
||||
Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
|
||||
CARD32 elem, CARD32 field, unsigned type, ExprResult * val_rtrn)
|
||||
{
|
||||
return SimpleLookup((char *) modIndexNames, elem, field, type,
|
||||
val_rtrn);
|
||||
|
@ -259,7 +259,7 @@ LookupModIndex(char * priv,
|
|||
|
||||
int
|
||||
LookupModMask(char * priv,
|
||||
Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
|
||||
CARD32 elem, CARD32 field, unsigned type, ExprResult * val_rtrn)
|
||||
{
|
||||
char *str;
|
||||
Bool ret = True;
|
||||
|
@ -317,7 +317,7 @@ ExprResolveModIndex(ExprDef * expr,
|
|||
val_rtrn->ival = expr->value.ival;
|
||||
return True;
|
||||
case ExprIdent:
|
||||
if (LookupModIndex(lookupPriv, (Atom) None, expr->value.str,
|
||||
if (LookupModIndex(lookupPriv, (CARD32) None, expr->value.str,
|
||||
(unsigned) TypeInt, val_rtrn))
|
||||
{
|
||||
return True;
|
||||
|
@ -915,7 +915,7 @@ ExprResolveEnum(ExprDef * expr, ExprResult * val_rtrn, LookupEntry * values)
|
|||
exprOpText(expr->op));
|
||||
return False;
|
||||
}
|
||||
if (!SimpleLookup((char *) values, (Atom) None, expr->value.str,
|
||||
if (!SimpleLookup((char *) values, (CARD32) None, expr->value.str,
|
||||
(unsigned) TypeInt, val_rtrn))
|
||||
{
|
||||
int nOut = 0;
|
||||
|
|
|
@ -36,8 +36,8 @@ typedef union _ExprResult
|
|||
} ExprResult;
|
||||
|
||||
typedef Bool(*IdentLookupFunc) (char * /* priv */ ,
|
||||
Atom /* elem */ ,
|
||||
Atom /* field */ ,
|
||||
CARD32 /* elem */ ,
|
||||
CARD32 /* field */ ,
|
||||
unsigned /* type */ ,
|
||||
ExprResult * /* val_rtrn */
|
||||
);
|
||||
|
@ -76,36 +76,36 @@ extern char *exprOpText(unsigned /* type */
|
|||
);
|
||||
|
||||
extern int RadioLookup(char * /* priv */ ,
|
||||
Atom /* elem */ ,
|
||||
Atom /* field */ ,
|
||||
CARD32 /* elem */ ,
|
||||
CARD32 /* field */ ,
|
||||
unsigned /* type */ ,
|
||||
ExprResult * /* val_rtrn */
|
||||
);
|
||||
|
||||
extern int SimpleLookup(char * /* priv */ ,
|
||||
Atom /* elem */ ,
|
||||
Atom /* field */ ,
|
||||
CARD32 /* elem */ ,
|
||||
CARD32 /* field */ ,
|
||||
unsigned /* type */ ,
|
||||
ExprResult * /* val_rtrn */
|
||||
);
|
||||
|
||||
extern int TableLookup(char * /* priv */ ,
|
||||
Atom /* elem */ ,
|
||||
Atom /* field */ ,
|
||||
CARD32 /* elem */ ,
|
||||
CARD32 /* field */ ,
|
||||
unsigned /* type */ ,
|
||||
ExprResult * /* val_rtrn */
|
||||
);
|
||||
|
||||
extern int LookupModIndex(char * /* priv */ ,
|
||||
Atom /* elem */ ,
|
||||
Atom /* field */ ,
|
||||
CARD32 /* elem */ ,
|
||||
CARD32 /* field */ ,
|
||||
unsigned /* type */ ,
|
||||
ExprResult * /* val_rtrn */
|
||||
);
|
||||
|
||||
extern int LookupModMask(char * /* priv */ ,
|
||||
Atom /* elem */ ,
|
||||
Atom /* field */ ,
|
||||
CARD32 /* elem */ ,
|
||||
CARD32 /* field */ ,
|
||||
unsigned /* type */ ,
|
||||
ExprResult * /* val_rtrn */
|
||||
);
|
||||
|
|
|
@ -37,8 +37,6 @@
|
|||
#include "keycodes.h"
|
||||
#include "alias.h"
|
||||
|
||||
#include <X11/extensions/XKBgeomcommon.h>
|
||||
|
||||
#define DFLT_FONT "helvetica"
|
||||
#define DFLT_SLANT "r"
|
||||
#define DFLT_WEIGHT "medium"
|
||||
|
@ -60,13 +58,13 @@ typedef struct _PropertyInfo
|
|||
typedef struct _ShapeInfo
|
||||
{
|
||||
CommonInfo defs;
|
||||
Atom name;
|
||||
CARD32 name;
|
||||
short index;
|
||||
unsigned short nOutlines;
|
||||
unsigned short szOutlines;
|
||||
XkbOutlinePtr outlines;
|
||||
XkbOutlinePtr approx;
|
||||
XkbOutlinePtr primary;
|
||||
XkbcOutlinePtr outlines;
|
||||
XkbcOutlinePtr approx;
|
||||
XkbcOutlinePtr primary;
|
||||
int dfltCornerRadius;
|
||||
} ShapeInfo;
|
||||
|
||||
|
@ -99,7 +97,7 @@ typedef struct _ShapeInfo
|
|||
typedef struct _DoodadInfo
|
||||
{
|
||||
CommonInfo defs;
|
||||
Atom name;
|
||||
CARD32 name;
|
||||
unsigned char type;
|
||||
unsigned char priority;
|
||||
short top;
|
||||
|
@ -108,18 +106,18 @@ typedef struct _DoodadInfo
|
|||
unsigned short corner;
|
||||
unsigned short width;
|
||||
unsigned short height;
|
||||
Atom shape;
|
||||
Atom color;
|
||||
Atom offColor;
|
||||
Atom text;
|
||||
Atom font;
|
||||
Atom fontSlant;
|
||||
Atom fontWeight;
|
||||
Atom fontSetWidth;
|
||||
Atom fontVariant;
|
||||
CARD32 shape;
|
||||
CARD32 color;
|
||||
CARD32 offColor;
|
||||
CARD32 text;
|
||||
CARD32 font;
|
||||
CARD32 fontSlant;
|
||||
CARD32 fontWeight;
|
||||
CARD32 fontSetWidth;
|
||||
CARD32 fontVariant;
|
||||
unsigned short fontSize;
|
||||
Atom fontEncoding;
|
||||
Atom fontSpec;
|
||||
CARD32 fontEncoding;
|
||||
CARD32 fontSpec;
|
||||
char *logoName;
|
||||
struct _SectionInfo *section;
|
||||
} DoodadInfo;
|
||||
|
@ -139,8 +137,8 @@ typedef struct _KeyInfo
|
|||
char name[8];
|
||||
short gap;
|
||||
short index;
|
||||
Atom shape;
|
||||
Atom color;
|
||||
CARD32 shape;
|
||||
CARD32 color;
|
||||
struct _RowInfo *row;
|
||||
} KeyInfo;
|
||||
#define keyText(k) ((k)&&(k)->name[0]?(k)->name:"default")
|
||||
|
@ -177,7 +175,7 @@ typedef struct _OverlayKeyInfo
|
|||
typedef struct _OverlayInfo
|
||||
{
|
||||
CommonInfo defs;
|
||||
Atom name;
|
||||
CARD32 name;
|
||||
unsigned short nRows;
|
||||
unsigned short nKeys;
|
||||
OverlayKeyInfo *keys;
|
||||
|
@ -197,7 +195,7 @@ typedef struct _OverlayInfo
|
|||
typedef struct _SectionInfo
|
||||
{
|
||||
CommonInfo defs;
|
||||
Atom name;
|
||||
CARD32 name;
|
||||
unsigned short top;
|
||||
unsigned short left;
|
||||
unsigned short width;
|
||||
|
@ -235,16 +233,16 @@ typedef struct _GeometryInfo
|
|||
DoodadInfo *doodads;
|
||||
int widthMM;
|
||||
int heightMM;
|
||||
Atom font;
|
||||
Atom fontSlant;
|
||||
Atom fontWeight;
|
||||
Atom fontSetWidth;
|
||||
Atom fontVariant;
|
||||
CARD32 font;
|
||||
CARD32 fontSlant;
|
||||
CARD32 fontWeight;
|
||||
CARD32 fontSetWidth;
|
||||
CARD32 fontVariant;
|
||||
unsigned fontSize;
|
||||
Atom fontEncoding;
|
||||
Atom fontSpec;
|
||||
Atom baseColor;
|
||||
Atom labelColor;
|
||||
CARD32 fontEncoding;
|
||||
CARD32 fontSpec;
|
||||
CARD32 baseColor;
|
||||
CARD32 labelColor;
|
||||
int dfltCornerRadius;
|
||||
SectionInfo dfltSection;
|
||||
DoodadInfo *dfltDoodads;
|
||||
|
@ -430,7 +428,7 @@ FindDoodadByType(DoodadInfo * di, unsigned type)
|
|||
}
|
||||
|
||||
static DoodadInfo *
|
||||
FindDoodadByName(DoodadInfo * di, Atom name)
|
||||
FindDoodadByName(DoodadInfo * di, CARD32 name)
|
||||
{
|
||||
while (di)
|
||||
{
|
||||
|
@ -796,7 +794,7 @@ NextShape(GeometryInfo * info)
|
|||
}
|
||||
|
||||
static ShapeInfo *
|
||||
FindShape(GeometryInfo * info, Atom name, const char *type, const char *which)
|
||||
FindShape(GeometryInfo * info, CARD32 name, const char *type, const char *which)
|
||||
{
|
||||
ShapeInfo *old;
|
||||
|
||||
|
@ -1512,7 +1510,7 @@ SetTextDoodadField(DoodadInfo * di,
|
|||
char *typeName = "text doodad";
|
||||
union
|
||||
{
|
||||
Atom *str;
|
||||
CARD32 *str;
|
||||
short *ival;
|
||||
unsigned short *uval;
|
||||
} pField;
|
||||
|
@ -2120,7 +2118,7 @@ HandleGeometryVar(VarDef * stmt, XkbcDescPtr xkb, GeometryInfo * info)
|
|||
ExprResult elem, field, tmp;
|
||||
ExprDef *ndx;
|
||||
DoodadInfo *di;
|
||||
Atom *pField = NULL;
|
||||
CARD32 *pField = NULL;
|
||||
int ret;
|
||||
|
||||
if (ExprResolveLhs(stmt->name, &elem, &field, &ndx) == 0)
|
||||
|
@ -2400,7 +2398,7 @@ HandleShapeBody(ShapeDef * def, ShapeInfo * si, unsigned merge,
|
|||
{
|
||||
OutlineDef *ol;
|
||||
int nOut, nPt;
|
||||
XkbOutlinePtr outline;
|
||||
XkbcOutlinePtr outline;
|
||||
ExprDef *pt;
|
||||
|
||||
if (def->nOutlines < 1)
|
||||
|
@ -2410,7 +2408,7 @@ HandleShapeBody(ShapeDef * def, ShapeInfo * si, unsigned merge,
|
|||
return True;
|
||||
}
|
||||
si->nOutlines = def->nOutlines;
|
||||
si->outlines = uTypedCalloc(def->nOutlines, XkbOutlineRec);
|
||||
si->outlines = uTypedCalloc(def->nOutlines, XkbcOutlineRec);
|
||||
if (!si->outlines)
|
||||
{
|
||||
ERROR("Couldn't allocate outlines for \"%s\"\n", shText(si));
|
||||
|
@ -2430,7 +2428,7 @@ HandleShapeBody(ShapeDef * def, ShapeInfo * si, unsigned merge,
|
|||
outline = &si->outlines[nOut++];
|
||||
outline->num_points = ol->nPoints;
|
||||
outline->corner_radius = si->dfltCornerRadius;
|
||||
outline->points = uTypedCalloc(ol->nPoints, XkbPointRec);
|
||||
outline->points = uTypedCalloc(ol->nPoints, XkbcPointRec);
|
||||
if (!outline->points)
|
||||
{
|
||||
ERROR("Can't allocate points for \"%s\"\n", shText(si));
|
||||
|
@ -2925,12 +2923,12 @@ HandleGeometryFile(XkbFile * file,
|
|||
/***====================================================================***/
|
||||
|
||||
static Bool
|
||||
CopyShapeDef(XkbGeometryPtr geom, ShapeInfo * si)
|
||||
CopyShapeDef(XkbcGeometryPtr geom, ShapeInfo * si)
|
||||
{
|
||||
register int i, n;
|
||||
XkbShapePtr shape;
|
||||
XkbOutlinePtr old_outline, outline;
|
||||
Atom name;
|
||||
XkbcShapePtr shape;
|
||||
XkbcOutlinePtr old_outline, outline;
|
||||
CARD32 name;
|
||||
|
||||
si->index = geom->num_shapes;
|
||||
name = si->name;
|
||||
|
@ -2952,7 +2950,7 @@ CopyShapeDef(XkbGeometryPtr geom, ShapeInfo * si)
|
|||
return False;
|
||||
}
|
||||
n = old_outline->num_points;
|
||||
memcpy(outline->points, old_outline->points, n * sizeof(XkbPointRec));
|
||||
memcpy(outline->points, old_outline->points, n * sizeof(XkbcPointRec));
|
||||
outline->num_points = old_outline->num_points;
|
||||
outline->corner_radius = old_outline->corner_radius;
|
||||
}
|
||||
|
@ -3257,10 +3255,10 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
|
|||
#define FONT_TEMPLATE "-*-%s-%s-%s-%s-%s-*-%d-*-*-*-*-%s"
|
||||
|
||||
static char *
|
||||
FontFromParts(Atom fontTok,
|
||||
Atom weightTok,
|
||||
Atom slantTok,
|
||||
Atom setWidthTok, Atom varTok, int size, Atom encodingTok)
|
||||
FontFromParts(CARD32 fontTok,
|
||||
CARD32 weightTok,
|
||||
CARD32 slantTok,
|
||||
CARD32 setWidthTok, CARD32 varTok, int size, CARD32 encodingTok)
|
||||
{
|
||||
int totalSize;
|
||||
char *font, *weight, *slant, *setWidth, *variant, *encoding;
|
||||
|
@ -3287,13 +3285,13 @@ FontFromParts(Atom fontTok,
|
|||
}
|
||||
|
||||
static Bool
|
||||
CopyDoodadDef(XkbGeometryPtr geom,
|
||||
XkbSectionPtr section, DoodadInfo * di, GeometryInfo * info)
|
||||
CopyDoodadDef(XkbcGeometryPtr geom,
|
||||
XkbcSectionPtr section, DoodadInfo * di, GeometryInfo * info)
|
||||
{
|
||||
Atom name;
|
||||
XkbDoodadPtr doodad;
|
||||
XkbColorPtr color;
|
||||
XkbShapePtr shape;
|
||||
CARD32 name;
|
||||
XkbcDoodadPtr doodad;
|
||||
XkbcColorPtr color;
|
||||
XkbcShapePtr shape;
|
||||
ShapeInfo *si;
|
||||
|
||||
if (!VerifyDoodadInfo(di, info))
|
||||
|
@ -3375,15 +3373,15 @@ CopyDoodadDef(XkbGeometryPtr geom,
|
|||
/***====================================================================***/
|
||||
|
||||
static Bool
|
||||
VerifyOverlayInfo(XkbGeometryPtr geom,
|
||||
XkbSectionPtr section,
|
||||
VerifyOverlayInfo(XkbcGeometryPtr geom,
|
||||
XkbcSectionPtr section,
|
||||
OverlayInfo * oi,
|
||||
GeometryInfo * info, short rowMap[256], short rowSize[256])
|
||||
{
|
||||
register OverlayKeyInfo *ki, *next;
|
||||
unsigned long oKey, uKey, sKey;
|
||||
XkbRowPtr row;
|
||||
XkbKeyPtr key;
|
||||
XkbcRowPtr row;
|
||||
XkbcKeyPtr key;
|
||||
int r, k;
|
||||
|
||||
/* find out which row each key is in */
|
||||
|
@ -3472,13 +3470,13 @@ VerifyOverlayInfo(XkbGeometryPtr geom,
|
|||
}
|
||||
|
||||
static Bool
|
||||
CopyOverlayDef(XkbGeometryPtr geom,
|
||||
XkbSectionPtr section, OverlayInfo * oi, GeometryInfo * info)
|
||||
CopyOverlayDef(XkbcGeometryPtr geom,
|
||||
XkbcSectionPtr section, OverlayInfo * oi, GeometryInfo * info)
|
||||
{
|
||||
Atom name;
|
||||
XkbOverlayPtr ol;
|
||||
XkbOverlayRowPtr row;
|
||||
XkbOverlayKeyPtr key;
|
||||
CARD32 name;
|
||||
XkbcOverlayPtr ol;
|
||||
XkbcOverlayRowPtr row;
|
||||
XkbcOverlayKeyPtr key;
|
||||
OverlayKeyInfo *ki;
|
||||
short rowMap[256], rowSize[256];
|
||||
int i;
|
||||
|
@ -3514,7 +3512,7 @@ CopyOverlayDef(XkbGeometryPtr geom,
|
|||
{
|
||||
row = &ol->rows[ki->overlayRow];
|
||||
key = &row->keys[row->num_keys++];
|
||||
bzero(key, sizeof(XkbOverlayKeyRec));
|
||||
bzero(key, sizeof(XkbcOverlayKeyRec));
|
||||
strncpy(key->over.name, ki->over, XkbKeyNameLength);
|
||||
strncpy(key->under.name, ki->under, XkbKeyNameLength);
|
||||
}
|
||||
|
@ -3524,11 +3522,11 @@ CopyOverlayDef(XkbGeometryPtr geom,
|
|||
/***====================================================================***/
|
||||
|
||||
static Bool
|
||||
CopySectionDef(XkbGeometryPtr geom, SectionInfo * si, GeometryInfo * info)
|
||||
CopySectionDef(XkbcGeometryPtr geom, SectionInfo * si, GeometryInfo * info)
|
||||
{
|
||||
XkbSectionPtr section;
|
||||
XkbRowPtr row;
|
||||
XkbKeyPtr key;
|
||||
XkbcSectionPtr section;
|
||||
XkbcRowPtr row;
|
||||
XkbcKeyPtr key;
|
||||
KeyInfo *ki;
|
||||
RowInfo *ri;
|
||||
|
||||
|
@ -3560,7 +3558,7 @@ CopySectionDef(XkbGeometryPtr geom, SectionInfo * si, GeometryInfo * info)
|
|||
row->vertical = ri->vertical;
|
||||
for (ki = ri->keys; ki != NULL; ki = (KeyInfo *) ki->defs.next)
|
||||
{
|
||||
XkbColorPtr color;
|
||||
XkbcColorPtr color;
|
||||
if ((ki->defs.defined & _GK_Name) == 0)
|
||||
{
|
||||
ERROR("Key %d of row %d in section %s has no name\n",
|
||||
|
@ -3636,8 +3634,8 @@ CompileGeometry(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
|
|||
|
||||
if (info.errorCount == 0)
|
||||
{
|
||||
XkbGeometryPtr geom;
|
||||
XkbGeometrySizesRec sizes;
|
||||
XkbcGeometryPtr geom;
|
||||
XkbcGeometrySizesRec sizes;
|
||||
bzero(&sizes, sizeof(sizes));
|
||||
sizes.which = XkbGeomAllMask;
|
||||
sizes.num_properties = info.nProps;
|
||||
|
|
|
@ -513,7 +513,7 @@ BindIndicators(XkbcDescPtr xkb, Bool force, LEDInfo *unbound,
|
|||
if ((xkb->names != NULL) &&
|
||||
(xkb->names->indicators[led->indicator - 1] != led->name))
|
||||
{
|
||||
Atom old = xkb->names->indicators[led->indicator - 1];
|
||||
CARD32 old = xkb->names->indicators[led->indicator - 1];
|
||||
ERROR("Multiple names bound to indicator %d\n",
|
||||
(unsigned int) led->indicator);
|
||||
ACTION("Using %s, ignoring %s\n",
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
typedef struct _LEDInfo
|
||||
{
|
||||
CommonInfo defs;
|
||||
Atom name;
|
||||
CARD32 name;
|
||||
unsigned char indicator;
|
||||
unsigned char flags;
|
||||
unsigned char which_mods;
|
||||
|
|
|
@ -60,7 +60,7 @@ typedef struct _IndicatorNameInfo
|
|||
{
|
||||
CommonInfo defs;
|
||||
int ndx;
|
||||
Atom name;
|
||||
CARD32 name;
|
||||
Bool virtual;
|
||||
} IndicatorNameInfo;
|
||||
|
||||
|
@ -142,7 +142,7 @@ FindIndicatorByIndex(KeyNamesInfo * info, int ndx)
|
|||
}
|
||||
|
||||
static IndicatorNameInfo *
|
||||
FindIndicatorByName(KeyNamesInfo * info, Atom name)
|
||||
FindIndicatorByName(KeyNamesInfo * info, CARD32 name)
|
||||
{
|
||||
IndicatorNameInfo *old;
|
||||
|
||||
|
@ -227,7 +227,7 @@ AddIndicatorName(KeyNamesInfo * info, IndicatorNameInfo * new)
|
|||
else
|
||||
{
|
||||
const char *oldType, *newType;
|
||||
Atom using, ignoring;
|
||||
CARD32 using, ignoring;
|
||||
if (old->virtual)
|
||||
oldType = "virtual indicator";
|
||||
else
|
||||
|
@ -857,7 +857,7 @@ CompileKeycodes(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
|
|||
}
|
||||
else
|
||||
{
|
||||
WSGO("Cannot create XkbNamesRec in CompileKeycodes\n");
|
||||
WSGO("Cannot create XkbcNamesRec in CompileKeycodes\n");
|
||||
return False;
|
||||
}
|
||||
if (info.leds)
|
||||
|
|
|
@ -52,7 +52,7 @@ typedef struct _PreserveInfo
|
|||
typedef struct _KeyTypeInfo
|
||||
{
|
||||
CommonInfo defs;
|
||||
Atom name;
|
||||
CARD32 name;
|
||||
int fileID;
|
||||
unsigned mask;
|
||||
unsigned vmask;
|
||||
|
@ -63,7 +63,7 @@ typedef struct _KeyTypeInfo
|
|||
XkbKTMapEntryPtr entries;
|
||||
PreserveInfo *preserve;
|
||||
int szNames;
|
||||
Atom *lvlNames;
|
||||
CARD32 *lvlNames;
|
||||
} KeyTypeInfo;
|
||||
|
||||
typedef struct _KeyTypesInfo
|
||||
|
@ -78,10 +78,10 @@ typedef struct _KeyTypesInfo
|
|||
VModInfo vmods;
|
||||
} KeyTypesInfo;
|
||||
|
||||
Atom tok_ONE_LEVEL;
|
||||
Atom tok_TWO_LEVEL;
|
||||
Atom tok_ALPHABETIC;
|
||||
Atom tok_KEYPAD;
|
||||
CARD32 tok_ONE_LEVEL;
|
||||
CARD32 tok_TWO_LEVEL;
|
||||
CARD32 tok_ALPHABETIC;
|
||||
CARD32 tok_KEYPAD;
|
||||
|
||||
/***====================================================================***/
|
||||
|
||||
|
@ -108,7 +108,7 @@ extern Bool AddPreserve(XkbcDescPtr /* xkb */ ,
|
|||
|
||||
extern Bool AddLevelName(KeyTypeInfo * /* type */ ,
|
||||
unsigned /* level */ ,
|
||||
Atom /* name */ ,
|
||||
CARD32 /* name */ ,
|
||||
Bool /* clobber */ ,
|
||||
Bool /* report */
|
||||
);
|
||||
|
@ -168,10 +168,10 @@ InitKeyTypesInfo(KeyTypesInfo * info, XkbcDescPtr xkb, KeyTypesInfo * from)
|
|||
}
|
||||
if (from->dflt.lvlNames)
|
||||
{
|
||||
info->dflt.lvlNames = uTypedCalloc(from->dflt.szNames, Atom);
|
||||
info->dflt.lvlNames = uTypedCalloc(from->dflt.szNames, CARD32);
|
||||
if (info->dflt.lvlNames)
|
||||
{
|
||||
register unsigned sz = from->dflt.szNames * sizeof(Atom);
|
||||
register unsigned sz = from->dflt.szNames * sizeof(CARD32);
|
||||
memcpy(info->dflt.lvlNames, from->dflt.lvlNames, sz);
|
||||
}
|
||||
}
|
||||
|
@ -783,12 +783,12 @@ SetPreserve(KeyTypeInfo * type,
|
|||
|
||||
Bool
|
||||
AddLevelName(KeyTypeInfo * type,
|
||||
unsigned level, Atom name, Bool clobber, Bool report)
|
||||
unsigned level, CARD32 name, Bool clobber, Bool report)
|
||||
{
|
||||
if ((type->lvlNames == NULL) || (type->szNames <= level))
|
||||
{
|
||||
type->lvlNames =
|
||||
uTypedRecalloc(type->lvlNames, type->szNames, level + 1, Atom);
|
||||
uTypedRecalloc(type->lvlNames, type->szNames, level + 1, CARD32);
|
||||
if (type->lvlNames == NULL)
|
||||
{
|
||||
ERROR("Couldn't allocate level names for type %s\n",
|
||||
|
@ -837,7 +837,7 @@ SetLevelName(KeyTypeInfo * type, ExprDef * arrayNdx, ExprDef * value)
|
|||
{
|
||||
ExprResult rtrn;
|
||||
unsigned level;
|
||||
Atom level_name;
|
||||
CARD32 level_name;
|
||||
|
||||
if (arrayNdx == NULL)
|
||||
return ReportTypeShouldBeArray(type, "level name");
|
||||
|
@ -1126,7 +1126,7 @@ HandleKeyTypesFile(XkbFile * file,
|
|||
}
|
||||
|
||||
static Bool
|
||||
CopyDefToKeyType(XkbcDescPtr xkb, XkbKeyTypePtr type, KeyTypeInfo * def)
|
||||
CopyDefToKeyType(XkbcDescPtr xkb, XkbcKeyTypePtr type, KeyTypeInfo * def)
|
||||
{
|
||||
register int i;
|
||||
PreserveInfo *pre;
|
||||
|
@ -1177,7 +1177,7 @@ CopyDefToKeyType(XkbcDescPtr xkb, XkbKeyTypePtr type, KeyTypeInfo * def)
|
|||
}
|
||||
else
|
||||
type->preserve = NULL;
|
||||
type->name = (Atom) def->name;
|
||||
type->name = (CARD32) def->name;
|
||||
if (def->szNames > 0)
|
||||
{
|
||||
type->level_names = uTypedCalloc(def->numLevels, CARD32);
|
||||
|
@ -1211,7 +1211,7 @@ CompileKeyTypes(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
|
|||
{
|
||||
register int i;
|
||||
register KeyTypeInfo *def;
|
||||
register XkbKeyTypePtr type, next;
|
||||
register XkbcKeyTypePtr type, next;
|
||||
|
||||
if (info.name != NULL)
|
||||
{
|
||||
|
|
|
@ -122,7 +122,6 @@ SOFTWARE.
|
|||
#include "parseutils.h"
|
||||
#include "misc.h"
|
||||
#include "tokens.h"
|
||||
#include <X11/extensions/XKBgeomcommon.h>
|
||||
|
||||
#ifndef DFLT_XKB_CONFIG_ROOT
|
||||
#define DFLT_XKB_CONFIG_ROOT "/usr/share/X11/xkb"
|
||||
|
|
|
@ -34,8 +34,6 @@
|
|||
#include <X11/keysym.h>
|
||||
#include "parseutils.h"
|
||||
|
||||
#include <X11/extensions/XKBgeomcommon.h>
|
||||
|
||||
/***====================================================================***/
|
||||
|
||||
/**
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include "xkbmisc.h"
|
||||
#include "xkbpath.h"
|
||||
#include <X11/keysym.h>
|
||||
#include <X11/extensions/XKBgeomcommon.h>
|
||||
#include <X11/Xalloca.h>
|
||||
|
||||
XkbFile *rtrnValue;
|
||||
|
@ -167,7 +166,7 @@ KeyAliasCreate(char *alias, char *real)
|
|||
}
|
||||
|
||||
VModDef *
|
||||
VModCreate(Atom name, ExprDef * value)
|
||||
VModCreate(CARD32 name, ExprDef * value)
|
||||
{
|
||||
VModDef *def;
|
||||
def = uTypedAlloc(VModDef);
|
||||
|
@ -207,7 +206,7 @@ VarCreate(ExprDef * name, ExprDef * value)
|
|||
}
|
||||
|
||||
VarDef *
|
||||
BoolVarCreate(Atom nameToken, unsigned set)
|
||||
BoolVarCreate(CARD32 nameToken, unsigned set)
|
||||
{
|
||||
ExprDef *name, *value;
|
||||
|
||||
|
@ -240,7 +239,7 @@ InterpCreate(char *sym, ExprDef * match)
|
|||
}
|
||||
|
||||
KeyTypeDef *
|
||||
KeyTypeCreate(Atom name, VarDef * body)
|
||||
KeyTypeCreate(CARD32 name, VarDef * body)
|
||||
{
|
||||
KeyTypeDef *def;
|
||||
|
||||
|
@ -307,7 +306,7 @@ GroupCompatCreate(int group, ExprDef * val)
|
|||
}
|
||||
|
||||
ModMapDef *
|
||||
ModMapCreate(Atom modifier, ExprDef * keys)
|
||||
ModMapCreate(CARD32 modifier, ExprDef * keys)
|
||||
{
|
||||
ModMapDef *def;
|
||||
|
||||
|
@ -329,7 +328,7 @@ ModMapCreate(Atom modifier, ExprDef * keys)
|
|||
}
|
||||
|
||||
IndicatorMapDef *
|
||||
IndicatorMapCreate(Atom name, VarDef * body)
|
||||
IndicatorMapCreate(CARD32 name, VarDef * body)
|
||||
{
|
||||
IndicatorMapDef *def;
|
||||
|
||||
|
@ -374,7 +373,7 @@ IndicatorNameCreate(int ndx, ExprDef * name, Bool virtual)
|
|||
}
|
||||
|
||||
ExprDef *
|
||||
ActionCreate(Atom name, ExprDef * args)
|
||||
ActionCreate(CARD32 name, ExprDef * args)
|
||||
{
|
||||
ExprDef *act;
|
||||
|
||||
|
@ -414,7 +413,7 @@ CreateKeysymList(char *sym)
|
|||
}
|
||||
|
||||
ShapeDef *
|
||||
ShapeDeclCreate(Atom name, OutlineDef * outlines)
|
||||
ShapeDeclCreate(CARD32 name, OutlineDef * outlines)
|
||||
{
|
||||
ShapeDef *shape;
|
||||
OutlineDef *ol;
|
||||
|
@ -439,7 +438,7 @@ ShapeDeclCreate(Atom name, OutlineDef * outlines)
|
|||
}
|
||||
|
||||
OutlineDef *
|
||||
OutlineCreate(Atom field, ExprDef * points)
|
||||
OutlineCreate(CARD32 field, ExprDef * points)
|
||||
{
|
||||
OutlineDef *outline;
|
||||
ExprDef *pt;
|
||||
|
@ -517,7 +516,7 @@ RowDeclCreate(KeyDef * keys)
|
|||
}
|
||||
|
||||
SectionDef *
|
||||
SectionDeclCreate(Atom name, RowDef * rows)
|
||||
SectionDeclCreate(CARD32 name, RowDef * rows)
|
||||
{
|
||||
SectionDef *section;
|
||||
RowDef *row;
|
||||
|
@ -561,7 +560,7 @@ OverlayKeyCreate(char *under, char *over)
|
|||
}
|
||||
|
||||
OverlayDef *
|
||||
OverlayDeclCreate(Atom name, OverlayKeyDef * keys)
|
||||
OverlayDeclCreate(CARD32 name, OverlayKeyDef * keys)
|
||||
{
|
||||
OverlayDef *ol;
|
||||
OverlayKeyDef *key;
|
||||
|
@ -583,7 +582,7 @@ OverlayDeclCreate(Atom name, OverlayKeyDef * keys)
|
|||
}
|
||||
|
||||
DoodadDef *
|
||||
DoodadCreate(unsigned type, Atom name, VarDef * body)
|
||||
DoodadCreate(unsigned type, CARD32 name, VarDef * body)
|
||||
{
|
||||
DoodadDef *doodad;
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ extern KeyAliasDef *KeyAliasCreate(char * /* alias */ ,
|
|||
char * /* real */
|
||||
);
|
||||
|
||||
extern VModDef *VModCreate(Atom /* name */ ,
|
||||
extern VModDef *VModCreate(CARD32 /* name */ ,
|
||||
ExprDef * /* value */
|
||||
);
|
||||
|
||||
|
@ -84,7 +84,7 @@ extern VarDef *VarCreate(ExprDef * /* name */ ,
|
|||
ExprDef * /* value */
|
||||
);
|
||||
|
||||
extern VarDef *BoolVarCreate(Atom /* nameToken */ ,
|
||||
extern VarDef *BoolVarCreate(CARD32 /* nameToken */ ,
|
||||
unsigned /* set */
|
||||
);
|
||||
|
||||
|
@ -92,7 +92,7 @@ extern InterpDef *InterpCreate(char * /* sym */ ,
|
|||
ExprDef * /* match */
|
||||
);
|
||||
|
||||
extern KeyTypeDef *KeyTypeCreate(Atom /* name */ ,
|
||||
extern KeyTypeDef *KeyTypeCreate(CARD32 /* name */ ,
|
||||
VarDef * /* body */
|
||||
);
|
||||
|
||||
|
@ -104,11 +104,11 @@ extern GroupCompatDef *GroupCompatCreate(int /* group */ ,
|
|||
ExprDef * /* def */
|
||||
);
|
||||
|
||||
extern ModMapDef *ModMapCreate(Atom /* modifier */ ,
|
||||
extern ModMapDef *ModMapCreate(CARD32 /* modifier */ ,
|
||||
ExprDef * /* keys */
|
||||
);
|
||||
|
||||
extern IndicatorMapDef *IndicatorMapCreate(Atom /* name */ ,
|
||||
extern IndicatorMapDef *IndicatorMapCreate(CARD32 /* name */ ,
|
||||
VarDef * /* body */
|
||||
);
|
||||
|
||||
|
@ -117,18 +117,18 @@ extern IndicatorNameDef *IndicatorNameCreate(int /* ndx */ ,
|
|||
Bool /* virtual */
|
||||
);
|
||||
|
||||
extern ExprDef *ActionCreate(Atom /* name */ ,
|
||||
extern ExprDef *ActionCreate(CARD32 /* name */ ,
|
||||
ExprDef * /* args */
|
||||
);
|
||||
|
||||
extern ExprDef *CreateKeysymList(char * /* sym */
|
||||
);
|
||||
|
||||
extern ShapeDef *ShapeDeclCreate(Atom /* name */ ,
|
||||
extern ShapeDef *ShapeDeclCreate(CARD32 /* name */ ,
|
||||
OutlineDef * /* outlines */
|
||||
);
|
||||
|
||||
extern OutlineDef *OutlineCreate(Atom /* field */ ,
|
||||
extern OutlineDef *OutlineCreate(CARD32 /* field */ ,
|
||||
ExprDef * /* points */
|
||||
);
|
||||
|
||||
|
@ -143,7 +143,7 @@ extern KeyDef *KeyDeclMerge(KeyDef * /* into */ ,
|
|||
extern RowDef *RowDeclCreate(KeyDef * /* keys */
|
||||
);
|
||||
|
||||
extern SectionDef *SectionDeclCreate(Atom /* name */ ,
|
||||
extern SectionDef *SectionDeclCreate(CARD32 /* name */ ,
|
||||
RowDef * /* rows */
|
||||
);
|
||||
|
||||
|
@ -151,12 +151,12 @@ extern OverlayKeyDef *OverlayKeyCreate(char * /* under */ ,
|
|||
char * /* over */
|
||||
);
|
||||
|
||||
extern OverlayDef *OverlayDeclCreate(Atom /* name */ ,
|
||||
extern OverlayDef *OverlayDeclCreate(CARD32 /* name */ ,
|
||||
OverlayKeyDef * /* rows */
|
||||
);
|
||||
|
||||
extern DoodadDef *DoodadCreate(unsigned /* type */ ,
|
||||
Atom /* name */ ,
|
||||
CARD32 /* name */ ,
|
||||
VarDef * /* body */
|
||||
);
|
||||
|
||||
|
|
|
@ -42,9 +42,9 @@
|
|||
#include "misc.h"
|
||||
#include "alias.h"
|
||||
|
||||
extern Atom tok_ONE_LEVEL;
|
||||
extern Atom tok_TWO_LEVEL;
|
||||
extern Atom tok_KEYPAD;
|
||||
extern CARD32 tok_ONE_LEVEL;
|
||||
extern CARD32 tok_TWO_LEVEL;
|
||||
extern CARD32 tok_KEYPAD;
|
||||
|
||||
/***====================================================================***/
|
||||
|
||||
|
@ -72,13 +72,13 @@ typedef struct _KeyInfo
|
|||
short numLevels[XkbNumKbdGroups];
|
||||
CARD32 *syms[XkbNumKbdGroups];
|
||||
XkbcAction *acts[XkbNumKbdGroups];
|
||||
Atom types[XkbNumKbdGroups];
|
||||
CARD32 types[XkbNumKbdGroups];
|
||||
unsigned repeat;
|
||||
XkbBehavior behavior;
|
||||
unsigned short vmodmap;
|
||||
unsigned long nameForOverlayKey;
|
||||
unsigned long allowNone;
|
||||
Atom dfltType;
|
||||
CARD32 dfltType;
|
||||
} KeyInfo;
|
||||
|
||||
/**
|
||||
|
@ -234,7 +234,7 @@ typedef struct _SymbolsInfo
|
|||
KeyInfo dflt;
|
||||
VModInfo vmods;
|
||||
ActionInfo *action;
|
||||
Atom groupNames[XkbNumKbdGroups];
|
||||
CARD32 groupNames[XkbNumKbdGroups];
|
||||
|
||||
ModMapEntry *modMap;
|
||||
AliasInfo *aliases;
|
||||
|
@ -540,7 +540,7 @@ MergeKeys(SymbolsInfo * info, KeyInfo * into, KeyInfo * from)
|
|||
if ((into->types[i] != None) && (report) &&
|
||||
(into->types[i] != from->types[i]))
|
||||
{
|
||||
Atom use, ignore;
|
||||
CARD32 use, ignore;
|
||||
collide |= _Key_Types;
|
||||
if (from->defs.merge != MergeAugment)
|
||||
{
|
||||
|
@ -1569,7 +1569,7 @@ SetExplicitGroup(SymbolsInfo * info, KeyInfo * key)
|
|||
if (key->acts[i] != NULL)
|
||||
uFree(key->acts[i]);
|
||||
key->acts[i] = (XkbcAction *) NULL;
|
||||
key->types[i] = (Atom) 0;
|
||||
key->types[i] = (CARD32) 0;
|
||||
}
|
||||
}
|
||||
key->typesDefined = key->symsDefined = key->actsDefined = 1 << group;
|
||||
|
@ -1581,7 +1581,7 @@ SetExplicitGroup(SymbolsInfo * info, KeyInfo * key)
|
|||
key->acts[group] = key->acts[0];
|
||||
key->acts[0] = (XkbcAction *) NULL;
|
||||
key->types[group] = key->types[0];
|
||||
key->types[0] = (Atom) 0;
|
||||
key->types[0] = (CARD32) 0;
|
||||
return True;
|
||||
}
|
||||
|
||||
|
@ -1756,7 +1756,7 @@ FindKeyForSymbol(XkbcDescPtr xkb, CARD32 sym, unsigned int *kc_rtrn)
|
|||
* @return True if found, False otherwise.
|
||||
*/
|
||||
static Bool
|
||||
FindNamedType(XkbcDescPtr xkb, Atom name, unsigned *type_rtrn)
|
||||
FindNamedType(XkbcDescPtr xkb, CARD32 name, unsigned *type_rtrn)
|
||||
{
|
||||
register unsigned n;
|
||||
|
||||
|
@ -1764,7 +1764,7 @@ FindNamedType(XkbcDescPtr xkb, Atom name, unsigned *type_rtrn)
|
|||
{
|
||||
for (n = 0; n < xkb->map->num_types; n++)
|
||||
{
|
||||
if (xkb->map->types[n].name == (Atom) name)
|
||||
if (xkb->map->types[n].name == (CARD32) name)
|
||||
{
|
||||
*type_rtrn = n;
|
||||
return True;
|
||||
|
@ -1791,7 +1791,7 @@ FindNamedType(XkbcDescPtr xkb, Atom name, unsigned *type_rtrn)
|
|||
* @returns True if a type could be found, False otherwise.
|
||||
*/
|
||||
static Bool
|
||||
FindAutomaticType(int width, CARD32 * syms, Atom * typeNameRtrn,
|
||||
FindAutomaticType(int width, CARD32 * syms, CARD32 * typeNameRtrn,
|
||||
Bool * autoType)
|
||||
{
|
||||
*autoType = False;
|
||||
|
@ -1936,7 +1936,7 @@ PrepareKeyDef(KeyInfo * key)
|
|||
if (key->acts[i] != NULL)
|
||||
uFree(key->acts[i]);
|
||||
key->acts[i] = (XkbcAction *) NULL;
|
||||
key->types[i] = (Atom) 0;
|
||||
key->types[i] = (CARD32) 0;
|
||||
}
|
||||
key->symsDefined &= 1;
|
||||
key->actsDefined &= 1;
|
||||
|
@ -1955,7 +1955,7 @@ CopySymbolsDef(XkbcDescPtr xkb, KeyInfo *key, int start_from)
|
|||
{
|
||||
register int i;
|
||||
unsigned okc, kc, width, tmp, nGroups;
|
||||
XkbKeyTypePtr type;
|
||||
XkbcKeyTypePtr type;
|
||||
Bool haveActions, autoType, useAlias;
|
||||
CARD32 *outSyms;
|
||||
XkbcAction *outActs;
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#define TOKENS_H 1
|
||||
|
||||
#include <X11/Xdefs.h>
|
||||
#include <X11/Xmd.h>
|
||||
|
||||
#define END_OF_FILE 0
|
||||
#define ERROR_TOK 255
|
||||
|
@ -98,9 +99,9 @@
|
|||
#define FUNCTION_KEYS 76
|
||||
#define ALTERNATE_GROUP 77
|
||||
|
||||
extern Atom tok_ONE_LEVEL;
|
||||
extern Atom tok_TWO_LEVEL;
|
||||
extern Atom tok_ALPHABETIC;
|
||||
extern Atom tok_KEYPAD;
|
||||
extern CARD32 tok_ONE_LEVEL;
|
||||
extern CARD32 tok_TWO_LEVEL;
|
||||
extern CARD32 tok_ALPHABETIC;
|
||||
extern CARD32 tok_KEYPAD;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -85,7 +85,7 @@ HandleVModDef(VModDef * stmt, unsigned mergeMode, VModInfo * info)
|
|||
register int i, bit, nextFree;
|
||||
ExprResult mod;
|
||||
XkbcServerMapPtr srv;
|
||||
XkbNamesPtr names;
|
||||
XkbcNamesPtr names;
|
||||
|
||||
srv = info->xkb->server;
|
||||
names = info->xkb->names;
|
||||
|
@ -164,7 +164,7 @@ HandleVModDef(VModDef * stmt, unsigned mergeMode, VModInfo * info)
|
|||
*/
|
||||
int
|
||||
LookupVModIndex(char * priv,
|
||||
Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
|
||||
CARD32 elem, CARD32 field, unsigned type, ExprResult * val_rtrn)
|
||||
{
|
||||
int i;
|
||||
XkbcDescPtr xkb;
|
||||
|
@ -203,7 +203,7 @@ LookupVModIndex(char * priv,
|
|||
*/
|
||||
int
|
||||
LookupVModMask(char * priv,
|
||||
Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
|
||||
CARD32 elem, CARD32 field, unsigned type, ExprResult * val_rtrn)
|
||||
{
|
||||
if (LookupVModIndex(priv, elem, field, type, val_rtrn))
|
||||
{
|
||||
|
@ -217,7 +217,7 @@ LookupVModMask(char * priv,
|
|||
int
|
||||
FindKeypadVMod(XkbcDescPtr xkb)
|
||||
{
|
||||
Atom name;
|
||||
CARD32 name;
|
||||
ExprResult rtrn;
|
||||
|
||||
name = XkbcInternAtom("NumLock", False);
|
||||
|
@ -231,7 +231,7 @@ FindKeypadVMod(XkbcDescPtr xkb)
|
|||
Bool
|
||||
ResolveVirtualModifier(ExprDef * def, ExprResult * val_rtrn, VModInfo * info)
|
||||
{
|
||||
XkbNamesPtr names;
|
||||
XkbcNamesPtr names;
|
||||
|
||||
names = info->xkb->names;
|
||||
if (def->op == ExprIdent)
|
||||
|
|
|
@ -54,15 +54,15 @@ extern Bool ApplyVModDefs(VModInfo * /* info */ ,
|
|||
);
|
||||
|
||||
extern int LookupVModIndex(char * /* priv */ ,
|
||||
Atom /* elem */ ,
|
||||
Atom /* field */ ,
|
||||
CARD32 /* elem */ ,
|
||||
CARD32 /* field */ ,
|
||||
unsigned /* type */ ,
|
||||
ExprResult * /* val_rtrn */
|
||||
);
|
||||
|
||||
extern int LookupVModMask(char * /* priv */ ,
|
||||
Atom /* elem */ ,
|
||||
Atom /* field */ ,
|
||||
CARD32 /* elem */ ,
|
||||
CARD32 /* field */ ,
|
||||
unsigned /* type */ ,
|
||||
ExprResult * /* val_rtrn */
|
||||
);
|
||||
|
|
|
@ -200,6 +200,8 @@ XkbcCompileKeymapFromComponents(const XkbComponentNamesPtr ktcsg)
|
|||
XkbFile *file, *mapToUse;
|
||||
XkbcDescPtr xkb;
|
||||
|
||||
uSetErrorFile(NULL);
|
||||
|
||||
if (!ktcsg || ISEMPTY(ktcsg->keycodes)) {
|
||||
ERROR("keycodes required to generate XKB keymap\n");
|
||||
goto fail;
|
||||
|
|
|
@ -140,18 +140,18 @@ typedef struct _Expr
|
|||
} binary;
|
||||
struct
|
||||
{
|
||||
Atom element;
|
||||
Atom field;
|
||||
CARD32 element;
|
||||
CARD32 field;
|
||||
} field;
|
||||
struct
|
||||
{
|
||||
Atom element;
|
||||
Atom field;
|
||||
CARD32 element;
|
||||
CARD32 field;
|
||||
struct _Expr *entry;
|
||||
} array;
|
||||
struct
|
||||
{
|
||||
Atom name;
|
||||
CARD32 name;
|
||||
struct _Expr *args;
|
||||
} action;
|
||||
struct
|
||||
|
@ -166,7 +166,7 @@ typedef struct _Expr
|
|||
int y;
|
||||
} coord;
|
||||
struct _Expr *child;
|
||||
Atom str;
|
||||
CARD32 str;
|
||||
unsigned uval;
|
||||
int ival;
|
||||
char keyName[5];
|
||||
|
@ -186,7 +186,7 @@ typedef struct _VModDef
|
|||
{
|
||||
ParseCommon common;
|
||||
unsigned merge;
|
||||
Atom name;
|
||||
CARD32 name;
|
||||
ExprDef *value;
|
||||
} VModDef;
|
||||
|
||||
|
@ -210,7 +210,7 @@ typedef struct _KeyTypeDef
|
|||
{
|
||||
ParseCommon common;
|
||||
unsigned merge;
|
||||
Atom name;
|
||||
CARD32 name;
|
||||
VarDef *body;
|
||||
} KeyTypeDef;
|
||||
|
||||
|
@ -226,7 +226,7 @@ typedef struct _ModMapDef
|
|||
{
|
||||
ParseCommon common;
|
||||
unsigned merge;
|
||||
Atom modifier;
|
||||
CARD32 modifier;
|
||||
ExprDef *keys;
|
||||
} ModMapDef;
|
||||
|
||||
|
@ -242,7 +242,7 @@ typedef struct _InterpDef
|
|||
{
|
||||
ParseCommon common;
|
||||
unsigned merge;
|
||||
CARD32 sym;
|
||||
char *sym;
|
||||
ExprDef *match;
|
||||
VarDef *def;
|
||||
} InterpDef;
|
||||
|
@ -259,7 +259,7 @@ typedef struct _IndicatorNameDef
|
|||
typedef struct _OutlineDef
|
||||
{
|
||||
ParseCommon common;
|
||||
Atom field;
|
||||
CARD32 field;
|
||||
int nPoints;
|
||||
ExprDef *points;
|
||||
} OutlineDef;
|
||||
|
@ -268,7 +268,7 @@ typedef struct _ShapeDef
|
|||
{
|
||||
ParseCommon common;
|
||||
unsigned merge;
|
||||
Atom name;
|
||||
CARD32 name;
|
||||
int nOutlines;
|
||||
OutlineDef *outlines;
|
||||
} ShapeDef;
|
||||
|
@ -292,7 +292,7 @@ typedef struct _SectionDef
|
|||
{
|
||||
ParseCommon common;
|
||||
unsigned merge;
|
||||
Atom name;
|
||||
CARD32 name;
|
||||
int nRows;
|
||||
RowDef *rows;
|
||||
} SectionDef;
|
||||
|
@ -308,7 +308,7 @@ typedef struct _OverlayDef
|
|||
{
|
||||
ParseCommon common;
|
||||
unsigned merge;
|
||||
Atom name;
|
||||
CARD32 name;
|
||||
int nKeys;
|
||||
OverlayKeyDef *keys;
|
||||
} OverlayDef;
|
||||
|
@ -318,7 +318,7 @@ typedef struct _DoodadDef
|
|||
ParseCommon common;
|
||||
unsigned merge;
|
||||
unsigned type;
|
||||
Atom name;
|
||||
CARD32 name;
|
||||
VarDef *body;
|
||||
} DoodadDef;
|
||||
|
||||
|
|
|
@ -97,7 +97,6 @@
|
|||
#include "xkbmisc.h"
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/keysym.h>
|
||||
#include <X11/extensions/XKBgeomcommon.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
unsigned int parseDebug;
|
||||
|
|
113
src/xkbgeom.h
113
src/xkbgeom.h
|
@ -30,149 +30,148 @@ authorization from the authors.
|
|||
#include <X11/X.h>
|
||||
#include <X11/Xdefs.h>
|
||||
#include <X11/extensions/XKBstrcommon.h>
|
||||
#include <X11/extensions/XKBgeomcommon.h>
|
||||
#include <X11/extensions/XKBrulescommon.h>
|
||||
#include "X11/extensions/XKBcommon.h"
|
||||
|
||||
extern void
|
||||
XkbcFreeGeomProperties(XkbGeometryPtr geom, int first, int count, Bool freeAll);
|
||||
XkbcFreeGeomProperties(XkbcGeometryPtr geom, int first, int count, Bool freeAll);
|
||||
|
||||
extern void
|
||||
XkbcFreeGeomKeyAliases(XkbGeometryPtr geom, int first, int count, Bool freeAll);
|
||||
XkbcFreeGeomKeyAliases(XkbcGeometryPtr geom, int first, int count, Bool freeAll);
|
||||
|
||||
extern void
|
||||
XkbcFreeGeomColors(XkbGeometryPtr geom, int first, int count, Bool freeAll);
|
||||
XkbcFreeGeomColors(XkbcGeometryPtr geom, int first, int count, Bool freeAll);
|
||||
|
||||
extern void
|
||||
XkbcFreeGeomPoints(XkbOutlinePtr outline, int first, int count, Bool freeAll);
|
||||
XkbcFreeGeomPoints(XkbcOutlinePtr outline, int first, int count, Bool freeAll);
|
||||
|
||||
extern void
|
||||
XkbcFreeGeomOutlines(XkbShapePtr shape, int first, int count, Bool freeAll);
|
||||
XkbcFreeGeomOutlines(XkbcShapePtr shape, int first, int count, Bool freeAll);
|
||||
|
||||
extern void
|
||||
XkbcFreeGeomShapes(XkbGeometryPtr geom, int first, int count, Bool freeAll);
|
||||
XkbcFreeGeomShapes(XkbcGeometryPtr geom, int first, int count, Bool freeAll);
|
||||
|
||||
extern void
|
||||
XkbcFreeGeomOverlayKeys(XkbOverlayRowPtr row, int first, int count,
|
||||
XkbcFreeGeomOverlayKeys(XkbcOverlayRowPtr row, int first, int count,
|
||||
Bool freeAll);
|
||||
|
||||
extern void
|
||||
XkbcFreeGeomOverlayRows(XkbOverlayPtr overlay, int first, int count,
|
||||
XkbcFreeGeomOverlayRows(XkbcOverlayPtr overlay, int first, int count,
|
||||
Bool freeAll);
|
||||
|
||||
extern void
|
||||
XkbcFreeGeomOverlays(XkbSectionPtr section, int first, int count, Bool freeAll);
|
||||
XkbcFreeGeomOverlays(XkbcSectionPtr section, int first, int count, Bool freeAll);
|
||||
|
||||
extern void
|
||||
XkbcFreeGeomKeys(XkbRowPtr row, int first, int count, Bool freeAll);
|
||||
XkbcFreeGeomKeys(XkbcRowPtr row, int first, int count, Bool freeAll);
|
||||
|
||||
extern void
|
||||
XkbcFreeGeomRows(XkbSectionPtr section, int first, int count, Bool freeAll);
|
||||
XkbcFreeGeomRows(XkbcSectionPtr section, int first, int count, Bool freeAll);
|
||||
|
||||
extern void
|
||||
XkbcFreeGeomSections(XkbGeometryPtr geom, int first, int count, Bool freeAll);
|
||||
XkbcFreeGeomSections(XkbcGeometryPtr geom, int first, int count, Bool freeAll);
|
||||
|
||||
extern void
|
||||
XkbcFreeGeomDoodads(XkbDoodadPtr doodads, int nDoodads, Bool freeAll);
|
||||
XkbcFreeGeomDoodads(XkbcDoodadPtr doodads, int nDoodads, Bool freeAll);
|
||||
|
||||
extern void
|
||||
XkbcFreeGeometry(XkbGeometryPtr geom, unsigned which, Bool freeMap);
|
||||
XkbcFreeGeometry(XkbcGeometryPtr geom, unsigned which, Bool freeMap);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomProps(XkbGeometryPtr geom, int nProps);
|
||||
XkbcAllocGeomProps(XkbcGeometryPtr geom, int nProps);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomColors(XkbGeometryPtr geom, int nColors);
|
||||
XkbcAllocGeomColors(XkbcGeometryPtr geom, int nColors);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomKeyAliases(XkbGeometryPtr geom, int nKeyAliases);
|
||||
XkbcAllocGeomKeyAliases(XkbcGeometryPtr geom, int nKeyAliases);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomShapes(XkbGeometryPtr geom, int nShapes);
|
||||
XkbcAllocGeomShapes(XkbcGeometryPtr geom, int nShapes);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomSections(XkbGeometryPtr geom, int nSections);
|
||||
XkbcAllocGeomSections(XkbcGeometryPtr geom, int nSections);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomOverlays(XkbSectionPtr section, int nOverlays);
|
||||
XkbcAllocGeomOverlays(XkbcSectionPtr section, int nOverlays);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomOverlayRows(XkbOverlayPtr overlay, int nRows);
|
||||
XkbcAllocGeomOverlayRows(XkbcOverlayPtr overlay, int nRows);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomOverlayKeys(XkbOverlayRowPtr row, int nKeys);
|
||||
XkbcAllocGeomOverlayKeys(XkbcOverlayRowPtr row, int nKeys);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomDoodads(XkbGeometryPtr geom, int nDoodads);
|
||||
XkbcAllocGeomDoodads(XkbcGeometryPtr geom, int nDoodads);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomSectionDoodads(XkbSectionPtr section, int nDoodads);
|
||||
XkbcAllocGeomSectionDoodads(XkbcSectionPtr section, int nDoodads);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomOutlines(XkbShapePtr shape, int nOL);
|
||||
XkbcAllocGeomOutlines(XkbcShapePtr shape, int nOL);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomRows(XkbSectionPtr section, int nRows);
|
||||
XkbcAllocGeomRows(XkbcSectionPtr section, int nRows);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomPoints(XkbOutlinePtr ol, int nPts);
|
||||
XkbcAllocGeomPoints(XkbcOutlinePtr ol, int nPts);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomKeys(XkbRowPtr row, int nKeys);
|
||||
XkbcAllocGeomKeys(XkbcRowPtr row, int nKeys);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeometry(XkbcDescPtr xkb, XkbGeometrySizesPtr sizes);
|
||||
XkbcAllocGeometry(XkbcDescPtr xkb, XkbcGeometrySizesPtr sizes);
|
||||
|
||||
extern XkbPropertyPtr
|
||||
XkbcAddGeomProperty(XkbGeometryPtr geom, char *name, char *value);
|
||||
extern XkbcPropertyPtr
|
||||
XkbcAddGeomProperty(XkbcGeometryPtr geom, char *name, char *value);
|
||||
|
||||
extern XkbKeyAliasPtr
|
||||
XkbcAddGeomKeyAlias(XkbGeometryPtr geom, char *aliasStr, char *realStr);
|
||||
XkbcAddGeomKeyAlias(XkbcGeometryPtr geom, char *aliasStr, char *realStr);
|
||||
|
||||
extern XkbColorPtr
|
||||
XkbcAddGeomColor(XkbGeometryPtr geom, char *spec, unsigned int pixel);
|
||||
extern XkbcColorPtr
|
||||
XkbcAddGeomColor(XkbcGeometryPtr geom, char *spec, unsigned int pixel);
|
||||
|
||||
extern XkbOutlinePtr
|
||||
XkbcAddGeomOutline(XkbShapePtr shape, int sz_points);
|
||||
extern XkbcOutlinePtr
|
||||
XkbcAddGeomOutline(XkbcShapePtr shape, int sz_points);
|
||||
|
||||
extern XkbShapePtr
|
||||
XkbcAddGeomShape(XkbGeometryPtr geom, Atom name, int sz_outlines);
|
||||
extern XkbcShapePtr
|
||||
XkbcAddGeomShape(XkbcGeometryPtr geom, CARD32 name, int sz_outlines);
|
||||
|
||||
extern XkbKeyPtr
|
||||
XkbcAddGeomKey(XkbRowPtr row);
|
||||
extern XkbcKeyPtr
|
||||
XkbcAddGeomKey(XkbcRowPtr row);
|
||||
|
||||
extern XkbRowPtr
|
||||
XkbcAddGeomRow(XkbSectionPtr section, int sz_keys);
|
||||
extern XkbcRowPtr
|
||||
XkbcAddGeomRow(XkbcSectionPtr section, int sz_keys);
|
||||
|
||||
extern XkbSectionPtr
|
||||
XkbcAddGeomSection(XkbGeometryPtr geom, Atom name,
|
||||
extern XkbcSectionPtr
|
||||
XkbcAddGeomSection(XkbcGeometryPtr geom, CARD32 name,
|
||||
int sz_rows, int sz_doodads, int sz_over);
|
||||
|
||||
extern XkbDoodadPtr
|
||||
XkbcAddGeomDoodad(XkbGeometryPtr geom, XkbSectionPtr section, Atom name);
|
||||
extern XkbcDoodadPtr
|
||||
XkbcAddGeomDoodad(XkbcGeometryPtr geom, XkbcSectionPtr section, CARD32 name);
|
||||
|
||||
extern XkbOverlayKeyPtr
|
||||
XkbcAddGeomOverlayKey(XkbOverlayPtr overlay, XkbOverlayRowPtr row,
|
||||
extern XkbcOverlayKeyPtr
|
||||
XkbcAddGeomOverlayKey(XkbcOverlayPtr overlay, XkbcOverlayRowPtr row,
|
||||
char *over, char *under);
|
||||
|
||||
extern XkbOverlayRowPtr
|
||||
XkbcAddGeomOverlayRow(XkbOverlayPtr overlay, int row_under, int sz_keys);
|
||||
extern XkbcOverlayRowPtr
|
||||
XkbcAddGeomOverlayRow(XkbcOverlayPtr overlay, int row_under, int sz_keys);
|
||||
|
||||
extern XkbOverlayPtr
|
||||
XkbcAddGeomOverlay(XkbSectionPtr section, Atom name, int sz_rows);
|
||||
extern XkbcOverlayPtr
|
||||
XkbcAddGeomOverlay(XkbcSectionPtr section, CARD32 name, int sz_rows);
|
||||
|
||||
/***====================================================================***/
|
||||
|
||||
extern Bool
|
||||
XkbcComputeShapeBounds(XkbShapePtr shape);
|
||||
XkbcComputeShapeBounds(XkbcShapePtr shape);
|
||||
|
||||
extern Bool
|
||||
XkbcComputeShapeTop(XkbShapePtr shape, XkbBoundsPtr bounds);
|
||||
XkbcComputeShapeTop(XkbcShapePtr shape, XkbcBoundsPtr bounds);
|
||||
|
||||
extern Bool
|
||||
XkbcComputeRowBounds(XkbGeometryPtr geom, XkbSectionPtr section, XkbRowPtr row);
|
||||
XkbcComputeRowBounds(XkbcGeometryPtr geom, XkbcSectionPtr section, XkbcRowPtr row);
|
||||
|
||||
extern Bool
|
||||
XkbcComputeSectionBounds(XkbGeometryPtr geom, XkbSectionPtr section);
|
||||
XkbcComputeSectionBounds(XkbcGeometryPtr geom, XkbcSectionPtr section);
|
||||
|
||||
#endif /* _XKBGEOM_H_ */
|
||||
|
|
|
@ -36,7 +36,7 @@ authorization from the authors.
|
|||
/***====================================================================***/
|
||||
|
||||
extern Bool
|
||||
XkbcComputeEffectiveMap(XkbcDescPtr xkb, XkbKeyTypePtr type,
|
||||
XkbcComputeEffectiveMap(XkbcDescPtr xkb, XkbcKeyTypePtr type,
|
||||
unsigned char *map_rtrn);
|
||||
|
||||
/***====================================================================***/
|
||||
|
|
Loading…
Reference in New Issue