|
28a22ba2
|
2014-04-22T18:05:24
|
|
xkbcomp: use straight assignment instead of CopyModSet
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
787faf36
|
2014-04-22T12:23:36
|
|
keymap: don't use darray in xkb_mod_set
Instead just statically allocate the mods array (of size MAX_MOD_SIZE =
32). The limit is not going anywhere, and static allocations are nicer
(nicer code, no OOM, etc.). It's also small and dense enough.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
bf2878d2
|
2013-02-08T15:12:35
|
|
compat: use xkb_mod_set instead of entire keymap
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
b5655b3d
|
2013-02-08T14:39:38
|
|
vmod: take xkb_mod_set instead of the entire keymap
This is the only place where the modifier information is modified. We
will make it local to a given XKB file (after which it will be merged
into the keymap). Currently it changes the keymap directly, which
sidesteps the abstraction and leaves side-effects even if the XkbFile's
compilation fails.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
5bd273a7
|
2012-11-27T10:42:15
|
|
vmod: bring back support for direct vmod -> real mod mapping
This brings back the functionality that was removed in
b9c87eb710ba4a86455601ca8c5a516b25e20366. Though it is not used in
xkeyboard-config, from our current perspective it can be quite useful to
be able to set the mappings directly, thus sidestepping the ugly and
legacy-ridden modifier_map statement.
Here's an example of how to get rid of modifier_map statements (though
that would break core-X11 applications, since they must have the
mappings through keysyms):
virtual_modifiers NumLock = Mod2;
virtual_modifiers Alt = Mod1;
// Would be nice to map these to Alt, but that would be
// incompatible with xkbcomp and somewhat complicated
virtual_modifiers LAlt = Mod1;
virtual_modifiers RAlt = Mod1;
virtual_modifiers LevelThree = Mod5;
virtual_modifiers RControl = Control;
virtual_modifiers LControl = Control;
virtual_modifiers Super = Mod4;
virtual_modifiers Meta = Mod1;
virtual_modifiers Hyper = Mod4;
virtual_modifiers AltGr = Mod5;
virtual_modifiers LShift = Shift;
virtual_modifiers RShift = Shift;
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
aed3140e
|
2012-10-05T21:06:34
|
|
Remove VModInfo for now
VModInfo currently is only used to track which virtual modifiers were
declared in the file which owns the VModInfo. This, in turn, is only
used in ResolveVirtualModifier, which in turn is only used to resolve
the virtualModifier field in an interpret statement (compat.c). In other
words, it is used to ensure that interprets can only use a vmod which
was declared in the same map.
We remove this now, because it doesn't do much and distracts from other
changes; we will later re-add it properly. Specificly, we will make it
so that virtual modifiers are not the exception in that they modify the
keymap directly, instead of keeping the changes in some *Info struct and
commiting them to the keymap at the end of the compilation. (This is bad
because if a vmod is added to the keymap, and then the compilation of
this specific file fails, the change sticks around nonetheless).
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
1f4009d4
|
2012-10-04T19:44:47
|
|
vmod: remove merge argument from HandleVModDef
It's unused and unneeded.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
a75989b9
|
2012-10-04T12:39:22
|
|
Omit struct '_Name' from non-recursive struct typedefs
Just a pet peeve.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
96c21e15
|
2012-09-14T00:21:54
|
|
Clean up Init/Clear functions
- The Clear* functions should just free the memory associated with the
object. If the object is used again, it is Init'd again.
- s/Free/Clear if the actual pointer is not free'd.
- Zeroise object in Init and only initialize non-zero fields.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
b3aced7e
|
2012-08-28T11:14:54
|
|
vmod: ClearVModInfo doesn't need the keymap
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
cdc228ea
|
2012-08-13T11:00:43
|
|
Organize xkbcomp/ header files
Various non-functional changes:
- Re-add keycodes.h and move some stuff there.
- Add parser-priv.h for internal bison/flex stuff.
- Don't include headers from other headers, such that file dependencies
are immediate in each file.
- Rename xkbcomp.h -> ast.h, parseutils.{c,h} -> ast-build.{c,h}
- Rename path.{c,h} -> include.{c,h}
- Rename keytypes.c -> types.c
- Make the naming of XkbFile-related functions more consistent.
- Move xkb_map_{new,ref,unref} to map.c.
- Remove most extern keyword from function declarations, it's just
noise (XKB_EXPORT is what's important here).
- Append XKBCOMP_ to include guards.
- Shuffle some code around to make all of this work.
Splitting this would be a headache..
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
b0b11c4e
|
2012-08-02T00:29:07
|
|
types: don't use canonical/required types
Xkb required every keymap to have at least the four following canonical
types: ONE_LEVEL, TWO_LEVEL, ALPHABETIC, KEYPAD. This is specified in
e.g. the kbproto spec and XkbKeyTypesForCoreSymbols(3) man page.
If these types are not specified in the keymap, the code specifically
checks for them and adds them to the 4 first places in the types array,
such that they exist in every keymap. These are also the types (along
with some non-required 4-level ones) that are automatically assigned to
keys which do not explicitly declare a type (see FindAutomaticType in
symbols.c, this commit doesn't touch these heuristics, whcih are also not
very nice but necessary).
The xkeyboard-config does not rely on the builtin xkbcomp definitions of
these types and does specify them explicitly, in types/basic and
types/numpad, which are virtually always included.
This commit removes the special behavior:
- The code is ugly and makes keytypes.c harder to read.
- The code practically never gets run - everyone who uses
xkeyboard-config or a keymap based upon it (i.e. everyone) doesn't need
it. So it doesn't get tested.
- It mixes policy with implementation for not very good reasons, it
seems mostly for default compatibility with X11 core.
- And of course we don't need to remain compatible with Xkb ABI neither.
Instead, if we read a keymap with no types specified at all, we simply
assign all keys a default one-level type (like ONE_LEVEL), and issue
plenty of warnings to make it clear (with verbosity >= 3). Note that
this default can actually be changed from within the keymap, by writing
something like
type.modifier = Shift
type.whatever_field = value
in the top level of the xkb_types section. (This functionality is
completely unused as well today, BTW, but makes some sense).
This change means that if someone writes a keymap from scratch and
doesn't add say ALPHABETIC, then something like <AE11> = { [ q Q ]; }; will
ignore the second level. But as stated above this should never happen.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
09dac54b
|
2012-08-01T21:31:36
|
|
vmod: remove unused fields
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
41d9afc5
|
2012-07-27T15:31:03
|
|
Remove ExprResult
Convert the IdentLookup typedef away from ExprResult, which drags along
everything else. This should also make all of the conversions explicit.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
6cb98200
|
2012-07-24T13:15:40
|
|
Use xkb_mod_mask_t and xkb_mask_index_t throughout
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
544a83e6
|
2012-07-21T15:27:09
|
|
vmod: use new log functions
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>
|
|
213dcf68
|
2012-06-29T17:31:10
|
|
Use enum for merge mode
The merge mode shows up in a lot of functions, so it's useful to give it
a distinct type.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
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>
|
|
33273304
|
2012-05-08T13:57:07
|
|
Rename xkbcomp/misc.h to xkbcomp-priv.h and use it
The include dependencies were quite convoluted, where you change the
order and get a ton of errors. Instead, change one file to act as the
internal interface for the xkbcomp files, and make every file use it.
Also drop the pointless "xkb" prefix to file names.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
a641a185
|
2012-04-06T03:38:55
|
|
Use stdbool.h
'Cause defining your own True and False is so 1990's.
Signed-off-by: Ran Benita <ran234@gmail.com>
[daniels: Fixed for xkb_desc -> xkb_keymap changes.]
|
|
a39ed85f
|
2012-04-05T11:24:39
|
|
Fix formatting in xkbcomp headers
Signed-off-by: Ran Benita <ran234@gmail.com>
[daniels: Fixed for xkb_desc -> xkb_keymap change.]
|
|
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>
|
|
43ed3ff0
|
2012-02-20T17:14:04
|
|
Switch expression resolution priv from char to void
Avoids a lot of really lame casts.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
90d86c36
|
2012-02-20T16:54:54
|
|
Remove field reference lookup support
None of the lookup functions anyone ever used supported field
references, so don't pretend we do in the API.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
1a6c3807
|
2012-02-15T15:58:14
|
|
vmod: Pass xkb_desc explicitly to vmod functions
Some error paths don't set info->xkb correctly, so just do like most
utility functions and pass the xkb_desc explicitly.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
73ca959d
|
2010-09-27T16:05:52
|
|
Dead code removal and static markup
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
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.
|
|
47d3b396
|
2010-06-28T06:50:12
|
|
Drop CARD32 and Opaque types
|
|
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>
|
|
5c910623
|
2009-04-04T09:19:51
|
|
Remove trailing spaces in source files
|
|
4fe322aa
|
2009-03-27T20:13:22
|
|
libxkbcomp: s/XPointer/char */
Replace XPointer with its definition since we don't have the privilege
of using Xlib.h. Why this is char * and not void *, I'll never know.
|
|
37769b5a
|
2009-03-27T20:01:32
|
|
libxkbcomp: s/XkbDescPtr/XkbcDescPtr/
We need to use the keyboard description structure from XKBcommon.h since
it doesn't have the Display field.
|
|
0c1bbb05
|
2009-03-27T06:55:32
|
|
Import xkbcomp sources for CompileKeymap
A copy of the xkbcomp sources (except the frontend) have been copied in
to provide a means to compile a XkbDescPtr. This definitely doesn't
build or do the right thing yet.
|