summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Improve the doc of the XKB keymap text format, V1 (#321)Wismill2023-04-301-0/+5
| | | | | | | | | | | - Add table of contents - Add terminology section - (WIP) Add Introduction to the format - Improve the keycode section - Improve the interpret section - Add guide to create and use modifiers - (WIP) Add actions documentation - Add cross-references - Add keysyms header to documentation
* keysyms: add new keysyms XF86EmojiPicker, XF86DictateRan Benita2023-04-121-0/+2
| | | | | | Ref: https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/commit/914d8f5e0f469cd0416364dd008e9eea752bf703 Ref: https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/commit/a839f0c7fc5596d10e786394d3b0953eb8a1731b Signed-off-by: Ran Benita <ran@unusedvar.com>
* doc: clarify "server state" and "client state" distinctionRan Benita2022-12-171-21/+42
| | | | | | | Add a common page for the concept and link to there from the relevant functions. Signed-off-by: Ran Benita <ran@unusedvar.com>
* context: add XKB_CONTEXT_NO_SECURE_GETENV flag (#312)Ronan Pigott2022-12-162-1/+16
| | | | | | | | | This flag is useful for clients that may have relatively benign capabilities set, like CAP_SYS_NICE, that also want to use the xkb configuration from the environment and user configs in XDG_CONFIG_HOME. Fixes: https://github.com/xkbcommon/libxkbcommon/issues/308 Fixes: https://github.com/xkbcommon/libxkbcommon/issues/129 Signed-off-by: Ran Benita <ran@unusedvar.com>
* Improve misleading comments #270Mladen Milinkovic2022-02-241-1/+2
|
* xkbcommon: deprecate XK_approxeq and XK_notapproxeqRan Benita2021-05-221-2/+2
| | | | | | | | Sync xorg-proto commit https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/commit/25f3278b85ec7d1c78bb150eaea52f9c98294ea4 Fixes: #82 Signed-off-by: Ran Benita <ran@unusedvar.com>
* Move include files to include/ subdirectoryRan Benita2021-04-277-0/+6871
| | | | | | | This way we don't specify `include_directorories('.')` which brings in more than needed. Signed-off-by: Ran Benita <ran@unusedvar.com>
* build: drop the include/ directoryRan Benita2012-07-233-3651/+0
| | | | | | | | | | The include/ dir is somewhat redundant and makes it just a bit harder to handle the -I directives from out side of automake; without it the default $(top_buildir) just works. Here's also some further justifications I found: http://smcv.pseudorandom.co.uk/2008/09/pc-uninstalled/ Signed-off-by: Ran Benita <ran234@gmail.com>
* Run source tree through uncrustifyDaniel Stone2012-07-171-68/+65
| | | | | | | .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>
* Enlarge keysym name buffers and mention in commentRan Benita2012-07-121-1/+3
| | | | | | The longest keysym is 27 chars long. Signed-off-by: Ran Benita <ran234@gmail.com>
* Add xkb_key_repeatsDaniel Stone2012-06-221-0/+6
| | | | | | Does what it says on the box. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Move XKB_KEY_NoSymbol to xkbcommon-keysyms.hRan Benita2012-06-092-2/+1
| | | | | | | | | 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>
* Add API for getting unicode representation of a keysymRob Bradford2012-06-081-0/+19
| | | | | | | | | | | | | This code uses a table and code derived from http://www.cl.cam.ac.uk/~mgk25/ucs/keysym2ucs.c The added API calls are: xkb_keysym_to_utf32 xkb_keysym_to_utf8 [daniels: Changed API to be more in line with keysym_get_name, added test, changed formatting to 4-space.]
* Add xkb_map_get_as_stringDaniel Stone2012-05-291-0/+7
| | | | | | Returns a newly-allocated string representing the specified keymap. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Change xkb_map_new_from_fd to use FILE*Ran Benita2012-05-181-3/+4
| | | | | | | | | | | | | | | | | i.e. xkb_map_new_from_file. The reason is that flex only works with FILE's, so we must use fdopen on the file descriptor; but to avoid a memory leak, we must also fclose() it, which, in turn, closes the file descriptor itself. Either way is not acceptable, so we can either: * dup() the fd and use fdopen on that, or * have the user call fdopen on his own, and accept a FILE* instead of an fd. The second one seems better, and is standard C, so why not. We must add stdio.h to xkbcommon.h though, which is regrettable, but not a big deal. Signed-off-by: Ran Benita <ran234@gmail.com>
* Rename 'ctx' back to 'context' in external APIDaniel Stone2012-05-111-19/+19
| | | | | | | | | | Still keep things as 'ctx' internally so we don't have to worry about typing it too often, but rename the user-visible API back as it was kinda ugly. This partially reverts e7bb1e5f. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* 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>