aboutsummaryrefslogtreecommitdiff
path: root/sherlock.h
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2016-06-07 16:55:05 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2016-06-07 16:55:05 +0200
commit1e7d3c4518794a14c934bf783a6c6639f4d3095a (patch)
treee7f63d0249a2573a814bbba9768431042451146c /sherlock.h
parentf42d2337cfba49be6868905d57ad28af4a6a2053 (diff)
downloadsherlock.lv2-1e7d3c4518794a14c934bf783a6c6639f4d3095a.tar.xz
implement parameters and state.
Diffstat (limited to 'sherlock.h')
-rw-r--r--sherlock.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/sherlock.h b/sherlock.h
index b303b85..d551d5b 100644
--- a/sherlock.h
+++ b/sherlock.h
@@ -30,6 +30,9 @@
#include "lv2/lv2plug.in/ns/extensions/units/units.h"
#include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
#include "lv2/lv2plug.in/ns/lv2core/lv2.h"
+
+#include <stdio.h>
+#include <props.h>
#define LV2_OSC__OscEvent "http://opensoundcontrol.org#OscEvent"
@@ -66,10 +69,48 @@ extern const LV2UI_Descriptor osc_inspector_kx;
extern const LV2UI_Descriptor osc_inspector_eo;
typedef struct _position_t position_t;
+typedef struct _state_t state_t;
struct _position_t {
uint64_t offset;
uint32_t nsamples;
};
+struct _state_t {
+ int32_t count;
+ int32_t overwrite;
+ int32_t block;
+ int32_t follow;
+};
+
+#define MAX_NPROPS 4
+
+static const props_def_t stat_count = {
+ .property = SHERLOCK_URI"#count",
+ .access = LV2_PATCH__writable,
+ .type = LV2_ATOM__Int,
+ .mode = PROP_MODE_STATIC
+};
+
+static const props_def_t stat_overwrite = {
+ .property = SHERLOCK_URI"#overwrite",
+ .access = LV2_PATCH__writable,
+ .type = LV2_ATOM__Bool,
+ .mode = PROP_MODE_STATIC
+};
+
+static const props_def_t stat_block = {
+ .property = SHERLOCK_URI"#block",
+ .access = LV2_PATCH__writable,
+ .type = LV2_ATOM__Bool,
+ .mode = PROP_MODE_STATIC
+};
+
+static const props_def_t stat_follow = {
+ .property = SHERLOCK_URI"#follow",
+ .access = LV2_PATCH__writable,
+ .type = LV2_ATOM__Bool,
+ .mode = PROP_MODE_STATIC
+};
+
#endif // _SHERLOCK_LV2_H