mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +02:00
Implement IEditController2::openAboutBox
With this IEditController2 has been fully implemented.
This commit is contained in:
@@ -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:
|
incomplete list of things that still have to be done before this can be used:
|
||||||
|
|
||||||
- Interfaces left to implement:
|
- Interfaces left to implement:
|
||||||
- `IEditController2`
|
- All other mandatory and optional VST 3.0 interfaces
|
||||||
- All other mandatory interfaces
|
- All interfaces introduced after that
|
||||||
- All other optional interfaces
|
|
||||||
- Fully implemented: see [this
|
- Fully implemented: see [this
|
||||||
document](https://github.com/robbert-vdh/yabridge/tree/feature/vst3/src/common/serialization/vst3/README.md)
|
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.
|
- Update yabridgectl to handle buth VST2 and VST3 plugins.
|
||||||
|
|||||||
@@ -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 Vst3Logger::log_request(
|
||||||
bool is_host_vst,
|
bool is_host_vst,
|
||||||
const YaPlugView::IsPlatformTypeSupported& request) {
|
const YaPlugView::IsPlatformTypeSupported& request) {
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ class Vst3Logger {
|
|||||||
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, const YaEditController2::OpenHelp&);
|
||||||
|
bool log_request(bool is_host_vst, const YaEditController2::OpenAboutBox&);
|
||||||
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&);
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ using ControlRequest = std::variant<Vst3PlugViewProxy::Destruct,
|
|||||||
YaEditController::CreateView,
|
YaEditController::CreateView,
|
||||||
YaEditController2::SetKnobMode,
|
YaEditController2::SetKnobMode,
|
||||||
YaEditController2::OpenHelp,
|
YaEditController2::OpenHelp,
|
||||||
|
YaEditController2::OpenAboutBox,
|
||||||
YaPlugView::IsPlatformTypeSupported,
|
YaPlugView::IsPlatformTypeSupported,
|
||||||
YaPlugView::Attached,
|
YaPlugView::Attached,
|
||||||
YaPlugView::Removed,
|
YaPlugView::Removed,
|
||||||
|
|||||||
@@ -101,6 +101,25 @@ class YaEditController2 : public Steinberg::Vst::IEditController2 {
|
|||||||
};
|
};
|
||||||
|
|
||||||
virtual tresult PLUGIN_API openHelp(TBool onlyCheck) override = 0;
|
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;
|
virtual tresult PLUGIN_API openAboutBox(TBool onlyCheck) override = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -404,9 +404,8 @@ tresult PLUGIN_API Vst3PluginProxyImpl::openHelp(TBool onlyCheck) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tresult PLUGIN_API Vst3PluginProxyImpl::openAboutBox(TBool onlyCheck) {
|
tresult PLUGIN_API Vst3PluginProxyImpl::openAboutBox(TBool onlyCheck) {
|
||||||
// TODO: Implement
|
return bridge.send_message(YaEditController2::OpenAboutBox{
|
||||||
bridge.logger.log("TODO: IEditController2::openAboutBox()");
|
.instance_id = instance_id(), .only_check = onlyCheck});
|
||||||
return Steinberg::kNotImplemented;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tresult PLUGIN_API Vst3PluginProxyImpl::initialize(FUnknown* context) {
|
tresult PLUGIN_API Vst3PluginProxyImpl::initialize(FUnknown* context) {
|
||||||
|
|||||||
@@ -346,6 +346,11 @@ void Vst3Bridge::run() {
|
|||||||
return object_instances[request.instance_id]
|
return object_instances[request.instance_id]
|
||||||
.edit_controller_2->openHelp(request.only_check);
|
.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)
|
[&](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