mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 20:40:11 +02:00
Fully implement IComponentHandler2
This commit is contained in:
@@ -360,6 +360,7 @@ tresult PLUGIN_API Vst3PluginProxyImpl::setComponentHandler(
|
||||
|
||||
// Automatically converted smart pointers for when the plugin performs a
|
||||
// callback later
|
||||
component_handler_2 = component_handler;
|
||||
unit_handler = component_handler;
|
||||
|
||||
return bridge.send_message(YaEditController::SetComponentHandler{
|
||||
|
||||
@@ -244,6 +244,8 @@ class Vst3PluginProxyImpl : public Vst3PluginProxy {
|
||||
// The following pointers are cast from `component_handler` if
|
||||
// `IEditController::setComponentHandler()` has been called
|
||||
|
||||
Steinberg::FUnknownPtr<Steinberg::Vst::IComponentHandler2>
|
||||
component_handler_2;
|
||||
Steinberg::FUnknownPtr<Steinberg::Vst::IUnitHandler> unit_handler;
|
||||
|
||||
private:
|
||||
|
||||
@@ -72,11 +72,36 @@ Vst3PluginBridge::Vst3PluginBridge()
|
||||
.component_handler->endEdit(request.id);
|
||||
},
|
||||
[&](const YaComponentHandler::RestartComponent& request)
|
||||
-> YaComponentHandler::EndEdit::Response {
|
||||
-> YaComponentHandler::RestartComponent::Response {
|
||||
return plugin_proxies.at(request.owner_instance_id)
|
||||
.get()
|
||||
.component_handler->restartComponent(request.flags);
|
||||
},
|
||||
[&](const YaComponentHandler2::SetDirty& request)
|
||||
-> YaComponentHandler2::SetDirty::Response {
|
||||
return plugin_proxies.at(request.owner_instance_id)
|
||||
.get()
|
||||
.component_handler_2->setDirty(request.state);
|
||||
},
|
||||
[&](const YaComponentHandler2::RequestOpenEditor& request)
|
||||
-> YaComponentHandler2::RequestOpenEditor::Response {
|
||||
return plugin_proxies.at(request.owner_instance_id)
|
||||
.get()
|
||||
.component_handler_2->requestOpenEditor(
|
||||
request.name.c_str());
|
||||
},
|
||||
[&](const YaComponentHandler2::StartGroupEdit& request)
|
||||
-> YaComponentHandler2::StartGroupEdit::Response {
|
||||
return plugin_proxies.at(request.owner_instance_id)
|
||||
.get()
|
||||
.component_handler_2->startGroupEdit();
|
||||
},
|
||||
[&](const YaComponentHandler2::FinishGroupEdit& request)
|
||||
-> YaComponentHandler2::FinishGroupEdit::Response {
|
||||
return plugin_proxies.at(request.owner_instance_id)
|
||||
.get()
|
||||
.component_handler_2->finishGroupEdit();
|
||||
},
|
||||
[&](YaConnectionPoint::Notify& request)
|
||||
-> YaConnectionPoint::Notify::Response {
|
||||
return plugin_proxies.at(request.instance_id)
|
||||
|
||||
Reference in New Issue
Block a user