diff options
author | cbdev <cb@cbcdn.com> | 2018-03-02 03:20:11 +0100 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2018-03-02 03:20:11 +0100 |
commit | 2dfc564edc0c89c4a8de7e384806aae5d593426d (patch) | |
tree | b1636ec14d3f35ed88b3f079e0c3d168f77b17b9 /backends/evdev.h | |
parent | be5df1c4e639ca6a7cd70a3122039a1de4588e28 (diff) | |
download | midimonster-2dfc564edc0c89c4a8de7e384806aae5d593426d.tar.gz midimonster-2dfc564edc0c89c4a8de7e384806aae5d593426d.tar.bz2 midimonster-2dfc564edc0c89c4a8de7e384806aae5d593426d.zip |
Move backend implementations to subdirectory
Diffstat (limited to 'backends/evdev.h')
-rw-r--r-- | backends/evdev.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/backends/evdev.h b/backends/evdev.h new file mode 100644 index 0000000..89a08ae --- /dev/null +++ b/backends/evdev.h @@ -0,0 +1,31 @@ +#include <sys/types.h> + +#include "midimonster.h" + +/* + * This provides read-write access to the Linux kernel evdev subsystem + * via libevdev. On systems where uinput is not supported, output can be + * disabled by building with -DEVDEV_NO_UINPUT + */ + +int init(); +static int evdev_configure(char* option, char* value); +static int evdev_configure_instance(instance* instance, char* option, char* value); +static instance* evdev_instance(); +static channel* evdev_channel(instance* instance, char* spec); +static int evdev_set(instance* inst, size_t num, channel** c, channel_value* v); +static int evdev_handle(size_t num, managed_fd* fds); +static int evdev_start(); +static int evdev_shutdown(); + +typedef struct /*_evdev_instance_model*/ { + int input_fd; + struct libevdev* input_ev; + int exclusive; + + int output_enabled; +#ifndef EVDEV_NO_UINPUT + struct libevdev* output_proto; + struct libevdev_uinput* output_ev; +#endif +} evdev_instance_data; |