aboutsummaryrefslogtreecommitdiff
path: root/sherlock.h
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2017-03-18 12:01:17 +0100
committerHanspeter Portner <dev@open-music-kontrollers.ch>2017-03-18 12:01:17 +0100
commit6b44a44c189198d4ba212d65d37b56d836089f3c (patch)
tree59be470f69358fcfdfc0160a8731cfbdbf67c6f1 /sherlock.h
parent6ca13cb62f077b7e28407f9ced62cd7b699bb503 (diff)
downloadsherlock.lv2-6b44a44c189198d4ba212d65d37b56d836089f3c.tar.xz
fixes for updated props.lv2.
Diffstat (limited to 'sherlock.h')
-rw-r--r--sherlock.h40
1 files changed, 18 insertions, 22 deletions
diff --git a/sherlock.h b/sherlock.h
index 524a3a2..5940da0 100644
--- a/sherlock.h
+++ b/sherlock.h
@@ -63,29 +63,25 @@ struct _state_t {
int32_t follow;
};
-#define MAX_NPROPS 4
-
-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
+#define MAX_NPROPS 3
+
+static const props_def_t defs [MAX_NPROPS] = {
+ {
+ .property = SHERLOCK_URI"#overwrite",
+ .offset = offsetof(state_t, overwrite),
+ .type = LV2_ATOM__Bool,
+ },
+ {
+ .property = SHERLOCK_URI"#block",
+ .offset = offsetof(state_t, block),
+ .type = LV2_ATOM__Bool,
+ },
+ {
+ .property = SHERLOCK_URI"#follow",
+ .offset = offsetof(state_t, follow),
+ .type = LV2_ATOM__Bool,
+ }
};
-
-static const props_def_t stat_follow = {
- .property = SHERLOCK_URI"#follow",
- .access = LV2_PATCH__writable,
- .type = LV2_ATOM__Bool,
- .mode = PROP_MODE_STATIC
-};
-
// there is a bug in LV2 <= 0.10
#if defined(LV2_ATOM_TUPLE_FOREACH)
# undef LV2_ATOM_TUPLE_FOREACH