Browse Source

Fix external UI build (#87)

* Fix external UI build

* Use default bool parameter in setWindowSize (non-DGL version)
pull/92/head
Patrick Desaulniers Filipe Coelho <falktx@falktx.com> 5 years ago
parent
commit
bf9ba880de
3 changed files with 6 additions and 1 deletions
  1. +2
    -0
      distrho/DistrhoUI.hpp
  2. +3
    -0
      distrho/src/DistrhoUI.cpp
  3. +1
    -1
      distrho/src/DistrhoUIInternal.hpp

+ 2
- 0
distrho/DistrhoUI.hpp View File

@@ -67,12 +67,14 @@ public:
*/
bool isUserResizable() const noexcept;

#ifdef HAVE_DGL
/**
Set geometry constraints for the UI when resized by the user, and optionally scale UI automatically.
@see Window::setGeometryConstraints(uint,uint,bool)
@see Window::setScaling(double)
*/
void setGeometryConstraints(uint minWidth, uint minHeight, bool keepAspectRatio, bool automaticallyScale = false);
#endif

/* --------------------------------------------------------------------------------------------------------
* Host state */


+ 3
- 0
distrho/src/DistrhoUI.cpp View File

@@ -62,6 +62,7 @@ bool UI::isUserResizable() const noexcept
return pData->userResizable;
}

#ifdef HAVE_DGL
void UI::setGeometryConstraints(uint minWidth, uint minHeight, bool keepAspectRatio, bool automaticallyScale)
{
DISTRHO_SAFE_ASSERT_RETURN(minWidth > 0,);
@@ -72,7 +73,9 @@ void UI::setGeometryConstraints(uint minWidth, uint minHeight, bool keepAspectRa
pData->minHeight = minHeight;

getParentWindow().setGeometryConstraints(minWidth, minHeight, keepAspectRatio);

}
#endif

/* ------------------------------------------------------------------------------------------------------------
* Host state */


+ 1
- 1
distrho/src/DistrhoUIInternal.hpp View File

@@ -460,7 +460,7 @@ public:
return glWindow.handlePluginSpecial(press, key);
}
#else
void setWindowSize(const uint, const uint, const bool) {}
void setWindowSize(const uint, const uint, const bool = false) {}
void setWindowTransientWinId(const uintptr_t) {}
bool setWindowVisible(const bool) { return true; }
#endif


Loading…
Cancel
Save