Rename maybe_resize_editor() to resize_editor()

This commit is contained in:
Robbert van der Helm
2022-10-09 14:22:49 +02:00
parent 4df2b389a0
commit 04e03840e0
6 changed files with 8 additions and 11 deletions
@@ -241,8 +241,7 @@ bool CLAP_ABI clap_host_proxy::ext_gui_request_resize(const clap_host_t* host,
// If the resize request was accepted by the host, then we'll also resize // If the resize request was accepted by the host, then we'll also resize
// our editor window // our editor window
if (result) { if (result) {
self->bridge_.maybe_resize_editor(self->owner_instance_id_, width, self->bridge_.resize_editor(self->owner_instance_id_, width, height);
height);
} }
return result; return result;
+1 -1
View File
@@ -740,7 +740,7 @@ void ClapBridge::run() {
} }
// NOLINTNEXTLINE(bugprone-easily-swappable-parameters) // NOLINTNEXTLINE(bugprone-easily-swappable-parameters)
bool ClapBridge::maybe_resize_editor(size_t instance_id, bool ClapBridge::resize_editor(size_t instance_id,
uint16_t width, uint16_t width,
uint16_t height) { uint16_t height) {
const auto& [instance, _] = get_instance(instance_id); const auto& [instance, _] = get_instance(instance_id);
+1 -3
View File
@@ -215,9 +215,7 @@ class ClapBridge : public HostBridge {
* the new size. This is called from `clap_host_gui::request_resize()` after * the new size. This is called from `clap_host_gui::request_resize()` after
* the host returns `true`. * the host returns `true`.
*/ */
bool maybe_resize_editor(size_t instance_id, bool resize_editor(size_t instance_id, uint16_t width, uint16_t height);
uint16_t width,
uint16_t height);
/** /**
* Get the plugin instance's current editor size, if it has an active * Get the plugin instance's current editor size, if it has an active
@@ -47,7 +47,7 @@ Vst3PlugFrameProxyImpl::resizeView(Steinberg::IPlugView* /*view*/,
// Resize the editor wrapper window in advance. We will do another // Resize the editor wrapper window in advance. We will do another
// resize automatically on `IPlugView::onSize()`, but this should make // resize automatically on `IPlugView::onSize()`, but this should make
// resizes look a bit smoother. // resizes look a bit smoother.
bridge_.maybe_resize_editor(owner_instance_id(), *newSize); bridge_.resize_editor(owner_instance_id(), *newSize);
// We have to use this special sending function here so we can handle // We have to use this special sending function here so we can handle
// calls to `IPlugView::onSize()` from this same thread (the UI thread). // calls to `IPlugView::onSize()` from this same thread (the UI thread).
+1 -1
View File
@@ -1314,7 +1314,7 @@ void Vst3Bridge::run() {
}); });
} }
bool Vst3Bridge::maybe_resize_editor(size_t instance_id, bool Vst3Bridge::resize_editor(size_t instance_id,
const Steinberg::ViewRect& new_size) { const Steinberg::ViewRect& new_size) {
const auto& [instance, _] = get_instance(instance_id); const auto& [instance, _] = get_instance(instance_id);
+1 -1
View File
@@ -308,7 +308,7 @@ class Vst3Bridge : public HostBridge {
* the new size. This is called from `IPlugFrame::resizeView()` to make sure * the new size. This is called from `IPlugFrame::resizeView()` to make sure
* we do the resize before the request gets sent to the host. * we do the resize before the request gets sent to the host.
*/ */
bool maybe_resize_editor(size_t instance_id, bool resize_editor(size_t instance_id,
const Steinberg::ViewRect& new_size); const Steinberg::ViewRect& new_size);
/** /**