|
a2507c08
|
2022-02-24T10:48:50
|
|
Improve misleading comments #270
|
|
7062ab97
|
2021-05-22T19:36:22
|
|
xkbcommon: deprecate XK_approxeq and XK_notapproxeq
Sync xorg-proto commit
https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/commit/25f3278b85ec7d1c78bb150eaea52f9c98294ea4
Fixes: #82
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
de1b6943
|
2021-04-27T10:10:26
|
|
Move include files to include/ subdirectory
This way we don't specify `include_directorories('.')` which brings in
more than needed.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
5e164ff1
|
2012-07-23T00:41:27
|
|
build: drop the include/ directory
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>
|
|
9308a460
|
2012-07-17T10:20:15
|
|
Run source tree through uncrustify
.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>
|
|
1f492901
|
2012-07-11T18:00:31
|
|
Enlarge keysym name buffers and mention in comment
The longest keysym is 27 chars long.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
8e2c66e9
|
2012-06-22T15:27:05
|
|
Add xkb_key_repeats
Does what it says on the box.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
58b030bb
|
2012-05-20T20:39:35
|
|
Move XKB_KEY_NoSymbol to xkbcommon-keysyms.h
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>
|
|
e0524296
|
2012-06-08T13:10:28
|
|
Add API for getting unicode representation of a keysym
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.]
|
|
ebd397e1
|
2012-05-25T17:05:39
|
|
Add xkb_map_get_as_string
Returns a newly-allocated string representing the specified keymap.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
b89b8e70
|
2012-05-13T23:31:59
|
|
Change xkb_map_new_from_fd to use FILE*
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>
|
|
7b00485a
|
2012-05-11T15:03:43
|
|
Rename 'ctx' back to 'context' in external API
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>
|
|
471e1122
|
2012-05-09T20:52:33
|
|
Document that xkb_state_get_map doesn't take a ref
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
7a1201bd
|
2012-05-09T20:51:37
|
|
Change xkb_key_get_syms to just return a bare int
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
46441b11
|
2012-05-09T20:49:04
|
|
Move KcCGST API to internal-only
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>
|
|
2761b1a3
|
2012-05-09T20:20:12
|
|
Rename serialise to serialize
Yes, British English is correct, but unfortunately we've lost that
battle.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
5a3771d1
|
2012-05-09T20:18:30
|
|
Add common LED names to xkbcommon-names.h
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
693d0578
|
2012-05-09T20:17:13
|
|
Include xkbcommon-names.h from xkbcommon.h
So clients only have one file to include.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
3e3ddd43
|
2012-05-09T20:12:18
|
|
Remove keycode_range_is_legal
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>
|
|
6433d72e
|
2012-05-09T20:12:12
|
|
Merge remote-tracking branch 'krh/keysyms'
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>
|
|
ace1e5df
|
2012-05-09T09:05:00
|
|
Use our own keysyms
|
|
c6897d26
|
2012-05-09T08:33:04
|
|
Add XKB version of X11 keysyms
With this we're now completely standalone.
add vendor keysyms
|
|
e7bb1e5f
|
2012-05-09T15:03:11
|
|
Shorten context to ctx
(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.]
|
|
38cb6390
|
2012-05-09T15:15:30
|
|
Change all 'xkb' xkb_keymap names to 'keymap'
To make it a bit more clear what it actually is.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
e1af48bc
|
2012-05-09T13:22:34
|
|
Rename keysym <-> string API
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>
|
|
124e62e4
|
2012-05-09T01:06:10
|
|
Add multiple modifier state matching API
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>
|
|
74a197d2
|
2012-05-08T17:59:35
|
|
Add pre-defined names database
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>
|
|
2a0f1780
|
2012-05-08T17:52:45
|
|
Add context flag to inhibit default include paths
Which will make the context start with no include paths at all.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
c3584280
|
2012-05-08T17:51:16
|
|
Add flags to context creation
None defined as yet, but why not.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
b537b552
|
2012-05-08T17:48:29
|
|
Add flags to keymap compilation entrypoints
No use as yet, but might as well ...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
b41c77f8
|
2012-05-07T14:54:12
|
|
Revert "Unconstify xkb_rules_names"
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.
|
|
1b9635df
|
2012-04-08T02:08:37
|
|
Add xkb_state_get_map()
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>
|
|
18e6a6a4
|
2012-04-05T10:47:43
|
|
Remove Xfuncproto.h and XKB.h from xkbcommon/xkbcommon.h
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.]
|
|
073a2107
|
2012-04-08T15:40:12
|
|
Constify the syms_out argument to xkb_key_get_syms()
The caller should not mess around with these as they come directly from
our internal structs.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
467d7bb6
|
2012-04-05T10:13:24
|
|
Implement missing xkb_state_ref and add return value
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.]
|
|
2590b5a1
|
2012-04-08T15:37:36
|
|
Fix compiler warnings
(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.]
|
|
d007cd0a
|
2012-04-03T17:08:57
|
|
Unconstify xkb_rules_names
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>
|
|
ef88c7ef
|
2012-04-03T15:14:16
|
|
Rename xkb_desc to xkb_keymap
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>
|
|
69111405
|
2012-04-03T12:48:05
|
|
Properly document xkb_key_get_syms
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
034ffce6
|
2012-03-27T17:22:35
|
|
Use xkb_contexts in keymap compilation
Primarily for the include path, but also for the logging in future.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
3e9dd751
|
2012-03-27T16:59:01
|
|
Add new context API
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
b5efe41f
|
2012-03-24T04:48:31
|
|
Make build non-recursive
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>
|
|
602e8780
|
2012-03-24T13:27:48
|
|
Define our own NoSymbol value and use it
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>
|
|
d9f934ca
|
2012-03-23T16:52:23
|
|
Mention xkb_state_new can return NULL
in the header comments.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
087327d9
|
2012-03-27T14:41:44
|
|
Move doxygen comment before enum item
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
389c2db1
|
2012-03-27T13:44:48
|
|
Remove internal API from xkbcommon.h
And move it to XKBcomminint.h.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
3dcd7ae0
|
2012-03-27T12:20:42
|
|
Remove hardcoded legacy modifier masks
Use the xkb_state_mod_* and xkb_map_mod_* API instead.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
729ac12f
|
2012-03-27T12:19:42
|
|
Remove unused changes structs
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
f89b0a80
|
2012-03-27T12:18:50
|
|
Remove unused members of xkb_state
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
ede84734
|
2012-03-27T12:11:45
|
|
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>
|
|
7f471a70
|
2012-03-27T12:07:57
|
|
Add state serialisation API
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
d039622a
|
2012-03-22T17:39:12
|
|
Rename keymap allocation API
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
3d672fcf
|
2012-03-22T14:32:53
|
|
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>
|
|
cfb07724
|
2012-03-22T14:30:58
|
|
Fix documentation bugs with mod/group state API
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
edcaab65
|
2012-03-21T15:25:32
|
|
Round out new state API
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
ecea0d71
|
2012-03-21T02:20:07
|
|
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>
|
|
62444a11
|
2012-03-14T17:06:09
|
|
Convert interp action from xkb_any_action to xkb_action
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
3ee370e9
|
2012-03-14T11:58:24
|
|
Remove unused control members
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
54aa839c
|
2012-03-14T11:59:52
|
|
Remove component listing code
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
5dd81733
|
2012-03-14T11:56:59
|
|
Add a tiny bit of documentation to xkbcommon.h
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
bc074525
|
2012-03-13T19:06:05
|
|
Add xkb_key_get_syms API
(And a slight cosmetic header reformatting.)
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
24c61d0f
|
2012-03-10T14:27:06
|
|
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>
|
|
e7c8bac7
|
2012-03-10T14:08:43
|
|
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>
|
|
971eb485
|
2012-03-09T20:01:33
|
|
Clean up xkb_keysym_to_string message
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
0bb24c2d
|
2012-03-09T19:03:59
|
|
Introduce xkb_keysym_t type
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
d67a94d3
|
2012-03-09T18:57:14
|
|
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>
|
|
731e5c40
|
2012-03-09T18:53:47
|
|
Stringify public name types
Ensure that all names under xkb_desc are strings, rather than atoms.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
ed5c6c17
|
2012-03-09T16:26:34
|
|
Remove geometry support, again
It still parses geometry, but happily throws it away.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
b28823cc
|
2012-03-09T16:04:00
|
|
Remove KcCGST names from the map
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
f57dcfeb
|
2012-02-15T16:23:47
|
|
Raise keycode range to 32 bits
\o/
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
4e228511
|
2012-02-15T14:34:08
|
|
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>
|
|
ead9d0cb
|
2012-02-15T11:49:10
|
|
Move include path from X11/extensions/ to xkbcommon/
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
c19661b9
|
2011-12-16T12:52:00
|
|
Add xkbc_free_keymap helper
Which just calls XkbcFreeKeyboard with the only arguments you'd ever
pass it.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
a63e82be
|
2010-12-17T21:14:54
|
|
Rename XkbcInternAtom() to xkb_intern_atom() and export
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
|
|
ff8e8f69
|
2010-12-09T18:25:18
|
|
config: include: use nobase_include_HEADERS
Slightly simpler.
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
|
12569157
|
2010-10-20T15:57:45
|
|
Restore compatible action structs
This unbreaks the X server code to serialize an xkb_desc, but loses the
32 bit vmod fields. Needs some work...
|
|
a84c0879
|
2010-10-19T21:57:59
|
|
Use flex for generating the scanner, add support for parsing from strings
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
|
|
a2f11558
|
2010-10-19T15:16:50
|
|
Add struct xkb_state
|
|
e8798287
|
2010-10-08T15:33:18
|
|
Don't return a static buffer in public API
|
|
d202bc44
|
2010-10-08T15:07:44
|
|
Pull in XKB_COMMON_* version of modifier masks
This way we can use libxkbcommon without having to include X.h.
|
|
fb05ee47
|
2010-09-03T20:35:28
|
|
Remove libxkbfile dependency for real this time
|
|
20bfe128
|
2010-08-29T21:30:10
|
|
Use const char * in struct xkb_rule_names
|
|
be2bd661
|
2010-08-25T14:51:52
|
|
Pull in a few #defines from libxkbfile and lower kbproto requirement
|
|
351f8c65
|
2010-07-02T15:05:21
|
|
Drop Bool type
It's a nightmare trying to avoid double definitions.
|
|
b3805a23
|
2010-07-02T12:26:43
|
|
Get rid of a few unused #defines in public header
|
|
97fbc348
|
2010-07-02T12:14:03
|
|
Rename XkbRMLVOSet to struct xkb_rule_names
|
|
15f25999
|
2010-07-02T12:10:05
|
|
Move private structs and defines to private headers
|
|
5669e1a8
|
2010-07-02T11:43:56
|
|
Compile with -fvisibility=hidden when possible
|
|
3f0034a9
|
2010-07-02T11:50:01
|
|
Rename public entry points to lowercase and underscore
|
|
9f602686
|
2010-07-01T14:35:24
|
|
Pull in enough structs and defines from XKBstr.h to only need XKB.h
We want to move away from sharing implementation structs and let libX11
and libxkbcommon use each their own set of structs.
|
|
9d55d5bb
|
2010-06-30T17:32:54
|
|
Drop Xmd.h include now that we're using uint32_t
|
|
a76df865
|
2010-06-30T16:33:25
|
|
Use the right action structs
We were casting the union members to the wrong action structs (from kbproto).
|
|
1723ef1b
|
2010-06-30T15:48:39
|
|
Copy over missing action structs from kbproto
|
|
9258cc3d
|
2010-06-30T13:31:21
|
|
Rename Xkbc*Action to struct xkb_*_action
|
|
47d3b396
|
2010-06-28T06:50:12
|
|
Drop CARD32 and Opaque types
|
|
2fb329c9
|
2010-06-23T16:25:10
|
|
Copy and duplicate XkbModsRec and XkbKTMapEntryRec
Copy these types in so we can extend the vmod size.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
b74223eb
|
2010-06-23T16:25:02
|
|
fix mod size confusion
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
15b0db54
|
2010-06-17T05:56:08
|
|
Copy in XkbCompatMapRec and XkbSymInterpretRec
These contain actions, so transition them ahead to XkbcAction and move
them into XKBcommon.h.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
7257d4c8
|
2010-06-21T14:28:34
|
|
Use CARD32 instead of Atom, move geom headers in
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>
|
|
2c4a045a
|
2010-06-21T14:22:26
|
|
Allow external atom databases
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>
|