mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 12:30:12 +02:00
Implement IPlugView::onFocus()
This commit is contained in:
@@ -297,11 +297,16 @@ bool Vst3Logger::log_request(bool is_host_vst,
|
||||
});
|
||||
}
|
||||
|
||||
bool Vst3Logger::log_request(bool is_host_vst,
|
||||
const YaPlugView::GetSize& request) {
|
||||
return log_request_base(is_host_vst, [&](auto& message) {
|
||||
message << request.owner_instance_id << ": IPlugView::getSize(size*)";
|
||||
});
|
||||
}
|
||||
|
||||
bool Vst3Logger::log_request(bool is_host_vst,
|
||||
const YaPlugView::OnSize& request) {
|
||||
return log_request_base(is_host_vst, [&](auto& message) {
|
||||
// This static cast is technically not correct of course but it's
|
||||
// UTF-16, so everything's allowed
|
||||
message << request.owner_instance_id
|
||||
<< ": IPlugView::onSize(newSize = <ViewRect* with left = "
|
||||
<< request.new_size.left << ", top = " << request.new_size.top
|
||||
@@ -311,9 +316,10 @@ bool Vst3Logger::log_request(bool is_host_vst,
|
||||
}
|
||||
|
||||
bool Vst3Logger::log_request(bool is_host_vst,
|
||||
const YaPlugView::GetSize& request) {
|
||||
const YaPlugView::OnFocus& request) {
|
||||
return log_request_base(is_host_vst, [&](auto& message) {
|
||||
message << request.owner_instance_id << ": IPlugView::getSize(size*)";
|
||||
message << request.owner_instance_id << ": IPlugView::onFucus(state = "
|
||||
<< (request.state ? "true" : "false") << ")";
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -94,8 +94,9 @@ class Vst3Logger {
|
||||
bool log_request(bool is_host_vst, const YaPlugView::OnWheel&);
|
||||
bool log_request(bool is_host_vst, const YaPlugView::OnKeyDown&);
|
||||
bool log_request(bool is_host_vst, const YaPlugView::OnKeyUp&);
|
||||
bool log_request(bool is_host_vst, const YaPlugView::OnSize&);
|
||||
bool log_request(bool is_host_vst, const YaPlugView::GetSize&);
|
||||
bool log_request(bool is_host_vst, const YaPlugView::OnSize&);
|
||||
bool log_request(bool is_host_vst, const YaPlugView::OnFocus&);
|
||||
bool log_request(bool is_host_vst, const YaPluginBase::Initialize&);
|
||||
bool log_request(bool is_host_vst, const YaPluginBase::Terminate&);
|
||||
bool log_request(bool is_host_vst, const YaPluginFactory::Construct&);
|
||||
|
||||
@@ -83,8 +83,9 @@ using ControlRequest = std::variant<Vst3PlugViewProxy::Destruct,
|
||||
YaPlugView::OnWheel,
|
||||
YaPlugView::OnKeyDown,
|
||||
YaPlugView::OnKeyUp,
|
||||
YaPlugView::OnSize,
|
||||
YaPlugView::GetSize,
|
||||
YaPlugView::OnSize,
|
||||
YaPlugView::OnFocus,
|
||||
YaPluginBase::Initialize,
|
||||
YaPluginBase::Terminate,
|
||||
YaPluginFactory::Construct,
|
||||
|
||||
@@ -256,6 +256,25 @@ class YaPlugView : public Steinberg::IPlugView {
|
||||
|
||||
virtual tresult PLUGIN_API
|
||||
onSize(Steinberg::ViewRect* newSize) override = 0;
|
||||
|
||||
/**
|
||||
* Message to pass through a call to `IPlugView::onFocus(state)` to the Wine
|
||||
* plugin host.
|
||||
*/
|
||||
struct OnFocus {
|
||||
using Response = UniversalTResult;
|
||||
|
||||
native_size_t owner_instance_id;
|
||||
|
||||
TBool state;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.value8b(owner_instance_id);
|
||||
s.value1b(state);
|
||||
}
|
||||
};
|
||||
|
||||
virtual tresult PLUGIN_API onFocus(TBool state) override = 0;
|
||||
virtual tresult PLUGIN_API
|
||||
setFrame(Steinberg::IPlugFrame* frame) override = 0;
|
||||
|
||||
Reference in New Issue
Block a user