summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2010-06-30Drop Xmd.h include now that we're using uint32_tKristian Høgsberg1-1/+0
2010-06-30Use the right action structsKristian Høgsberg1-3/+3
We were casting the union members to the wrong action structs (from kbproto).
2010-06-30Copy over missing action structs from kbprotoKristian Høgsberg1-12/+45
2010-06-30Rename Xkbc*Action to struct xkb_*_actionKristian Høgsberg1-33/+34
2010-06-28Drop CARD32 and Opaque typesKristian Høgsberg1-25/+25
2010-06-23Copy and duplicate XkbModsRec and XkbKTMapEntryRecDaniel Stone1-5/+17
Copy these types in so we can extend the vmod size. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2010-06-23fix mod size confusionDaniel Stone1-6/+6
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2010-06-22Use CARD32 instead of Atom, move geom headers inDaniel Stone1-12/+303
Use CARD32 instead of Atom/KeySym/et al to avoid type size confusion between server and non-server code; relatedly, move the geometry headers in from kbproto, so every non-simple type (i.e. structs containing nothing more than basic types) is now copied into xkbcommon. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2010-06-22Allow external atom databasesDaniel Stone1-1/+4
Allow people to plug in an external atom database (e.g. the X server's), so we don't have to migrate our own atoms over later. We are a bit over-keen on atoms at the moment, so it does pollute the atom database a bit though. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2010-06-22Copy in XkbCompatMapRec and XkbSymInterpretRecDaniel Stone1-1/+1
These contain actions, so transition them ahead to XkbcAction and move them into XKBcommon.h. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2010-06-22Use CARD32 instead of Atom, drag in XkbClientMapRecDaniel Stone1-3/+41
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>
2010-06-22Regroup actions into current vs. deprecated, resize vmodDaniel Stone1-43/+74
Use Xkbc* for all our actions that we intend to keep around, and Xkb* for deprecated ones we can hopefully get rid of, at least internally. While we're at it, make vmods be a uint32_t. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2010-06-22Add XkbcCanonicaliseComponentsDaniel Stone1-0/+18
Canonicalises two sets of components (new and old), e.g.: new: +bar old: foo result: foo+bar This is required as part of the spec, so clients can reuse part of the device's old keymap. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2010-06-22XKBcommon.h: Make header self-containedDaniel Stone1-0/+2
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2010-06-22Keysym: Add apallingly bad API documentation for keysym <-> stringDaniel Stone1-0/+12
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2010-06-22Make keysym <-> string conversion public APIDaniel Stone1-0/+6
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-04-21listing: Drop unused deviceSpec argumentDan Nicholson1-2/+1
The server might care about this, but ListComponents is just reading xkb files.
2009-04-19Rewrite listing code to generate XkbComponentListPtrDan Nicholson1-0/+4
In xkbcomp, the listing code printed out the xkb files to stdout and the caller would parse the output. Here, we can just generate a XkbComponentListPtr and pass it back. This should be a series of smaller commits, but there was no clean way to do it since it's basically a complete rewrite except for the core map matching logic. A lot of code used for special printing modes in xkbcomp has been shedded. Callers can massage the output as they please.
2009-04-10Add interface to compile keyboard description from keymap filesDan Nicholson1-0/+4
We need to support generating a keyboard description from a keymap file because there are just some cases where RMLVO or ktcsg is not enough. The map choosing logic has been refactored into its own function and now supports choosing a named or default keymap.
2009-04-09Make XkbcInitAtoms externally accessibleDan Nicholson1-0/+3
Applications (like the server) need to initialize the atoms system before using the rest of the library. Maybe it should just init itself implicitly.
2009-04-08Constify public APIDan Nicholson1-2/+2
There's no reason the arguments can't be const.
2009-04-08Change CompileKeymapFromRules to take XkbRMLVOSetDan Nicholson1-1/+1
Let's use a nice interface now that it's available from XKBrulescommon.h.
2009-04-08Remove all non-public API from XKBcommon.h headerDan Nicholson1-315/+0
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.
2009-04-07Remove KS macros available in XKBfilecommon.h nowDan Nicholson1-7/+0
A couple of the XkbcKS* macros become redundant with XKBfilecommon.h split out in kbproto.
2009-04-05Add action datatypes as defined in the serverDan Nicholson1-2/+78
Some of the XkbAction types are defined differently in the server, so we add those to XKBcommon.h and use them here like XkbcDescPtr. We'll have to deal with the impedance mismatch on the client side later.
2009-04-03Fix install path for XKBcommon.hDan Nicholson1-1/+1
2009-04-02Drop keysym.h pollution from XKBcommon.hDan Nicholson1-2/+1
There's really no need to pull this into a public header.
2009-03-31Compile keyboard description from XKB rules, tooDan Nicholson1-1/+4
XkbcCompileKeymapFromRules can be used to generate a XkbDescPtr from XKB rules instead of using components. The previous XkbcCompileKeymap has been renamed to XkbcCompileKeymapFromComponents.
2009-03-30Add rules file parsing from xkbfileDan Nicholson1-0/+42
Copy over the Xkb_RF* rules parsing functions from xkbfile's maprules.c. Eventually, this will be tied into xkbcomp's path searching utilities so you don't need to supply a full path to the rules file. Also, it this should eventually incorporate the server's RMLVOSet.
2009-03-29Generate keyboard description from componentsDan Nicholson1-0/+3
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-29Add XKBlib resizing functionsDan Nicholson1-0/+14
These were originally in XKBMalloc.c.
2009-03-28Copy xkbfile IsUpper/IsLower macrosDan Nicholson1-1/+9
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-28Copy XkbEnsureSafeMapName from xkbfileDan Nicholson1-0/+3
2009-03-28Add XKBlib API to support keytypesDan Nicholson1-3/+20
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-28Add geometry Compute API from XKBlibDan Nicholson1-0/+12
A small needed subset from libX11/src/xkb/XKBGeom.c.
2009-03-28Add xkbcommon macro for XkbKSIsKeypad and XkbKSIsDeadKey(k)Dan Nicholson1-0/+5
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-28Add XkbModIndexText replacementDan Nicholson1-0/+3
Now, I think we should have all the *Text functions we need.
2009-03-28Add VMod Text functions from xkbfileDan Nicholson1-0/+6
2009-03-28Copy XkbAddGeom* functions from XKBlibDan Nicholson1-0/+38
These are needed by the geometry compiler in xkbcomp.
2009-03-28Expose all the geometry allocation subroutinesDan Nicholson1-0/+42
We need a couple in xkbcomp, but they might also be needed externally, too.
2009-03-28Add more *Text functions from xkbfileDan Nicholson1-2/+20
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-28Move *Text APIs into libxkbcommonDan Nicholson1-0/+6
These seem like they might be generally useful, and more will be needed from xkbfile.
2009-03-25Use X extern "C" guards around function declarations for public headerDan Nicholson1-0/+5
2009-03-25Borrow atom implementation from libxkbfileDan Nicholson1-0/+9
We need an atom implementation not relying on XInternAtom and friends. The original code is in libxkbfile/src/xkbatom.c
2009-03-25Rename headers to XKBcommon* and install in extensions directoryDan Nicholson2-2/+2
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-25Add XkbDescRec initializers and destructorsDan Nicholson1-0/+90
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-19Use common XKB headers and add common type XkbcDescRecDan Nicholson1-0/+19
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-19Initial implementation of keysym handlersDan Nicholson2-0/+42
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