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>
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>
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>
test: rename a test to match what it's testing better

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test: fix typo

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
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>
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>
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>
include: update linux/input.h for kernel 3.13

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
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>
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>
test: remove NULL test for SW_MAX, 3.13 defines SW_MUTE_DEVICE

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
libevdev 0.9.1

libevdev 1.0-rc1

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
README: remove the warning, it's stable now

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
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>
Improve the documentation a bit

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Mark a few more functions as signal-safe

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
More documentation fixes and improvements

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
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>
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>