Commit Graph

79 Commits (1a4a89a749100db97cc00cef0c79ee2eceda4c69)

Author SHA1 Message Date
Ran Benita d9f934ca42 Mention xkb_state_new can return NULL
in the header comments.

Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-27 13:58:27 +01:00
Guillem Jover 087327d9c5 Move doxygen comment before enum item
Signed-off-by: Guillem Jover <guillem@hadrons.org>
2012-03-27 13:45:17 +01:00
Daniel Stone 389c2db1d7 Remove internal API from xkbcommon.h
And move it to XKBcomminint.h.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-27 13:44:48 +01:00
Daniel Stone 3dcd7ae02c Remove hardcoded legacy modifier masks
Use the xkb_state_mod_* and xkb_map_mod_* API instead.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-27 12:20:42 +01:00
Daniel Stone 729ac12f1c Remove unused changes structs
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-27 12:19:42 +01:00
Daniel Stone f89b0a80ba Remove unused members of xkb_state
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-27 12:18:50 +01:00
Daniel Stone ede8473490 Add enum xkb_key_direction instead of bool
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>
2012-03-27 12:18:41 +01:00
Daniel Stone 7f471a702e Add state serialisation API
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-27 12:11:27 +01:00
Daniel Stone d039622a65 Rename keymap allocation API
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-22 17:39:12 +00:00
Daniel Stone 3d672fcfea Add LED state API
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>
2012-03-22 14:32:53 +00:00
Daniel Stone cfb07724b7 Fix documentation bugs with mod/group state API
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-22 14:30:58 +00:00
Daniel Stone edcaab6512 Round out new state API
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-21 15:25:45 +00:00
Daniel Stone ecea0d71b2 Add new state API
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>
2012-03-21 02:22:04 +00:00
Daniel Stone 62444a117c Convert interp action from xkb_any_action to xkb_action
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-14 17:06:09 +00:00
Daniel Stone 54aa839c0e Remove component listing code
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-14 12:00:54 +00:00
Daniel Stone 3ee370e969 Remove unused control members
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-14 12:00:54 +00:00
Daniel Stone 5dd817339d Add a tiny bit of documentation to xkbcommon.h
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-14 11:56:59 +00:00
Daniel Stone bc07452542 Add xkb_key_get_syms API
(And a slight cosmetic header reformatting.)

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-13 19:06:05 +00:00
Daniel Stone 24c61d0f78 Remove half-implemented radio groups
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>
2012-03-10 14:27:06 +00:00
Daniel Stone e7c8bac79d Remove indirect XkbCM* and XkbSM* macros
The XkbKey* macros used to work through XkbCM* and XkbSM* variants, for
the xkb_map and xkb_server_map respectively; the latter versions weren't
used by anyone at all, so just bin them and make the macros work
directly.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-10 14:08:43 +00:00
Daniel Stone 971eb485c5 Clean up xkb_keysym_to_string message
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 20:01:33 +00:00
Daniel Stone 0bb24c2d23 Introduce xkb_keysym_t type
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 19:30:31 +00:00
Daniel Stone d67a94d374 Remove atom functions from public API
They're no longer needed since we don't expose any atoms in the
published API anymore.  As a result, we don't need to support external
atom implementations either.  Result!

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 19:30:31 +00:00
Daniel Stone 731e5c40bc Stringify public name types
Ensure that all names under xkb_desc are strings, rather than atoms.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 19:30:31 +00:00
Daniel Stone ed5c6c1796 Remove geometry support, again
It still parses geometry, but happily throws it away.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 19:30:30 +00:00
Daniel Stone b28823cc59 Remove KcCGST names from the map
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 16:04:00 +00:00
Daniel Stone f57dcfebf4 Raise keycode range to 32 bits
\o/

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-02-15 16:24:51 +00:00
Daniel Stone 4e22851141 Introduce xkb_keycode_t for keycodes
And use it consistently everywhere, including with a special long-safe
internal keycode type, to ease the transition to large keycodes.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-02-15 16:24:50 +00:00
Daniel Stone ead9d0cb62 Move include path from X11/extensions/ to xkbcommon/
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-02-15 16:24:50 +00:00