evdev: Port evdev input backend to libinput

Instead of having its own evdev input device processing implementation,
make clutter's evdev backend use libinput to do input device processing
for it.

Two GObject parameters of ClutterInputDeviceEvdev (sysfs-path and
device-path) are removed as they are not used any more.

Before ClutterDeviceManagerEvdev had one virtual core keyboard and one
virtual core pointer device. These are now instead separated into seats,
which all have one virtual core keyboard and pointer device respectively.

The 'global' core keyboard and pointer device are the core keyboard and
pointer device of the first seat that is created.

A ClutterInputDeviceEvdev can, as before, both represent a real physical
device or a virtual device, but is now instead created either via
_clutter_input_device_evdev_new() for real devices, and
_clutter_input_device_new_virtual() for virtual devices.

XKB state and button state is moved to the seat structure and is thus
separated per seat. Seats are not a concept exposed outside of clutter's
evdev backend.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=720566
build: Bump required libinput version to the actually released 0.1.0
evdev: Add a conditional define guard to expose API

The evdev backend has always been excluded from Clutter's API
stability guarantee though in an informal way. This commit makes it
explicit by forcing users to define CLUTTER_ENABLE_COMPOSITOR_API.

https://bugzilla.gnome.org/show_bug.cgi?id=725102
evdev: Implement keyboard repeat

The kernel keyboard repeat functionality isn't configurable and
libinput rightfully ignores it.

This implements keyboard repeat in userspace allowing for consumers to
set the initial delay and repeat intervals.

https://bugzilla.gnome.org/show_bug.cgi?id=725102
evdev: Keep latched and locked modifier state when switching keymaps

https://bugzilla.gnome.org/show_bug.cgi?id=725102
evdev: Don't update xkb state with pressed keys on keymap change

Doing so is unlikely to work reliably. Instead, switching the keymap
should be done at a time when no key is currently pressed down, but
let's leave that task to higher level code.

This allows us to remove key state tracking at yet another level in
the stack since higher level code likely already tracks this for other
purposes.

https://bugzilla.gnome.org/show_bug.cgi?id=725102
evdev: Make the keymap available

Make the keymap available so that consumers don't have to duplicate it
if they need it.

https://bugzilla.gnome.org/show_bug.cgi?id=725102
evdev: Set the initial core pointer coordinates to a sane value

ClutterInputDevice's default initial coordinates is (-1, -1) and since
they're updated from events in a relative way it means that the
pointer can go outside the stage right from the first event.

We usually let this up to higher layers to fix through the pointer
constraint callback but that doesn't work if the first event doesn't
put the pointer immediately inside the stage.

https://bugzilla.gnome.org/show_bug.cgi?id=725103
evdev: Add missing 'Since' and 'Stability' doc tags
evdev: Add missing CLUTTER_AVAILABLE_IN_* annotations
evdev: Kill compile warning
Updated Polish translation
DeviceManagerXi2: Cache the client pointer

Currently clutter_device_manager_xi2_get_core_device always
does a round trip to query the client.

So avoid that by caching the client pointer and only update it when the
xi devices change.

https://bugzilla.gnome.org/show_bug.cgi?id=725561
device-manager-evdev: Make sure to reset released when reclaiming devices

Otherwise, Clutter will tell us that we forgot to call reclaim_devices
the next time we call release_devices... but we didn't!
Updated Galician translations
text: Discover the direction of the contents

We should set the direction on the PangoContext when creating a
PangoLayout based on a best effort between the contents of the text
itself and the text direction of the widget, in case that fails.

https://bugzilla.gnome.org/show_bug.cgi?id=705779
text: Use the resolved text direction

Now that we compute the effective text direction when creating the Pango
layout, we should also use it when painting it.

https://bugzilla.gnome.org/show_bug.cgi?id=705779
backend: Add private accessor for the keymap direction

We need to ask the backend (wherever possible) for the direction of the
current keymap.

https://bugzilla.gnome.org/show_bug.cgi?id=705779
x11: Add keymap direction query

We should use the Xkb API to query the direction of the key map,
depending on the group. To get a valid result we need to go over
the Unicode equivalents of the key symbols for each group, so we
should cache the result.

The code used to query and cache the key map direction is taken
from GDK.

https://bugzilla.gnome.org/show_bug.cgi?id=705779
text: Use the keymap direction when focused

If the ClutterText actor has key focus then we should ask for the
direction of the key map, instead of the direction of the actor.

https://bugzilla.gnome.org/show_bug.cgi?id=705779