From fe9e38995f5a0abc196e9600c38d95385d6bf84f Mon Sep 17 00:00:00 2001 From: Jonas Suhr Christensen Date: Sat, 18 Jan 2014 10:17:58 +0100 Subject: Added PuGl window drawing. Enable with './configure -with-pugl'. --- plugingui/window.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'plugingui/window.cc') 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 #include +#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 pl = getPixelBuffers(); -- cgit v1.2.3