diff options
author | cbdev <cb@cbcdn.com> | 2020-05-01 16:49:49 +0200 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2020-05-01 16:49:49 +0200 |
commit | 4f467a30f88a628e0e49858986d9278e12a92ce5 (patch) | |
tree | f2a94dad142d6b4be7a5a116d6daec172b2c64b8 /backends/wininput.h | |
parent | c0bb55ff08faf2f89af947090d1c9bc412927d9f (diff) | |
download | midimonster-4f467a30f88a628e0e49858986d9278e12a92ce5.tar.gz midimonster-4f467a30f88a628e0e49858986d9278e12a92ce5.tar.bz2 midimonster-4f467a30f88a628e0e49858986d9278e12a92ce5.zip |
Implement wininput skeleton and mouse output
Diffstat (limited to 'backends/wininput.h')
-rw-r--r-- | backends/wininput.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/backends/wininput.h b/backends/wininput.h new file mode 100644 index 0000000..240f1a6 --- /dev/null +++ b/backends/wininput.h @@ -0,0 +1,44 @@ +#include "midimonster.h" + +MM_PLUGIN_API int init(); +static int wininput_configure(char* option, char* value); +static int wininput_configure_instance(instance* inst, char* option, char* value); +static int wininput_instance(instance* inst); +static channel* wininput_channel(instance* inst, char* spec, uint8_t flags); +static int wininput_set(instance* inst, size_t num, channel** c, channel_value* v); +static int wininput_handle(size_t num, managed_fd* fds); +static int wininput_start(size_t n, instance** inst); +static int wininput_shutdown(size_t n, instance** inst); + +enum /*wininput_channel_type*/ { + none = 0, + mouse, + keyboard, + joystick +}; + +enum /*wininput_control_channel*/ { + position, + //wheel, /*relative*/ + button, + + keypress, + key_unicode +}; + +typedef union { + struct { + uint8_t pad[4]; + uint8_t type; + uint8_t channel; + uint16_t control; + } fields; + uint64_t label; +} wininput_channel_ident; + +typedef struct { + struct { + uint16_t x; + uint16_t y; + } mouse; +} wininput_instance_data; |