aboutsummaryrefslogtreecommitdiffhomepage
path: root/uinput.h
diff options
context:
space:
mode:
Diffstat (limited to 'uinput.h')
-rw-r--r--uinput.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/uinput.h b/uinput.h
new file mode 100644
index 0000000..f61ca4f
--- /dev/null
+++ b/uinput.h
@@ -0,0 +1,28 @@
+#pragma once
+
+#include <sys/types.h>
+#include <linux/input.h>
+
+#include "midimonster.h"
+
+int init();
+static int backend_configure(char* option, char* value);
+static int backend_configure_instance(instance* instance, char* option, char* value);
+static instance* backend_instance();
+static channel* backend_channel(instance* instance, char* spec);
+static int backend_set(instance* inst, size_t num, channel** c, channel_value* v);
+static int backend_handle(size_t num, managed_fd* fds);
+static int backend_start();
+static int backend_shutdown();
+
+/* uinput_instance */
+typedef struct {
+ int ident;
+ char* device_path;
+ char* name;
+ int fd_in;
+ int fd_out;
+ int exclusive;
+ size_t size_events;
+ struct input_event* events;
+} uinput_instance;