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> 6 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; bool isUserResizable() const noexcept;


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


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


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

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


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


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

} }
#endif


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


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

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


Loading…
Cancel
Save