Add libxkbregistry to query available RMLVO
authorPeter Hutterer <peter.hutterer@who-t.net>
Tue, 12 May 2020 04:09:50 +0000 (14:09 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Mon, 6 Jul 2020 05:15:20 +0000 (15:15 +1000)
commitafb26e7df9090a0b765eb294b6efff448f763b6f
treeed8820db131fde2f5190333e0776aced657629d7
parentfe8861338242762da6a3245a106042266280714c
Add libxkbregistry to query available RMLVO

This library is the replacement for clients parsing evdev.xml directly.
Instead, they should use the API here so that in the future we may even
be able to swap evdev.xml for a more suitable data format.

The library parses through evdev.xml (using libxml2) and - if requested -
through evdev.extras.xml as well. The merge approach is optimised for
the default case where we have a system-installed rules XML and another file in
$XDG_CONFIG_DIR that adds a few entries.  We load the system file first, then
append any custom ones to that. It's not possible to overwrite the MLVO list
provided by the system files - if you want to do that, get the change upstream.

XML validation is handled through the DTD itself which means we only need to
check for a nonempty name, everything else the DTD validation should complain
about.

The logging system is effectively identical to xkbcommon.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
15 files changed:
.github/workflows/main.yml
NEWS
PACKAGING
README.md
doc/user-configuration.md
meson.build
meson_options.txt
src/darray.h
src/registry.c [new file with mode: 0644]
src/util-list.c [new file with mode: 0644]
src/util-list.h [new file with mode: 0644]
test/registry.c [new file with mode: 0644]
tools/registry-list.c [new file with mode: 0644]
xkbcommon/xkbregistry.h [new file with mode: 0644]
xkbregistry.map [new file with mode: 0644]