Commit graph

849 commits

Author SHA1 Message Date
Peter Hutterer
4eeda3bc47 test: fix typo
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-01-17 10:54:58 +10:00
Peter Hutterer
650f372c90 test: rename a test to match what it's testing better
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-01-17 10:54:58 +10:00
Peter Hutterer
cea8f0b8cc Drop the argparse requirement for make-event-names.py
We only take one option (path to linux/input.h) anyway so drop the argparse
requirement. This way libevdev builds on RHEL6 too which doesn't ship
argparse.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2014-01-15 08:01:31 +10:00
Peter Hutterer
8f2a808cfa Drop --output flag and python generation code from make-event-names.py
This is a leftover from when the file was in evemu and used to generate python
headers too.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2014-01-15 08:00:18 +10:00
Peter Hutterer
d3c3486560 include: update linux/input.h for kernel 3.12
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
2014-01-09 09:05:05 +10:00
Peter Hutterer
fd3118ea1a test: detect if we're running inside gdb and disable forking
The Check test framework forks by default which is annoying when running gdb.
Try to detect whether we're inside gdb by ptracing ourselves. If that works,
we're not inside a debugger. If it doesn't, then assume we're inside a
debugger and set CK_FORK to "no".

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-12-24 09:14:12 +10:00
Peter Hutterer
49f0b9300e Documentation rewordings and additions
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-12-24 09:14:12 +10:00
Peter Hutterer
f87647b509 Documentation typo fixes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-12-24 09:13:23 +10:00
Peter Hutterer
590291513b Add more cross-references
doxygen doesn't detect enum cross-references automatically, prefix them with
@ref

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-12-24 09:13:23 +10:00
Peter Hutterer
7da329b4d4 doc: remove initial * from example code lines
doxygen actually copies that over into the resulting output.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-12-24 09:12:32 +10:00
Peter Hutterer
5c2605c039 libevdev 0.6
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-12-23 17:38:07 +10:00
Peter Hutterer
e947fdc4c7 test: add basic link test
This test doesn't do anything but compile and link against libevdev. It's a
simple protection to avoid linker errors. If we ever have libs we depend on
and they don't get resolved properly, this test should warn us in time.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-12-12 13:19:52 +10:00
Peter Hutterer
2487950f65 test: split tests into run-time and build-time tests
The build-time tests don't do anything, we don't need to run them.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-12-12 12:57:21 +10:00
Peter Hutterer
546efc783c Don't treat devices with (ABS_MT_SLOT - 1) as multitouch devices
Some devices (PS3 sixaxis controller) merely have a bunch of axes, without the
semantic information that linux/input.h requires. For those, the ABS_MT range
may be merely another axis, not the special range that we need to treat it
with.

Use a simple heuristic: if ABS_MT_SLOT - 1 is enabled, don't treat ABS_MT as
multitouch axes. The ABS_MT_SLOT - 1 axis is not used for a real axis.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
2013-12-10 19:39:47 +10:00
Peter Hutterer
714c2ffa9e Merge branch 'ev-rep-handling' 2013-12-09 09:49:43 +10:00
Peter Hutterer
f66bf57baa State that the event is defined for a SYN_DROPPED
All clients that want to handle SYN_DROPPED correctly need to pass an EV_SYN
through their own handlers before starting with the syn events. Rather than
letting them synthesize that, guarantee that the event is defined the first
time LIBEVDEV_READ_STATUS_SYNC is returned.

This does not change existing behavior, it merely documents it so we can rely
on it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-12-09 09:49:28 +10:00
Peter Hutterer
a2f842bb8a Support EV_REP values through libevdev_get_event_value
We shouldn't have a separate API for that, the whole point of libevdev is to
abstract the quirkyness of the ioctls into a common interface. So let's
export the two EV_REP values through libevdev_get_event_value.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
2013-12-09 09:49:15 +10:00
Peter Hutterer
0aae85122d Constify libevdev_get_repeat
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-12-09 09:49:15 +10:00
Peter Hutterer
aac29742b0 Move the testing part to a separate page
Not something that interests the average visitor of the front page

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-12-09 09:48:59 +10:00
Peter Hutterer
f0f4f00c2a Add a doxygen page listing the ioctls and their current support
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
2013-12-09 09:48:27 +10:00
Peter Hutterer
94628309f9 doc: add a placeholder man page
We don't provide man pages (the ones created by doxygen are pretty
terrible) so provide a placeholder page to provide the minimum info and point
people in the right direction.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-12-09 08:46:24 +10:00
Peter Hutterer
08a7773ef8 Documentation fix, refer to correct function
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-12-05 07:53:12 +10:00
Peter Hutterer
14af49ab39 Fix a typo in the documentation
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-12-05 07:53:10 +10:00
David Herrmann
cc54b786a7 build: set aux-dir
If we don't set AUX_DIR, I get errors during ./configure:
  /bin/sh: /home/david/missing: No such file or directory
  configure: WARNING: 'missing' script is too old or missing

This error is ignored by default, but may cause failures with newer
autoconf versions. Simply set the AUX_DIR to "build-aux" like many other
autotools projects do.

[This is an automake 1.14 bug, see the upstream report:
http://lists.gnu.org/archive/html/bug-automake/2013-11/msg00007.html]

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-12-04 14:48:17 +10:00
Peter Hutterer
a612ee753e Drop some leftover deprecated constants.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-28 17:50:36 +10:00
Gaetan Nadon
81780fc4d2 test-compile-pedantic: replace -Wpedantic with -pedantic
-Wpedantic is a relatively new option, with -pedantic being the old version of
it that works on older gcc versions too.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-26 09:53:08 +10:00
Gaetan Nadon
d15856c77a doxygen: specifying builddir is not required
For the scenarios the module supports it is not required to
be specified.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-26 09:43:35 +10:00
Gaetan Nadon
c495cb42c0 doxygen: fix 'dist' when the html docs have not yet been built
The reason why this did not work is that we do not have a fixed list
of html doc files and it would be  pain to maintain.

The 'find' hack gets a list of html files but only when the package
has already been built. Let's complement this hack with the
html/index.html file which act as a build trigger as it is the target name.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-25 10:40:05 +10:00
Gaetan Nadon
dd016ebc3f doxygen: fix rebuild when not necessary
Everytime make is invoked, doxygen is invoked to generate the html doc.

Dependencies are added so it does rebuild when necessary.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-25 10:25:32 +10:00
Gaetan Nadon
ebb70f42dc doxygen: fix error msg: 'find: `html': No such file or directory'
Every time a make target is run in the doc directory when the html dir
is absent, you get this error. Even with 'make clean'.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-25 10:24:45 +10:00
Gaetan Nadon
83d679f1a1 doxygen: remove redundant "dist_noinst_DATA = libevdev.doxygen.in" statement
All .in files in AC_CONFIG_FILES are distributed.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-25 10:24:30 +10:00
Gaetan Nadon
17eb113524 doxygen: implement silent rules in the makefile
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-25 10:24:00 +10:00
Gaetan Nadon
40dde58556 doxygen: invocation of doxygen fails due to hard coded path
The makefile does not use $(DOXYGEN) variable.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-25 10:23:52 +10:00
Gaetan Nadon
a0fc429f06 doxygen: libevdev.doxygen must not be distributed
It reflects the values on the build machine.
Same pattern as libevdev.pc vs libevdev.pc.in.

For example, in libevdev.doxygen:
HTML_EXTRA_STYLESHEET  = ./libevdev.css

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-25 10:23:45 +10:00
Peter Hutterer
a742d253b7 test: add a build test for -Wpedantic
A user of libevdev may be compiled with -Wpedantic. Our header files should
not produce any warnings, so add a simple test that merely includes both
public header files and compiles with -Wpedantic -Werror.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
2013-11-23 09:00:53 +10:00
Peter Hutterer
5812ae0b7a Drop semicolons after getter/setter macros
libevdev.c:921:134: warning: ISO C does not allow extra ';' outside of a
function [-Wpedantic]

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
2013-11-22 12:28:22 +10:00
Peter Hutterer
8c7c55059d Drop trailing comma from last element in the enums
If a caller is compiled with -pedantic, this causes a few complaints

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
2013-11-22 12:28:22 +10:00
Peter Hutterer
7a38f4abc3 Drop deprecated functions
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
2013-11-22 10:38:36 +10:00
Peter Hutterer
bd5d247b4e libevdev 0.5
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-22 09:43:31 +10:00
Gaetan Nadon
a6400cd8da python: request version 2.6 or higher
This seems like a reasonable minimum version to require.
Available in RHEL6 (2010) or Ubuntu (2010).

Version 2.7 contains the argparse module so the check could be removed.
The argparse module was introduced in v2.3.5 as an optional module.

http://www.python.org/doc/versions/

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-20 07:50:22 +10:00
Gaetan Nadon
f15afcb795 configure.ac: remove redundant AC_SUBST(PYTHON)
This is already done by AM_PATH_PYTHON.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-20 07:50:22 +10:00
Gaetan Nadon
fdb42481ef configure.ac: AC_PROG_CC_C99: use C99 compiler
Given the close ties with input drivers and xserver, might
as well use the same level of compiler.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-20 07:50:22 +10:00
Gaetan Nadon
5c1f55d9ce configure.ac: add copyright statement
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-20 07:50:22 +10:00
Gaetan Nadon
2b0db220d4 configure.ac: AC_INIT: add bug report url
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-20 07:50:22 +10:00
Gaetan Nadon
16560f2c01 autogen.sh: remove unneeded m4 configuration workaround
Creating the m4 directory is not required under any circumstances
when the package is properly configured. We have git files under m4.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-19 09:37:06 +10:00
Gaetan Nadon
4184c153ec autogen.sh: fix broken out-of-source tree building
The configure script is invoked from the build directory rather than
from the source directory.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-19 09:36:09 +10:00
Gaetan Nadon
4f0f1ca68c Review/update .gitignore files
Merge potentially useful patterns taken from other projects.

Some application specific patterns were move to their respective directories.

The only noticeable change is that *.patch is ignore to prevent accidental
checkin of patches. The pattern "test-driver" could not be found and was
removed.

The test directory had not been updated since the move of all test cases
in a single binary.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-19 09:34:23 +10:00
Peter Hutterer
2420d2577b Drop gcov flags from main libevdev sources
We recompile the sources anyway in the tests and we have our own CFLAGS there.
Drop them from the main library code so we don't leave gcov files everywhere.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
2013-11-18 18:16:20 +10:00
David Herrmann
b8ffc23875 build: check for build/link flags harder
Use AC_LINK_IFELSE instead of AC_COMPILE_IFELSE to test for flags that
might succeed during compilation but not during linking. An example is gcc
compiled with libssp support but gnu-ld without it. In this case
-fstack-protector works fine during compilation but fails during linking
as several internal helpers are missing.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-18 11:56:22 +10:00
Gaetan Nadon
f7acb3b19b Update COPYING file.
The file must reflect actual Copyright statements in the source code.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-15 09:30:10 +10:00