mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-20 19:03:56 +02:00
Implement IEditController2::openHelp
This commit is contained in:
@@ -262,6 +262,15 @@ bool Vst3Logger::log_request(bool is_host_vst,
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Vst3Logger::log_request(bool is_host_vst,
|
||||||
|
const YaEditController2::OpenHelp& request) {
|
||||||
|
return log_request_base(is_host_vst, [&](auto& message) {
|
||||||
|
message << request.instance_id
|
||||||
|
<< ": IEditController2::openHelp(onlyCheck = "
|
||||||
|
<< (request.only_check ? "true" : "false") << ")";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
bool Vst3Logger::log_request(
|
bool Vst3Logger::log_request(
|
||||||
bool is_host_vst,
|
bool is_host_vst,
|
||||||
const YaPlugView::IsPlatformTypeSupported& request) {
|
const YaPlugView::IsPlatformTypeSupported& request) {
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ class Vst3Logger {
|
|||||||
const YaEditController::SetComponentHandler&);
|
const YaEditController::SetComponentHandler&);
|
||||||
bool log_request(bool is_host_vst, const YaEditController::CreateView&);
|
bool log_request(bool is_host_vst, const YaEditController::CreateView&);
|
||||||
bool log_request(bool is_host_vst, const YaEditController2::SetKnobMode&);
|
bool log_request(bool is_host_vst, const YaEditController2::SetKnobMode&);
|
||||||
|
bool log_request(bool is_host_vst, const YaEditController2::OpenHelp&);
|
||||||
bool log_request(bool is_host_vst,
|
bool log_request(bool is_host_vst,
|
||||||
const YaPlugView::IsPlatformTypeSupported&);
|
const YaPlugView::IsPlatformTypeSupported&);
|
||||||
bool log_request(bool is_host_vst, const YaPlugView::Attached&);
|
bool log_request(bool is_host_vst, const YaPlugView::Attached&);
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ using ControlRequest = std::variant<Vst3PlugViewProxy::Destruct,
|
|||||||
YaEditController::SetComponentHandler,
|
YaEditController::SetComponentHandler,
|
||||||
YaEditController::CreateView,
|
YaEditController::CreateView,
|
||||||
YaEditController2::SetKnobMode,
|
YaEditController2::SetKnobMode,
|
||||||
|
YaEditController2::OpenHelp,
|
||||||
YaPlugView::IsPlatformTypeSupported,
|
YaPlugView::IsPlatformTypeSupported,
|
||||||
YaPlugView::Attached,
|
YaPlugView::Attached,
|
||||||
YaPlugView::Removed,
|
YaPlugView::Removed,
|
||||||
|
|||||||
@@ -81,6 +81,25 @@ class YaEditController2 : public Steinberg::Vst::IEditController2 {
|
|||||||
|
|
||||||
virtual tresult PLUGIN_API
|
virtual tresult PLUGIN_API
|
||||||
setKnobMode(Steinberg::Vst::KnobMode mode) override = 0;
|
setKnobMode(Steinberg::Vst::KnobMode mode) override = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Message to pass through a call to
|
||||||
|
* `IEditController2::openHelp(only_check)` to the Wine plugin host.
|
||||||
|
*/
|
||||||
|
struct OpenHelp {
|
||||||
|
using Response = UniversalTResult;
|
||||||
|
|
||||||
|
native_size_t instance_id;
|
||||||
|
|
||||||
|
TBool only_check;
|
||||||
|
|
||||||
|
template <typename S>
|
||||||
|
void serialize(S& s) {
|
||||||
|
s.value8b(instance_id);
|
||||||
|
s.value1b(only_check);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
virtual tresult PLUGIN_API openHelp(TBool onlyCheck) override = 0;
|
virtual tresult PLUGIN_API openHelp(TBool onlyCheck) override = 0;
|
||||||
virtual tresult PLUGIN_API openAboutBox(TBool onlyCheck) override = 0;
|
virtual tresult PLUGIN_API openAboutBox(TBool onlyCheck) override = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -399,9 +399,8 @@ Vst3PluginProxyImpl::setKnobMode(Steinberg::Vst::KnobMode mode) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tresult PLUGIN_API Vst3PluginProxyImpl::openHelp(TBool onlyCheck) {
|
tresult PLUGIN_API Vst3PluginProxyImpl::openHelp(TBool onlyCheck) {
|
||||||
// TODO: Implement
|
return bridge.send_message(YaEditController2::OpenHelp{
|
||||||
bridge.logger.log("TODO: IEditController2::openHelp()");
|
.instance_id = instance_id(), .only_check = onlyCheck});
|
||||||
return Steinberg::kNotImplemented;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tresult PLUGIN_API Vst3PluginProxyImpl::openAboutBox(TBool onlyCheck) {
|
tresult PLUGIN_API Vst3PluginProxyImpl::openAboutBox(TBool onlyCheck) {
|
||||||
|
|||||||
@@ -341,6 +341,11 @@ void Vst3Bridge::run() {
|
|||||||
return object_instances[request.instance_id]
|
return object_instances[request.instance_id]
|
||||||
.edit_controller_2->setKnobMode(request.mode);
|
.edit_controller_2->setKnobMode(request.mode);
|
||||||
},
|
},
|
||||||
|
[&](const YaEditController2::OpenHelp& request)
|
||||||
|
-> YaEditController2::OpenHelp::Response {
|
||||||
|
return object_instances[request.instance_id]
|
||||||
|
.edit_controller_2->openHelp(request.only_check);
|
||||||
|
},
|
||||||
[&](const YaPlugView::IsPlatformTypeSupported& request)
|
[&](const YaPlugView::IsPlatformTypeSupported& request)
|
||||||
-> YaPlugView::IsPlatformTypeSupported::Response {
|
-> YaPlugView::IsPlatformTypeSupported::Response {
|
||||||
// The host will of course want to pass an X11 window ID for the
|
// The host will of course want to pass an X11 window ID for the
|
||||||
|
|||||||
Reference in New Issue
Block a user