DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit b19da2fdde437f3a107fa3d82efcd3c8e10ca98a
parent 7ddda017a03653d13e8fe13fa94a9eae626b2c86
Author: falkTX <falktx@falktx.com>
Date:   Tue, 24 Aug 2021 08:59:24 +0100

Allow DISTRHO_UI_USER_RESIZABLE for external UIs

Signed-off-by: falkTX <falktx@falktx.com>

Diffstat:
Mdistrho/src/DistrhoUI.cpp | 6+++++-
Mdistrho/src/DistrhoUIPrivateData.hpp | 1+
Mexamples/EmbedExternalUI/DistrhoPluginInfo.h | 1+
3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/distrho/src/DistrhoUI.cpp b/distrho/src/DistrhoUI.cpp @@ -90,7 +90,11 @@ UI::~UI() bool UI::isResizable() const noexcept { #if DISTRHO_UI_USER_RESIZABLE +# if DISTRHO_PLUGIN_HAS_EXTERNAL_UI + return true; +# else return uiData->window->isResizable(); +# endif #else return false; #endif @@ -172,7 +176,7 @@ uintptr_t UI::getNextWindowId() noexcept return g_nextWindowId; } # endif -#endif +#endif // DISTRHO_PLUGIN_HAS_EXTERNAL_UI /* ------------------------------------------------------------------------------------------------------------ * DSP/Plugin Callbacks (optional) */ diff --git a/distrho/src/DistrhoUIPrivateData.hpp b/distrho/src/DistrhoUIPrivateData.hpp @@ -142,6 +142,7 @@ public: void close() { ui->close(); } void focus() { ui->focus(); } void show() { ui->show(); } + bool isResizable() const noexcept { return ui->isResizable(); } bool isVisible() const noexcept { return ui->isVisible(); } void setTitle(const char* const title) { ui->setTitle(title); } void setVisible(const bool visible) { ui->setVisible(visible); } diff --git a/examples/EmbedExternalUI/DistrhoPluginInfo.h b/examples/EmbedExternalUI/DistrhoPluginInfo.h @@ -27,6 +27,7 @@ #define DISTRHO_PLUGIN_IS_RT_SAFE 1 #define DISTRHO_PLUGIN_NUM_INPUTS 2 #define DISTRHO_PLUGIN_NUM_OUTPUTS 2 +#define DISTRHO_UI_USER_RESIZABLE 1 enum Parameters { kParameterLevel = 0,