vte: improve docs

Add parser-links to the docs and add summary comment to the vte.c source file.

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

Add 2012 to copyright and remove University of Tuebingen from new files as
copyright holder. It will still remain in the old files, though.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
build: implicitly include config.h

config.h is meant to be around in all files, as it contains stuff like
_GNU_SOURCE, NDEBUG and HAVE_*.

Make these definitions available without needing to #include config.h
every single time.

Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
input: add features mechanism

This commit discards the simplistic udev check for the ID_KEYBOARD
property in favor of a more direct "feature" probing. This is done for
the following reasons:

- We will need to use input devices which are not necessarily keyboards,
  for example the PC speaker to sound the bell.

- To differentiate between keyboard with certain capabilities, such as
  LEDs (indicators). We can then perform actions on devices according to
  their feature bits.

- We check directly for what we need, i.e. the ability to send/receive
  certain evdev events, without relying on logic in udev. This also
  reduces our dependency on udev if we ever want to make it optional.

Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
input: test for LED feature and use it

Add probing for LEDs in the input devices, and move the ioctl for the
LEDs state from the keyboard backends to the input subsystem itself
(thus not exposing the device's file descriptor unnecessarily).

Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
vte: constify global tables

Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
eloop: rename from kmscon_ to ev_

We don't need the long kmscon_ prefix so make it shorter.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
eloop: move prefix to "ev_" instead of "kmscon_"

The long "kmscon_" prefix is horrible so move everything to "ev_" now.

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

The new logger is much more powerful, allows online log-filter
modifications and precise debugging. We still avoid heavy file-operations
as we rely on the caller to forward stderr to a log-file and perform
log-rotations. However, we now provide a simple way to perform this
forward inside the application.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
uterm: new video backend

Our old backend was hacked together and hadn't have any structure. This is
a new approach to create the uterm-library inside kmscon. The
uterm-library will contain everything that is needed to run an application
on Linux DRM devices without X11 or Wayland support.

The idea is to move the input subsystem to uterm, too. No other stuff is
currently planned to be included in uterm.

Although uterm is supposed to be a separate library, we do not build it as
such library. We currently include the log-subsystem and the
eloop-handlers in the library so we cannot build it as stand-alone
library. However, we try to keep it separate so if we ever need to export
it, then it should be a one-hour job to do it so.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
uterm_video: add DRM backend

uterm_video can work with any backend so we need a DRM backend to get the
same functionality as our previous compositor/output API.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
uterm_video: add dummy fbdev backend

The fbdev backend is non-functional, but we add it for documentational
purposes. It is not built as part of kmscon.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
uterm_video: include GLES2 headers instead of GL

We use GLES2 for drawing. There is currently no reason to provide full GL
inside kmscon as we use the basic operations only.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
gl: add GL subsystem

The GL subsystem is copied from the old output_context subsystem and now
provides shader and GL-math. It will replace the old output_context subs
soon.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
uterm_video: take ref-cnt of display in screen object

Inside a screen object we are independent of the lifetime of the displays
so we need to correctly keep references to them.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
gl: add debug statements

Add messages about new shader objects.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
build: define LOG_ENABLE_DEBUG if debugging

Define LOG_ENABLE_DEBUG if we enabled debugging. The log subsystem uses
this to enable the log_debug() statements.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
uterm_video: add *_screen_height/width() helpers

A screen may have a different size than the displays so add these two
hooks.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
test_output: use new uterm/log/etc. subsystems

Convert the test_output test to use the new subsystems.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
gl: add viewport helper

This helper correctly sets the viewport to the size of a screen.

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