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/Xfuncproto.h>
33 #include "xkbcommon/xkbcommon.h"
34 #include "XKBcommonint.h"
36 typedef uint32_t xkb_atom_t;
38 #define XKB_ATOM_NONE 0
40 /***====================================================================***/
43 XkbcComputeEffectiveMap(struct xkb_keymap * xkb, struct xkb_key_type * type,
44 unsigned char *map_rtrn);
46 /***====================================================================***/
49 XkbcInitCanonicalKeyTypes(struct xkb_keymap * xkb, unsigned which, int keypadVMod);
52 XkbcVirtualModsToReal(struct xkb_keymap * xkb, unsigned virtual_mask,
56 XkbcEnsureSafeMapName(char *name);
59 _XkbcKSCheckCase(xkb_keysym_t sym);
61 #define _XkbKSLower (1 << 0)
62 #define _XkbKSUpper (1 << 1)
64 #define XkbcKSIsLower(k) (_XkbcKSCheckCase(k) & _XkbKSLower)
65 #define XkbcKSIsUpper(k) (_XkbcKSCheckCase(k) & _XkbKSUpper)
67 #define XkbKSIsKeypad(k) (((k) >= XK_KP_Space) && ((k) <= XK_KP_Equal))
68 #define XkbKSIsDeadKey(k) \
69 (((k) >= XK_dead_grave) && ((k) <= XK_dead_semivoiced_sound))
72 XkbcNameMatchesPattern(char *name, char *ptrn);
74 /***====================================================================***/
77 xkb_intern_atom(const char *string);
80 XkbcAtomGetString(xkb_atom_t atom);
83 XkbcFreeAllAtoms(void);
85 /***====================================================================***/
88 XkbcAtomText(xkb_atom_t atm);
91 XkbcVModMaskText(struct xkb_keymap * xkb, unsigned modMask, unsigned mask);
94 XkbcModIndexText(unsigned ndx);
97 XkbcModMaskText(unsigned mask, bool cFormat);
100 XkbcConfigText(unsigned config);
103 XkbcActionTypeText(unsigned type);
106 XkbcKeysymText(xkb_keysym_t sym);
109 XkbcKeyNameText(char *name);
112 XkbcSIMatchText(unsigned type);
114 #endif /* _XKBMISC_H_ */