diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2014-08-27 18:31:34 +0200 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2014-08-27 18:42:28 +0200 |
commit | c93e5a62ff599528c3bf2a8656825403aaebe093 (patch) | |
tree | 4aed2f2ccaad553397e60d68851b5fdc80307d6e /src/libsystemd-terminal/idev-internal.h | |
parent | e202fa31fb2d60084e7b2ab7976a81c138184d40 (diff) |
terminal: add evdev elements to idev
The evdev-element provides linux evdev interfaces as idev-elements. This
way, all real input hardware devices on linux can be used with the idev
interface.
We use libevdev to interface with the kernel. It's a simple wrapper
library around the kernel evdev API that takes care to resync devices
after kernel-queue overflows, which is a rather non-trivial task.
Furthermore, it's a well tested interface used by all other major input
users (Xorg, weston, libinput, ...).
Last but not least, it provides nice keycode to keyname lookup tables (and
vice versa), which is really nice for debugging input problems.
Diffstat (limited to 'src/libsystemd-terminal/idev-internal.h')
-rw-r--r-- | src/libsystemd-terminal/idev-internal.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libsystemd-terminal/idev-internal.h b/src/libsystemd-terminal/idev-internal.h index bffefbb9c1..3301ebf6e4 100644 --- a/src/libsystemd-terminal/idev-internal.h +++ b/src/libsystemd-terminal/idev-internal.h @@ -22,6 +22,8 @@ #pragma once #include <inttypes.h> +#include <libudev.h> +#include <linux/input.h> #include <stdbool.h> #include <stdlib.h> #include <systemd/sd-bus.h> @@ -37,6 +39,14 @@ typedef struct idev_element idev_element; typedef struct idev_element_vtable idev_element_vtable; /* + * Evdev Elements + */ + +bool idev_is_evdev(idev_element *e); +idev_element *idev_find_evdev(idev_session *s, dev_t devnum); +int idev_evdev_new(idev_element **out, idev_session *s, struct udev_device *ud); + +/* * Element Links */ |