From: U. Artie Eoff Date: Fri, 27 Apr 2012 17:32:16 +0000 (-0700) Subject: display hooks for window X-Git-Tag: upstream/0.2.1~352 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5a5d2019b355ff01732bc9ca550198e2e057777d;p=test%2Fgeneric%2Fwayland-fits.git display hooks for window Signed-off-by: U. Artie Eoff --- diff --git a/src/Makefile.am b/src/Makefile.am index 6cade67..4fdb1c3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3,4 +3,7 @@ CXXFLAGS = -std=gnu++0x $(CAIRO_CFLAGS) $(WAYLAND_CFLAGS) LDFLAGS = $(CAIRO_LIBS) $(WAYLAND_LIBS) bin_PROGRAMS = simple -simple_SOURCES = simple.cpp display.cpp +simple_SOURCES = \ + simple.cpp \ + display.cpp \ + window.cpp diff --git a/src/display.h b/src/display.h index 38a1535..ec82797 100644 --- a/src/display.h +++ b/src/display.h @@ -34,6 +34,9 @@ public: wl_compositor* compositor() { return compositor_; } wl_display* display() { return display_; } + wl_shell* shell() { return shell_; } + EGLConfig& config() { return argbConfig_; } + EGLContext& context() { return argbContext_; } private: wl_display* display_; diff --git a/src/simple.cpp b/src/simple.cpp index 4e753b2..e844af5 100644 --- a/src/simple.cpp +++ b/src/simple.cpp @@ -2,9 +2,11 @@ #include #include "display.h" +#include "window.h" int main(const int argc, const char** argv) { wayland::Display display; + wayland::Window window(display); return 0; } diff --git a/src/window.cpp b/src/window.cpp index 2ea1960..1c54d7d 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -1,3 +1,7 @@ +#include +#include +#include + #include "window.h" namespace wayland { @@ -15,7 +19,7 @@ Window::Window(Display& display) wl_shell_surface_set_toplevel(shellSurface_); assert( - eglMakeCurrent(display_.display(), eglSurface_, eglSurface_, display_.context() + eglMakeCurrent(display_.display(), eglSurface_, eglSurface_, &display_.context()) == EGL_TRUE ); }