Browse Source

Allow DISTRHO_UI_USER_RESIZABLE for external UIs

Signed-off-by: falkTX <falktx@falktx.com>
pull/314/head
falkTX 4 years ago
parent
commit
b19da2fdde
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 7 additions and 1 deletions
  1. +5
    -1
      distrho/src/DistrhoUI.cpp
  2. +1
    -0
      distrho/src/DistrhoUIPrivateData.hpp
  3. +1
    -0
      examples/EmbedExternalUI/DistrhoPluginInfo.h

+ 5
- 1
distrho/src/DistrhoUI.cpp View File

@@ -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) */


+ 1
- 0
distrho/src/DistrhoUIPrivateData.hpp View File

@@ -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); }


+ 1
- 0
examples/EmbedExternalUI/DistrhoPluginInfo.h View File

@@ -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,


Loading…
Cancel
Save