Commit Graph

69 Commits (6a3b38b1711732be09840c85996fd65d0a7f03ff)

Author SHA1 Message Date
Dan Nicholson 3fc0dcc816 Generate keyboard description from components
Finally, we can generate a XkbcDescPtr from a XkbComponentNamesPtr. This
involves turning the components into a parsed XKB file and then passing
it into the compiler. This first conversion needs more error handling.
2009-03-29 08:55:18 -07:00
Dan Nicholson e86b31ce92 Add XKBlib resizing functions
These were originally in XKBMalloc.c.
2009-03-29 08:11:25 -07:00
Dan Nicholson d43a7bf02f Copy xkbfile IsUpper/IsLower macros
xkbcomp was using Xlib's XConvertCase to check upper/lowercase. That's a
lot of code, so hopefully the xkbfile macros using _XkbKSCheckCase are
good enough. This also required that <X11/keysym.h> is included to get
all the XK_* definitions.
2009-03-28 20:22:28 -07:00
Dan Nicholson eff1c53873 Copy XkbEnsureSafeMapName from xkbfile 2009-03-28 19:00:13 -07:00
Dan Nicholson 5315e5d14a Add XKBlib API to support keytypes
Added common variants of XkbComputeEffectiveMap, XkbInitCanonicalKeyTypes
and all their needed functions. A couple functions that were in alloc.c
moved to malloc.c to mirror the libX11 sources better.

Original code in

libX11/src/xkb/XKBMalloc.c
libX11/src/xkb/XKBMisc.c
libX11/src/xkb/XKB.c
2009-03-28 17:55:46 -07:00
Dan Nicholson 62482b9614 Add geometry Compute API from XKBlib
A small needed subset from libX11/src/xkb/XKBGeom.c.
2009-03-28 16:08:46 -07:00
Dan Nicholson 28de09e515 Add xkbcommon macro for XkbKSIsKeypad and XkbKSIsDeadKey(k)
IsKeypad is used in symbols, but we'll just grab them both. It might be
better to split parts of XKBfile.h out eventually.
2009-03-28 15:51:06 -07:00
Dan Nicholson a53b9b1ed3 Add XkbModIndexText replacement
Now, I think we should have all the *Text functions we need.
2009-03-28 15:32:51 -07:00
Dan Nicholson 54aea7fe8b Add VMod Text functions from xkbfile 2009-03-28 15:12:30 -07:00
Dan Nicholson 46e5e164d6 Copy XkbAddGeom* functions from XKBlib
These are needed by the geometry compiler in xkbcomp.
2009-03-28 14:22:42 -07:00
Dan Nicholson 1f08ae1e56 Expose all the geometry allocation subroutines
We need a couple in xkbcomp, but they might also be needed externally,
too.
2009-03-28 14:22:41 -07:00
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 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 4859304f65 Use X extern "C" guards around function declarations for public header 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 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 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