wayland: Add API to access the shell surface for the onscreen

Reviewed-by: Robert Bragg <robert@linux.intel.com>
This commit is contained in:
Rob Bradford 2011-12-08 16:21:57 +00:00
parent 4928ca5a90
commit 590e1c46f0
2 changed files with 18 additions and 0 deletions

View File

@ -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

View File

@ -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