summaryrefslogtreecommitdiff
path: root/plugingui
diff options
context:
space:
mode:
Diffstat (limited to 'plugingui')
-rw-r--r--plugingui/Makefile.am1
-rw-r--r--plugingui/Makefile.am.plugingui4
-rw-r--r--plugingui/window.cc13
3 files changed, 14 insertions, 4 deletions
diff --git a/plugingui/Makefile.am b/plugingui/Makefile.am
index 252db2a..9cf0218 100644
--- a/plugingui/Makefile.am
+++ b/plugingui/Makefile.am
@@ -41,6 +41,7 @@ EXTRA_DIST = \
listboxbasic.h \
listboxthin.h \
nativewindow.h \
+ nativewindow.h \
nativewindow_win32.h \
nativewindow_x11.h \
painter.h \
diff --git a/plugingui/Makefile.am.plugingui b/plugingui/Makefile.am.plugingui
index 121b128..f47582c 100644
--- a/plugingui/Makefile.am.plugingui
+++ b/plugingui/Makefile.am.plugingui
@@ -1,6 +1,8 @@
PLUGIN_GUI_SOURCES = \
$(top_srcdir)/hugin/hugin.c \
$(top_srcdir)/hugin/hugin_syslog.c \
+ $(top_srcdir)/pugl/pugl/pugl_x11.c \
+ $(top_srcdir)/plugingui/nativewindow_pugl.cc \
$(top_srcdir)/plugingui/nativewindow_x11.cc \
$(top_srcdir)/plugingui/nativewindow_win32.cc \
$(top_srcdir)/plugingui/plugingui.cc \
@@ -33,4 +35,4 @@ PLUGIN_GUI_SOURCES = \
PLUGIN_GUI_LIBS = $(X11_LIBS) $(PTHREAD_LIBS) $(PNG_LIBS) $(ZLIB_LIBS)
-PLUGIN_GUI_CFLAGS = $(X11_CFLAGS) $(PNG_CFLAGS) $(ZLIB_CFLAGS) -I$(top_srcdir)/hugin -DWITH_HUG_SYSLOG -DWITH_HUG_MUTEX $(PTHREAD_CFLAGS)
+PLUGIN_GUI_CFLAGS = $(X11_CFLAGS) $(PNG_CFLAGS) $(ZLIB_CFLAGS) -I$(top_srcdir)/hugin -DWITH_HUG_SYSLOG -DWITH_HUG_MUTEX $(PTHREAD_CFLAGS) -I$(top_srcdir)/pugl/pugl
diff --git a/plugingui/window.cc b/plugingui/window.cc
index 41d4d82..8337533 100644
--- a/plugingui/window.cc
+++ b/plugingui/window.cc
@@ -34,13 +34,16 @@
#include <string.h>
#include <hugin.hpp>
+#ifndef PUGL
#ifdef X11
#include "nativewindow_x11.h"
#endif/*X11*/
-
#ifdef WIN32
#include "nativewindow_win32.h"
#endif/*WIN32*/
+#else
+#include "nativewindow_pugl.h"
+#endif
GUI::Window::Window()
: Widget(NULL), wpixbuf(100, 100), back(":bg.png"), logo(":logo.png")
@@ -55,13 +58,16 @@ GUI::Window::Window()
_buttonDownFocus = NULL;
_mouseFocus = NULL;
+#ifndef PUGL
#ifdef X11
native = new NativeWindowX11(this);
#endif/*X11*/
-
#ifdef WIN32
native = new NativeWindowWin32(this);
#endif/*WIN32*/
+#else/*Use pugl*/
+ native = new NativeWindowPugl(this);
+#endif
eventhandler = new GUI::EventHandler(native, this);
}
@@ -110,8 +116,8 @@ void GUI::Window::resize(int width, int height)
resized(width, height);
//#endif
- native->resize(width, height);
Widget::resize(width, height);
+ native->resize(width, height);
}
void GUI::Window::move(size_t x, size_t y)
@@ -166,6 +172,7 @@ void GUI::Window::endPaint()
void GUI::Window::updateBuffer()
{
+ DEBUG(window, "Updating buffer\n");
memset(wpixbuf.buf, 0, wpixbuf.width * wpixbuf.height * 3);
std::vector<PixelBufferAlpha *> pl = getPixelBuffers();