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/XKBrulescommon.h>
34 #include "X11/extensions/XKBcommon.h"
37 XkbcFreeGeomProperties(XkbcGeometryPtr geom, int first, int count, Bool freeAll);
40 XkbcFreeGeomKeyAliases(XkbcGeometryPtr geom, int first, int count, Bool freeAll);
43 XkbcFreeGeomColors(XkbcGeometryPtr geom, int first, int count, Bool freeAll);
46 XkbcFreeGeomPoints(XkbcOutlinePtr outline, int first, int count, Bool freeAll);
49 XkbcFreeGeomOutlines(XkbcShapePtr shape, int first, int count, Bool freeAll);
52 XkbcFreeGeomShapes(XkbcGeometryPtr geom, int first, int count, Bool freeAll);
55 XkbcFreeGeomOverlayKeys(XkbcOverlayRowPtr row, int first, int count,
59 XkbcFreeGeomOverlayRows(XkbcOverlayPtr overlay, int first, int count,
63 XkbcFreeGeomOverlays(XkbcSectionPtr section, int first, int count, Bool freeAll);
66 XkbcFreeGeomKeys(XkbcRowPtr row, int first, int count, Bool freeAll);
69 XkbcFreeGeomRows(XkbcSectionPtr section, int first, int count, Bool freeAll);
72 XkbcFreeGeomSections(XkbcGeometryPtr geom, int first, int count, Bool freeAll);
75 XkbcFreeGeomDoodads(XkbcDoodadPtr doodads, int nDoodads, Bool freeAll);
78 XkbcFreeGeometry(XkbcGeometryPtr geom, unsigned which, Bool freeMap);
81 XkbcAllocGeomProps(XkbcGeometryPtr geom, int nProps);
84 XkbcAllocGeomColors(XkbcGeometryPtr geom, int nColors);
87 XkbcAllocGeomKeyAliases(XkbcGeometryPtr geom, int nKeyAliases);
90 XkbcAllocGeomShapes(XkbcGeometryPtr geom, int nShapes);
93 XkbcAllocGeomSections(XkbcGeometryPtr geom, int nSections);
96 XkbcAllocGeomOverlays(XkbcSectionPtr section, int nOverlays);
99 XkbcAllocGeomOverlayRows(XkbcOverlayPtr overlay, int nRows);
102 XkbcAllocGeomOverlayKeys(XkbcOverlayRowPtr row, int nKeys);
105 XkbcAllocGeomDoodads(XkbcGeometryPtr geom, int nDoodads);
108 XkbcAllocGeomSectionDoodads(XkbcSectionPtr section, int nDoodads);
111 XkbcAllocGeomOutlines(XkbcShapePtr shape, int nOL);
114 XkbcAllocGeomRows(XkbcSectionPtr section, int nRows);
117 XkbcAllocGeomPoints(XkbcOutlinePtr ol, int nPts);
120 XkbcAllocGeomKeys(XkbcRowPtr row, int nKeys);
123 XkbcAllocGeometry(XkbcDescPtr xkb, XkbcGeometrySizesPtr sizes);
125 extern XkbcPropertyPtr
126 XkbcAddGeomProperty(XkbcGeometryPtr geom, char *name, char *value);
128 extern XkbKeyAliasPtr
129 XkbcAddGeomKeyAlias(XkbcGeometryPtr geom, char *aliasStr, char *realStr);
132 XkbcAddGeomColor(XkbcGeometryPtr geom, char *spec, unsigned int pixel);
134 extern XkbcOutlinePtr
135 XkbcAddGeomOutline(XkbcShapePtr shape, int sz_points);
138 XkbcAddGeomShape(XkbcGeometryPtr geom, CARD32 name, int sz_outlines);
141 XkbcAddGeomKey(XkbcRowPtr row);
144 XkbcAddGeomRow(XkbcSectionPtr section, int sz_keys);
146 extern XkbcSectionPtr
147 XkbcAddGeomSection(XkbcGeometryPtr geom, CARD32 name,
148 int sz_rows, int sz_doodads, int sz_over);
151 XkbcAddGeomDoodad(XkbcGeometryPtr geom, XkbcSectionPtr section, CARD32 name);
153 extern XkbcOverlayKeyPtr
154 XkbcAddGeomOverlayKey(XkbcOverlayPtr overlay, XkbcOverlayRowPtr row,
155 char *over, char *under);
157 extern XkbcOverlayRowPtr
158 XkbcAddGeomOverlayRow(XkbcOverlayPtr overlay, int row_under, int sz_keys);
160 extern XkbcOverlayPtr
161 XkbcAddGeomOverlay(XkbcSectionPtr section, CARD32 name, int sz_rows);
163 /***====================================================================***/
166 XkbcComputeShapeBounds(XkbcShapePtr shape);
169 XkbcComputeShapeTop(XkbcShapePtr shape, XkbcBoundsPtr bounds);
172 XkbcComputeRowBounds(XkbcGeometryPtr geom, XkbcSectionPtr section, XkbcRowPtr row);
175 XkbcComputeSectionBounds(XkbcGeometryPtr geom, XkbcSectionPtr section);
177 #endif /* _XKBGEOM_H_ */