Commit Graph

599 Commits (059c1842ef35aa6e2eb33230a228edb12ecd8852)

Author SHA1 Message Date
Dan Nicholson 2671b777cf Add more *Text functions from xkbfile
This should cover all the usage in xkbcomp. The format arguments were
dropped except for the special case of XkbModMaskText, which needs to
write in XkbCFile format in HandleVModDef. This was just changed to a
Bool to avoid the need for the macros in XKBfile.h.

The function prefixes have been renamed to be unique from xkbfile.
2009-03-28 14:22:41 -07:00
Dan Nicholson 8544cde52e xkbcomp: Drop unused Display argument in Atom functions
The xkbcommon Atom implementation doesn't take Display into account.
2009-03-28 14:22:35 -07:00
Dan Nicholson 72df9bb35f Move *Text APIs into libxkbcommon
These seem like they might be generally useful, and more will be needed
from xkbfile.
2009-03-28 12:01:36 -07:00
Dan Nicholson 18337008b5 libxkbcomp: Use the internal Atom implementation
s/XkbInternAtom/XkbcInternAtom/ and s/XkbAtomGetString/XkbcAtomGetString/
2009-03-28 12:01:36 -07:00
Dan Nicholson c277d3d438 libxkbcomp: s/Status/int/ since we don't have Xlib.h 2009-03-28 12:01:36 -07:00
Dan Nicholson d5a9be653b libxkbcomp: Drop unused format field for *Text functions 2009-03-28 12:01:36 -07:00
Dan Nicholson 6a578de9cb libxkbcomp: Add non-xkbfile XkbActionTypeText 2009-03-28 12:01:36 -07:00
Dan Nicholson 4fe322aa99 libxkbcomp: s/XPointer/char */
Replace XPointer with its definition since we don't have the privilege
of using Xlib.h. Why this is char * and not void *, I'll never know.
2009-03-28 12:01:36 -07:00
Dan Nicholson 37769b5a10 libxkbcomp: s/XkbDescPtr/XkbcDescPtr/
We need to use the keyboard description structure from XKBcommon.h since
it doesn't have the Display field.
2009-03-28 12:01:35 -07:00
Dan Nicholson dd25bbc9ac libxkbcomp: Eradicate XkbFileInfo usage
The only real usage was in the frontend to generate a .xkm file. The
rest of the code just operated on the attached XkbDescPtr. Note that
here we've replaced the usage of the defined field in CompileKeymap with
the equivalent field in a XkbcDescPtr.
2009-03-28 12:01:28 -07:00
Dan Nicholson f3677538f4 libxkbcomp: Include X.h and Xdefs.h for Atom and Bool 2009-03-27 19:30:11 -07:00
Dan Nicholson 30e0103216 libxkbcomp: Remove usage of client-side headers
This will surely break things. Let's see just what we need to replace.
2009-03-27 19:25:14 -07:00
Dan Nicholson a3809b1340 xkbcomp: Add non-xkbfile XkbConfigText 2009-03-27 18:55:13 -07:00
Dan Nicholson f2308e7e55 Ignore files for xkbcomp 2009-03-27 18:44:39 -07:00
Dan Nicholson 23caa60fa9 Ignore ks_tables.h in makekeys directory now 2009-03-27 18:43:12 -07:00
Dan Nicholson 0c1bbb05d9 Import xkbcomp sources for CompileKeymap
A copy of the xkbcomp sources (except the frontend) have been copied in
to provide a means to compile a XkbDescPtr. This definitely doesn't
build or do the right thing yet.
2009-03-27 06:55:32 -07:00
Dan Nicholson f4d8e2932c Move ks_tables.h build into makekeys subdirectory
This avoids the BUILT_SOURCES weirdness and forcing the build into the
makekeys subdirectory. Added a new make variable KS_HEADERS that lists
all the keysym headers we're going to parse.
2009-03-27 06:46:32 -07:00
Dan Nicholson 4859304f65 Use X extern "C" guards around function declarations for public header 2009-03-25 20:06:39 -07:00
Dan Nicholson 433a405c98 atom: Coding-style cleanup and refactor
Some coding style nits were cleaned up. Additionally, most of the
functions have been collapsed from the libxkbfile version where there's
distinction with the Xlib atom functions when Display was set. Finally,
the InitAtoms function tests whether the table has already been created
by testing the pointer rather than using a static int.
2009-03-25 20:06:39 -07:00
Dan Nicholson c88c0ba725 Borrow atom implementation from libxkbfile
We need an atom implementation not relying on XInternAtom and friends.
The original code is in

libxkbfile/src/xkbatom.c
2009-03-25 20:06:39 -07:00
Dan Nicholson 46faf56ded alloc/galloc: 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.
2009-03-25 20:06:33 -07:00
Dan Nicholson 1ff77ecd36 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.
2009-03-25 19:40:57 -07:00
Dan Nicholson 7417310403 Add XkbDescRec initializers and destructors
Copies the code to initialize and destroy an XkbDescRec from libX11. The
original code is in

libX11/src/xkb/XKBAlloc.c
libX11/src/xkb/XKBGAlloc.c
libX11/src/xkb/XKBMAlloc.c
2009-03-25 19:40:26 -07:00
Dan Nicholson 3a700f8123 Use common XKB headers and add common type XkbcDescRec
Switched to the common XKB headers which don't contain Xlib pollution.
A new common keyboard description type, XkbcDescRec, has been added.
This is the XkbDescRec definitions in xkbstr.h in the xserver since it
contains the defined field we'll need.
2009-03-19 17:16:13 -07:00
Dan Nicholson d4ddac2b8d Use XKB alloc macros internally
These are used throughout the XKB code, but are defined in XKBsrv.h,
which we'd like to avoid. Internal definitions for True/False have also
been added since they're in Xlib.h
2009-03-19 16:58:45 -07:00
Dan Nicholson 6aa78dedb2 Ignore generated ChangeLog 2009-03-19 16:25:34 -07:00
Dan Nicholson 036c23eaf2 Use generated config.h header 2009-03-19 16:25:34 -07:00
Dan Nicholson a45cdf4b0e makekeys: Fix warning about not returning from function
If we've gotten through the for loop in the alias functions, then we
don't have a match.
2009-03-19 16:25:34 -07:00
Dan Nicholson ffa0ccfad9 Use XORG_CWARNFLAGS for more warnings 2009-03-19 16:25:34 -07:00
Dan Nicholson d60166b507 makekeys: No need for strncat 2009-03-19 16:25:26 -07:00
Dan Nicholson ba0b312ac8 test: Add tests for XFree86 special keys
Since the XFree86 special keysyms contain an underscore after the XF86
prefix, check to make sure they're handled correctly.
2009-03-19 11:51:10 -07:00
Dan Nicholson 176b9cf524 test: Consistently use upper case hex 2009-03-19 11:51:10 -07:00
Dan Nicholson 49a06f926d test: Add convenience functions for xkey.sh 2009-03-19 11:51:10 -07:00
Dan Nicholson e8c7f68539 makekeys: Handle XFree86 special action keys
For some reason, there are a set of keys that have an underscore after
the XF86 prefix when Xlib gets them from XKeysymDB.
2009-03-19 11:51:10 -07:00
Dan Nicholson c005d63c58 makekeys: Always continue when no alias match found 2009-03-19 11:51:10 -07:00
Dan Nicholson 498935c1bc makekeys: Handle aliases in convenience functions
There's no need to pass the alias buffer down.
2009-03-19 11:51:09 -07:00
Dan Nicholson 6518e5482d makekeys: Prepend XF86 to XFree86 keysyms 2009-03-19 11:51:09 -07:00
Dan Nicholson 79ddd7e530 Refactor makekeys with some convenience functions
All the nested ifs in the parsing code were confusing me.
2009-03-19 11:51:09 -07:00
Dan Nicholson 49cda1187f Move makekeys to separate subdir
The build is a little cleaner when makekeys has its own Makefile.
2009-03-19 11:51:09 -07:00
Dan Nicholson b2737e9bfb Testing harness for keysym functions
A test program and script have been added for checking the XkbCommon
keysym functions. This has already highlighted an error in handling of
keysyms from XF86keysym.h.
2009-03-19 11:51:09 -07:00
Dan Nicholson 732bade234 Fix CC_FOR_BUILD detection 2009-03-19 11:51:09 -07:00
Dan Nicholson 56c3e7440e 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.
2009-03-19 11:51:09 -07:00
Dan Nicholson 83f198f1ae 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
2009-03-19 11:51:09 -07:00
Dan Nicholson d0a4291e74 makekeys: Handle XF86XK_ keysyms in addition to XK_ keysyms 2009-03-19 11:51:09 -07:00
Dan Nicholson fa6a3d122d Generate keysym tables from X and XF86 keysym definitions
The keysym hash table ks_tables.h is generated by makekeys from
keysymdef.h and XF86keysym.h.
2009-03-19 11:51:09 -07:00
Dan Nicholson 7f64541c30 ks_tables: Remove table-specific #ifdefs and add header guard
Since we'll be including ks_tables.h in a single file, we don't need to
make parts conditional. A header guard has been added just to be safe.
2009-03-19 11:51:09 -07:00
Dan Nicholson ddc3178959 makekeys: Coding style cleanup
Mostly tab-to-space conversion, but a couple other nits, too.
2009-03-19 11:50:57 -07:00
Dan Nicholson 27fe8d1657 Add makekeys for creating keysym hash tables
The makekeys utility is used to generate the keysym hash tables during
the build. We try to detect a build machine native compiler so the
tables can be generated when cross compiling.
2009-03-19 10:54:31 -07:00
Dan Nicholson b58a95d037 Initial autotools commit 2009-03-19 10:47:15 -07:00