aboutsummaryrefslogtreecommitdiff
path: root/include/interfaces
diff options
context:
space:
mode:
authorSimon Zeni <simon@bl4ckb0ne.ca>2022-03-03 09:43:38 -0500
committerKirill Primak <vyivel@eclair.cafe>2022-03-07 16:37:41 +0000
commitcfed039c9a353cff5d8c3c678d7eb272c887de77 (patch)
treeac6e617cda2658d534fc9081d5c985e6cbc9c1b0 /include/interfaces
parent1bb2631c5c05e4b74c1a3163ab030ae42c7d8fe8 (diff)
types/wlr_input_device: move init and finish function to private API
Diffstat (limited to 'include/interfaces')
-rw-r--r--include/interfaces/wlr_input_device.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/interfaces/wlr_input_device.h b/include/interfaces/wlr_input_device.h
new file mode 100644
index 00000000..c24b5366
--- /dev/null
+++ b/include/interfaces/wlr_input_device.h
@@ -0,0 +1,20 @@
+#ifndef INTERFACES_INPUT_DEVICE_H
+#define INTERFACES_INPUT_DEVICE_H
+
+#include <wlr/types/wlr_input_device.h>
+
+/**
+ * Initializes a given wlr_input_device. Allocates memory for the name and sets
+ * its vendor and product id to 0.
+ * wlr_device must be non-NULL.
+ */
+void wlr_input_device_init(struct wlr_input_device *wlr_device,
+ enum wlr_input_device_type type, const char *name);
+
+/**
+ * Cleans up all the memory owned by a given wlr_input_device and signals
+ * the destroy event.
+ */
+void wlr_input_device_finish(struct wlr_input_device *wlr_device);
+
+#endif