[cogl] wayland: Add API to access the shell surface for the onscreen



commit 590e1c46f044dbb5082c9693f1398bb186e0ae4b
Author: Rob Bradford <rob linux intel com>
Date:   Thu Dec 8 16:21:57 2011 +0000

    wayland: Add API to access the shell surface for the onscreen
    
    Reviewed-by: Robert Bragg <robert linux intel com>

 cogl/cogl-onscreen.h          |    2 ++
 cogl/winsys/cogl-winsys-egl.c |   16 ++++++++++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/cogl/cogl-onscreen.h b/cogl/cogl-onscreen.h
index 8a9d64a..9bcc769 100644
--- a/cogl/cogl-onscreen.h
+++ b/cogl/cogl-onscreen.h
@@ -131,6 +131,8 @@ cogl_win32_onscreen_get_window (CoglOnscreen *onscreen);
 #if defined (COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT)
 struct wl_surface *
 cogl_wayland_onscreen_get_surface (CoglOnscreen *onscreen);
+struct wl_shell_surface *
+cogl_wayland_onscreen_get_shell_surface (CoglOnscreen *onscreen);
 #endif /* COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT */
 
 #define cogl_onscreen_set_swap_throttled cogl_onscreen_set_swap_throttled_EXP
diff --git a/cogl/winsys/cogl-winsys-egl.c b/cogl/winsys/cogl-winsys-egl.c
index abf7d23..895a8d8 100644
--- a/cogl/winsys/cogl-winsys-egl.c
+++ b/cogl/winsys/cogl-winsys-egl.c
@@ -1936,6 +1936,22 @@ cogl_wayland_onscreen_get_surface (CoglOnscreen *onscreen)
     return NULL;
 }
 
+
+struct wl_shell_surface *
+cogl_wayland_onscreen_get_shell_surface (CoglOnscreen *onscreen)
+{
+  CoglFramebuffer *fb;
+
+  fb = COGL_FRAMEBUFFER (onscreen);
+  if (fb->allocated)
+    {
+      CoglOnscreenEGL *egl_onscreen = onscreen->winsys;
+      return egl_onscreen->wayland_shell_surface;
+    }
+  else
+    return NULL;
+}
+
 #endif /* COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT */
 
 #ifdef EGL_KHR_image_base



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]