Peter Hutterer [Sat, 31 Aug 2013 02:59:27 +0000 (12:59 +1000)]
uinput: don't try to set the syspath twice
If we have it, stop searching for it. Otherwise a second device with the
same name would overwrite the first, causing a leak.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Sat, 31 Aug 2013 02:37:14 +0000 (12:37 +1000)]
Return -EBADF for functions that need the fd initialized
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Sat, 31 Aug 2013 02:33:33 +0000 (12:33 +1000)]
Return EBADF when trying to read from an uninitalized device
All other functions that check the fd for validity return EBADF, which also makes it
easier to debug if the actual device goes away.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Sat, 31 Aug 2013 02:23:44 +0000 (12:23 +1000)]
Use ENOMEM instead of ENOSPC
From errno(3):
ENOMEM Not enough space (POSIX.1)
ENOSPC No space left on device (POSIX.1)
when we run out memory the reason is a failed malloc, for which ENOMEM
seems more appropriate.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Fri, 30 Aug 2013 00:21:01 +0000 (10:21 +1000)]
test: update to test for the various _MAX values
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Thu, 29 Aug 2013 05:52:54 +0000 (15:52 +1000)]
memcpy instead of invidual bittoggle
The ioctls return the number of bytes copied into the destination, so just
copy them into the device state instead of individually flipping bits.
For easier review: rc is the return value of the EVIOCG* ioctl, which is
the number of bytes copied.
state variables must be initialized to 0 now, in case the kernel's FOO_MAX
is smaller than libevdev's FOO_MAX. If not initialized to 0, the bytes
between the two max values is undefined and we may end up generating bogus
events.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Fri, 30 Aug 2013 00:12:30 +0000 (10:12 +1000)]
test: add a test for uinput device properties
Specifically, test for INPUT_PROP_MAX, which is a valid property value
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Thu, 29 Aug 2013 05:38:53 +0000 (15:38 +1000)]
Fix off-by-one errors when dealing with *_MAX values.
LED_MAX, KEY_MAX, ABS_MT_MAX, etc. are all valid event codes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Mon, 26 Aug 2013 03:08:12 +0000 (13:08 +1000)]
Use AC_USE_SYSTEM_EXTENSIONS
Defines _GNU_SOURCE for us.
http://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Posix-Variants.html
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 29 Jul 2013 02:15:07 +0000 (12:15 +1000)]
test: fix ev_rep test for new uinput implementation
We can actually set EV_REP values now, though with limitations
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Mon, 29 Jul 2013 03:50:41 +0000 (13:50 +1000)]
test: switch udev backend over to new libevdev-uinput bits
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 26 Jul 2013 04:35:54 +0000 (14:35 +1000)]
test: add uinput creation tests
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Thu, 25 Jul 2013 05:56:11 +0000 (15:56 +1000)]
Add support for uinput device creation
This lets libevdev provide a relatively generic interface for the
creation of uinput devices so we don't need to duplicate this across
multiple projects.
Most of this is lifted from the current test implementation, with a
couple of minor changes.
EV_REP needs special handling:
Kernel allows to set the EV_REP bit, it doesn't set REP_* bits (which we
wrap anyway) but it will also set the default values (500, 33).
Device node is guessed based on the sysfs path:
The sysfs path contains a eventN file, that corresponds to our
/dev/input/eventN number. Use it so clients can quickly get the device
node, without a libudev dependency.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 29 Aug 2013 01:53:59 +0000 (11:53 +1000)]
Fix two signed vs unsigned int warnings
dev->num_slots is -1 if we don't have ABS_MT_SLOT.
Set dev->grabbed to the right field type.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 23 Aug 2013 00:42:10 +0000 (10:42 +1000)]
Actually use the gcc CFLAGS set in configure
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 29 Aug 2013 01:50:09 +0000 (11:50 +1000)]
Mark all external symbols with LIBEVDEV_EXPORT
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>
Peter Hutterer [Sun, 25 Aug 2013 22:39:55 +0000 (08:39 +1000)]
Fix some compiler warnings about maybe uninitialized values
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>
Peter Hutterer [Fri, 23 Aug 2013 04:01:34 +0000 (14:01 +1000)]
configure.ac: Drop a superfluous variable
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 23 Aug 2013 01:08:26 +0000 (11:08 +1000)]
Add C++ header guards
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 23 Aug 2013 00:57:50 +0000 (10:57 +1000)]
test: add test for libevdev_is_event_code(EV_SYN...)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 23 Aug 2013 00:49:56 +0000 (10:49 +1000)]
Simplify getter/setter macros
Now that we've dropped the deprecated API, we can simplify the macros a bit.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 23 Aug 2013 00:48:46 +0000 (10:48 +1000)]
Drop deprecated API
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Fri, 23 Aug 2013 00:28:57 +0000 (10:28 +1000)]
Fix a few signed/unsigned int comparisons
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Fri, 23 Aug 2013 00:26:36 +0000 (10:26 +1000)]
Add a note that libevdev_is_event_type/code have compile-time ranges
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Thu, 29 Aug 2013 01:17:08 +0000 (11:17 +1000)]
libevdev_is_event_type() needs to check for < EV_CNT
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>
Peter Hutterer [Fri, 23 Aug 2013 00:25:08 +0000 (10:25 +1000)]
Rewrite libevdev_is_event_code to avoid signed/unsigned comparison
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 23 Aug 2013 00:20:50 +0000 (10:20 +1000)]
Use libevdev_get_event_type_max from libevdev_get_event_code_name
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>
Peter Hutterer [Fri, 23 Aug 2013 00:15:50 +0000 (10:15 +1000)]
Axis values must be int, not unsigned int
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 22 Aug 2013 06:04:40 +0000 (16:04 +1000)]
Ignore -Woverride-init in event-names.h
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>
Peter Hutterer [Sun, 25 Aug 2013 22:53:46 +0000 (08:53 +1000)]
Change event name generate script to be python 2/3 compatible
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>
Peter Hutterer [Tue, 27 Aug 2013 01:42:48 +0000 (11:42 +1000)]
doc: actually package generated documentation
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>
Peter Hutterer [Wed, 14 Aug 2013 09:52:25 +0000 (19:52 +1000)]
Add support for EV_SW
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Mon, 26 Aug 2013 22:03:17 +0000 (08:03 +1000)]
Avoid under-allocation of array for syncing key/led state
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>
Peter Hutterer [Mon, 26 Aug 2013 03:10:05 +0000 (13:10 +1000)]
Remove unneeded include of linux/uinput.h
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Sun, 25 Aug 2013 23:53:10 +0000 (09:53 +1000)]
Merge branch 'led-handling'
Peter Hutterer [Wed, 14 Aug 2013 00:17:59 +0000 (10:17 +1000)]
Rename enums to match lower_case format
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>
Peter Hutterer [Thu, 15 Aug 2013 01:10:17 +0000 (11:10 +1000)]
Store the abs value after handling mt events
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>
polyphemus [Fri, 9 Aug 2013 15:38:51 +0000 (17:38 +0200)]
write EV_SYN input_event along with led events to device
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>
Martin Minarik [Fri, 23 Aug 2013 17:47:55 +0000 (19:47 +0200)]
Fix build without MSC_TIMESTAMP
To build with older input.h
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
David Herrmann [Sat, 17 Aug 2013 11:58:18 +0000 (13:58 +0200)]
Pass --no-print-directory to make
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>
David Herrmann [Sat, 17 Aug 2013 11:58:17 +0000 (13:58 +0200)]
Remove deprecated SYMBOL_CACHE_SIZE from doxygen.in
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>
David Herrmann [Sat, 17 Aug 2013 11:58:14 +0000 (13:58 +0200)]
Add -I m4 to ACLOCAL_AMFLAGS
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>
Peter Hutterer [Fri, 9 Aug 2013 03:21:28 +0000 (13:21 +1000)]
Add functions to toggle LEDs on the device
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Tue, 13 Aug 2013 23:29:41 +0000 (09:29 +1000)]
Keep the LED state and sync it after SYN_DROPPED
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>
Peter Hutterer [Fri, 9 Aug 2013 04:46:24 +0000 (14:46 +1000)]
Add setters for an event or slot value
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 9 Aug 2013 03:47:00 +0000 (13:47 +1000)]
Rename libevdev_kernel_set_abs_value to libevdev_kernel_set_abs_info
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>
Peter Hutterer [Tue, 13 Aug 2013 23:44:21 +0000 (09:44 +1000)]
Sync the key state on startup
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Tue, 13 Aug 2013 23:15:51 +0000 (09:15 +1000)]
Simplify a bit state setter
set_bit_state does exactly what the previous if/else did.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 14 Aug 2013 00:22:24 +0000 (10:22 +1000)]
Minor documentation improvement
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 29 Jul 2013 03:38:28 +0000 (13:38 +1000)]
test: devices with abs axes need to be created properly
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>
Peter Hutterer [Mon, 29 Jul 2013 04:27:41 +0000 (14:27 +1000)]
Make the tests optional to drop unneeded dependencies
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>
Peter Hutterer [Mon, 29 Jul 2013 03:34:48 +0000 (13:34 +1000)]
test: change device for enabling/disabling bits to use REL_*
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>
Peter Hutterer [Fri, 9 Aug 2013 04:35:45 +0000 (14:35 +1000)]
Fix stray * in documentation
Peter Hutterer [Thu, 8 Aug 2013 03:21:04 +0000 (13:21 +1000)]
libevdev 0.3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 8 Aug 2013 03:04:11 +0000 (13:04 +1000)]
Fix header guard, lowercased in some previous search/replace
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 25 Jul 2013 06:21:32 +0000 (16:21 +1000)]
Add setters for product/vendor/bustype/version
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Thu, 1 Aug 2013 03:22:07 +0000 (13:22 +1000)]
Rename ID getters to have a consistent naming scheme
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Tue, 30 Jul 2013 03:48:55 +0000 (13:48 +1000)]
Replace ID getter implementation with a define
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Thu, 25 Jul 2013 06:11:04 +0000 (16:11 +1000)]
Provide setters for name, phys, uniq
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Wed, 24 Jul 2013 05:52:02 +0000 (15:52 +1000)]
Add abs setters for changing a single value on an abs axis
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>
Peter Hutterer [Tue, 30 Jul 2013 01:25:00 +0000 (11:25 +1000)]
Rename a few getters for consistency
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>
Peter Hutterer [Thu, 25 Jul 2013 03:06:23 +0000 (13:06 +1000)]
Replace libevdev_get_abs_* with macro-generated ones
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Mon, 29 Jul 2013 05:34:37 +0000 (15:34 +1000)]
Add setter for property bits
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>
Peter Hutterer [Mon, 29 Jul 2013 04:35:52 +0000 (14:35 +1000)]
test: check for enabling REL_X with data
Only EV_REP and EV_ABS accept data.
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>
Peter Hutterer [Wed, 24 Jul 2013 03:37:53 +0000 (13:37 +1000)]
Add libevdev_has_event_pending()
Returns non-zero if there are events avialable to be read.
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>
Peter Hutterer [Tue, 30 Jul 2013 23:48:44 +0000 (09:48 +1000)]
doc: fix css for notes and return values
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 29 Jul 2013 01:46:01 +0000 (11:46 +1000)]
When enabling EV_REP, set the delay/period values
Just enabling EV_REP sets them to zero, but when enabling them directly,
a value is required.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Mon, 29 Jul 2013 02:04:58 +0000 (12:04 +1000)]
Make sure all EV_REP bits are set
Current code was skipping REP_PERIOD
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Mon, 29 Jul 2013 01:45:30 +0000 (11:45 +1000)]
Set the size for repeat delays based on REP_CNT
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Fri, 26 Jul 2013 06:53:04 +0000 (16:53 +1000)]
Don't try setting an ABS code without data
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Fri, 26 Jul 2013 06:51:17 +0000 (16:51 +1000)]
Allow enabling of EV_SYN codes
Has no effect, but allow it nonetheless to avoid superfluous
conditions in client code.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Mon, 29 Jul 2013 02:36:42 +0000 (12:36 +1000)]
test: drop some superfluous dev creation
copy/paste residue, had no effect
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Mon, 29 Jul 2013 03:32:41 +0000 (13:32 +1000)]
gitignore: ignore gcov, ctags, announce emails
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Wed, 24 Jul 2013 23:00:42 +0000 (09:00 +1000)]
libevdev 0.2.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 23 Jul 2013 21:19:12 +0000 (07:19 +1000)]
Fix name and version in pkgconfig file
evdev_read was an earlier name for this library.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Sun, 21 Jul 2013 22:16:07 +0000 (08:16 +1000)]
libevdev 0.2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 22 Jul 2013 00:49:36 +0000 (10:49 +1000)]
doc: fix two doxygen include paths to be source-relative
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 22 Jul 2013 00:44:23 +0000 (10:44 +1000)]
Add libevdev.css to EXTRA_DIST
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Sun, 21 Jul 2013 22:31:36 +0000 (08:31 +1000)]
Point to new API documentation URL
And fix up the tool to publish it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Sun, 21 Jul 2013 22:20:46 +0000 (08:20 +1000)]
Document mailing list
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 17 Jul 2013 01:05:08 +0000 (11:05 +1000)]
Change github.com references to freedesktop.org
Except for the API documentation, that'll stay on github for now until
I figure out where to put it (and have the space to put it in).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 10 Jul 2013 23:09:14 +0000 (09:09 +1000)]
test: add uinput prop bits and the test for it
Turns out I was looking at an old header file, UI_SET_PROPBIT
has existed for quite a while.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 9 Jul 2013 04:39:23 +0000 (14:39 +1000)]
Don't include config.h in the public header
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Sat, 6 Jul 2013 00:27:10 +0000 (10:27 +1000)]
doc: couple of minor documentation fixes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Sat, 6 Jul 2013 00:26:54 +0000 (10:26 +1000)]
doc: css changes for gnome web
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 5 Jul 2013 01:20:50 +0000 (11:20 +1000)]
Add a custom stylesheet to the documentation.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 4 Jul 2013 23:23:30 +0000 (09:23 +1000)]
Add documentation about the test suite
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 4 Jul 2013 23:08:04 +0000 (09:08 +1000)]
test: define a common device name
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 4 Jul 2013 23:02:46 +0000 (09:02 +1000)]
test: constify the input_absinfo argument
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 4 Jul 2013 23:00:24 +0000 (09:00 +1000)]
test: don't set the abs value when initializing an uinput device
The helper function uses abs.value for the axis code (to save a parameter).
Reset that to 0 before we write to the device
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 4 Jul 2013 22:45:48 +0000 (08:45 +1000)]
test: fix up the tests to test for resolution now too
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 4 Jul 2013 22:35:06 +0000 (08:35 +1000)]
test: write resolution for uinput devices after creating the device
EVIOCSABS allows us to set the device's abs axes to the desired resolution.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 4 Jul 2013 01:38:56 +0000 (11:38 +1000)]
doc: tweak a few doxygen options, mainly to display the version
The rest is rather insignificant
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 4 Jul 2013 01:37:20 +0000 (11:37 +1000)]
Some minor documentation fixes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 4 Jul 2013 01:11:51 +0000 (11:11 +1000)]
test: add test for event values (type and code)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 4 Jul 2013 01:05:39 +0000 (11:05 +1000)]
test: unify test case creation in test-event-names.c
Simple rename from custom test case variable names to tc
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 4 Jul 2013 00:07:44 +0000 (10:07 +1000)]
Add two helper functions to check event type/code
These aren't really that useful since they're just one or two lines in
code, but it saves callers from accidentally misplacing braces, etc.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 3 Jul 2013 05:27:51 +0000 (15:27 +1000)]
Add a simple example to the documentation
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 3 Jul 2013 05:16:26 +0000 (15:16 +1000)]
Indent some documentation better
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 3 Jul 2013 05:15:10 +0000 (15:15 +1000)]
README: Drop the details, refer to documentation instead
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>