2 Copyright 2009 Dan Nicholson
4 Permission is hereby granted, free of charge, to any person obtaining a
5 copy of this software and associated documentation files (the "Software"),
6 to deal in the Software without restriction, including without limitation
7 the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 and/or sell copies of the Software, and to permit persons to whom the
9 Software is furnished to do so, subject to the following conditions:
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
18 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 Except as contained in this notice, the names of the authors or their
22 institutions shall not be used in advertising or otherwise to promote the
23 sale, use or other dealings in this Software without prior written
24 authorization from the authors.
31 #include <X11/Xdefs.h>
32 #include <X11/extensions/XKBstrcommon.h>
33 #include <X11/extensions/XKBgeomcommon.h>
34 #include <X11/extensions/XKBrulescommon.h>
35 #include "X11/extensions/XKBcommon.h"
38 XkbcFreeGeomProperties(XkbGeometryPtr geom, int first, int count, Bool freeAll);
41 XkbcFreeGeomKeyAliases(XkbGeometryPtr geom, int first, int count, Bool freeAll);
44 XkbcFreeGeomColors(XkbGeometryPtr geom, int first, int count, Bool freeAll);
47 XkbcFreeGeomPoints(XkbOutlinePtr outline, int first, int count, Bool freeAll);
50 XkbcFreeGeomOutlines(XkbShapePtr shape, int first, int count, Bool freeAll);
53 XkbcFreeGeomShapes(XkbGeometryPtr geom, int first, int count, Bool freeAll);
56 XkbcFreeGeomOverlayKeys(XkbOverlayRowPtr row, int first, int count,
60 XkbcFreeGeomOverlayRows(XkbOverlayPtr overlay, int first, int count,
64 XkbcFreeGeomOverlays(XkbSectionPtr section, int first, int count, Bool freeAll);
67 XkbcFreeGeomKeys(XkbRowPtr row, int first, int count, Bool freeAll);
70 XkbcFreeGeomRows(XkbSectionPtr section, int first, int count, Bool freeAll);
73 XkbcFreeGeomSections(XkbGeometryPtr geom, int first, int count, Bool freeAll);
76 XkbcFreeGeomDoodads(XkbDoodadPtr doodads, int nDoodads, Bool freeAll);
79 XkbcFreeGeometry(XkbGeometryPtr geom, unsigned which, Bool freeMap);
82 XkbcAllocGeomProps(XkbGeometryPtr geom, int nProps);
85 XkbcAllocGeomColors(XkbGeometryPtr geom, int nColors);
88 XkbcAllocGeomKeyAliases(XkbGeometryPtr geom, int nKeyAliases);
91 XkbcAllocGeomShapes(XkbGeometryPtr geom, int nShapes);
94 XkbcAllocGeomSections(XkbGeometryPtr geom, int nSections);
97 XkbcAllocGeomOverlays(XkbSectionPtr section, int nOverlays);
100 XkbcAllocGeomOverlayRows(XkbOverlayPtr overlay, int nRows);
103 XkbcAllocGeomOverlayKeys(XkbOverlayRowPtr row, int nKeys);
106 XkbcAllocGeomDoodads(XkbGeometryPtr geom, int nDoodads);
109 XkbcAllocGeomSectionDoodads(XkbSectionPtr section, int nDoodads);
112 XkbcAllocGeomOutlines(XkbShapePtr shape, int nOL);
115 XkbcAllocGeomRows(XkbSectionPtr section, int nRows);
118 XkbcAllocGeomPoints(XkbOutlinePtr ol, int nPts);
121 XkbcAllocGeomKeys(XkbRowPtr row, int nKeys);
124 XkbcAllocGeometry(XkbcDescPtr xkb, XkbGeometrySizesPtr sizes);
126 extern XkbPropertyPtr
127 XkbcAddGeomProperty(XkbGeometryPtr geom, char *name, char *value);
129 extern XkbKeyAliasPtr
130 XkbcAddGeomKeyAlias(XkbGeometryPtr geom, char *aliasStr, char *realStr);
133 XkbcAddGeomColor(XkbGeometryPtr geom, char *spec, unsigned int pixel);
136 XkbcAddGeomOutline(XkbShapePtr shape, int sz_points);
139 XkbcAddGeomShape(XkbGeometryPtr geom, Atom name, int sz_outlines);
142 XkbcAddGeomKey(XkbRowPtr row);
145 XkbcAddGeomRow(XkbSectionPtr section, int sz_keys);
148 XkbcAddGeomSection(XkbGeometryPtr geom, Atom name,
149 int sz_rows, int sz_doodads, int sz_over);
152 XkbcAddGeomDoodad(XkbGeometryPtr geom, XkbSectionPtr section, Atom name);
154 extern XkbOverlayKeyPtr
155 XkbcAddGeomOverlayKey(XkbOverlayPtr overlay, XkbOverlayRowPtr row,
156 char *over, char *under);
158 extern XkbOverlayRowPtr
159 XkbcAddGeomOverlayRow(XkbOverlayPtr overlay, int row_under, int sz_keys);
162 XkbcAddGeomOverlay(XkbSectionPtr section, Atom name, int sz_rows);
164 /***====================================================================***/
167 XkbcComputeShapeBounds(XkbShapePtr shape);
170 XkbcComputeShapeTop(XkbShapePtr shape, XkbBoundsPtr bounds);
173 XkbcComputeRowBounds(XkbGeometryPtr geom, XkbSectionPtr section, XkbRowPtr row);
176 XkbcComputeSectionBounds(XkbGeometryPtr geom, XkbSectionPtr section);
178 #endif /* _XKBGEOM_H_ */