diff options
author | Jonas Ådahl <jadahl@gmail.com> | 2013-11-17 11:19:50 +0100 |
---|---|---|
committer | Jonas Ådahl <jadahl@gmail.com> | 2013-11-17 17:03:06 +0100 |
commit | ce787552bce26ccac433c7fcf9868d2a5561a0cc (patch) | |
tree | 4d91460f76e5e8d8dd55a459309fe0b1f5a78360 /configure.ac | |
parent | 8f8fdc85b17c6ea80911d998bcf0d9630bfc5d9f (diff) | |
download | libinput-ce787552bce26ccac433c7fcf9868d2a5561a0cc.tar.gz |
Introduce libinput object managing all input data
Instead of having the user manage added and removed fd's as well as the
fd used for creating evdev devices, introduce a libinput object that
itself has an epoll fd.
The user no longer manages multiple fd's per libinput instance, but
instead handles one fd, dispatches libinput when data is available, then
reading events using libinput_get_event().
libinput_event's are now per libinstance, but divided into categories.
So far the only category is device events. Device events are categorized
by the presence of a non-NULL device pointer in the event.
The current API usage should look like:
struct libinput libinput = ...;
struct libinput_event *event;
if (libinput_dispatch(libinput) != 0)
return -1;
while ((event = libinput_get_event(libinput))) {
if (event->device)
process_device_event(event);
free(event);
}
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 8e0f1c93..08472cf0 100644 --- a/configure.ac +++ b/configure.ac @@ -31,6 +31,9 @@ AC_PROG_CC LT_PREREQ([2.2]) LT_INIT +AC_CHECK_DECL(EPOLL_CLOEXEC, [], + [AC_MSG_ERROR("EPOLL_CLOEXEC is needed to compile libinput")], + [[#include <sys/epoll.h>]]) AC_CHECK_DECL(TFD_CLOEXEC,[], [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile libinput")], [[#include <sys/timerfd.h>]]) |