Implement IEditController2::openAboutBox

With this IEditController2 has been fully implemented.
This commit is contained in:
Robbert van der Helm
2020-12-26 00:10:39 +01:00
parent 3c5700163e
commit 86aaf2fa3a
7 changed files with 39 additions and 6 deletions
+2 -3
View File
@@ -16,9 +16,8 @@ This branch is still very far removed from being in a usable state. Below is an
incomplete list of things that still have to be done before this can be used:
- Interfaces left to implement:
- `IEditController2`
- All other mandatory interfaces
- All other optional interfaces
- All other mandatory and optional VST 3.0 interfaces
- All interfaces introduced after that
- Fully implemented: see [this
document](https://github.com/robbert-vdh/yabridge/tree/feature/vst3/src/common/serialization/vst3/README.md)
- Update yabridgectl to handle buth VST2 and VST3 plugins.
+9
View File
@@ -271,6 +271,15 @@ bool Vst3Logger::log_request(bool is_host_vst,
});
}
bool Vst3Logger::log_request(bool is_host_vst,
const YaEditController2::OpenAboutBox& request) {
return log_request_base(is_host_vst, [&](auto& message) {
message << request.instance_id
<< ": IEditController2::openAboutBox(onlyCheck = "
<< (request.only_check ? "true" : "false") << ")";
});
}
bool Vst3Logger::log_request(
bool is_host_vst,
const YaPlugView::IsPlatformTypeSupported& request) {
+1
View File
@@ -90,6 +90,7 @@ class Vst3Logger {
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::OpenHelp&);
bool log_request(bool is_host_vst, const YaEditController2::OpenAboutBox&);
bool log_request(bool is_host_vst,
const YaPlugView::IsPlatformTypeSupported&);
bool log_request(bool is_host_vst, const YaPlugView::Attached&);
+1
View File
@@ -83,6 +83,7 @@ using ControlRequest = std::variant<Vst3PlugViewProxy::Destruct,
YaEditController::CreateView,
YaEditController2::SetKnobMode,
YaEditController2::OpenHelp,
YaEditController2::OpenAboutBox,
YaPlugView::IsPlatformTypeSupported,
YaPlugView::Attached,
YaPlugView::Removed,
@@ -101,6 +101,25 @@ class YaEditController2 : public Steinberg::Vst::IEditController2 {
};
virtual tresult PLUGIN_API openHelp(TBool onlyCheck) override = 0;
/**
* Message to pass through a call to
* `IEditController2::openAboutBox(only_check)` to the Wine plugin host.
*/
struct OpenAboutBox {
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 openAboutBox(TBool onlyCheck) override = 0;
protected:
@@ -404,9 +404,8 @@ tresult PLUGIN_API Vst3PluginProxyImpl::openHelp(TBool onlyCheck) {
}
tresult PLUGIN_API Vst3PluginProxyImpl::openAboutBox(TBool onlyCheck) {
// TODO: Implement
bridge.logger.log("TODO: IEditController2::openAboutBox()");
return Steinberg::kNotImplemented;
return bridge.send_message(YaEditController2::OpenAboutBox{
.instance_id = instance_id(), .only_check = onlyCheck});
}
tresult PLUGIN_API Vst3PluginProxyImpl::initialize(FUnknown* context) {
+5
View File
@@ -346,6 +346,11 @@ void Vst3Bridge::run() {
return object_instances[request.instance_id]
.edit_controller_2->openHelp(request.only_check);
},
[&](const YaEditController2::OpenAboutBox& request)
-> YaEditController2::OpenAboutBox::Response {
return object_instances[request.instance_id]
.edit_controller_2->openAboutBox(request.only_check);
},
[&](const YaPlugView::IsPlatformTypeSupported& request)
-> YaPlugView::IsPlatformTypeSupported::Response {
// The host will of course want to pass an X11 window ID for the