diff --git a/src/common/serialization/vst3/component-handler-proxy.cpp b/src/common/serialization/vst3/component-handler-proxy.cpp index 74890e63..4331d978 100644 --- a/src/common/serialization/vst3/component-handler-proxy.cpp +++ b/src/common/serialization/vst3/component-handler-proxy.cpp @@ -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) diff --git a/src/common/serialization/vst3/component-handler-proxy.h b/src/common/serialization/vst3/component-handler-proxy.h index 4463048b..ebc290ae 100644 --- a/src/common/serialization/vst3/component-handler-proxy.h +++ b/src/common/serialization/vst3/component-handler-proxy.h @@ -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 @@ -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); } }; diff --git a/src/wine-host/bridges/vst3-impls/component-handler-proxy.cpp b/src/wine-host/bridges/vst3-impls/component-handler-proxy.cpp index 382cbde7..5c40c8d4 100644 --- a/src/wine-host/bridges/vst3-impls/component-handler-proxy.cpp +++ b/src/wine-host/bridges/vst3-impls/component-handler-proxy.cpp @@ -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{ diff --git a/src/wine-host/bridges/vst3-impls/component-handler-proxy.h b/src/wine-host/bridges/vst3-impls/component-handler-proxy.h index f1f00a1c..932ef465 100644 --- a/src/wine-host/bridges/vst3-impls/component-handler-proxy.h +++ b/src/wine-host/bridges/vst3-impls/component-handler-proxy.h @@ -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;