Move include path from X11/extensions/ to xkbcommon/
[platform/upstream/libxkbcommon.git] / src / xkbgeom.h
1 /*
2 Copyright 2009  Dan Nicholson
3
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:
10
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
13
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.
20
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.
25 */
26
27 #ifndef _XKBGEOM_H_
28 #define _XKBGEOM_H_
29
30 #include <X11/X.h>
31 #include <X11/Xdefs.h>
32 #include "xkbcommon/xkbcommon.h"
33
34 extern void
35 XkbcFreeGeometry(struct xkb_geometry * geom, unsigned which, Bool freeMap);
36
37 extern int
38 XkbcAllocGeomKeyAliases(struct xkb_geometry * geom, int nKeyAliases);
39
40 extern int
41 XkbcAllocGeometry(struct xkb_desc * xkb, struct xkb_geometry_sizes * sizes);
42
43 extern struct xkb_property *
44 XkbcAddGeomProperty(struct xkb_geometry * geom, const char *name, const char *value);
45
46 extern struct xkb_color *
47 XkbcAddGeomColor(struct xkb_geometry * geom, const char *spec, unsigned int pixel);
48
49 extern struct xkb_outline *
50 XkbcAddGeomOutline(struct xkb_shape * shape, int sz_points);
51
52 extern struct xkb_shape *
53 XkbcAddGeomShape(struct xkb_geometry * geom, uint32_t name, int sz_outlines);
54
55 extern struct xkb_key *
56 XkbcAddGeomKey(struct xkb_row * row);
57
58 extern struct xkb_row *
59 XkbcAddGeomRow(struct xkb_section * section, int sz_keys);
60
61 extern struct xkb_section *
62 XkbcAddGeomSection(struct xkb_geometry * geom, uint32_t name,
63                    int sz_rows, int sz_doodads, int sz_over);
64
65 extern union xkb_doodad *
66 XkbcAddGeomDoodad(struct xkb_geometry * geom, struct xkb_section * section, uint32_t name);
67
68 extern struct xkb_overlay_row *
69 XkbcAddGeomOverlayRow(struct xkb_overlay * overlay, int row_under, int sz_keys);
70
71 extern struct xkb_overlay *
72 XkbcAddGeomOverlay(struct xkb_section * section, uint32_t name, int sz_rows);
73
74 /***====================================================================***/
75
76 extern Bool
77 XkbcComputeShapeBounds(struct xkb_shape * shape);
78
79 extern Bool
80 XkbcComputeSectionBounds(struct xkb_geometry * geom, struct xkb_section * section);
81
82 #endif /* _XKBGEOM_H_ */