GCC_CFLAGS was set by configure, but never actually used. So we didn't build with hidden symbols,
rather just weeded them out later through libtool.
Do this properly now, mark the symbols as visibility default.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
These are just to shut the compiler up, in all three cases we only access
the respective values if they're defined.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
EV_MAX is a valid (though unused) value.
Reported-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This will check for invalid types for us, and we can do a better check
for signed/unsigned comparison.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Having the declarations in the form of [0...EV_MAX] = NULL together
with the actual definitions causes warnings for every true definition if
-Woverride-init is enabled.
We can drop them for most as they're zero, but still need them for
ev_max (which defaults to -1), not zero. So use the GCC pragma to
disable the warnings for this file.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Python 3 doesn't have a print statement, only a print function.
Fixed with:
2to3 make-event-names.py | git apply
Print as function requires Python 2.6 which is reasonable enough given
that even RHEL6 ships that.
Even though it's not needed for 2.6, use
from __future__ import print_function
to avoid accidentally introducing a print statement in the future.
With this line, print "blah" is now a syntax error in python 2.
This line was added manually, after the 2to3 conversion.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Previous find command wouldn't actually list the generated documentation
files, so they'd be missing in the tarball.
...and add a dist-hook to make sure this won't happen during release.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
No functional effect as the size would end up being the same anyway
due to the values of KEY_MAX and LED_MAX.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This is technically an API, but not an ABI change.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
This way any ABS_MT_ event value that comes in will also be stored in abs_info.
That always corresponds to "current slot", so if a user calls
libevdev_set_event_value() or libevdev_get_event_value() they're actually
modifying the current slot value.
When the current slot changes, sync the state back into the absinfo values.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Other clients of an evdev device need to have the events they receive
be separated, in moment in time, from other events by an EV_SYN/
SYN_REPORT. This is the responsibility of the client who writes events
into the stream.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
The "Entering/Leaving directroy /xyz" messages only add noise to
make-output. Even without we still get short hints which directory is
currently processed. Compare the two outputs below:
With --no-print-directory added:
make --no-print-directory all-recursive
Making all in doc
doxygen libevdev.doxygen
Making all in libevdev
python2 ./make-event-names.py --output=c > event-names.h
make all-am
CC libevdev.lo
CCLD libevdev.la
Making all in tools
CC libevdev-events.o
CCLD libevdev-events
Making all in test
CC test-main.o
CC test-event-names.o
CC test-libevdev-init.o
CC test-libevdev-has-event.o
CC test-int-queue.o
CC test-libevdev-events.o
CC libevdev.o
CC test-common-uinput.o
CC test-common.o
CCLD test-libevdev
Without it:
make all-recursive
make[1]: Entering directory `/home/david/dev/libevdev'
Making all in doc
make[2]: Entering directory `/home/david/dev/libevdev/doc'
doxygen libevdev.doxygen
make[2]: Leaving directory `/home/david/dev/libevdev/doc'
Making all in libevdev
make[2]: Entering directory `/home/david/dev/libevdev/libevdev'
python2 ./make-event-names.py --output=c > event-names.h
make all-am
make[3]: Entering directory `/home/david/dev/libevdev/libevdev'
CC libevdev.lo
CCLD libevdev.la
make[3]: Leaving directory `/home/david/dev/libevdev/libevdev'
make[2]: Leaving directory `/home/david/dev/libevdev/libevdev'
Making all in tools
make[2]: Entering directory `/home/david/dev/libevdev/tools'
CC libevdev-events.o
CCLD libevdev-events
make[2]: Leaving directory `/home/david/dev/libevdev/tools'
Making all in test
make[2]: Entering directory `/home/david/dev/libevdev/test'
CC test-main.o
CC test-event-names.o
CC test-libevdev-init.o
CC test-libevdev-has-event.o
CC test-int-queue.o
CC test-libevdev-events.o
CC libevdev.o
CC test-common-uinput.o
CC test-common.o
CCLD test-libevdev
make[2]: Leaving directory `/home/david/dev/libevdev/test'
make[2]: Entering directory `/home/david/dev/libevdev'
make[2]: Leaving directory `/home/david/dev/libevdev'
make[1]: Leaving directory `/home/david/dev/libevdev'
We don't really win any useful information from these messages.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
SYMBOL_CACHE_SIZE was removed in newer doxygen releases. We use the
default value, so simply drop it.
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>
We put m4 files into a separate directory. If we ever put our own files in
there, we need to include it. Furthermore, this suppresses annoying
autotools warnings.
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>
This enables libevdev_get_event_value(dev, EV_LED, LED_NUML); to check
if a LED is on or off.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Keep it in line with the non-kernel setter
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Simply enabling the bits is not enough, we need to provide axis
information too if we want to enable this properly.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
libevdev has no external dependencies and both check and libudev are
only required for running the unit-tests. Make them optional.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
No real effect on the test, this check is just so that a follow-up patch to
fix the tests for the new uinput backend is a bit easier to review.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Changing a single value on an abs axis is slightly more common than
having to enable that axis outright. Provide a set of accessors for
doing so.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Deprecated:
* libevdev_get_abs_min, libevdev_get_abs_max
* libevdev_get_input_prop_name
Will be removed in one or two versions.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>