Add our own version of linux/input.h

Avoids having to #define any values we're trying to use.

Header file is from Linux 3.15-rc8.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
This commit is contained in:
Peter Hutterer 2014-06-03 07:51:37 +10:00
parent 8e20d8105b
commit 4982b46010
10 changed files with 1190 additions and 22 deletions

1174
include/linux/input.h Normal file

File diff suppressed because it is too large Load diff

View file

@ -20,13 +20,15 @@ libinput_la_SOURCES = \
path.h \
path.c \
udev-seat.c \
udev-seat.h
udev-seat.h \
../include/linux/input.h
libinput_la_LIBADD = $(MTDEV_LIBS) \
$(LIBUDEV_LIBS) \
$(LIBEVDEV_LIBS) \
-lm
libinput_la_CFLAGS = $(MTDEV_CFLAGS) \
libinput_la_CFLAGS = -I$(top_srcdir)/include \
$(MTDEV_CFLAGS) \
$(LIBUDEV_CFLAGS) \
$(LIBEVDEV_CFLAGS) \
$(GCC_CFLAGS)

View file

@ -26,15 +26,11 @@
#include <math.h>
#include <string.h>
#include <unistd.h>
#include <linux/input.h>
#include "linux/input.h"
#include <sys/timerfd.h>
#include "evdev-mt-touchpad.h"
#ifndef INPUT_PROP_TOPBUTTONPAD
#define INPUT_PROP_TOPBUTTONPAD 0x04
#endif
#define DEFAULT_BUTTON_MOTION_THRESHOLD 0.02 /* 2% of size */
#define DEFAULT_BUTTON_ENTER_TIMEOUT 100 /* ms */
#define DEFAULT_BUTTON_LEAVE_TIMEOUT 300 /* ms */

View file

@ -26,7 +26,7 @@
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <linux/input.h>
#include "linux/input.h"
#include <unistd.h>
#include <fcntl.h>
#include <mtdev-plumbing.h>
@ -41,14 +41,6 @@
#define DEFAULT_AXIS_STEP_DISTANCE li_fixed_from_int(10)
#ifndef KEY_MICMUTE
#define KEY_MICMUTE 0xf8
#endif
#ifndef KEY_LIGHTS_TOGGLE
#define KEY_LIGHTS_TOGGLE 0x21e
#endif
void
evdev_device_led_update(struct evdev_device *device, enum libinput_led leds)
{

View file

@ -26,7 +26,7 @@
#include "config.h"
#include <linux/input.h>
#include "linux/input.h"
#include <libevdev/libevdev.h>
#include "libinput-private.h"

View file

@ -23,7 +23,7 @@
#ifndef LIBINPUT_PRIVATE_H
#define LIBINPUT_PRIVATE_H
#include <linux/input.h>
#include "linux/input.h"
#include "libinput.h"
#include "libinput-util.h"

View file

@ -1,5 +1,8 @@
if BUILD_TESTS
AM_CPPFLAGS = -I$(top_srcdir)/src $(CHECK_CFLAGS) $(LIBEVDEV_CFLAGS)
AM_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_srcdir)/src \
$(CHECK_CFLAGS) \
$(LIBEVDEV_CFLAGS)
TEST_LIBS = liblitest.la $(CHECK_LIBS) $(LIBUDEV_LIBS) $(LIBEVDEV_LIBS) $(top_builddir)/src/libinput.la -lm
TEST_CFLAGS = $(GCC_CFLAGS) $(AM_CFLAGS)

View file

@ -34,7 +34,7 @@
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include <linux/input.h>
#include "linux/input.h"
#include <sys/ptrace.h>
#include <sys/timerfd.h>
#include <sys/wait.h>

View file

@ -1,6 +1,7 @@
noinst_PROGRAMS = event-debug
AM_CPPFLAGS = -I$(top_srcdir)/src
AM_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_srcdir)/src
event_debug_SOURCES = event-debug.c
event_debug_LDADD = ../src/libinput.la $(LIBUDEV_LIBS)

View file

@ -31,7 +31,7 @@
#include <time.h>
#include <unistd.h>
#include <libudev.h>
#include <linux/input.h>
#include "linux/input.h"
#include <sys/ioctl.h>
#include <sys/signalfd.h>