add CustomCommand function

This commit is contained in:
Luna 2020-05-31 21:34:49 -03:00
parent ca751e58f7
commit e669b74ffb

View file

@ -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 { pub const Command = struct {
tag: Tag, tag: Tag,
@ -182,7 +199,7 @@ pub const Command = struct {
pub const Rotate = struct { pub const Rotate = struct {
pub const base_tag = Tag.rotate; pub const base_tag = Tag.rotate;
base: Command, base: Command,
deg: usize, deg: f32,
bgfill: []const u8, bgfill: []const u8,
}; };