mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-16 16:00:24 +01:00
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>
56 lines
1.5 KiB
Text
56 lines
1.5 KiB
Text
AC_PREREQ([2.64])
|
|
|
|
m4_define([libinput_major_version], [0])
|
|
m4_define([libinput_minor_version], [0])
|
|
m4_define([libinput_micro_version], [90])
|
|
m4_define([libinput_version],
|
|
[libinput_major_version.libinput_minor_version.libinput_micro_version])
|
|
|
|
AC_INIT([libinput],
|
|
[libinput_version],
|
|
[http://nobugtracker],
|
|
[libinput],
|
|
[http://nohomepage])
|
|
|
|
AC_SUBST([LIBINPUT_VERSION_MAJOR], [libinput_major_version])
|
|
AC_SUBST([LIBINPUT_VERSION_MINOR], [libinput_minor_version])
|
|
AC_SUBST([LIBINPUT_VERSION_MICRO], [libinput_micro_version])
|
|
AC_SUBST([LIBINPUT_VERSION], [libinput_version])
|
|
|
|
AC_CONFIG_HEADERS([config.h])
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
|
|
AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
|
|
|
|
AM_SILENT_RULES([yes])
|
|
|
|
# Check for programs
|
|
AC_PROG_CC
|
|
|
|
# Initialize libtool
|
|
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>]])
|
|
AC_CHECK_DECL(CLOCK_MONOTONIC,[],
|
|
[AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile libinput")],
|
|
[[#include <time.h>]])
|
|
|
|
PKG_PROG_PKG_CONFIG()
|
|
PKG_CHECK_MODULES(MTDEV, [mtdev >= 1.1.0])
|
|
|
|
if test "x$GCC" = "xyes"; then
|
|
GCC_CFLAGS="-Wall -Wextra -Wno-unused-parameter -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden"
|
|
fi
|
|
AC_SUBST(GCC_CFLAGS)
|
|
|
|
AC_CONFIG_FILES([Makefile
|
|
src/Makefile
|
|
src/libinput.pc
|
|
src/libinput-version.h])
|
|
AC_OUTPUT
|