summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2020-01-03 19:59:43 +0100
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2020-01-03 19:59:43 +0100
commit0c68e544b113f0493b9b80511c26c1e4584bd1e7 (patch)
tree37bd18d5abf5d8b347fed778c5479ef1c142a8a6 /include/relabsd/device/virtual_device.h
parenta4841776b6e1751232d46482731836a7c17b896f (diff)
...
Diffstat (limited to 'include/relabsd/device/virtual_device.h')
-rw-r--r--include/relabsd/device/virtual_device.h33
1 files changed, 19 insertions, 14 deletions
diff --git a/include/relabsd/device/virtual_device.h b/include/relabsd/device/virtual_device.h
index 646422a..5ffd1c9 100644
--- a/include/relabsd/device/virtual_device.h
+++ b/include/relabsd/device/virtual_device.h
@@ -1,40 +1,45 @@
#pragma once
+#include <relabsd/config/parameters.h>
+
#include <relabsd/device/virtual_device_types.h>
/*
* - Clones the (real) input device.
* - Adds ABS event support to the clone.
- * - Adds the ABS axis described in 'config' to the clone (overwriting if
+ * - Adds the ABS axis described in 'parameters' 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.
+ * 'device' does not need to be initialized, as the function will to that for
+ * you (on success).
+ * On success, 'device' will need to be closed.
* This opens the (real) input device in read only mode to copy its properties.
*/
-int relabsd_device_create
+int relabsd_virtual_device_create_from
(
- struct relabsd_device * const dev,
- const struct relabsd_config * const config
+ const struct relabsd_parameters parameters [const restrict static 1],
+ struct relabsd_virtual_device device [const restrict static 1]
);
-void relabsd_device_destroy (const struct relabsd_device * const dev);
+void relabsd_virtual_device_destroy
+(
+ const struct relabsd_virtual_device device [const restrict static 1]
+);
/*
- * Write an event to 'dev'. At this time, every event written to 'dev' is
+ * Write an event to 'device'. At this time, every event written to 'device' 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
+int relabsd_virtual_device_write_evdev_event
(
- const struct relabsd_device * const dev,
+ const struct relabsd_virtual_device device [const restrict static 1],
unsigned int const type,
unsigned int const code,
int const value
@@ -44,8 +49,8 @@ int relabsd_device_write_evdev_event
* Send an event for each enabled axis, setting it to zero.
* An EV_SYN event is sent afterwards.
*/
-void relabsd_device_set_axes_to_zero
+void relabsd_virtual_device_set_axes_to_zero
(
- const struct relabsd_device * const dev,
- const struct relabsd_config * const config
+ const struct relabsd_parameters parameters [const restrict static 1],
+ const struct relabsd_virtual_device device [const restrict static 1]
);