Add stubs for IComponentHandler3

This commit is contained in:
Robbert van der Helm
2021-01-06 20:55:27 +01:00
parent 237b755c52
commit abe7085ab5
4 changed files with 24 additions and 0 deletions
@@ -24,11 +24,13 @@ Vst3ComponentHandlerProxy::ConstructArgs::ConstructArgs(
: owner_instance_id(owner_instance_id),
component_handler_args(object),
component_handler_2_args(object),
component_handler_3_args(object),
unit_handler_args(object) {}
Vst3ComponentHandlerProxy::Vst3ComponentHandlerProxy(const ConstructArgs&& args)
: YaComponentHandler(std::move(args.component_handler_args)),
YaComponentHandler2(std::move(args.component_handler_2_args)),
YaComponentHandler3(std::move(args.component_handler_3_args)),
YaUnitHandler(std::move(args.unit_handler_args)),
arguments(std::move(args)){FUNKNOWN_CTOR}
@@ -54,6 +56,10 @@ Vst3ComponentHandlerProxy::queryInterface(Steinberg::FIDString _iid,
QUERY_INTERFACE(_iid, obj, Steinberg::Vst::IComponentHandler2::iid,
Steinberg::Vst::IComponentHandler2)
}
if (YaComponentHandler3::supported()) {
QUERY_INTERFACE(_iid, obj, Steinberg::Vst::IComponentHandler3::iid,
Steinberg::Vst::IComponentHandler3)
}
if (YaUnitHandler::supported()) {
QUERY_INTERFACE(_iid, obj, Steinberg::Vst::IUnitHandler::iid,
Steinberg::Vst::IUnitHandler)
@@ -18,6 +18,7 @@
#include "../common.h"
#include "component-handler/component-handler-2.h"
#include "component-handler/component-handler-3.h"
#include "component-handler/component-handler.h"
#include "component-handler/unit-handler.h"
@@ -34,6 +35,7 @@
*/
class Vst3ComponentHandlerProxy : public YaComponentHandler,
public YaComponentHandler2,
public YaComponentHandler3,
public YaUnitHandler {
public:
/**
@@ -60,6 +62,7 @@ class Vst3ComponentHandlerProxy : public YaComponentHandler,
YaComponentHandler::ConstructArgs component_handler_args;
YaComponentHandler2::ConstructArgs component_handler_2_args;
YaComponentHandler3::ConstructArgs component_handler_3_args;
YaUnitHandler::ConstructArgs unit_handler_args;
template <typename S>
@@ -67,6 +70,7 @@ class Vst3ComponentHandlerProxy : public YaComponentHandler,
s.value8b(owner_instance_id);
s.object(component_handler_args);
s.object(component_handler_2_args);
s.object(component_handler_3_args);
s.object(unit_handler_args);
}
};
@@ -91,6 +91,15 @@ tresult PLUGIN_API Vst3ComponentHandlerProxyImpl::finishGroupEdit() {
.owner_instance_id = owner_instance_id()});
}
Steinberg::Vst::IContextMenu* PLUGIN_API
Vst3ComponentHandlerProxyImpl::createContextMenu(
Steinberg::IPlugView* plugView,
const Steinberg::Vst::ParamID* paramID) {
// TODO: Implement
std::cerr << "TODO: IComponentHandler3::createContextMenu" << std::endl;
return nullptr;
}
tresult PLUGIN_API Vst3ComponentHandlerProxyImpl::notifyUnitSelection(
Steinberg::Vst::UnitID unitId) {
return bridge.send_message(YaUnitHandler::NotifyUnitSelection{
@@ -45,6 +45,11 @@ class Vst3ComponentHandlerProxyImpl : public Vst3ComponentHandlerProxy {
tresult PLUGIN_API startGroupEdit() override;
tresult PLUGIN_API finishGroupEdit() override;
// From `IComponentHandler3`
Steinberg::Vst::IContextMenu* PLUGIN_API
createContextMenu(Steinberg::IPlugView* plugView,
const Steinberg::Vst::ParamID* paramID) override;
// From `IUnitHandler`
tresult PLUGIN_API
notifyUnitSelection(Steinberg::Vst::UnitID unitId) override;