| summaryrefslogtreecommitdiff |
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2015-09-02 10:57:48 +0200 |
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2015-09-02 10:57:48 +0200 |
| commit | 265053e2a4394b20d82aa1170ec3a9901f437d81 (patch) | |
| tree | 022440b6bc0d1ad36e36429573ec17e589fb791c /src/relabsd_device.h | |
| parent | d9656cc86505b6f2bba57e04a4c99430a945a70d (diff) | |
Adds some comments, as well as minor code improvements.
Diffstat (limited to 'src/relabsd_device.h')
| -rw-r--r-- | src/relabsd_device.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/relabsd_device.h b/src/relabsd_device.h index 35a4830..b3f2d51 100644 --- a/src/relabsd_device.h +++ b/src/relabsd_device.h @@ -12,6 +12,21 @@ struct relabsd_device struct libevdev_uinput * uidev; }; +/* + * - Clones the (real) input device. + * - Adds ABS event support to the clone. + * - Adds the ABS axis described in 'config' to the clone (overwriting if + * needed). + * - Disables the associated REL events from the clone. + * + * Returns -1 on (fatal) error, + * 0 on success. + * + * 'dev' does not need to be initialized, as the function will to that for you + * (on success). + * On success, 'dev' will need to be closed. + * This opens the (real) input device in read only mode to copy its properties. + */ int relabsd_device_create ( struct relabsd_device * const dev, @@ -20,6 +35,13 @@ int relabsd_device_create void relabsd_device_destroy (const struct relabsd_device * const dev); +/* + * Write an event to 'dev'. At this time, every event written to 'dev' is + * followed by an EV_SYN event. + * + * Returns 0 if both the event and the EV_SYN were successful, + * -1 if either failed. + */ int relabsd_device_write_evdev_event ( const struct relabsd_device * const dev, |


