Browse Source

Build DPF with sofd disabled, not used for any plugins so far

tags/1.9.8
falkTX 8 years ago
parent
commit
412f0dd3f6
6 changed files with 24 additions and 4 deletions
  1. +4
    -0
      source/Makefile.mk
  2. +1
    -4
      source/modules/dgl/Makefile
  3. +6
    -0
      source/modules/dgl/Window.hpp
  4. +8
    -0
      source/modules/dgl/src/Window.cpp
  5. +3
    -0
      source/modules/dgl/src/pugl/pugl_osx.m
  6. +2
    -0
      source/modules/dgl/src/pugl/pugl_x11.c

+ 4
- 0
source/Makefile.mk View File

@@ -127,6 +127,10 @@ ifneq ($(MACOS),true)
LINK_FLAGS += -Wl,--no-undefined
endif

ifeq ($(MACOS_OLD),true)
BUILD_CXX_FLAGS = $(BASE_FLAGS) $(CXXFLAGS)
endif

# --------------------------------------------------------------
# Strict test build



+ 1
- 4
source/modules/dgl/Makefile View File

@@ -10,10 +10,7 @@ include ../Makefile.mk

# ----------------------------------------------------------------------------------------------------------------------------

BUILD_CXX_FLAGS += $(DGL_FLAGS) -Isrc

# needed by sofd right now, fix later
BUILD_CXX_FLAGS += -Wno-type-limits -fpermissive
BUILD_CXX_FLAGS += $(DGL_FLAGS) -DDGL_FILE_BROWSER_DISABLED -Isrc

# ----------------------------------------------------------------------------------------------------------------------------



+ 6
- 0
source/modules/dgl/Window.hpp View File

@@ -30,6 +30,7 @@ class StandaloneWindow;
class Window
{
public:
#ifndef DGL_FILE_BROWSER_DISABLED
/**
File browser options.
*/
@@ -66,6 +67,7 @@ public:
height(0),
buttons() {}
};
#endif // DGL_FILE_BROWSER_DISABLED

explicit Window(Application& app);
explicit Window(Application& app, Window& parent);
@@ -80,7 +82,9 @@ public:
void focus();
void repaint() noexcept;

#ifndef DGL_FILE_BROWSER_DISABLED
bool openFileBrowser(const FileBrowserOptions& options);
#endif

bool isVisible() const noexcept;
void setVisible(bool yesNo);
@@ -111,7 +115,9 @@ protected:
virtual void onReshape(uint width, uint height);
virtual void onClose();

#ifndef DGL_FILE_BROWSER_DISABLED
virtual void fileBrowserSelected(const char* filename);
#endif

private:
struct PrivateData;


+ 8
- 0
source/modules/dgl/src/Window.cpp View File

@@ -207,7 +207,9 @@ struct Window::PrivateData {
puglSetSpecialFunc(fView, onSpecialCallback);
puglSetReshapeFunc(fView, onReshapeCallback);
puglSetCloseFunc(fView, onCloseCallback);
#ifndef DGL_FILE_BROWSER_DISABLED
puglSetFileSelectedFunc(fView, fileBrowserSelectedCallback);
#endif

puglCreateWindow(fView, nullptr);

@@ -949,10 +951,12 @@ struct Window::PrivateData {
handlePtr->onPuglClose();
}

#ifndef DGL_FILE_BROWSER_DISABLED
static void fileBrowserSelectedCallback(PuglView* view, const char* filename)
{
handlePtr->fSelf->fileBrowserSelected(filename);
}
#endif

#undef handlePtr

@@ -1012,6 +1016,7 @@ void Window::repaint() noexcept
// (void)name;
// }

#ifndef DGL_FILE_BROWSER_DISABLED
bool Window::openFileBrowser(const FileBrowserOptions& options)
{
#ifdef SOFD_HAVE_X11
@@ -1077,6 +1082,7 @@ bool Window::openFileBrowser(const FileBrowserOptions& options)
return false;
#endif
}
#endif

bool Window::isVisible() const noexcept
{
@@ -1207,9 +1213,11 @@ void Window::onClose()
{
}

#ifndef DGL_FILE_BROWSER_DISABLED
void Window::fileBrowserSelected(const char*)
{
}
#endif

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



+ 3
- 0
source/modules/dgl/src/pugl/pugl_osx.m View File

@@ -570,4 +570,7 @@ void*
puglGetContext(PuglView* view)
{
return NULL;

// unused
(void)view;
}

+ 2
- 0
source/modules/dgl/src/pugl/pugl_x11.c View File

@@ -41,9 +41,11 @@

#include "pugl/pugl_internal.h"

#ifndef DGL_FILE_BROWSER_DISABLED
#define SOFD_HAVE_X11
#include "../sofd/libsofd.h"
#include "../sofd/libsofd.c"
#endif

struct PuglInternalsImpl {
Display* display;


Loading…
Cancel
Save