Use CARD32 instead of Atom, move geom headers in
[platform/upstream/libxkbcommon.git] / src / xkballoc.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 _XKBALLOC_H_
28 #define _XKBALLOC_H_
29
30 #include <X11/X.h>
31 #include <X11/Xdefs.h>
32 #include <X11/extensions/XKBstrcommon.h>
33 #include <X11/extensions/XKBrulescommon.h>
34 #include "X11/extensions/XKBcommon.h"
35
36 extern int
37 XkbcAllocCompatMap(XkbcDescPtr xkb, unsigned which, unsigned nSI);
38
39 extern void
40 XkbcFreeCompatMap(XkbcDescPtr xkb, unsigned which, Bool freeMap);
41
42 extern int
43 XkbcAllocNames(XkbcDescPtr xkb, unsigned which, int nTotalRG,
44                int nTotalAliases);
45
46 extern void
47 XkbcFreeNames(XkbcDescPtr xkb, unsigned which, Bool freeMap);
48
49 extern int
50 XkbcAllocControls(XkbcDescPtr xkb, unsigned which);
51
52 extern void
53 XkbcFreeControls(XkbcDescPtr xkb, unsigned which, Bool freeMap);
54
55 extern int
56 XkbcAllocIndicatorMaps(XkbcDescPtr xkb);
57
58 extern void
59 XkbcFreeIndicatorMaps(XkbcDescPtr xkb);
60
61 extern XkbcDescRec *
62 XkbcAllocKeyboard(void);
63
64 extern void
65 XkbcFreeKeyboard(XkbcDescPtr xkb, unsigned which, Bool freeAll);
66
67 /***====================================================================***/
68
69 extern int
70 XkbcAllocClientMap(XkbcDescPtr xkb, unsigned which, unsigned nTotalTypes);
71
72 extern int
73 XkbcAllocServerMap(XkbcDescPtr xkb, unsigned which, unsigned nNewActions);
74
75 extern int
76 XkbcCopyKeyType(XkbcKeyTypePtr from, XkbcKeyTypePtr into);
77
78 extern int
79 XkbcCopyKeyTypes(XkbcKeyTypePtr from, XkbcKeyTypePtr into, int num_types);
80
81 extern int
82 XkbcResizeKeyType(XkbcDescPtr xkb, int type_ndx, int map_count,
83                   Bool want_preserve, int new_num_lvls);
84
85 extern CARD32 *
86 XkbcResizeKeySyms(XkbcDescPtr xkb, int key, int needed);
87
88 extern int
89 XkbcChangeKeycodeRange(XkbcDescPtr xkb, int minKC, int maxKC,
90                        XkbChangesPtr changes);
91
92 extern XkbcAction *
93 XkbcResizeKeyActions(XkbcDescPtr xkb, int key, int needed);
94
95 extern void
96 XkbcFreeClientMap(XkbcDescPtr xkb, unsigned what, Bool freeMap);
97
98 extern void
99 XkbcFreeServerMap(XkbcDescPtr xkb, unsigned what, Bool freeMap);
100
101 #endif /* _XKBALLOC_H_ */