diff --git a/src/common/serialization/vst3/component-handler-proxy.cpp b/src/common/serialization/vst3/component-handler-proxy.cpp index 5f6043a4..74890e63 100644 --- a/src/common/serialization/vst3/component-handler-proxy.cpp +++ b/src/common/serialization/vst3/component-handler-proxy.cpp @@ -23,10 +23,12 @@ Vst3ComponentHandlerProxy::ConstructArgs::ConstructArgs( size_t owner_instance_id) : owner_instance_id(owner_instance_id), component_handler_args(object), + component_handler_2_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)), YaUnitHandler(std::move(args.unit_handler_args)), arguments(std::move(args)){FUNKNOWN_CTOR} @@ -48,6 +50,10 @@ Vst3ComponentHandlerProxy::queryInterface(Steinberg::FIDString _iid, QUERY_INTERFACE(_iid, obj, Steinberg::Vst::IComponentHandler::iid, Steinberg::Vst::IComponentHandler) } + if (YaComponentHandler2::supported()) { + QUERY_INTERFACE(_iid, obj, Steinberg::Vst::IComponentHandler2::iid, + Steinberg::Vst::IComponentHandler2) + } 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 d455947c..4463048b 100644 --- a/src/common/serialization/vst3/component-handler-proxy.h +++ b/src/common/serialization/vst3/component-handler-proxy.h @@ -17,6 +17,7 @@ #pragma once #include "../common.h" +#include "component-handler/component-handler-2.h" #include "component-handler/component-handler.h" #include "component-handler/unit-handler.h" @@ -32,6 +33,7 @@ * plugin by the host. */ class Vst3ComponentHandlerProxy : public YaComponentHandler, + public YaComponentHandler2, public YaUnitHandler { public: /** @@ -57,12 +59,14 @@ class Vst3ComponentHandlerProxy : public YaComponentHandler, native_size_t owner_instance_id; YaComponentHandler::ConstructArgs component_handler_args; + YaComponentHandler2::ConstructArgs component_handler_2_args; YaUnitHandler::ConstructArgs unit_handler_args; template void serialize(S& s) { s.value8b(owner_instance_id); s.object(component_handler_args); + s.object(component_handler_2_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 c09ad942..65b85494 100644 --- a/src/wine-host/bridges/vst3-impls/component-handler-proxy.cpp +++ b/src/wine-host/bridges/vst3-impls/component-handler-proxy.cpp @@ -63,6 +63,34 @@ Vst3ComponentHandlerProxyImpl::restartComponent(int32 flags) { .owner_instance_id = owner_instance_id(), .flags = flags}); } +tresult PLUGIN_API Vst3ComponentHandlerProxyImpl::setDirty(TBool state) { + // TODO: Implement + std::cerr << "TODO: Implement IComponentHandler2::setDirty()" << std::endl; + return Steinberg::kNotImplemented; +} + +tresult PLUGIN_API +Vst3ComponentHandlerProxyImpl::requestOpenEditor(Steinberg::FIDString name) { + // TODO: Implement + std::cerr << "TODO: Implement IComponentHandler2::requestOpenEditor()" + << std::endl; + return Steinberg::kNotImplemented; +} + +tresult PLUGIN_API Vst3ComponentHandlerProxyImpl::startGroupEdit() { + // TODO: Implement + std::cerr << "TODO: Implement IComponentHandler2::startGroupEdit()" + << std::endl; + return Steinberg::kNotImplemented; +} + +tresult PLUGIN_API Vst3ComponentHandlerProxyImpl::finishGroupEdit() { + // TODO: Implement + std::cerr << "TODO: Implement IComponentHandler2::finishGroupEdit()" + << std::endl; + return Steinberg::kNotImplemented; +} + 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 c15c7cab..f1f00a1c 100644 --- a/src/wine-host/bridges/vst3-impls/component-handler-proxy.h +++ b/src/wine-host/bridges/vst3-impls/component-handler-proxy.h @@ -39,6 +39,12 @@ class Vst3ComponentHandlerProxyImpl : public Vst3ComponentHandlerProxy { tresult PLUGIN_API endEdit(Steinberg::Vst::ParamID id) override; tresult PLUGIN_API restartComponent(int32 flags) override; + // From `IComponentHandler2` + tresult PLUGIN_API setDirty(TBool state) override; + tresult PLUGIN_API requestOpenEditor(Steinberg::FIDString name) override; + tresult PLUGIN_API startGroupEdit() override; + tresult PLUGIN_API finishGroupEdit() override; + // From `IUnitHandler` tresult PLUGIN_API notifyUnitSelection(Steinberg::Vst::UnitID unitId) override;