| @@ -252,15 +252,13 @@ HAVE_CAIRO = $(shell $(PKG_CONFIG) --exists cairo && echo true) | |||||
| ifeq ($(MACOS_OR_WINDOWS),true) | ifeq ($(MACOS_OR_WINDOWS),true) | ||||
| HAVE_OPENGL = true | HAVE_OPENGL = true | ||||
| else | else | ||||
| HAVE_OPENGL = $(shell $(PKG_CONFIG) --exists gl && echo true) | |||||
| ifneq ($(HAIKU),true) | |||||
| HAVE_OPENGL = $(shell $(PKG_CONFIG) --exists gl && echo true) | |||||
| HAVE_DBUS = $(shell $(PKG_CONFIG) --exists dbus-1 && echo true) | HAVE_DBUS = $(shell $(PKG_CONFIG) --exists dbus-1 && echo true) | ||||
| HAVE_X11 = $(shell $(PKG_CONFIG) --exists x11 && echo true) | HAVE_X11 = $(shell $(PKG_CONFIG) --exists x11 && echo true) | ||||
| HAVE_XCURSOR = $(shell $(PKG_CONFIG) --exists xcursor && echo true) | HAVE_XCURSOR = $(shell $(PKG_CONFIG) --exists xcursor && echo true) | ||||
| HAVE_XEXT = $(shell $(PKG_CONFIG) --exists xext && echo true) | HAVE_XEXT = $(shell $(PKG_CONFIG) --exists xext && echo true) | ||||
| HAVE_XRANDR = $(shell $(PKG_CONFIG) --exists xrandr && echo true) | HAVE_XRANDR = $(shell $(PKG_CONFIG) --exists xrandr && echo true) | ||||
| endif | endif | ||||
| endif | |||||
| # --------------------------------------------------------------------------------------------------------------------- | # --------------------------------------------------------------------------------------------------------------------- | ||||
| # Check for optional libraries | # Check for optional libraries | ||||
| @@ -304,7 +302,7 @@ DGL_SYSTEM_LIBS += -lgdi32 -lcomdlg32 | |||||
| # -lole32 | # -lole32 | ||||
| endif | endif | ||||
| ifneq ($(HAIKU_OR_MACOS_OR_WINDOWS),true) | |||||
| ifneq ($(MACOS_OR_WINDOWS),true) | |||||
| ifeq ($(HAVE_DBUS),true) | ifeq ($(HAVE_DBUS),true) | ||||
| DGL_FLAGS += $(shell $(PKG_CONFIG) --cflags dbus-1) -DHAVE_DBUS | DGL_FLAGS += $(shell $(PKG_CONFIG) --cflags dbus-1) -DHAVE_DBUS | ||||
| DGL_SYSTEM_LIBS += $(shell $(PKG_CONFIG) --libs dbus-1) | DGL_SYSTEM_LIBS += $(shell $(PKG_CONFIG) --libs dbus-1) | ||||
| @@ -362,7 +360,7 @@ ifeq ($(WINDOWS),true) | |||||
| OPENGL_LIBS = -lopengl32 | OPENGL_LIBS = -lopengl32 | ||||
| endif | endif | ||||
| ifneq ($(HAIKU_OR_MACOS_OR_WINDOWS),true) | |||||
| ifneq ($(MACOS_OR_WINDOWS),true) | |||||
| OPENGL_FLAGS = $(shell $(PKG_CONFIG) --cflags gl x11) | OPENGL_FLAGS = $(shell $(PKG_CONFIG) --cflags gl x11) | ||||
| OPENGL_LIBS = $(shell $(PKG_CONFIG) --libs gl x11) | OPENGL_LIBS = $(shell $(PKG_CONFIG) --libs gl x11) | ||||
| endif | endif | ||||
| @@ -374,7 +372,7 @@ endif | |||||
| # --------------------------------------------------------------------------------------------------------------------- | # --------------------------------------------------------------------------------------------------------------------- | ||||
| # Set Stub specific stuff | # Set Stub specific stuff | ||||
| ifeq ($(HAIKU_OR_MACOS_OR_WINDOWS),true) | |||||
| ifeq ($(MACOS_OR_WINDOWS),true) | |||||
| HAVE_STUB = true | HAVE_STUB = true | ||||
| else | else | ||||
| HAVE_STUB = $(HAVE_X11) | HAVE_STUB = $(HAVE_X11) | ||||
| @@ -424,12 +422,8 @@ endif | |||||
| ifeq ($(MACOS_OR_WINDOWS),true) | ifeq ($(MACOS_OR_WINDOWS),true) | ||||
| HAVE_DGL = true | HAVE_DGL = true | ||||
| else ifeq ($(HAVE_OPENGL),true) | else ifeq ($(HAVE_OPENGL),true) | ||||
| ifeq ($(HAIKU),true) | |||||
| HAVE_DGL = true | |||||
| else | |||||
| HAVE_DGL = $(HAVE_X11) | HAVE_DGL = $(HAVE_X11) | ||||
| endif | endif | ||||
| endif | |||||
| # --------------------------------------------------------------------------------------------------------------------- | # --------------------------------------------------------------------------------------------------------------------- | ||||
| # Optional flags | # Optional flags | ||||
| @@ -23,8 +23,7 @@ | |||||
| #include <cstring> | #include <cstring> | ||||
| #include <ctime> | #include <ctime> | ||||
| #if defined(DISTRHO_OS_HAIKU) | |||||
| #elif defined(DISTRHO_OS_MAC) | |||||
| #if defined(DISTRHO_OS_MAC) | |||||
| # import <Cocoa/Cocoa.h> | # import <Cocoa/Cocoa.h> | ||||
| # include <dlfcn.h> | # include <dlfcn.h> | ||||
| # include <mach/mach_time.h> | # include <mach/mach_time.h> | ||||
| @@ -106,8 +105,7 @@ START_NAMESPACE_DGL | |||||
| // -------------------------------------------------------------------------------------------------------------------- | // -------------------------------------------------------------------------------------------------------------------- | ||||
| #if defined(DISTRHO_OS_HAIKU) | |||||
| #elif defined(DISTRHO_OS_MAC) | |||||
| #if defined(DISTRHO_OS_MAC) | |||||
| # ifndef DISTRHO_MACOS_NAMESPACE_MACRO | # ifndef DISTRHO_MACOS_NAMESPACE_MACRO | ||||
| # define DISTRHO_MACOS_NAMESPACE_MACRO_HELPER(NS, SEP, INTERFACE) NS ## SEP ## INTERFACE | # define DISTRHO_MACOS_NAMESPACE_MACRO_HELPER(NS, SEP, INTERFACE) NS ## SEP ## INTERFACE | ||||
| # define DISTRHO_MACOS_NAMESPACE_MACRO(NS, INTERFACE) DISTRHO_MACOS_NAMESPACE_MACRO_HELPER(NS, _, INTERFACE) | # define DISTRHO_MACOS_NAMESPACE_MACRO(NS, INTERFACE) DISTRHO_MACOS_NAMESPACE_MACRO_HELPER(NS, _, INTERFACE) | ||||
| @@ -278,9 +276,7 @@ double puglGetDesktopScaleFactor(const PuglView* const view) | |||||
| void puglRaiseWindow(PuglView* const view) | void puglRaiseWindow(PuglView* const view) | ||||
| { | { | ||||
| #if defined(DISTRHO_OS_HAIKU) | |||||
| // nothing here yet | |||||
| #elif defined(DISTRHO_OS_MAC) | |||||
| #if defined(DISTRHO_OS_MAC) | |||||
| if (NSWindow* const window = view->impl->window ? view->impl->window | if (NSWindow* const window = view->impl->window ? view->impl->window | ||||
| : [view->impl->wrapperView window]) | : [view->impl->wrapperView window]) | ||||
| [window orderFrontRegardless]; | [window orderFrontRegardless]; | ||||
| @@ -325,7 +321,7 @@ PuglStatus puglSetGeometryConstraints(PuglView* const view, const uint width, co | |||||
| view->maxAspectY = (int)height; | view->maxAspectY = (int)height; | ||||
| } | } | ||||
| #if defined(DISTRHO_OS_HAIKU) || defined(DISTRHO_OS_MAC) | |||||
| #if defined(DISTRHO_OS_MAC) | |||||
| puglSetMinSize(view, width, height); | puglSetMinSize(view, width, height); | ||||
| if (aspect) { | if (aspect) { | ||||
| @@ -353,8 +349,7 @@ PuglStatus puglSetWindowSize(PuglView* const view, const uint width, const uint | |||||
| view->frame.width = width; | view->frame.width = width; | ||||
| view->frame.height = height; | view->frame.height = height; | ||||
| #if defined(DISTRHO_OS_HAIKU) | |||||
| #elif defined(DISTRHO_OS_MAC) | |||||
| #if defined(DISTRHO_OS_MAC) | |||||
| // replace setFrame with setFrameSize | // replace setFrame with setFrameSize | ||||
| PuglInternals* const impl = view->impl; | PuglInternals* const impl = view->impl; | ||||
| @@ -499,7 +499,9 @@ static int query_font_geometry (Display *dpy, GC gc, const char *txt, int *w, in | |||||
| if (h) *h = text_structure.ascent + text_structure.descent; | if (h) *h = text_structure.ascent + text_structure.descent; | ||||
| if (a) *a = text_structure.ascent; | if (a) *a = text_structure.ascent; | ||||
| if (d) *d = text_structure.descent; | if (d) *d = text_structure.descent; | ||||
| #ifndef DISTRHO_OS_HAIKU // FIXME | |||||
| XFreeFontInfo (NULL, fontinfo, 1); | XFreeFontInfo (NULL, fontinfo, 1); | ||||
| #endif | |||||
| return 0; | return 0; | ||||
| } | } | ||||