mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-15 13:00:02 +02:00
Implement IPlugFrame::resizeView()
The base IPlugFrame only contains this single function.
This commit is contained in:
@@ -348,7 +348,7 @@ bool Vst3Logger::log_request(bool is_host_vst,
|
||||
}
|
||||
|
||||
bool Vst3Logger::log_request(bool is_host_vst,
|
||||
const YaPluginFactory::SetHostContext& request) {
|
||||
const YaPluginFactory::SetHostContext&) {
|
||||
return log_request_base(is_host_vst, [&](auto& message) {
|
||||
message << "IPluginFactory3::setHostContext(<FUnknown*>)";
|
||||
});
|
||||
@@ -612,6 +612,18 @@ bool Vst3Logger::log_request(bool is_host_vst,
|
||||
});
|
||||
}
|
||||
|
||||
bool Vst3Logger::log_request(bool is_host_vst,
|
||||
const YaPlugFrame::ResizeView& request) {
|
||||
return log_request_base(is_host_vst, [&](auto& message) {
|
||||
message << request.owner_instance_id
|
||||
<< ": IPlugFrame::resizeView(view = <IPlugView*>, newSize = "
|
||||
"<ViewRect* with left = "
|
||||
<< request.new_size.left << ", top = " << request.new_size.top
|
||||
<< ", right = " << request.new_size.right
|
||||
<< ", bottom = " << request.new_size.bottom << ">)";
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_response(bool is_host_vst, const Ack&) {
|
||||
log_response_base(is_host_vst, [&](auto& message) { message << "ACK"; });
|
||||
}
|
||||
|
||||
@@ -132,6 +132,7 @@ class Vst3Logger {
|
||||
bool log_request(bool is_host_vst,
|
||||
const YaComponentHandler::RestartComponent&);
|
||||
bool log_request(bool is_host_vst, const YaHostApplication::GetName&);
|
||||
bool log_request(bool is_host_vst, const YaPlugFrame::ResizeView&);
|
||||
|
||||
void log_response(bool is_host_vst, const Ack&);
|
||||
void log_response(
|
||||
|
||||
@@ -140,7 +140,8 @@ using CallbackRequest = std::variant<WantsConfiguration,
|
||||
YaComponentHandler::PerformEdit,
|
||||
YaComponentHandler::EndEdit,
|
||||
YaComponentHandler::RestartComponent,
|
||||
YaHostApplication::GetName>;
|
||||
YaHostApplication::GetName,
|
||||
YaPlugFrame::ResizeView>;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s, CallbackRequest& payload) {
|
||||
|
||||
@@ -61,6 +61,28 @@ class YaPlugFrame : public Steinberg::IPlugFrame {
|
||||
|
||||
inline bool supported() const { return arguments.supported; }
|
||||
|
||||
/**
|
||||
* Message to pass through a call to `IPlugFrame::resizeView` to the
|
||||
* `IPlugView` object provided by the host.
|
||||
*
|
||||
* XXX: Since we don't support multiple `IPlugView`s right now (as it's not
|
||||
* used the SDK's current version), we'll just assume that `view` is
|
||||
* the view stored in `Vst3PluginProxyImpl::plug_view`
|
||||
*/
|
||||
struct ResizeView {
|
||||
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
|
||||
resizeView(Steinberg::IPlugView* view,
|
||||
Steinberg::ViewRect* newSize) override = 0;
|
||||
|
||||
Reference in New Issue
Block a user