From e669b74ffb0b5444f2b77dc157c536bb524d5c8d Mon Sep 17 00:00:00 2001 From: Luna Date: Sun, 31 May 2020 21:34:49 -0300 Subject: [PATCH] add CustomCommand function --- src/lang.zig | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/lang.zig b/src/lang.zig index 824a3bb..03a6c52 100644 --- a/src/lang.zig +++ b/src/lang.zig @@ -31,6 +31,23 @@ fn LV2Command( }; } +fn CustomCommand( + comptime tag: Command.tag, + comptime plugin: type, + comptime parameters: type, +) type { + return struct { + pub const base_tag = tag; + pub const command_type = CommandType.plugin_command; + pub const plugin_type = plugin; + + base: Command, + split: usize, + index: usize, + parameters: LV2Parameters, + }; +} + pub const Command = struct { tag: Tag, @@ -182,7 +199,7 @@ pub const Command = struct { pub const Rotate = struct { pub const base_tag = Tag.rotate; base: Command, - deg: usize, + deg: f32, bgfill: []const u8, };