summaryrefslogtreecommitdiff
path: root/libevdev/libevdev-int.h
Commit message (Collapse)AuthorAgeFilesLines
* Name-space the read flags betterPeter Hutterer2013-09-111-3/+3
| | | | | | | | Rename from LIBEVDEV_READ_foo to LIBEVDEV_READ_FLAG_foo to differentiate better from LIBEVDEV_READ_STATUS_foo. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
* Revamp the API once againPeter Hutterer2013-09-101-0/+1
| | | | | | | | | | | | | | | | | Another look at the current API showed some inconsistencies, rectified in this commit: libevdev_kernel_*: modify the underlying kernel device libevdev_event_type_*: something with an event type libevdev_event_code_*: something with an event code libevdev_event_*: struct input_event-related functions (i.e. not device-related) libevdev_property_*: something with a property libevdev_*: anything applying to a device Hopefully that's the last API change. Current symbols deprecated and aliased. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
* Drop per-device logging function, use per-library one insteadPeter Hutterer2013-09-031-2/+25
| | | | | | | | | | | | | | | | There's no need to have separate logging function for each device created. More likely, libevdev will be hooked up once into the logging system and expected to deal with it. Plus, this allows us to log from the uinput code where we don't have the context anyway. Requires a rename to libevdev_set_log_function to avoid ABI breaks, and while we're breaking the ABI make the logging function more sophisticated to log line, number, etc. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
* Use ENOMEM instead of ENOSPCPeter Hutterer2013-08-311-2/+2
| | | | | | | | | | | | 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>
* Fix two signed vs unsigned int warningsPeter Hutterer2013-08-291-1/+1
| | | | | | | | 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>
* Mark all external symbols with LIBEVDEV_EXPORTPeter Hutterer2013-08-291-0/+1
| | | | | | | | | 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>
* Axis values must be int, not unsigned intPeter Hutterer2013-08-291-1/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Add support for EV_SWPeter Hutterer2013-08-291-0/+1
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
* Keep the LED state and sync it after SYN_DROPPEDPeter Hutterer2013-08-151-0/+1
| | | | | | | | 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>
* Set the size for repeat delays based on REP_CNTPeter Hutterer2013-07-311-1/+1
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
* Switch to a state machine to handle incomplete syncsPeter Hutterer2013-07-021-1/+18
| | | | | | | | A caller may start syncing but switch back to normal half-way through the sync. In that case, we need to drop all sync events and continue with regular events only. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Don't crash peeking at a zero-sized queuePeter Hutterer2013-06-271-1/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Fix queue_num_free_elementsPeter Hutterer2013-06-271-1/+4
| | | | | | | 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>
* Don't return the next element if the queue is fullPeter Hutterer2013-06-271-0/+3
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Don't allow a queue size of 0.Peter Hutterer2013-06-271-0/+3
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Use a size_t, not an int, where appropriatePeter Hutterer2013-06-271-7/+7
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Add the remaining ev bitsPeter Hutterer2013-06-261-0/+6
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Add a few includes the libevdev-int.h needsPeter Hutterer2013-06-041-0/+3
| | | | | | | 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>
* Fill in the last event time for synced eventsPeter Hutterer2013-06-031-0/+2
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Let the name be dynamically allocatedPeter Hutterer2013-06-031-1/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Expose phys/uniq to the callerPeter Hutterer2013-06-031-0/+2
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Export version fields as wellPeter Hutterer2013-06-031-0/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Free the event queue on cleanup.Peter Hutterer2013-05-311-0/+8
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Update the MT state properlyPeter Hutterer2013-05-301-0/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* After a SYN_DROPPED, drop all events in the queuePeter Hutterer2013-05-301-10/+51
| | | | | | | | Ideally, we could sync by pre-pending all the sync events and then pretend nothing happened but our queue is too small and likely too full for any extra events. So drop all events, then add the sync events to the queue. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Abstract the event queue awayPeter Hutterer2013-05-301-0/+99
| | | | | | | Provide a couple of handler functions to avoid erroneous queue updates. This will make it easier if we need to swap queue implementation later. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Drop the callback interface, replace with libevdev_next_eventPeter Hutterer2013-05-301-4/+1
| | | | | | | | | | | Callbacks looked good on paper, but synaptics ran into an issue already that it just couldn't easily pass around the state needed in the actual event processing function. Replace with a new interface that only returns the next event (still reading more off the fd while doing so). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Add log func handlingPeter Hutterer2013-05-301-0/+2
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* libevdev is a library to handle evdev devicesPeter Hutterer2013-05-291-0/+66
Two main goals of this library: - 'transparently' handle SYN_DROPPED events - avoid errors in ioctl handling by providing a simpler interface. Keeps a cached copy of the device for quick querying. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>