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