mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 20:10:13 +02:00
Add stubs for IPlugViewContentScaleSupport
This commit is contained in:
@@ -23,11 +23,14 @@ Vst3PlugViewProxy::ConstructArgs::ConstructArgs(
|
||||
size_t owner_instance_id)
|
||||
: owner_instance_id(owner_instance_id),
|
||||
plug_view_args(object),
|
||||
parameter_finder_args(object) {}
|
||||
parameter_finder_args(object),
|
||||
plug_view_content_scale_support_args(object) {}
|
||||
|
||||
Vst3PlugViewProxy::Vst3PlugViewProxy(const ConstructArgs&& args)
|
||||
: YaPlugView(std::move(args.plug_view_args)),
|
||||
YaParameterFinder(std::move(args.parameter_finder_args)),
|
||||
YaPlugViewContentScaleSupport(
|
||||
std::move(args.plug_view_content_scale_support_args)),
|
||||
arguments(std::move(args)){FUNKNOWN_CTOR}
|
||||
|
||||
Vst3PlugViewProxy::~Vst3PlugViewProxy() {
|
||||
@@ -51,6 +54,10 @@ tresult PLUGIN_API Vst3PlugViewProxy::queryInterface(Steinberg::FIDString _iid,
|
||||
QUERY_INTERFACE(_iid, obj, Steinberg::Vst::IParameterFinder::iid,
|
||||
Steinberg::Vst::IParameterFinder)
|
||||
}
|
||||
if (YaPlugViewContentScaleSupport::supported()) {
|
||||
QUERY_INTERFACE(_iid, obj, Steinberg::IPlugViewContentScaleSupport::iid,
|
||||
Steinberg::IPlugViewContentScaleSupport)
|
||||
}
|
||||
|
||||
*obj = nullptr;
|
||||
return Steinberg::kNoInterface;
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "../common.h"
|
||||
#include "plug-view/parameter-finder.h"
|
||||
#include "plug-view/plug-view-content-scale-support.h"
|
||||
#include "plug-view/plug-view.h"
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
@@ -30,7 +31,9 @@
|
||||
* `IEditController::createView()`, and it works exactly the same as
|
||||
* `Vst3PluginProxy`.
|
||||
*/
|
||||
class Vst3PlugViewProxy : public YaPlugView, public YaParameterFinder {
|
||||
class Vst3PlugViewProxy : public YaPlugView,
|
||||
public YaParameterFinder,
|
||||
public YaPlugViewContentScaleSupport {
|
||||
public:
|
||||
/**
|
||||
* These are the arguments for constructing a
|
||||
@@ -56,12 +59,15 @@ class Vst3PlugViewProxy : public YaPlugView, public YaParameterFinder {
|
||||
YaPlugView::ConstructArgs plug_view_args;
|
||||
|
||||
YaParameterFinder::ConstructArgs parameter_finder_args;
|
||||
YaPlugViewContentScaleSupport::ConstructArgs
|
||||
plug_view_content_scale_support_args;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.value8b(owner_instance_id);
|
||||
s.object(plug_view_args);
|
||||
s.object(parameter_finder_args);
|
||||
s.object(plug_view_content_scale_support_args);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -186,3 +186,12 @@ tresult PLUGIN_API Vst3PlugViewProxyImpl::findParameter(
|
||||
|
||||
return response.result;
|
||||
}
|
||||
|
||||
tresult PLUGIN_API
|
||||
Vst3PlugViewProxyImpl::setContentScaleFactor(ScaleFactor factor) {
|
||||
// TODO: Implement
|
||||
bridge.logger.log(
|
||||
"TODO: Implement "
|
||||
"iplugviewcontentscalesupport::setContentScaleFactor()");
|
||||
return Steinberg::kNotImplemented;
|
||||
}
|
||||
|
||||
@@ -63,6 +63,9 @@ class Vst3PlugViewProxyImpl : public Vst3PlugViewProxy {
|
||||
int32 yPos,
|
||||
Steinberg::Vst::ParamID& resultTag /*out*/) override;
|
||||
|
||||
// From `iplugviewcontentscalesupport`
|
||||
tresult PLUGIN_API setContentScaleFactor(ScaleFactor factor) override;
|
||||
|
||||
/**
|
||||
* The `IPlugFrame` object passed by the host passed to us in
|
||||
* `IPlugView::setFrame()`. When the plugin makes a callback on the
|
||||
|
||||
Reference in New Issue
Block a user