src/keysym.c


Log

Author Commit Date CI Message
Ran Benita 58f8d2c1 2012-07-20T17:09:49 utils: remove Xfuncproto.h and use our own macros Add XKB_EXPORT to replace _X_EXPORT, and copy the definitions of _X_ATTRIBUTE_FOO as ATTR_FOO. Signed-off-by: Ran Benita <ran234@gmail.com>
Daniel Stone 9308a460 2012-07-17T10:20:15 Run source tree through uncrustify .uncrustify.cfg committed for future reference also, but had to manually fix up a few things: it really likes justifying struct initialisers. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Ran Benita 57374c32 2012-07-13T18:55:10 Rename KSIsLower/Upper and move to keysym.c Seems like a more natural place, and allows to remove the src/misc.c file. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 58b030bb 2012-05-20T20:39:35 Move XKB_KEY_NoSymbol to xkbcommon-keysyms.h This avoids a couple of special cases in the code, and is more consistent. Since anyone who includes xkbcommon.h also gets xkbcommon-keysyms.h, and anyone who include xkbcommon-keysyms.h would want NoSymbol anyway, there's no down side. Signed-off-by: Ran Benita <ran234@gmail.com>
Daniel Stone 6433d72e 2012-05-09T20:12:12 Merge remote-tracking branch 'krh/keysyms' Conflicts: src/keysym.c src/misc.c src/text.h src/xkbcomp/expr.c src/xkbcomp/parser.y src/xkbcomp/parseutils.c src/xkbcomp/symbols.c Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Kristian Høgsberg ace1e5df 2012-05-09T09:05:00 Use our own keysyms
Daniel Stone e1af48bc 2012-05-09T13:22:34 Rename keysym <-> string API Change them to refer to the string representation of the keysym's name as a name rather than a string, since we want to add API to get the Unicode printable representation as well. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Ran Benita b610b2b9 2012-05-08T14:52:23 Rename XKBcommonint.h to xkb-priv.h and use it Make the files in the src/* directory use their own header or a consilidated private header. This makes the file dependencies clearer. Also drop the pointless "xkb" file name prefix, add split a few declarations to their own files (atom.h and text.h). Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 8fbd44fd 2012-04-06T03:12:50 Implicitly include config.h in all files The definitions in config.h should be available in all files an implementation detail; it can be included through the build system instead of having each file pull it every time. This is especially helpful with AC_USE_SYSTEM_EXTENSIONS, as _GNU_SOURCE and friends can have an effect by merely being defined, which can lead to some confusion if its effective for only half the files. And we don't really support a build _without_ config.h; so, one less thing to worry about. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 18e6a6a4 2012-04-05T10:47:43 Remove Xfuncproto.h and XKB.h from xkbcommon/xkbcommon.h The kbproto header is already not needed here anymore. Move the _X_EXPORT's to the corresponding function definitions, and use straight extern "C" clauses instead of _XFUNCPROTOBEGIN/END. It also makes more sense to have the EXPORT's in the source files, as it provides some documentation to the reader, whereas in the header it's obvious. Signed-off-by: Ran Benita <ran234@gmail.com> [daniels: Updated for xkb_keymap changes.]
Daniel Stone 632d9f03 2012-04-03T14:26:04 Eliminate remaining gcc warnings Various one-liners (mostly removing unused variables) to make the code safe for the full set of warnings used by the xorg macros. On Debian-based systems, flex generates incorrect code resulting in two warnings about yy_getcolumn and yy_setcolumn having no previous declaration despite being non-static. Fedora carries a patch to fix this, and a bug has been filed on Debian's flex to add the patch: http://bugs.debian.org/667027 Aside from this, it's now safe for --enable-strict-compilation. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 495d87b0 2012-04-03T13:57:44 Don't parse nonsense Unicode/hex keycodes If a keysym was specified as "U1039andsomeextrastuffontheend", return NoSymbol rather than 0x10001039; similarly, return NoSymbol for "0xdeadbeefhitherehowsyourdaybeen" rather than 0xdeadbeef. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Ran Benita 602e8780 2012-03-24T13:27:48 Define our own NoSymbol value and use it Since we have our own xkb_keysym_t type, it makes sense to have our own NoSymbol value instead of the one from X11/X.h. Signed-off-by: Ran Benita <ran234@gmail.com>
Daniel Stone 0bb24c2d 2012-03-09T19:03:59 Introduce xkb_keysym_t type Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Ran Benita 0d8874d0 2012-02-26T00:03:24 makekeys: update to match the rest of libX11 makekeys This integrates two commits from libX11: ebd6ef0a4db0ddef0ae17ad14571518ccdeea5ba XStringToKeysym: Special case for XF86 keysyms Some XFree86 keysyms were in XKeysymDB as XF86_foo, despite really being XF86foo. So, if we get to the bottom of XStringToKeysym and haven't found our XF86_foo, try it again as XF86foo. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> 00175397480b76d32bf82b0c7c94c91a2a95954e makekeys: Scan vendor keysyms as well as core Since we can't really live without vendor keysyms, scan them all in to generate ks_tables.h, rather than only doing the core ones, and leaving the vendor syms to be manually synchronised with XKeysymDB. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Notice that the xkey.sh test is changed to match libX11 behavior, i.e. XKeysymToString(0x1008FE20) -> "XF86Ungrab" as opposed to "XF86_Ungrab". Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 04e687c9 2012-02-25T21:09:28 makekeys: Fix build/target word size mismatch when cross-compiling This matches commit 24283d40b1e4314c6647dda49d2a159833341a8b from libX11: Since makekeys is built using build environment's compiler and runs natively, we have to make sure that the size of the Signature type is the same on both the native environment and the target, otherwise we get mismatches upon running X, and some LSB test failures (xts5). Use an unsigned 32-bit integer on all platforms. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita f3e4335f 2012-02-24T16:07:17 Fix all constness warnings These are all trivial/obvious fixes which clear a bunch of warnings. Signed-off-by: Ran Benita <ran234@gmail.com>
Daniel Stone ead9d0cb 2012-02-15T11:49:10 Move include path from X11/extensions/ to xkbcommon/ Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Kristian Høgsberg e8798287 2010-10-08T15:33:18 Don't return a static buffer in public API
Kristian Høgsberg 3f0034a9 2010-07-02T11:50:01 Rename public entry points to lowercase and underscore
Kristian Høgsberg 8e653493 2010-06-30T17:31:34 Fix warning from CARD32 -> uint32_t conversion
Kristian Høgsberg 47d3b396 2010-06-28T06:50:12 Drop CARD32 and Opaque types
Daniel Stone 60e7eeeb 2010-06-17T03:16:09 Use CARD32 instead of Atom, drag in XkbClientMapRec On 64-bit architectures, XID varies in size between the server (always 32 bits), and non-server (always unsigned long) for some inexplicable reason. Use CARD32 instead to avoid this horrible trap. This involves dragging in XkbClientMapRec so we don't get stuck in the KeySym trap. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone cdc735c8 2009-04-25T14:42:42 Keysym: Fix conversion for Unicode and bare numbers Ensure that Unicode string representations are accepted and turned into numbers, as well as hexadecimal numbers in 0xabcd1234 form; unknown keysyms are output as 0xabcd1234 in string form. This also ensures that strings are never returned malloc()ed. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 8e3239a7 2009-04-25T14:32:04 KeySym: Actually handle NoSymbol Add NoSymbol into the keysym table, so keysym <-> string conversion works for that, too; also eliminate special-casing of VoidSymbol. This will require special-casing in libX11 to preserve its API. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Dan Nicholson 6a84a34d 2009-04-08T07:46:25 Remove all non-public API from XKBcommon.h header The noble intention was to expose all the new API and new generic types in the split out kbproto headers through XKBcommon.h. It turns out that would be a massive amount of work in the server. Someday, but first just wedging in XkbCompileKeymap* would be good. Most of the API is in new internal xkb*.h headers. In order to allow the XKBcommon.h header to be used from the server, we can't pull in other headers from kbproto since the server has its own copies. However, types that are different (XkbDescRec, XkbAction) still have Xkbc equivalents here, and I think they should be used in the server.
Dan Nicholson 1ff77ecd 2009-03-05T18:20:15 Rename headers to XKBcommon* and install in extensions directory Following the kbproto convention, the headers will be named XKBcommon.h and XKBcommonint.h. Furthermore, they'll be installed in X11/extensions directory with the rest of the XKB headers.
Dan Nicholson 56c3e744 2009-03-19T11:34:54 keysym: Coding style cleanup Mostly tab-to-space conversion plus a few style nits. Dropped the register keywords as I'm pretty sure modern compilers can be trusted to do the right thing.
Dan Nicholson 83f198f1 2009-01-20T07:46:12 Initial implementation of keysym handlers Add the xkbcommon implementations of XKeysymToString and XStringToKeysym. These symbols have the namespace prefix of Xkbc and are declared in X11/XkbCommon.h. The implementation is taken directly from Xlib, but does not include the XKeysymDB parsing and hashing yet (if it ever will). A couple type conversions were needed to keep from using Xlib.h. See original files: libX11/src/KeysymStr.c libX11/src/StrKeysym.c