diff options
| author | Peter Hutterer <peter.hutterer@who-t.net> | 2013-06-04 16:24:11 +1000 |
|---|---|---|
| committer | Peter Hutterer <peter.hutterer@who-t.net> | 2013-06-04 20:17:27 +1000 |
| commit | 0e9ef8a22d16c327af1a060d058b7cf746298c98 (patch) | |
| tree | 9b7f39fa325b8c72c05566b7ddb3356ab9c45dc4 /libevdev/libevdev.h | |
| parent | aff1db36da26db45cf724bde5d0c579e12d03c02 (diff) | |
| download | libevdev-0e9ef8a22d16c327af1a060d058b7cf746298c98.tar.gz | |
Add functions to enable axis on the device in the kernel
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'libevdev/libevdev.h')
| -rw-r--r-- | libevdev/libevdev.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/libevdev/libevdev.h b/libevdev/libevdev.h index a693acd..49c34d9 100644 --- a/libevdev/libevdev.h +++ b/libevdev/libevdev.h @@ -454,6 +454,41 @@ int libevdev_enable_event_code(struct libevdev *dev, unsigned int type, unsigned */ int libevdev_disable_event_code(struct libevdev *dev, unsigned int type, unsigned int code); + +/** + * Forcibly enable an event type on this device, even if the underlying + * device does not support it. While this cannot make the device actually + * report such events, it will now return true for libevdev_has_event_code. + * + * This will be written to the kernel. + * + * This cannot be undone, the kernel only allows to enable axes, not disable + * them. + * + * This function calls libevdev_kernel_enable_event_type if necessary. + * + * @param type The event type to enable (EV_ABS, EV_KEY, ...) + * @param code The event code to enable (ABS_X, REL_X, etc.) + */ +int libevdev_kernel_enable_event_type(struct libevdev *dev, unsigned int type); + +/** + * Forcibly enable an event code on this device, even if the underlying + * device does not support it. While this cannot make the device actually + * report such events, it will now return true for libevdev_has_event_code. + * + * This will be written to the kernel. + * + * This cannot be undone, the kernel only allows to enable axes, not disable + * them. + * + * This function calls libevdev_kernel_enable_event_type if necessary. + * + * @param type The event type to enable (EV_ABS, EV_KEY, ...) + * @param code The event code to enable (ABS_X, REL_X, etc.) + */ +int libevdev_kernel_enable_event_code(struct libevdev *dev, unsigned int type, unsigned int code); + /** * Set the device's EV_ABS/<code> axis to the value defined in the abs * parameter. This will be written to the kernel. |
