[Cogl] [PATCH] Move cogl_wayland_display_ proto to cogl-wayland-server.h

Robert Bragg robert at sixbynine.org
Mon Aug 6 09:27:12 PDT 2012


From: Robert Bragg <robert at linux.intel.com>

We need to avoid including wayland-server.h or wayland-client.h
indirectly when including cogl.h because there are overlapping typedef
names between the client and server wayland headers and we can't assume
whether Cogl is being used client or server side. This moves the
prototype for cogl_wayland_display_set_compositor_display() into
cogl-wayland-server.h which Cogl apps must include explicitly if the
want access to server side Cogl Wayland symbols.
---
 cogl/cogl-display.h        |   18 ------------------
 cogl/cogl-wayland-server.h |   18 ++++++++++++++++--
 2 files changed, 16 insertions(+), 20 deletions(-)

diff --git a/cogl/cogl-display.h b/cogl/cogl-display.h
index 463b99c..c8cf7be 100644
--- a/cogl/cogl-display.h
+++ b/cogl/cogl-display.h
@@ -171,24 +171,6 @@ cogl_gdl_display_set_plane (CoglDisplay *display,
                             gdl_plane_id_t plane);
 #endif
 
-#ifdef COGL_HAS_WAYLAND_EGL_SERVER_SUPPORT
-/**
- * cogl_wayland_display_set_compositor_display:
- * @display: a #CoglDisplay
- * @wayland_display: A compositor's Wayland display pointer
- *
- * Informs Cogl of a compositor's Wayland display pointer. This
- * enables Cogl to register private wayland extensions required to
- * pass buffers between the clients and compositor.
- *
- * Since: 1.10
- * Stability: unstable
- */
-void
-cogl_wayland_display_set_compositor_display (CoglDisplay *display,
-                                          struct wl_display *wayland_display);
-#endif
-
 /**
  * cogl_is_display:
  * @object: A #CoglObject pointer
diff --git a/cogl/cogl-wayland-server.h b/cogl/cogl-wayland-server.h
index 9c2cb46..315af22 100644
--- a/cogl/cogl-wayland-server.h
+++ b/cogl/cogl-wayland-server.h
@@ -34,8 +34,22 @@
 
 G_BEGIN_DECLS
 
-#define cogl_wayland_texture_2d_new_from_buffer \
-  cogl_wayland_texture_2d_new_from_buffer_EXP
+/**
+ * cogl_wayland_display_set_compositor_display:
+ * @display: a #CoglDisplay
+ * @wayland_display: A compositor's Wayland display pointer
+ *
+ * Informs Cogl of a compositor's Wayland display pointer. This
+ * enables Cogl to register private wayland extensions required to
+ * pass buffers between the clients and compositor.
+ *
+ * Since: 1.10
+ * Stability: unstable
+ */
+void
+cogl_wayland_display_set_compositor_display (CoglDisplay *display,
+                                          struct wl_display *wayland_display);
+
 /**
  * cogl_wayland_texture_2d_new_from_buffer:
  * @ctx: A #CoglContext
-- 
1.7.7.6



More information about the Cogl mailing list