wayland: Allow setting foreign display/compositor

To support toolkits targeting wayland and using Cogl we allow toolkits
to be responsible for connecting to a wayland display and asking Cogl to
use the toolkit owned display and compositor object. Note: eventually
the plan is that wayland will allow retrospective querying of objects so
we won't need the foreign compositor API when Cogl can simply query it
from the foreign display.
This commit is contained in:
Robert Bragg
2011-05-11 14:07:02 +01:00
parent 653d59af04
commit 2282455f27
3 changed files with 93 additions and 8 deletions

View File

@ -34,6 +34,10 @@
#include <windows.h>
#endif /* COGL_HAS_WIN32_SUPPORT */
#if COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT
#include <wayland-client.h>
#endif /* COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT */
G_BEGIN_DECLS
#ifdef COGL_ENABLE_EXPERIMENTAL_API
@ -172,6 +176,11 @@ HWND
cogl_onscreen_win32_get_window (CoglOnscreen *onscreen);
#endif /* COGL_HAS_WIN32_SUPPORT */
#if COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT
struct wl_surface *
cogl_wayland_onscreen_get_surface (CoglOnscreen *onscreen);
#endif /* COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT */
#define cogl_onscreen_set_swap_throttled cogl_onscreen_set_swap_throttled_EXP
void
cogl_onscreen_set_swap_throttled (CoglOnscreen *onscreen,