DPF

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

commit 662ca8a75157a046e8b395f38303625cdd1011e1
parent f726245325c7fcfcdffb66e1c3a89bb07da96d06
Author: falkTX <falktx@gmail.com>
Date:   Mon, 14 Mar 2016 22:44:09 +0100

Fix external-ui build on OSX; Fix non-embed external-ui

Diffstat:
Mdistrho/DistrhoUI.hpp | 18++++++++++--------
Mdistrho/extra/ExternalWindow.hpp | 1+
Mdistrho/src/DistrhoUI.cpp | 14++++++++------
3 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/distrho/DistrhoUI.hpp b/distrho/DistrhoUI.hpp @@ -109,23 +109,25 @@ public: void* getPluginInstancePointer() const noexcept; #endif -#if DISTRHO_PLUGIN_HAS_EMBED_UI && DISTRHO_PLUGIN_HAS_EXTERNAL_UI +#if DISTRHO_PLUGIN_HAS_EXTERNAL_UI /* -------------------------------------------------------------------------------------------------------- - * External embeddable UI helpers */ + * External UI helpers */ /** - Get the Window Id that will be used for the next created window. + Get the bundle path that will be used for the next UI. @note: This function is only valid during createUI(), - it will return 0 when called from anywhere else. + it will return null when called from anywhere else. */ - static uintptr_t getNextWindowId() noexcept; + static const char* getNextBundlePath() noexcept; +# if DISTRHO_PLUGIN_HAS_EMBED_UI /** - Get the bundle path that will be used for the next UI. + Get the Window Id that will be used for the next created window. @note: This function is only valid during createUI(), - it will return null when called from anywhere else. + it will return 0 when called from anywhere else. */ - static const char* getNextBundlePath() noexcept; + static uintptr_t getNextWindowId() noexcept; +# endif #endif protected: diff --git a/distrho/extra/ExternalWindow.hpp b/distrho/extra/ExternalWindow.hpp @@ -21,6 +21,7 @@ #ifdef DISTRHO_OS_UNIX # include <cerrno> +# include <signal.h> # include <sys/wait.h> # include <unistd.h> #else diff --git a/distrho/src/DistrhoUI.cpp b/distrho/src/DistrhoUI.cpp @@ -99,19 +99,21 @@ void* UI::getPluginInstancePointer() const noexcept } #endif -#if DISTRHO_PLUGIN_HAS_EMBED_UI && DISTRHO_PLUGIN_HAS_EXTERNAL_UI +#if DISTRHO_PLUGIN_HAS_EXTERNAL_UI /* ------------------------------------------------------------------------------------------------------------ - * External embeddable UI helpers */ + * External UI helpers */ -uintptr_t UI::getNextWindowId() noexcept +const char* UI::getNextBundlePath() noexcept { - return g_nextWindowId; + return g_nextBundlePath; } -const char* UI::getNextBundlePath() noexcept +# if DISTRHO_PLUGIN_HAS_EMBED_UI +uintptr_t UI::getNextWindowId() noexcept { - return g_nextBundlePath; + return g_nextWindowId; } +# endif #endif /* ------------------------------------------------------------------------------------------------------------