Browse Source

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

pull/6/head
falkTX 8 years ago
parent
commit
662ca8a751
3 changed files with 19 additions and 14 deletions
  1. +10
    -8
      distrho/DistrhoUI.hpp
  2. +1
    -0
      distrho/extra/ExternalWindow.hpp
  3. +8
    -6
      distrho/src/DistrhoUI.cpp

+ 10
- 8
distrho/DistrhoUI.hpp View File

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


+ 1
- 0
distrho/extra/ExternalWindow.hpp View File

@@ -21,6 +21,7 @@

#ifdef DISTRHO_OS_UNIX
# include <cerrno>
# include <signal.h>
# include <sys/wait.h>
# include <unistd.h>
#else


+ 8
- 6
distrho/src/DistrhoUI.cpp View File

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

/* ------------------------------------------------------------------------------------------------------------


Loading…
Cancel
Save