summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Document that xkb_state_get_map doesn't take a refDaniel Stone2012-05-091-1/+3
| | | | Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Change xkb_key_get_syms to just return a bare intDaniel Stone2012-05-091-1/+1
| | | | Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Move KcCGST API to internal-onlyDaniel Stone2012-05-091-46/+0
| | | | | | | And don't export it. We don't need it for X11 support, let alone anything else. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Rename serialise to serializeDaniel Stone2012-05-091-8/+8
| | | | | | | Yes, British English is correct, but unfortunately we've lost that battle. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Add common LED names to xkbcommon-names.hDaniel Stone2012-05-091-0/+4
| | | | Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Include xkbcommon-names.h from xkbcommon.hDaniel Stone2012-05-091-0/+1
| | | | | | So clients only have one file to include. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Remove keycode_range_is_legalDaniel Stone2012-05-091-6/+1
| | | | | | | It was a pretty pointless check. Also sanitise the _x11 variant to actually do what it says on the box. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Merge remote-tracking branch 'krh/keysyms'Daniel Stone2012-05-092-2/+2998
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Use our own keysymsKristian Høgsberg2012-05-091-2/+2
| |
| * Add XKB version of X11 keysymsKristian Høgsberg2012-05-092-0/+2996
| | | | | | | | | | | | With this we're now completely standalone. add vendor keysyms
* | Shorten context to ctxRan Benita2012-05-091-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | (This breaks the API.) "context" is really annoying to type all the time (and we're going to type it a lot more :). "ctx" is clear, concise and common in many other libraries. Use it! Signed-off-by: Ran Benita <ran234@gmail.com> [daniels: Fix for xkb -> keymap change.]
* | Change all 'xkb' xkb_keymap names to 'keymap'Daniel Stone2012-05-091-13/+13
| | | | | | | | | | | | To make it a bit more clear what it actually is. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* | Rename keysym <-> string APIDaniel Stone2012-05-091-4/+4
| | | | | | | | | | | | | | | | 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>
* | Add multiple modifier state matching APIDaniel Stone2012-05-091-1/+41
| | | | | | | | | | | | | | Two new calls allow users to test the exact modifier state, including verifying that no other modifiers but the ones you wanted are down. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* | Add pre-defined names databaseDaniel Stone2012-05-081-0/+35
| | | | | | | | | | | | | | | | | | xkbcommon-names.h right now just contains a set of hardcoded modifier strings that are most commonly used for the usual modifiers. Provide definitions of these so people don't have to worry about typoing a string or mixing up Mod1 and Mod4. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* | Add context flag to inhibit default include pathsDaniel Stone2012-05-081-2/+2
| | | | | | | | | | | | Which will make the context start with no include paths at all. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* | Add flags to context creationDaniel Stone2012-05-081-1/+6
| | | | | | | | | | | | None defined as yet, but why not. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* | Add flags to keymap compilation entrypointsDaniel Stone2012-05-081-4/+13
| | | | | | | | | | | | No use as yet, but might as well ... Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* | Revert "Unconstify xkb_rules_names"Ran Benita2012-05-081-5/+5
|/ | | | | | | | | | | | | This reverts commit d007cd0a1f3f4b9c927175771ff79aae6fe4ab8b. This is in fact more restrictive, because it breaks the (common) case where the strings are const themselved, e.g. "evdev", "us", etc. As is you must either duplicate the strings or suppress the warnings. If the user needs to retain the non-const strings, he should instead just keep them in some other struct and use xkb_rules_names just as a temporary parameter for xkb_map_new_from_names. Mildly annoying but acceptable.
* Add xkb_state_get_map()Ran Benita2012-04-091-0/+6
| | | | | | | This is very useful because it avoids redundent pointers in structs and/or parameter passing in the application. Signed-off-by: Ran Benita <ran234@gmail.com>
* Remove Xfuncproto.h and XKB.h from xkbcommon/xkbcommon.hRan Benita2012-04-091-48/+49
| | | | | | | | | | | | | | | 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.]
* Constify the syms_out argument to xkb_key_get_syms()Ran Benita2012-04-091-1/+1
| | | | | | | The caller should not mess around with these as they come directly from our internal structs. Signed-off-by: Ran Benita <ran234@gmail.com>
* Implement missing xkb_state_ref and add return valueRan Benita2012-04-091-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | xkb_state_ref was missing. Also modify the _ref functions to return the object instead of being void. This is a useful idiom: struct my_object my_object_new(struct xkb_state *state) { [...] my_object->state = xkb_state_ref(state); [...] } Essentially "taking" a reference, such that you don't forget to increment it and it's one line less (see example in our own code). A case could also be made for _unref to return the object or NULL, but this is quite uncommon. Signed-off-by: Ran Benita <ran234@gmail.com> [daniels: Updated for xkb_keymap changes.]
* Fix compiler warningsRan Benita2012-04-091-1/+1
| | | | | | | | | | (They were not reported, see next commit). The reset function declaration didn't match its name in the definition; the _defaults variant matches better with the rest. Signed-off-by: Ran Benita <ran234@gmail.com> [daniels: Updated to current master.]
* Unconstify xkb_rules_namesDaniel Stone2012-04-091-5/+5
| | | | | | | Since we never return an xkb_rules_names and it's all user-provided strings, seems a bit harsh to have it const. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Rename xkb_desc to xkb_keymapDaniel Stone2012-04-091-18/+18
| | | | | | | struct xkb_desc was just a hangover from the old XkbDescRec, which isn't a very descriptive name. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Properly document xkb_key_get_symsDaniel Stone2012-04-031-4/+13
| | | | Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Use xkb_contexts in keymap compilationDaniel Stone2012-03-271-4/+21
| | | | | | Primarily for the include path, but also for the logging in future. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Add new context APIDaniel Stone2012-03-271-1/+73
| | | | Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Make build non-recursiveRan Benita2012-03-271-1/+0
| | | | | | | | | | | | | Unify all the different Makefile.am into a single short top level one (the test/Makefile.am file is left intact though). This makes the build system simpler to look and should encourage unifying more currently-disparate code. Some further motivation can be found in this page: http://www.flameeyes.eu/autotools-mythbuster/automake/nonrecursive.html Signed-off-by: Ran Benita <ran234@gmail.com>
* Define our own NoSymbol value and use itRan Benita2012-03-271-0/+2
| | | | | | | 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>
* Mention xkb_state_new can return NULLRan Benita2012-03-271-1/+2
| | | | | | in the header comments. Signed-off-by: Ran Benita <ran234@gmail.com>
* Move doxygen comment before enum itemGuillem Jover2012-03-271-7/+7
| | | | Signed-off-by: Guillem Jover <guillem@hadrons.org>
* Remove internal API from xkbcommon.hDaniel Stone2012-03-271-342/+51
| | | | | | And move it to XKBcomminint.h. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Remove hardcoded legacy modifier masksDaniel Stone2012-03-271-11/+0
| | | | | | Use the xkb_state_mod_* and xkb_map_mod_* API instead. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Remove unused changes structsDaniel Stone2012-03-271-63/+0
| | | | Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Remove unused members of xkb_stateDaniel Stone2012-03-271-24/+9
| | | | Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Add enum xkb_key_direction instead of boolDaniel Stone2012-03-271-1/+7
| | | | | | | Use XKB_KEY_UP instead of 0 and XKB_KEY_DOWN instead of 1. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reported-by: Ran Benita <ran234@gmail.com>
* Add state serialisation APIDaniel Stone2012-03-271-0/+47
| | | | Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Rename keymap allocation APIDaniel Stone2012-03-221-15/+64
| | | | Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Add LED state APIDaniel Stone2012-03-221-0/+36
| | | | | | | And also convert state.c to use the state API for mods and groups, rather than testing the state members directly. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Fix documentation bugs with mod/group state APIDaniel Stone2012-03-221-2/+2
| | | | Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Round out new state APIDaniel Stone2012-03-211-1/+116
| | | | Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Add new state APIDaniel Stone2012-03-211-2/+41
| | | | | | | | | | | | | | | | | | | | Add new API to deal with xkb_state objects, including xkb_state_update_key, which runs the XKB action machinery internally to calculate what exactly happens to the state when a given key is pressed or released. The canonical way to deal with keys is now: struct xkb_state *state = xkb_state_new(xkb); xkb_keysym_t *syms; int num_syms; xkb_state_update_key(state, key, is_down); num_syms = xkb_key_get_syms(state, key, &syms); More state handling API, including a way to get at or ignore preserved modifiers, is on its way. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Convert interp action from xkb_any_action to xkb_actionDaniel Stone2012-03-141-2/+2
| | | | Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Remove component listing codeDaniel Stone2012-03-141-16/+0
| | | | Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Remove unused control membersDaniel Stone2012-03-141-6/+0
| | | | Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Add a tiny bit of documentation to xkbcommon.hDaniel Stone2012-03-141-2/+2
| | | | Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Add xkb_key_get_syms APIDaniel Stone2012-03-131-8/+12
| | | | | | (And a slight cosmetic header reformatting.) Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Remove half-implemented radio groupsDaniel Stone2012-03-101-2/+0
| | | | | | | It looks like this could never have worked anyway, what with num_rg always being 0 everywhere. Remove it. Signed-off-by: Daniel Stone <daniel@fooishbar.org>