mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-09 20:29:10 +02:00
Implement the Wine side for createView()
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user