mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-14 12:30:00 +02:00
Implement IPlugFrame::resizeView()
The base IPlugFrame only contains this single function.
This commit is contained in:
@@ -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