log: change severities to be identical to kernel sevs

The kernel defines 8 severities. Lets be compatible to these numbers so
our API will not have to be changes in the future.

This also causes LOG_ALERT to be added. It is not used, yet, but may be in
the future.

We also change the parameter type of severities to "unsigned int". Enum
variables can change types if new enums are added. We don't want that so
use a fixed type.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
llog: add library log helpers

Libraries must never log unconditionally. Otherwise, applications are
unable to disable logging and can get confused. This header contains
helpers to implement conditional logging on context objects inside of
libraries.

It is compatible to the log interface in kmscon apart from the runtime
configuration.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
log: add link to llog

Add helper function that can be used as llog backend.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
build: set LLOG_ENABLE_DEBUG

Set LLOG_ENABLE_DEBUG if debug mode is used.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
eloop: require llog function in eloop-creation

When creating a new eloop object, we now require an lloop function so we
can perform conditional logging.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
llog: add direct log helpers

Sometimes, the parent object might not be available so we need to pass in
the log-object directly. Use "d" as prefix for those functions and add
variants for the most oftenly used functions.

If you need more direct variants, add them when you introduce the first
user.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
llop: add default helpers

We often need to return the same message over and over again with the same
return value. Use default log-messages now instead of ignoring the log.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
eloop: move to llog

Move every use of log_* to llog_* and make all objects aware of llog
objects.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
static: move statically linked subsystems to static_*

Small stuff that is not worth putting into a separate library is no moved
into the "static" library which is statically linked into all our
subsystems.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
build: put static_* files into separate library

We now build all small helpers into a separate small library that can be
linked statically into all our others. That is, we don't need to keep
backwards compatibility or anything inside this library.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
build: add comments to Makefile.am

Add more comments to Makefile.am to make it more readable.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
doc: fix header of gtk-doc makefile

It still used the old name. So convert it to use the more general name as
we are building all documentation into one global document.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
build: move external sources into libkmscon-static

Move all external sources into this library so we can use them everyone
but also be sure that we can link them statically. We will need this
guarantee later when adding LGPL stuff to libkmscon-static.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
xkb: use unicode conversion from xkbcommon

Support for this was added upstream, so we should avoid keeping the
entire conversion table twice in (readonly) memory. The old files are
still used by the dumb backend.

Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
xkb: only repeat keys when they're supposed to repeat

Support for this was added upstream, we can use it now. This mostly
means that modifiers won't repeat anymore.

Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
xkb: first get keysyms, then update state

This is the correct order, as specified in xkb_state_update_key header
comment.

Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
build: move eloop into shared library

We use the eloop code in several other projects so move it into a shared
library to allow code-sharing.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
build: move uterm into shared library

The uterm code was created to allow other applications to easily build new
user-space terminals for linux machines. Therefore, put it into a separate
library and install the header files correctly.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
uterm: remove libudev.h includes if not needed

All udev-dependencies are now moved into uterm-monitor. This allows us to
easily make udev optional for hotplug-less systems or emergency setups.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
build: move vt.[hc] to libuterm

The kmscon VT layer is used in libuterm exclusively so build it as part of
it.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>