aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/evdev.h
diff options
context:
space:
mode:
Diffstat (limited to 'backends/evdev.h')
-rw-r--r--backends/evdev.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/backends/evdev.h b/backends/evdev.h
index c6e3a25..6504416 100644
--- a/backends/evdev.h
+++ b/backends/evdev.h
@@ -8,11 +8,11 @@
* disabled by building with -DEVDEV_NO_UINPUT
*/
-int init();
+MM_PLUGIN_API 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 channel* evdev_channel(instance* instance, char* spec, uint8_t flags);
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();
@@ -24,10 +24,19 @@ static int evdev_shutdown();
#define UINPUT_MAX_NAME_SIZE 512
#endif
+typedef struct /*_evdev_relative_axis_config*/ {
+ uint8_t inverted;
+ int code;
+ int64_t max;
+ int64_t current;
+} evdev_relaxis_config;
+
typedef struct /*_evdev_instance_model*/ {
int input_fd;
struct libevdev* input_ev;
int exclusive;
+ size_t relative_axes;
+ evdev_relaxis_config* relative_axis;
int output_enabled;
#ifndef EVDEV_NO_UINPUT
@@ -35,3 +44,13 @@ typedef struct /*_evdev_instance_model*/ {
struct libevdev_uinput* output_ev;
#endif
} evdev_instance_data;
+
+typedef union {
+ struct {
+ uint32_t pad;
+ uint16_t type;
+ uint16_t code;
+ } fields;
+ uint64_t label;
+} evdev_channel_ident;
+