Trigger properties.

This commit is contained in:
Robin Davies
2024-10-24 04:18:37 -04:00
parent 4045447040
commit ae7e6f5abe
6 changed files with 161 additions and 124 deletions
+4 -1
View File
@@ -118,6 +118,7 @@ void PluginHost::LilvUris::Initialize(LilvWorld *pWorld)
core__toggled = lilv_new_uri(pWorld, LV2_CORE__toggled);
core__connectionOptional = lilv_new_uri(pWorld, LV2_CORE__connectionOptional);
portprops__not_on_gui_property_uri = lilv_new_uri(pWorld, LV2_PORT_PROPS__notOnGUI);
portprops__trigger = lilv_new_uri(pWorld,LV2_PORT_PROPS__trigger);
midi__event = lilv_new_uri(pWorld, LV2_MIDI__MidiEvent);
core__designation = lilv_new_uri(pWorld, LV2_CORE__designation);
portgroups__group = lilv_new_uri(pWorld, LV2_PORT_GROUPS__group);
@@ -932,6 +933,7 @@ Lv2PortInfo::Lv2PortInfo(PluginHost *host, const LilvPlugin *plugin, const LilvP
this->toggled_property_ = lilv_port_has_property(plugin, pPort, host->lilvUris->core__toggled);
this->not_on_gui_ = lilv_port_has_property(plugin, pPort, host->lilvUris->portprops__not_on_gui_property_uri);
this->connection_optional_ = lilv_port_has_property(plugin, pPort, host->lilvUris->core__connectionOptional);
this->trigger_property_ = lilv_port_has_property(plugin,pPort,host->lilvUris->portprops__trigger);
LilvScalePoints *pScalePoints = lilv_port_get_scale_points(plugin, pPort);
LILV_FOREACH(scale_points, iSP, pScalePoints)
@@ -1593,7 +1595,7 @@ json_map::storage_type<Lv2PortInfo> Lv2PortInfo::jmap{
MAP_REF(Lv2PortInfo, is_logarithmic),
MAP_REF(Lv2PortInfo, display_priority),
MAP_REF(Lv2PortInfo, range_steps),
MAP_REF(Lv2PortInfo, trigger),
MAP_REF(Lv2PortInfo, trigger_property),
MAP_REF(Lv2PortInfo, integer_property),
MAP_REF(Lv2PortInfo, enumeration_property),
MAP_REF(Lv2PortInfo, toggled_property),
@@ -1662,6 +1664,7 @@ json_map::storage_type<Lv2PluginUiPort> Lv2PluginUiPort::jmap{{
MAP_REF(Lv2PluginUiPort, enumeration_property),
MAP_REF(Lv2PluginUiPort, not_on_gui),
MAP_REF(Lv2PluginUiPort, toggled_property),
MAP_REF(Lv2PluginUiPort, trigger_property),
MAP_REF(Lv2PluginUiPort, scale_points),
MAP_REF(Lv2PluginUiPort, port_group),
+6 -2
View File
@@ -214,7 +214,7 @@ namespace pipedal
bool is_logarithmic_ = false;
int display_priority_ = -1;
int range_steps_ = 0;
bool trigger_ = false;
bool trigger_property_ = false;
bool integer_property_ = false;
bool enumeration_property_ = false;
bool toggled_property_ = false;
@@ -285,7 +285,7 @@ namespace pipedal
LV2_PROPERTY_GETSET_SCALAR(is_logarithmic);
LV2_PROPERTY_GETSET_SCALAR(display_priority);
LV2_PROPERTY_GETSET_SCALAR(range_steps);
LV2_PROPERTY_GETSET_SCALAR(trigger);
LV2_PROPERTY_GETSET_SCALAR(trigger_property);
LV2_PROPERTY_GETSET_SCALAR(integer_property);
LV2_PROPERTY_GETSET_SCALAR(enumeration_property);
LV2_PROPERTY_GETSET_SCALAR(toggled_property);
@@ -496,6 +496,7 @@ namespace pipedal
default_value_(pPort->default_value()), range_steps_(pPort->range_steps()), display_priority_(pPort->display_priority()),
is_logarithmic_(pPort->is_logarithmic()), integer_property_(pPort->integer_property()), enumeration_property_(pPort->enumeration_property()),
toggled_property_(pPort->toggled_property()), not_on_gui_(pPort->not_on_gui()), scale_points_(pPort->scale_points()),
trigger_property_(pPort->trigger_property()),
comment_(pPort->comment()), units_(pPort->units()),
connection_optional_(pPort->connection_optional())
{
@@ -536,6 +537,7 @@ namespace pipedal
bool enumeration_property_ = false;
bool not_on_gui_ = false;
bool toggled_property_ = false;
bool trigger_property_ = false;
std::vector<Lv2ScalePoint> scale_points_;
std::string port_group_;
@@ -561,6 +563,7 @@ namespace pipedal
LV2_PROPERTY_GETSET_SCALAR(integer_property);
LV2_PROPERTY_GETSET_SCALAR(enumeration_property);
LV2_PROPERTY_GETSET_SCALAR(toggled_property);
LV2_PROPERTY_GETSET_SCALAR(trigger_property);
LV2_PROPERTY_GETSET_SCALAR(not_on_gui);
LV2_PROPERTY_GETSET(scale_points);
LV2_PROPERTY_GETSET(units);
@@ -664,6 +667,7 @@ namespace pipedal
AutoLilvNode core__toggled;
AutoLilvNode core__connectionOptional;
AutoLilvNode portprops__not_on_gui_property_uri;
AutoLilvNode portprops__trigger;
AutoLilvNode midi__event;
AutoLilvNode core__designation;
AutoLilvNode portgroups__group;