mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 12:30:12 +02:00
Implement IPlugView::setFrame()
This commit is contained in:
@@ -122,9 +122,20 @@ tresult PLUGIN_API Vst3PlugViewProxyImpl::onFocus(TBool state) {
|
||||
|
||||
tresult PLUGIN_API
|
||||
Vst3PlugViewProxyImpl::setFrame(Steinberg::IPlugFrame* frame) {
|
||||
// TODO: Implement
|
||||
bridge.logger.log("TODO: IPlugView::setFrame()");
|
||||
return Steinberg::kNotImplemented;
|
||||
if (frame) {
|
||||
// We'll store the pointer for when the plugin later makes a callback to
|
||||
// this component handler
|
||||
plug_frame = frame;
|
||||
|
||||
return bridge.send_message(YaPlugView::SetFrame{
|
||||
.owner_instance_id = owner_instance_id(),
|
||||
.plug_frame_args = Vst3PlugFrameProxy::ConstructArgs(
|
||||
plug_frame, owner_instance_id())});
|
||||
} else {
|
||||
bridge.logger.log(
|
||||
"WARNING: Null pointer passed to 'IPlugView::setFrame()'");
|
||||
return Steinberg::kInvalidArgument;
|
||||
}
|
||||
}
|
||||
|
||||
tresult PLUGIN_API Vst3PlugViewProxyImpl::canResize() {
|
||||
|
||||
@@ -57,6 +57,13 @@ class Vst3PlugViewProxyImpl : public Vst3PlugViewProxy {
|
||||
tresult PLUGIN_API canResize() override;
|
||||
tresult PLUGIN_API checkSizeConstraint(Steinberg::ViewRect* rect) override;
|
||||
|
||||
/**
|
||||
* The `IPlugFrame` object passed by the host passed to us in
|
||||
* `IPlugView::setFrame()`. When the plugin makes a callback on the
|
||||
* `IPlugFrame` proxy object, we'll pass the call through to this object.
|
||||
*/
|
||||
Steinberg::IPtr<Steinberg::IPlugFrame> plug_frame;
|
||||
|
||||
private:
|
||||
Vst3PluginBridge& bridge;
|
||||
};
|
||||
|
||||
@@ -342,10 +342,6 @@ tresult PLUGIN_API Vst3PluginProxyImpl::setComponentHandler(
|
||||
// this component handler
|
||||
component_handler = handler;
|
||||
|
||||
// Automatically converted smart pointers for when the plugin performs a
|
||||
// callback later
|
||||
host_application = host_context;
|
||||
|
||||
return bridge.send_message(YaEditController::SetComponentHandler{
|
||||
.instance_id = instance_id(),
|
||||
.component_handler_proxy_args =
|
||||
|
||||
Reference in New Issue
Block a user