Implement the Wine side for createView()

This commit is contained in:
Robbert van der Helm
2020-12-19 20:41:06 +01:00
parent e391bbccb7
commit f0ece64018
6 changed files with 90 additions and 1 deletions
+19
View File
@@ -371,6 +371,25 @@ void Vst3Bridge::run() {
object_instances[request.instance_id]
.component_handler_proxy);
},
[&](const YaEditController::CreateView& request)
-> YaEditController::CreateView::Response {
object_instances[request.instance_id].plug_view =
Steinberg::owned(
object_instances[request.instance_id]
.edit_controller->createView(request.name.c_str()));
// We'll create a proxy so the host can call functions on this
// `IPlugView` object
return YaEditController::CreateViewResponse{
.plug_view_args =
(object_instances[request.instance_id].plug_view
? std::make_optional<
Vst3PlugViewProxy::ConstructArgs>(
object_instances[request.instance_id]
.plug_view,
request.instance_id)
: std::nullopt)};
},
[&](YaPluginBase::Initialize& request)
-> YaPluginBase::Initialize::Response {
// If we got passed a host context, we'll create a proxy object
+10
View File
@@ -60,6 +60,16 @@ struct InstanceInterfaces {
*/
Steinberg::IPtr<Steinberg::FUnknown> object;
/**
* The `IPlugView` object the plugin returned from a call to
* `IEditController::createView()`.
*
* XXX: Technically VST3 supports multiple named views, so we could have
* multiple different view for a single plugin. This is not used within
* the SDK, so a single pointer should be fine for now.
*/
Steinberg::IPtr<Steinberg::IPlugView> plug_view;
// All smart pointers below are created from `component`. They will be null
// pointers if `component` did not implement the interface.