DPF

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

commit 335cb08628ca89f01f8b5babd92b983dae147cfd
parent 4a3327e0114d8e228d7f9d865b73f9ac7f9ea768
Author: falkTX <falktx@falktx.com>
Date:   Fri, 23 Aug 2019 18:01:09 +0100

Fix build without set-DGL-namespace

Diffstat:
Mdistrho/src/DistrhoPluginVST.cpp | 2++
Mdistrho/src/DistrhoUIInternal.hpp | 2+-
Mexamples/CairoUI/DemoWidgetBanner.cpp | 8++++++++
Mexamples/CairoUI/DemoWidgetBanner.hpp | 10++++++++++
Mexamples/CairoUI/DemoWidgetClickable.cpp | 8++++++++
Mexamples/CairoUI/DemoWidgetClickable.hpp | 10++++++++++
Mexamples/Meters/ExampleUIMeters.cpp | 5+++++
Mexamples/Parameters/ExampleUIParameters.cpp | 5+++++
Mexamples/States/ExampleUIStates.cpp | 5+++++
9 files changed, 54 insertions(+), 1 deletion(-)

diff --git a/distrho/src/DistrhoPluginVST.cpp b/distrho/src/DistrhoPluginVST.cpp @@ -231,6 +231,8 @@ public: d_stdout("handlePluginKeyEvent %i %i %li\n", down, index, (long int)value); + using namespace DGL_NAMESPACE; + int special = 0; switch (value) { diff --git a/distrho/src/DistrhoUIInternal.hpp b/distrho/src/DistrhoUIInternal.hpp @@ -528,7 +528,7 @@ public: return glWindow.handlePluginKeyboard(press, key); } - bool handlePluginSpecial(const bool press, const Key key) + bool handlePluginSpecial(const bool press, const DGL_NAMESPACE::Key key) { return glWindow.handlePluginSpecial(press, key); } diff --git a/examples/CairoUI/DemoWidgetBanner.cpp b/examples/CairoUI/DemoWidgetBanner.cpp @@ -19,6 +19,10 @@ #include "Cairo.hpp" #include "Window.hpp" +START_NAMESPACE_DGL + +// ----------------------------------------------------------------------- + static const char* banner = " " " * * * * * " @@ -90,3 +94,7 @@ void DemoWidgetBanner::onDisplay() } } } + +// ----------------------------------------------------------------------- + +END_NAMESPACE_DGL diff --git a/examples/CairoUI/DemoWidgetBanner.hpp b/examples/CairoUI/DemoWidgetBanner.hpp @@ -16,9 +16,19 @@ #include "Widget.hpp" +START_NAMESPACE_DGL + +// ----------------------------------------------------------------------- + class DemoWidgetBanner : public Widget { public: explicit DemoWidgetBanner(Widget* group); void onDisplay() override; }; + +// ----------------------------------------------------------------------- + +END_NAMESPACE_DGL + +using DGL_NAMESPACE::DemoWidgetBanner; diff --git a/examples/CairoUI/DemoWidgetClickable.cpp b/examples/CairoUI/DemoWidgetClickable.cpp @@ -19,6 +19,10 @@ #include "Cairo.hpp" #include "Window.hpp" +START_NAMESPACE_DGL + +// ----------------------------------------------------------------------- + DemoWidgetClickable::DemoWidgetClickable(Widget* group) : Widget(group) { @@ -77,3 +81,7 @@ bool DemoWidgetClickable::onMouse(const MouseEvent& event) return Widget::onMouse(event); } + +// ----------------------------------------------------------------------- + +END_NAMESPACE_DGL diff --git a/examples/CairoUI/DemoWidgetClickable.hpp b/examples/CairoUI/DemoWidgetClickable.hpp @@ -16,6 +16,10 @@ #include "Widget.hpp" +START_NAMESPACE_DGL + +// ----------------------------------------------------------------------- + class DemoWidgetClickable : public Widget { public: @@ -26,3 +30,9 @@ public: private: unsigned fColorId = 0; }; + +// ----------------------------------------------------------------------- + +END_NAMESPACE_DGL + +using DGL_NAMESPACE::DemoWidgetClickable; diff --git a/examples/Meters/ExampleUIMeters.cpp b/examples/Meters/ExampleUIMeters.cpp @@ -19,6 +19,11 @@ START_NAMESPACE_DISTRHO /** + We need the Color class from DGL. + */ +using DGL_NAMESPACE::Color; + +/** Smooth meters a bit. */ static const float kSmoothMultiplier = 3.0f; diff --git a/examples/Parameters/ExampleUIParameters.cpp b/examples/Parameters/ExampleUIParameters.cpp @@ -18,6 +18,11 @@ START_NAMESPACE_DISTRHO +/** + We need the rectangle class from DGL. + */ +using DGL_NAMESPACE::Rectangle; + // ----------------------------------------------------------------------------------------------------------- class ExampleUIParameters : public UI diff --git a/examples/States/ExampleUIStates.cpp b/examples/States/ExampleUIStates.cpp @@ -18,6 +18,11 @@ START_NAMESPACE_DISTRHO +/** + We need the rectangle class from DGL. + */ +using DGL_NAMESPACE::Rectangle; + // ----------------------------------------------------------------------------------------------------------- class ExampleUIParameters : public UI