Implement IPlugView::setFrame()

This commit is contained in:
Robbert van der Helm
2020-12-22 14:16:00 +01:00
parent 9288cdcb59
commit da6ddccf07
10 changed files with 83 additions and 17 deletions
+17
View File
@@ -403,6 +403,23 @@ void Vst3Bridge::run() {
return object_instances[request.owner_instance_id]
.plug_view->onFocus(request.state);
},
[&](YaPlugView::SetFrame& request)
-> YaPlugView::SetFrame::Response {
// We'll create a proxy object for the `IPlugFrame` object and
// pass that to the `setFrame()` function. The lifetime of this
// object is tied to that of the actual `IPlugFrame` object
// we're passing this proxy to.
// TODO: Does this have to be run from the UI thread? Figure out
// if it does
object_instances[request.owner_instance_id].plug_frame_proxy =
Steinberg::owned(new Vst3PlugFrameProxyImpl(
*this, std::move(request.plug_frame_args)));
return object_instances[request.owner_instance_id]
.plug_view->setFrame(
object_instances[request.owner_instance_id]
.plug_frame_proxy);
},
[&](YaPluginBase::Initialize& request)
-> YaPluginBase::Initialize::Response {
// We'll create a proxy object for the host context passed by
+9 -9
View File
@@ -53,6 +53,15 @@ struct InstanceInterfaces {
*/
Steinberg::IPtr<Vst3HostContextProxy> host_context_proxy;
/**
* After a call to `IEditController::setComponentHandler()`, we'll create a
* proxy of that component handler just like we did for the plugin object.
* When the plugin calls a function on this object, we make a callback to
* the original object provided by the host. Will be initialized with a null
* pointer until used.
*/
Steinberg::IPtr<Vst3ComponentHandlerProxy> component_handler_proxy;
/**
* If the host passes an `IPlugFrame` object during `IPlugView::setFrame()`,
* then we'll store a proxy object here and then pass it to
@@ -63,15 +72,6 @@ struct InstanceInterfaces {
*/
Steinberg::IPtr<Vst3PlugFrameProxy> plug_frame_proxy;
/**
* After a call to `IEditController::setComponentHandler()`, we'll create a
* proxy of that component handler just like we did for the plugin object.
* When the plugin calls a function on this object, we make a callback to
* the original object provided by the host. Will be initialized with a null
* pointer until used.
*/
Steinberg::IPtr<Vst3ComponentHandlerProxy> component_handler_proxy;
/**
* The base object we cast from.
*/