commit d6d1d3b55c2737a9a0c13f69ee76238917ad62e3
parent 5f18defb72bd2257b72d2f7a26f6f24f5affcfb5
Author: falkTX <falktx@gmail.com>
Date: Mon, 1 Jan 2018 13:17:09 +0100
Add DGL_NO_SHARED_RESOURCES; Fix build
Diffstat:
3 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/dgl/NanoVG.hpp b/dgl/NanoVG.hpp
@@ -20,7 +20,9 @@
#include "Color.hpp"
#include "Widget.hpp"
-#define NANOVG_DEJAVU_SANS_TTF "__dpf_dejavusans_ttf__"
+#ifndef DGL_NO_SHARED_RESOURCES
+# define NANOVG_DEJAVU_SANS_TTF "__dpf_dejavusans_ttf__"
+#endif
struct NVGcontext;
struct NVGpaint;
@@ -844,10 +846,12 @@ public:
*/
int textBreakLines(const char* string, const char* end, float breakRowWidth, TextRow& rows, int maxRows);
+#ifndef DGL_NO_SHARED_RESOURCES
/**
Load DPF's internal shared resources for this NanoVG class.
*/
virtual void loadSharedResources();
+#endif
private:
NVGcontext* const fContext;
diff --git a/dgl/src/NanoVG.cpp b/dgl/src/NanoVG.cpp
@@ -15,9 +15,12 @@
*/
#include "../NanoVG.hpp"
-#include "Resources.hpp"
#include "WidgetPrivateData.hpp"
+#ifndef DGL_NO_SHARED_RESOURCES
+# include "Resources.hpp"
+#endif
+
// -----------------------------------------------------------------------
#if defined(DISTRHO_OS_WINDOWS)
@@ -895,6 +898,7 @@ int NanoVG::textBreakLines(const char* string, const char* end, float breakRowWi
return 0;
}
+#ifndef DGL_NO_SHARED_RESOURCES
void NanoVG::loadSharedResources()
{
if (nvgFindFont(fContext, NANOVG_DEJAVU_SANS_TTF) >= 0)
@@ -904,6 +908,7 @@ void NanoVG::loadSharedResources()
nvgCreateFontMem(fContext, NANOVG_DEJAVU_SANS_TTF, (const uchar*)dejavusans_ttf, dejavusans_ttf_size, 0);
}
+#endif
// -----------------------------------------------------------------------
diff --git a/dgl/src/Window.cpp b/dgl/src/Window.cpp
@@ -1317,16 +1317,6 @@ bool Window::handlePluginSpecial(const bool press, const Key key)
return pData->handlePluginSpecial(press, key);
}
-bool Window::handlePluginKeyboard(const bool press, const uint key)
-{
- return pData->handlePluginKeyboard(press, key);
-}
-
-bool Window::handlePluginSpecial(const bool press, const Key key)
-{
- return pData->handlePluginSpecial(press, key);
-}
-
// -----------------------------------------------------------------------
StandaloneWindow::StandaloneWindow()