mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-15 04:50:43 +02:00
Implement IPlugView::onSize()
This commit is contained in:
@@ -297,6 +297,19 @@ bool Vst3Logger::log_request(bool is_host_vst,
|
||||
});
|
||||
}
|
||||
|
||||
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
|
||||
<< ", right = " << request.new_size.right
|
||||
<< ", bottom = " << request.new_size.bottom << ">)";
|
||||
});
|
||||
}
|
||||
|
||||
bool Vst3Logger::log_request(bool is_host_vst,
|
||||
const YaPlugView::GetSize& request) {
|
||||
return log_request_base(is_host_vst, [&](auto& message) {
|
||||
|
||||
@@ -94,6 +94,7 @@ 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 YaPluginBase::Initialize&);
|
||||
bool log_request(bool is_host_vst, const YaPluginBase::Terminate&);
|
||||
|
||||
@@ -83,6 +83,7 @@ using ControlRequest = std::variant<Vst3PlugViewProxy::Destruct,
|
||||
YaPlugView::OnWheel,
|
||||
YaPlugView::OnKeyDown,
|
||||
YaPlugView::OnKeyUp,
|
||||
YaPlugView::OnSize,
|
||||
YaPlugView::GetSize,
|
||||
YaPluginBase::Initialize,
|
||||
YaPluginBase::Terminate,
|
||||
|
||||
@@ -235,6 +235,25 @@ class YaPlugView : public Steinberg::IPlugView {
|
||||
};
|
||||
|
||||
virtual tresult PLUGIN_API getSize(Steinberg::ViewRect* size) override = 0;
|
||||
|
||||
/**
|
||||
* Message to pass through a call to `IPlugView::onSize(new_size)` to the
|
||||
* Wine plugin host.
|
||||
*/
|
||||
struct OnSize {
|
||||
using Response = UniversalTResult;
|
||||
|
||||
native_size_t owner_instance_id;
|
||||
|
||||
Steinberg::ViewRect new_size;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.value8b(owner_instance_id);
|
||||
s.object(new_size);
|
||||
}
|
||||
};
|
||||
|
||||
virtual tresult PLUGIN_API
|
||||
onSize(Steinberg::ViewRect* newSize) override = 0;
|
||||
virtual tresult PLUGIN_API onFocus(TBool state) override = 0;
|
||||
|
||||
Reference in New Issue
Block a user