platform/upstream/libevdev.git
11 years agotest: fix parameter name for uinput_device_set_abs_bit
Peter Hutterer [Sun, 30 Jun 2013 22:54:39 +0000 (08:54 +1000)]
test: fix parameter name for uinput_device_set_abs_bit

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agotest: add two more tests for enabling/disabling invalid events.
Peter Hutterer [Sun, 30 Jun 2013 22:42:29 +0000 (08:42 +1000)]
test: add two more tests for enabling/disabling invalid events.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agodoc: set doxygen to quiet mode
Peter Hutterer [Sun, 30 Jun 2013 22:33:53 +0000 (08:33 +1000)]
doc: set doxygen to quiet mode

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoAdd more documentation to stop complaints about undocumented members
Peter Hutterer [Sun, 30 Jun 2013 22:33:02 +0000 (08:33 +1000)]
Add more documentation to stop complaints about undocumented members

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoDrop code for kernel-enabling bits
Peter Hutterer [Sun, 30 Jun 2013 05:27:24 +0000 (15:27 +1000)]
Drop code for kernel-enabling bits

We can't enable axes on devices at runtime in the kernel, not even
for uinput devices. So this API can't work anyway, remove it before
someone thinks it does work.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agotest: add test for kernel-enabling bits
Peter Hutterer [Sun, 30 Jun 2013 05:24:46 +0000 (15:24 +1000)]
test: add test for kernel-enabling bits

This test fails because we can't actually enable bits at runtime, guess I
should've thought of that before. Either way, commit this test (and revert it
again) so the test is in the repository in case we do get this ability later.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoChange signature for kernel_enable_event_code to match enable_event_code
Peter Hutterer [Sat, 29 Jun 2013 08:25:30 +0000 (18:25 +1000)]
Change signature for kernel_enable_event_code to match enable_event_code

They do essentially the same thing, so the function signature should be null.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agotest: use new convenience function for uinput device creation
Peter Hutterer [Sat, 29 Jun 2013 08:19:50 +0000 (18:19 +1000)]
test: use new convenience function for uinput device creation

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agotest: move device creation into a shared function
Peter Hutterer [Sat, 29 Jun 2013 08:09:28 +0000 (18:09 +1000)]
test: move device creation into a shared function

remove some of that code duplication in the tests.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agotest: provide uinput convenience function for varargs
Peter Hutterer [Sat, 29 Jun 2013 08:10:01 +0000 (18:10 +1000)]
test: provide uinput convenience function for varargs

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agotest: prepare a common header file for all tests
Peter Hutterer [Sat, 29 Jun 2013 07:57:31 +0000 (17:57 +1000)]
test: prepare a common header file for all tests

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agotest: add tests for device bit manipulation
Peter Hutterer [Sat, 29 Jun 2013 07:28:49 +0000 (17:28 +1000)]
test: add tests for device bit manipulation

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoReturn -1 for failing to enable/disable bits
Peter Hutterer [Sat, 29 Jun 2013 07:34:32 +0000 (17:34 +1000)]
Return -1 for failing to enable/disable bits

as the documentation says

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agotools: add a tool to build and publish the documentation
Peter Hutterer [Fri, 28 Jun 2013 03:18:28 +0000 (13:18 +1000)]
tools: add a tool to build and publish the documentation

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agotest: close the right pipe fds
Peter Hutterer [Fri, 28 Jun 2013 03:15:27 +0000 (13:15 +1000)]
test: close the right pipe fds

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agotest: fix a bunch of memory leaks
Peter Hutterer [Fri, 28 Jun 2013 03:13:55 +0000 (13:13 +1000)]
test: fix a bunch of memory leaks

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agotest: fix valgrind complaint about uninitialized bytes
Peter Hutterer [Fri, 28 Jun 2013 03:13:15 +0000 (13:13 +1000)]
test: fix valgrind complaint about uninitialized bytes

uinput ignores the timestamp, but add it anyway to stop valgrind
worrying about it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoAdd a FIXME to log a warning message
Peter Hutterer [Fri, 28 Jun 2013 02:51:16 +0000 (12:51 +1000)]
Add a FIXME to log a warning message

When a sync is complete and the first event is a SYN_DROPPED again,
we have a problem. Log that so that the process can print a warning.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agotest: add test case for button deltas after SYN_DROPPED
Peter Hutterer [Fri, 28 Jun 2013 01:24:13 +0000 (11:24 +1000)]
test: add test case for button deltas after SYN_DROPPED

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoAdd a flag for forcing a SYN_DROPPED event
Peter Hutterer [Fri, 28 Jun 2013 00:18:35 +0000 (10:18 +1000)]
Add a flag for forcing a SYN_DROPPED event

uinput doesn't route a SYN_DROPPED, so we neeed to handle fds in
a rather complicated manner. For tests, avoid this and instead force
the library to sync if a specific flag is given.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoBuild doc first, to see the warnings better
Peter Hutterer [Fri, 28 Jun 2013 00:18:03 +0000 (10:18 +1000)]
Build doc first, to see the warnings better

Leave the code warnings at the end of the build, makes them more visible.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoExpand main documentation to explain libevdev a bit more
Peter Hutterer [Thu, 27 Jun 2013 23:31:55 +0000 (09:31 +1000)]
Expand main documentation to explain libevdev a bit more

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoREADME: Add link to API documentation
Peter Hutterer [Thu, 27 Jun 2013 20:38:14 +0000 (06:38 +1000)]
README: Add link to API documentation

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoREADME: fix library name
Peter Hutterer [Thu, 27 Jun 2013 19:58:57 +0000 (05:58 +1000)]
README: fix library name

libevdevdev was an old name for this library. libevemu is something
completely different.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agotools: update libevdev-events to use the new LIBEVDEV_READ_NORMAL flag
Peter Hutterer [Thu, 27 Jun 2013 04:28:23 +0000 (14:28 +1000)]
tools: update libevdev-events to use the new LIBEVDEV_READ_NORMAL flag

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoImprove documentation to libevdev_next_event
Peter Hutterer [Thu, 27 Jun 2013 04:21:55 +0000 (14:21 +1000)]
Improve documentation to libevdev_next_event

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoRequire a flag for normal mode too
Peter Hutterer [Thu, 27 Jun 2013 04:20:03 +0000 (14:20 +1000)]
Require a flag for normal mode too

Makes the whole thing more explicit.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agotest: add test for event polling and SYN_DROPPED handling
Peter Hutterer [Thu, 27 Jun 2013 01:03:52 +0000 (11:03 +1000)]
test: add test for event polling and SYN_DROPPED handling

Rudimentary only, but it's a start

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agotest: don't check for a max on EV_SYN events
Peter Hutterer [Thu, 27 Jun 2013 01:02:39 +0000 (11:02 +1000)]
test: don't check for a max on EV_SYN events

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agotest: add incomplete test for input props
Peter Hutterer [Thu, 27 Jun 2013 00:37:21 +0000 (10:37 +1000)]
test: add incomplete test for input props

Can't set those via uinput, so we're limited to making sure nothing
goes crazy.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agotests: add two multitouch tests
Peter Hutterer [Thu, 27 Jun 2013 00:29:11 +0000 (10:29 +1000)]
tests: add two multitouch tests

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agotest: add test case for device grabbing
Peter Hutterer [Thu, 27 Jun 2013 00:23:23 +0000 (10:23 +1000)]
test: add test case for device grabbing

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agotest: test some more event max and invalid event type paths
Peter Hutterer [Thu, 27 Jun 2013 00:22:47 +0000 (10:22 +1000)]
test: test some more event max and invalid event type paths

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoInit dev->grabbed as LIBEVDEV_UNGRAB
Peter Hutterer [Thu, 27 Jun 2013 00:21:44 +0000 (10:21 +1000)]
Init dev->grabbed as LIBEVDEV_UNGRAB

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoReplace a few malloc + strcpy with strdup
Peter Hutterer [Wed, 26 Jun 2013 23:45:58 +0000 (09:45 +1000)]
Replace a few malloc + strcpy with strdup

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoRevert "test: Hook up gcov to require the test name"
Peter Hutterer [Wed, 26 Jun 2013 23:40:41 +0000 (09:40 +1000)]
Revert "test: Hook up gcov to require the test name"

This reverts commit c590c70ea467b37e96b2b4cb41d91776519b569d.

11 years agoPull all tests together into one binary
Peter Hutterer [Wed, 26 Jun 2013 23:40:23 +0000 (09:40 +1000)]
Pull all tests together into one binary

Easier to monitor gcov coverage that way

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agotest: Hook up gcov to require the test name
Peter Hutterer [Wed, 26 Jun 2013 23:24:05 +0000 (09:24 +1000)]
test: Hook up gcov to require the test name

Make check will simply overwrite results of a previous test. Hook up gcov so that the test has to be
explicitly passed to avoid confusion here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoDon't return a NULL name, ever.
Peter Hutterer [Wed, 26 Jun 2013 08:13:24 +0000 (18:13 +1000)]
Don't return a NULL name, ever.

Even if the device is not yet initialized (which would be a caller bug, but still)

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoFix distcheck
Peter Hutterer [Wed, 26 Jun 2013 07:31:15 +0000 (17:31 +1000)]
Fix distcheck

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agotest: add more event queue tests
Peter Hutterer [Wed, 26 Jun 2013 06:48:21 +0000 (16:48 +1000)]
test: add more event queue tests

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoDon't crash peeking at a zero-sized queue
Peter Hutterer [Wed, 26 Jun 2013 06:47:43 +0000 (16:47 +1000)]
Don't crash peeking at a zero-sized queue

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoUpdate gitignore
Peter Hutterer [Sun, 23 Jun 2013 09:49:47 +0000 (19:49 +1000)]
Update gitignore

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agotest: fix includes for distcheck
Peter Hutterer [Sat, 22 Jun 2013 10:00:48 +0000 (20:00 +1000)]
test: fix includes for distcheck

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoSlots are now definitely zero-indexed, see recent kernel patch
Peter Hutterer [Sat, 22 Jun 2013 09:45:39 +0000 (19:45 +1000)]
Slots are now definitely zero-indexed, see recent kernel patch

doc: specify that ABS_MT_SLOT must have a minimum of 0

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoDocumentation fixes
Peter Hutterer [Sat, 22 Jun 2013 09:44:03 +0000 (19:44 +1000)]
Documentation fixes

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoUse doxygen instead of man pages
Peter Hutterer [Sat, 22 Jun 2013 09:13:36 +0000 (19:13 +1000)]
Use doxygen instead of man pages

Doxygen is bad for man pages, but having an online API documentation
is better and easier to maintain.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoFix stray code tag in html
Peter Hutterer [Tue, 18 Jun 2013 11:57:34 +0000 (21:57 +1000)]
Fix stray code tag in html

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agotest: add test for internal event queue
Peter Hutterer [Sun, 9 Jun 2013 10:22:18 +0000 (20:22 +1000)]
test: add test for internal event queue

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoFix queue_num_free_elements
Peter Hutterer [Sun, 9 Jun 2013 10:11:39 +0000 (20:11 +1000)]
Fix queue_num_free_elements

Return 0 for an unallocated queue, and return the actual number of events (rather than one too
little).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoDon't return the next element if the queue is full
Peter Hutterer [Wed, 26 Jun 2013 07:26:50 +0000 (17:26 +1000)]
Don't return the next element if the queue is full

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoDon't allow a queue size of 0.
Peter Hutterer [Sun, 9 Jun 2013 10:07:14 +0000 (20:07 +1000)]
Don't allow a queue size of 0.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoUse a size_t, not an int, where appropriate
Peter Hutterer [Sun, 9 Jun 2013 10:03:50 +0000 (20:03 +1000)]
Use a size_t, not an int, where appropriate

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoHook up gcov
Peter Hutterer [Wed, 5 Jun 2013 07:30:08 +0000 (17:30 +1000)]
Hook up gcov

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoDirectly compile libevdev sources
Peter Hutterer [Wed, 5 Jun 2013 06:50:48 +0000 (16:50 +1000)]
Directly compile libevdev sources

This avoids messing around with libtool for debugging. I may revert this
once the library is actually slightly stable, but for now this makes things
easier.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoAdd a test for event the various libevdev_has_event * functions
Peter Hutterer [Wed, 5 Jun 2013 05:31:00 +0000 (15:31 +1000)]
Add a test for event the various libevdev_has_event * functions

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoAdd an API to get the repeat values
Peter Hutterer [Sun, 9 Jun 2013 09:48:19 +0000 (19:48 +1000)]
Add an API to get the repeat values

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoman: add a note about EV_REP values
Peter Hutterer [Sun, 9 Jun 2013 09:49:10 +0000 (19:49 +1000)]
man: add a note about EV_REP values

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoHandle EV_REP events in event-names.h
Peter Hutterer [Wed, 5 Jun 2013 06:43:15 +0000 (16:43 +1000)]
Handle EV_REP events in event-names.h

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoAdd the remaining ev bits
Peter Hutterer [Wed, 5 Jun 2013 06:30:00 +0000 (16:30 +1000)]
Add the remaining ev bits

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoUse a macro for type_to_mask
Peter Hutterer [Wed, 5 Jun 2013 06:03:54 +0000 (16:03 +1000)]
Use a macro for type_to_mask

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoAdd function to get max value for a given ev type
Peter Hutterer [Wed, 5 Jun 2013 06:01:25 +0000 (16:01 +1000)]
Add function to get max value for a given ev type

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoDefault to a max of -1 for undefined EV_foo bits
Peter Hutterer [Wed, 5 Jun 2013 06:00:56 +0000 (16:00 +1000)]
Default to a max of -1 for undefined EV_foo bits

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoFix type_to_mask to return -1
Peter Hutterer [Wed, 5 Jun 2013 01:22:35 +0000 (11:22 +1000)]
Fix type_to_mask to return -1

EV_SYN doesn't have a max, so 0 is not enough.

returning 0 on failure is a bad idea, as mask is unset.

11 years agotest: add infrastructure for uinput device tests
Peter Hutterer [Wed, 5 Jun 2013 01:17:11 +0000 (11:17 +1000)]
test: add infrastructure for uinput device tests

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoAdd functions to enable axis on the device in the kernel
Peter Hutterer [Tue, 4 Jun 2013 06:24:11 +0000 (16:24 +1000)]
Add functions to enable axis on the device in the kernel

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoInline the type-to-mask helpers
Peter Hutterer [Tue, 4 Jun 2013 05:55:20 +0000 (15:55 +1000)]
Inline the type-to-mask helpers

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoMove utility functions to a separate header
Peter Hutterer [Tue, 4 Jun 2013 05:46:03 +0000 (15:46 +1000)]
Move utility functions to a separate header

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoAdd a few includes the libevdev-int.h needs
Peter Hutterer [Tue, 4 Jun 2013 05:44:51 +0000 (15:44 +1000)]
Add a few includes the libevdev-int.h needs

These were hidden due to the include order from the .c files, but really,
libevdev-int should include them.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoProtect against NULL device on log handler
Peter Hutterer [Tue, 4 Jun 2013 04:53:30 +0000 (14:53 +1000)]
Protect against NULL device on log handler

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoSet up a test harness
Peter Hutterer [Tue, 4 Jun 2013 01:11:57 +0000 (11:11 +1000)]
Set up a test harness

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoBlacklist some key names that resolve to other names
Peter Hutterer [Tue, 4 Jun 2013 01:11:25 +0000 (11:11 +1000)]
Blacklist some key names that resolve to other names

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoSwitch tools to use libevdev_get_event_*_name interface
Peter Hutterer [Tue, 4 Jun 2013 01:15:29 +0000 (11:15 +1000)]
Switch tools to use libevdev_get_event_*_name interface

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoExpose API for retrieving event names
Peter Hutterer [Mon, 3 Jun 2013 23:52:20 +0000 (09:52 +1000)]
Expose API for retrieving event names

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoAdd man page for libevdev_get_event_value and friends
Peter Hutterer [Mon, 3 Jun 2013 23:53:32 +0000 (09:53 +1000)]
Add man page for libevdev_get_event_value and friends

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoMove libevdev-events over to a tools directory
Peter Hutterer [Mon, 3 Jun 2013 23:35:14 +0000 (09:35 +1000)]
Move libevdev-events over to a tools directory

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoMerge libevdev-print and libevdev-events into one binary
Peter Hutterer [Mon, 3 Jun 2013 23:31:46 +0000 (09:31 +1000)]
Merge libevdev-print and libevdev-events into one binary

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agotest: drop unused function print_code_bits
Peter Hutterer [Mon, 3 Jun 2013 23:30:45 +0000 (09:30 +1000)]
test: drop unused function print_code_bits

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoDrop requirement on ffi - copy/paste leftover
Peter Hutterer [Tue, 4 Jun 2013 00:12:16 +0000 (10:12 +1000)]
Drop requirement on ffi - copy/paste leftover

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoAllow libevdev_free on a NULL pointer.
Peter Hutterer [Tue, 4 Jun 2013 01:15:00 +0000 (11:15 +1000)]
Allow libevdev_free on a NULL pointer.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoInclude stdarg for va_list.
Peter Hutterer [Tue, 4 Jun 2013 00:16:36 +0000 (10:16 +1000)]
Include stdarg for va_list.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoSkip over ABS_MT_SLOT when syncing MT axis values
Peter Hutterer [Mon, 3 Jun 2013 06:36:34 +0000 (16:36 +1000)]
Skip over ABS_MT_SLOT when syncing MT axis values

The slot event is already on the queue.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoFix invalid abs_info read
Peter Hutterer [Mon, 3 Jun 2013 06:36:10 +0000 (16:36 +1000)]
Fix invalid abs_info read

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoFill in the last event time for synced events
Peter Hutterer [Mon, 3 Jun 2013 06:20:35 +0000 (16:20 +1000)]
Fill in the last event time for synced events

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoUpdate README
Peter Hutterer [Mon, 3 Jun 2013 05:24:54 +0000 (15:24 +1000)]
Update README

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoLet the name be dynamically allocated
Peter Hutterer [Mon, 3 Jun 2013 04:20:34 +0000 (14:20 +1000)]
Let the name be dynamically allocated

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoExpose phys/uniq to the caller
Peter Hutterer [Mon, 3 Jun 2013 03:59:06 +0000 (13:59 +1000)]
Expose phys/uniq to the caller

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoExport version fields as well
Peter Hutterer [Mon, 3 Jun 2013 03:35:28 +0000 (13:35 +1000)]
Export version fields as well

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoAdd man-pages for the current interface
Peter Hutterer [Fri, 31 May 2013 01:46:20 +0000 (11:46 +1000)]
Add man-pages for the current interface

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoRename pid/vid to product-id and vendor-id
Peter Hutterer [Mon, 3 Jun 2013 01:22:39 +0000 (11:22 +1000)]
Rename pid/vid to product-id and vendor-id

Slightly more expressive and it's not that painful to type.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoAdd a FIXME for lack of O_NONBLOCK
Peter Hutterer [Fri, 31 May 2013 05:16:57 +0000 (15:16 +1000)]
Add a FIXME for lack of O_NONBLOCK

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoAdd a fixme: if we're dropping sync event, libedev loses state info too
Peter Hutterer [Fri, 31 May 2013 05:01:32 +0000 (15:01 +1000)]
Add a fixme: if we're dropping sync event, libedev loses state info too

If a client doesn't care about syncing that's one thing, but
libevdev functions still need to return the right _current_ (i.e. synced)
value.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoDon't allow re-setting the fd
Peter Hutterer [Fri, 31 May 2013 04:53:42 +0000 (14:53 +1000)]
Don't allow re-setting the fd

If a caller needs to re-init a device, libevdev_new_from_fd() is a better
choice.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoChange libevdev_grab to take an enum
Peter Hutterer [Fri, 31 May 2013 04:48:43 +0000 (14:48 +1000)]
Change libevdev_grab to take an enum

Enum values fo 3 and 4 to avoid callers using true/false values for grabbing
and ungrabbing. If the evdev mute ioctl is merged, we can extend this
without having to worry about breaking callers.

[1] http://lwn.net/Articles/476830/

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agogitignore: Ignore tarballs
Peter Hutterer [Fri, 31 May 2013 04:48:24 +0000 (14:48 +1000)]
gitignore: Ignore tarballs

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoSplit libevdev_new() into _new and _new_from_fd()
Peter Hutterer [Fri, 31 May 2013 01:26:58 +0000 (11:26 +1000)]
Split libevdev_new() into _new and _new_from_fd()

libevdev_new() can only fail on allocation failures, but with an fd the
failure options are more. Split into a new function that can return an error
code.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoFree the event queue on cleanup.
Peter Hutterer [Fri, 31 May 2013 05:24:39 +0000 (15:24 +1000)]
Free the event queue on cleanup.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoCheck for allocation failure in libevdev_new()
Peter Hutterer [Fri, 31 May 2013 01:26:01 +0000 (11:26 +1000)]
Check for allocation failure in libevdev_new()

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoRename ER_SYNC flag to LIBEVDEV_READ_SYNC
Peter Hutterer [Thu, 30 May 2013 04:04:33 +0000 (14:04 +1000)]
Rename ER_SYNC flag to LIBEVDEV_READ_SYNC

ER dated to an earlier version of this library called libevdev_read.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
11 years agoAdd a function to retrieve the current slot
Peter Hutterer [Thu, 30 May 2013 04:02:17 +0000 (14:02 +1000)]
Add a function to retrieve the current slot

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