aboutsummaryrefslogtreecommitdiff
path: root/sandbox_ui.lv2/sandbox_slave.h
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2016-04-03 22:52:48 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2016-04-03 22:56:50 +0200
commitf18ac20e55169a3e8583075ad273a11474a7a2a4 (patch)
treee1408b5138f064d042cf2dae59e34055cbdbc4a9 /sandbox_ui.lv2/sandbox_slave.h
parenta0a9843bdfcc3b3abe0d741f3aab6820bc47002a (diff)
downloadsherlock.lv2-f18ac20e55169a3e8583075ad273a11474a7a2a4.tar.xz
prototype sandbox_ui.
Diffstat (limited to 'sandbox_ui.lv2/sandbox_slave.h')
-rw-r--r--sandbox_ui.lv2/sandbox_slave.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/sandbox_ui.lv2/sandbox_slave.h b/sandbox_ui.lv2/sandbox_slave.h
new file mode 100644
index 0000000..bea0b85
--- /dev/null
+++ b/sandbox_ui.lv2/sandbox_slave.h
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2015-2016 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ *
+ * This is free software: you can redistribute it and/or modify
+ * it under the terms of the Artistic License 2.0 as published by
+ * The Perl Foundation.
+ *
+ * This source is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Artistic License 2.0 for more details.
+ *
+ * You should have received a copy of the Artistic License 2.0
+ * along the source as a COPYING file. If not, obtain it from
+ * http://www.perlfoundation.org/artistic_license_2_0.
+ */
+
+#ifndef _SANDBOX_SLAVE_H
+#define _SANDBOX_SLAVE_H
+
+#ifdef _WIN32
+# define SANDBOX_SYMBOL_EXTERN __declspec(dllexport)
+#else
+# define SANDBOX_SYMBOL_EXTERN __attribute__((visibility("default")))
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _sandbox_slave_t sandbox_slave_t;
+typedef struct _sandbox_slave_driver_t sandbox_slave_driver_t;
+
+typedef int (*sandbox_slave_driver_init_t)(sandbox_slave_t *sb, void *data);
+typedef void (*sandbox_slave_driver_run_t)(sandbox_slave_t *sb, void *data);
+typedef void (*sandbox_slave_driver_deinit_t)(void *data);
+typedef int (*sandbox_slave_driver_resize_t)(void *data, int width, int height);
+
+struct _sandbox_slave_driver_t {
+ sandbox_slave_driver_init_t init_cb;
+ sandbox_slave_driver_run_t run_cb;
+ sandbox_slave_driver_deinit_t deinit_cb;
+ sandbox_slave_driver_resize_t resize_cb;
+};
+
+SANDBOX_SYMBOL_EXTERN sandbox_slave_t *
+sandbox_slave_new(int argc, char **argv, const sandbox_slave_driver_t *driver, void *data);
+
+SANDBOX_SYMBOL_EXTERN void
+sandbox_slave_free(sandbox_slave_t *sb);
+
+SANDBOX_SYMBOL_EXTERN int
+sandbox_slave_instantiate(sandbox_slave_t *sb, void *parent, void *widget);
+
+SANDBOX_SYMBOL_EXTERN void
+sandbox_slave_recv(sandbox_slave_t *sb);
+
+SANDBOX_SYMBOL_EXTERN bool
+sandbox_slave_flush(sandbox_slave_t *sb);
+
+SANDBOX_SYMBOL_EXTERN int
+sandbox_slave_idle(sandbox_slave_t *sb);
+
+SANDBOX_SYMBOL_EXTERN void
+sandbox_slave_run(sandbox_slave_t *sb);
+
+SANDBOX_SYMBOL_EXTERN void
+sandbox_slave_fd_get(sandbox_slave_t *sb, int *fd);
+
+SANDBOX_SYMBOL_EXTERN const char *
+sandbox_slave_title_get(sandbox_slave_t *sb);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif