aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/lua.h
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2019-07-06 17:25:12 +0200
committercbdev <cb@cbcdn.com>2019-07-06 17:25:12 +0200
commitb618c4a6b74a52f830ca53029e1cc680d56a2501 (patch)
tree6da5459b45db4448936cb8f0225490b9f5135b1e /backends/lua.h
parentee75bee08b8fb280fc1d76e8635cf29c576835da (diff)
downloadmidimonster-b618c4a6b74a52f830ca53029e1cc680d56a2501.tar.gz
midimonster-b618c4a6b74a52f830ca53029e1cc680d56a2501.tar.bz2
midimonster-b618c4a6b74a52f830ca53029e1cc680d56a2501.zip
Implement Lua backend
Diffstat (limited to 'backends/lua.h')
-rw-r--r--backends/lua.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/backends/lua.h b/backends/lua.h
new file mode 100644
index 0000000..27e1afd
--- /dev/null
+++ b/backends/lua.h
@@ -0,0 +1,21 @@
+#include "midimonster.h"
+
+#include <lua.h>
+#include <lualib.h>
+#include <lauxlib.h>
+
+int init();
+static int lua_configure(char* option, char* value);
+static int lua_configure_instance(instance* inst, char* option, char* value);
+static instance* lua_instance();
+static channel* lua_channel(instance* inst, char* spec);
+static int lua_set(instance* inst, size_t num, channel** c, channel_value* v);
+static int lua_handle(size_t num, managed_fd* fds);
+static int lua_start();
+static int lua_shutdown();
+
+typedef struct /*_lua_instance_data*/ {
+ size_t channels;
+ char** channel_name;
+ lua_State* interpreter;
+} lua_instance_data;