Commit graph

615 commits

Author SHA1 Message Date
Peter Hutterer
cf70d0cd88 libevdev 1.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-18 14:51:23 +10:00
Peter Hutterer
50b82c19b5 Actually filter by log priority
If a message is higher than the current priority, filter it. And add a few
tests that the priority is handled the way it should.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
2014-02-13 08:07:30 +10:00
Peter Hutterer
0d593bff71 Use 0 instead of "zero"
We're a bit inconsistent here anyway because of the ample use of "non-zero"
which can't really be converted to non-0. But let's at least be consistent
with the use of 0 instead of zero.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-12 16:01:10 +10:00
Peter Hutterer
069236334c More documentation fixes and improvements
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-12 16:01:10 +10:00
Peter Hutterer
fd01f895b6 Mark a few more functions as signal-safe
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-12 15:47:33 +10:00
Peter Hutterer
7e8ba41a40 Improve the documentation a bit
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-11 16:46:49 +10:00
Peter Hutterer
4b3d2405e3 Document that we don't support EVIOCREVOKE
This is intentional, see
http://lists.freedesktop.org/archives/input-tools/2014-January/000688.html

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-11 16:46:49 +10:00
Peter Hutterer
2a06d3e182 README: remove the warning, it's stable now
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-11 16:27:50 +10:00
Peter Hutterer
da6de93985 libevdev 0.9.1
libevdev 1.0-rc1

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-01-29 15:09:05 +10:00
Peter Hutterer
6c2b01d67f test: remove NULL test for SW_MAX, 3.13 defines SW_MUTE_DEVICE
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-01-29 15:08:12 +10:00
Peter Hutterer
def04e91e7 Bump soname
Bump once to the stable interface we have now. This isn't really required as
we're compatible with everything but functions deprecated with 0.4 but we
might as well do it now to force a rebuild of everyone. Should've done that
for 0.6 when we actually dropped the function, but ...

Now that we have proper library versioning we shouldn't need any
backwards-incompatible soname bumps for a while.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
2014-01-29 15:02:45 +10:00
David Herrmann
5f40be0b43 Add ld version-script
Explicit symbol versioning allows us to provide multiple versions of
incompatible API changes. It is a very common practice in GNU world and
avoids the problems occuring if distributions try to ship multiple version
of a single DSO.

Background information available at:
  http://people.redhat.com/drepper/dsohowto.pdf

To see the symbol-versions, use objdump:
  objdump -T libevdev/.libs/libevdev.so.1.0.0
This can also be used to verify that all symbols are correctly
exported (typos in linker-scripts are silently ignored by ld).

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>

Updated for evdev 0.6's API.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-01-29 15:02:40 +10:00
Peter Hutterer
8356f417df include: update linux/input.h for kernel 3.13
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-01-22 09:15:14 +10:00
Peter Hutterer
642c91fc6a Warn about a SYN_DROPPED right after finishing a sync
If the first event after a completed device sync is a SYN_DROPPED, warn the
user that they're not fast enough handling this device.

The test for this is rather complicated since we can't write SYN_DROPPED
through uinput so we have to juggle the device fd and a pipe and switch
between the two at the right time (taking into account that libevdev will read
events from the fd whenever it can).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-01-22 09:15:14 +10:00
Peter Hutterer
0c01886985 test: abort on unexpected log messages
Add two log functions, one that aborts on a received message. We know when we
expect to receive an error, so anytime this happens unexpectedly should
terminate the test.

And for those tests do issue a log message, let them ignore it and don't
print anything.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-01-22 09:14:40 +10:00
Peter Hutterer
77bf0fe228 Count the number of events needed for a full sync
Make sure we have a queue that is at least large enough to do a full sync
after a SYN_DROPPED, plus store a few extra events in case some came in after
the sync.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
2014-01-22 08:28:41 +10:00
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