From c93e5a62ff599528c3bf2a8656825403aaebe093 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Wed, 27 Aug 2014 18:31:34 +0200 Subject: 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. --- src/libsystemd-terminal/idev-internal.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/libsystemd-terminal/idev-internal.h') 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 +#include +#include #include #include #include @@ -36,6 +38,14 @@ typedef struct idev_device_vtable idev_device_vtable; 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 */ -- cgit v1.2.3-54-g00ecf