Browse Source

More DISTRHO work

tags/1.9.4
falkTX 12 years ago
parent
commit
574e699f1c
5 changed files with 30 additions and 26 deletions
  1. +5
    -3
      source/libs/distrho/DistrhoUIMain.cpp
  2. +8
    -8
      source/libs/distrho/DistrhoUIOpenGL.hpp
  3. +13
    -13
      source/libs/distrho/DistrhoUIQt.hpp
  4. +1
    -1
      source/libs/distrho/src/DistrhoUIOpenGL.cpp
  5. +3
    -1
      source/libs/distrho/src/DistrhoUIQt.cpp

+ 5
- 3
source/libs/distrho/DistrhoUIMain.cpp View File

@@ -26,8 +26,10 @@
// nothing
#endif

#ifdef DISTRHO_UI_QT
# include "src/DistrhoUIQt.cpp"
#else
#if defined(DISTRHO_UI_EXTERNAL)
# include "src/DistrhoUIExternal.cpp"
#elif defined(DISTRHO_UI_OPENGL)
# include "src/DistrhoUIOpenGL.cpp"
#else
# include "src/DistrhoUIQt.cpp"
#endif

+ 8
- 8
source/libs/distrho/DistrhoUIOpenGL.hpp View File

@@ -33,33 +33,33 @@ class OpenGLUI : public UI,
{
public:
OpenGLUI();
virtual ~OpenGLUI();
virtual ~OpenGLUI() override;

protected:
// ---------------------------------------------
// Information

virtual unsigned int d_width() const = 0;
virtual unsigned int d_height() const = 0;
virtual unsigned int d_width() const override = 0;
virtual unsigned int d_height() const override = 0;

// ---------------------------------------------
// DSP Callbacks

virtual void d_parameterChanged(uint32_t index, float value) = 0;
virtual void d_parameterChanged(uint32_t index, float value) override = 0;
#if DISTRHO_PLUGIN_WANT_PROGRAMS
virtual void d_programChanged(uint32_t index) = 0;
virtual void d_programChanged(uint32_t index) override = 0;
#endif
#if DISTRHO_PLUGIN_WANT_STATE
virtual void d_stateChanged(const char* key, const char* value) = 0;
virtual void d_stateChanged(const char* key, const char* value) override = 0;
#endif
#if DISTRHO_PLUGIN_IS_SYNTH
virtual void d_noteReceived(bool onOff, uint8_t channel, uint8_t note, uint8_t velocity) = 0;
virtual void d_noteReceived(bool onOff, uint8_t channel, uint8_t note, uint8_t velocity) override = 0;
#endif

// ---------------------------------------------
// UI Callbacks

virtual void d_uiIdle() {}
virtual void d_uiIdle() override {}

private:
friend class UIInternal;


+ 13
- 13
source/libs/distrho/DistrhoUIQt.hpp View File

@@ -37,7 +37,12 @@ class QtUI : public UI,
{
public:
QtUI();
virtual ~QtUI();
virtual ~QtUI() override;

// ---------------------------------------------
// UI Helpers

void setSize(unsigned int width, unsigned int height);

protected:
// ---------------------------------------------
@@ -50,32 +55,27 @@ protected:
// ---------------------------------------------
// DSP Callbacks

virtual void d_parameterChanged(uint32_t index, float value) = 0;
virtual void d_parameterChanged(uint32_t index, float value) override = 0;
#if DISTRHO_PLUGIN_WANT_PROGRAMS
virtual void d_programChanged(uint32_t index) = 0;
virtual void d_programChanged(uint32_t index) override = 0;
#endif
#if DISTRHO_PLUGIN_WANT_STATE
virtual void d_stateChanged(const char* key, const char* value) = 0;
virtual void d_stateChanged(const char* key, const char* value) override = 0;
#endif
#if DISTRHO_PLUGIN_IS_SYNTH
virtual void d_noteReceived(bool onOff, uint8_t channel, uint8_t note, uint8_t velocity) = 0;
virtual void d_noteReceived(bool onOff, uint8_t channel, uint8_t note, uint8_t velocity) override = 0;
#endif

// ---------------------------------------------
// UI Callbacks

virtual void d_uiIdle() {}

// ---------------------------------------------
// UI Helpers

void setSize(unsigned int width, unsigned int height);
virtual void d_uiIdle() override {}

private:
friend class UIInternal;

unsigned int d_width() const { return width(); }
unsigned int d_height() const { return height(); }
unsigned int d_width() const override { return width(); }
unsigned int d_height() const override { return height(); }
};

// -------------------------------------------------


+ 1
- 1
source/libs/distrho/src/DistrhoUIOpenGL.cpp View File

@@ -23,7 +23,7 @@ END_NAMESPACE_DGL
START_NAMESPACE_DISTRHO

// -------------------------------------------------
// OpenGLUI
// OpenGL UI

OpenGLUI::OpenGLUI()
: UI(),


+ 3
- 1
source/libs/distrho/src/DistrhoUIQt.cpp View File

@@ -21,7 +21,7 @@
START_NAMESPACE_DISTRHO

// -------------------------------------------------
// Qt4UI
// Qt UI

QtUI::QtUI()
: UI(),
@@ -33,6 +33,8 @@ QtUI::~QtUI()
{
}

// -------------------------------------------------

void QtUI::setSize(unsigned int width, unsigned int height)
{
if (d_resizable())


Loading…
Cancel
Save