mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 20:10:13 +02:00
Update the ViewRect in checkSizeConstraint()
This commit is contained in:
@@ -1001,6 +1001,20 @@ void Vst3Logger::log_response(bool is_host_vst,
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_response(
|
||||
bool is_host_vst,
|
||||
const YaPlugView::CheckSizeConstraintResponse& response) {
|
||||
log_response_base(is_host_vst, [&](auto& message) {
|
||||
message << response.result.string();
|
||||
if (response.result == Steinberg::kResultOk) {
|
||||
message << ", <ViewRect* with left = " << response.updated_rect.left
|
||||
<< ", top = " << response.updated_rect.top
|
||||
<< ", right = " << response.updated_rect.right
|
||||
<< ", bottom = " << response.updated_rect.bottom << ">";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_response(bool is_host_vst,
|
||||
const YaPluginFactory::ConstructArgs& args) {
|
||||
log_response_base(is_host_vst, [&](auto& message) {
|
||||
|
||||
@@ -180,6 +180,8 @@ class Vst3Logger {
|
||||
void log_response(bool is_host_vst,
|
||||
const YaEditController::CreateViewResponse&);
|
||||
void log_response(bool is_host_vst, const YaPlugView::GetSizeResponse&);
|
||||
void log_response(bool is_host_vst,
|
||||
const YaPlugView::CheckSizeConstraintResponse&);
|
||||
void log_response(bool is_host_vst, const YaPluginFactory::ConstructArgs&);
|
||||
void log_response(bool is_host_vst, const Configuration&);
|
||||
void log_response(bool is_host_vst,
|
||||
|
||||
@@ -320,14 +320,27 @@ class YaPlugView : public Steinberg::IPlugView {
|
||||
|
||||
virtual tresult PLUGIN_API canResize() override = 0;
|
||||
|
||||
/**
|
||||
* The result and updated `ViewRect` from a call to
|
||||
* `IPlugView::checkSizeConstraint(rect)`.
|
||||
*/
|
||||
struct CheckSizeConstraintResponse {
|
||||
UniversalTResult result;
|
||||
Steinberg::ViewRect updated_rect;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.object(result);
|
||||
s.object(updated_rect);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Message to pass through a call to `IPlugView::checkSizeConstraint(rect)`
|
||||
* to the Wine plugin host.
|
||||
*
|
||||
* TODO: This should also return the updated ViewRect
|
||||
*/
|
||||
struct CheckSizeConstraint {
|
||||
using Response = UniversalTResult;
|
||||
using Response = CheckSizeConstraintResponse;
|
||||
|
||||
native_size_t owner_instance_id;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user