[cogl/wip/example-crate: 19/20] Updates wayland symbol names to be consistent



commit 71f6d16083c4c58dad9ad2d9764f2220fba784a8
Author: Robert Bragg <robert linux intel com>
Date:   Tue Jun 28 14:57:05 2011 +0100

    Updates wayland symbol names to be consistent
    
    This updates the public wayland symbols to follow the pattern
    cogl_wayland_blah instead of cogl_blah_wayland.

 cogl/Makefile.am                                   |    3 +
 cogl/cogl-renderer.h                               |   28 ---------
 cogl/cogl-wayland-renderer.h                       |   62 ++++++++++++++++++++
 cogl/cogl.h                                        |    3 +
 cogl/winsys/cogl-winsys-egl.c                      |    8 +-
 .../cogl-2.0-experimental/cogl-sections.txt        |    8 +-
 6 files changed, 76 insertions(+), 36 deletions(-)
---
diff --git a/cogl/Makefile.am b/cogl/Makefile.am
index 70f822c..40399f5 100644
--- a/cogl/Makefile.am
+++ b/cogl/Makefile.am
@@ -355,6 +355,9 @@ cogl_sources_c += \
        $(srcdir)/winsys/cogl-winsys-egl-private.h
 endif
 if SUPPORT_EGL_PLATFORM_WAYLAND
+cogl_public_h += \
+	$(srcdir)/cogl-wayland-renderer.h
+
 cogl_sources_c += \
        $(srcdir)/winsys/cogl-winsys-egl.c \
        $(srcdir)/winsys/cogl-winsys-egl-private.h
diff --git a/cogl/cogl-renderer.h b/cogl/cogl-renderer.h
index 0194958..2b3b9e3 100644
--- a/cogl/cogl-renderer.h
+++ b/cogl/cogl-renderer.h
@@ -33,10 +33,6 @@
 #include <cogl/cogl-types.h>
 #include <cogl/cogl-onscreen-template.h>
 
-#if COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT
-#include <wayland-client.h>
-#endif
-
 G_BEGIN_DECLS
 
 /**
@@ -118,30 +114,6 @@ cogl_renderer_set_winsys_id (CoglRenderer *renderer,
 CoglWinsysID
 cogl_renderer_get_winsys_id (CoglRenderer *renderer);
 
-#if COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT
-#define cogl_renderer_wayland_set_foreign_display \
-  cogl_renderer_wayland_set_foreign_display_EXP
-void
-cogl_renderer_wayland_set_foreign_display (CoglRenderer *renderer,
-                                           struct wl_display *display);
-
-#define cogl_renderer_wayland_get_display \
-  cogl_renderer_wayland_get_display_EXP
-struct wl_display *
-cogl_renderer_wayland_get_display (CoglRenderer *renderer);
-
-#define cogl_renderer_wayland_set_foreign_compositor \
-  cogl_renderer_wayland_set_foreign_compositor_EXP
-void
-cogl_renderer_wayland_set_foreign_compositor (CoglRenderer *renderer,
-                                              struct wl_compositor *compositor);
-
-#define cogl_renderer_wayland_get_compositor \
-  cogl_renderer_wayland_get_compositor_EXP
-struct wl_compositor *
-cogl_renderer_wayland_get_compositor (CoglRenderer *renderer);
-#endif /* COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT */
-
 #ifdef COGL_HAS_WGL_SUPPORT
 
 #define cogl_win32_renderer_handle_event \
diff --git a/cogl/cogl-wayland-renderer.h b/cogl/cogl-wayland-renderer.h
new file mode 100644
index 0000000..7e155f4
--- /dev/null
+++ b/cogl/cogl-wayland-renderer.h
@@ -0,0 +1,62 @@
+/*
+ * Cogl
+ *
+ * An object oriented GL/GLES Abstraction/Utility Layer
+ *
+ * Copyright (C) 2011 Intel Corporation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#if !defined(__COGL_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
+#error "Only <cogl/cogl.h> can be included directly."
+#endif
+
+#ifndef __COGL_WAYLAND_RENDERER_H__
+#define __COGL_WAYLAND_RENDERER_H__
+
+#include <cogl/cogl-types.h>
+#include <cogl/cogl-renderer.h>
+
+#include <wayland-client.h>
+
+G_BEGIN_DECLS
+
+#define cogl_wayland_renderer_set_foreign_display \
+  cogl_wayland_renderer_set_foreign_display_EXP
+void
+cogl_wayland_renderer_set_foreign_display (CoglRenderer *renderer,
+                                           struct wl_display *display);
+
+#define cogl_wayland_renderer_get_display \
+  cogl_wayland_renderer_get_display_EXP
+struct wl_display *
+cogl_wayland_renderer_get_display (CoglRenderer *renderer);
+
+#define cogl_wayland_renderer_set_foreign_compositor \
+  cogl_wayland_renderer_set_foreign_compositor_EXP
+void
+cogl_wayland_renderer_set_foreign_compositor (CoglRenderer *renderer,
+                                              struct wl_compositor *compositor);
+
+#define cogl_wayland_renderer_get_compositor \
+  cogl_wayland_renderer_get_compositor_EXP
+struct wl_compositor *
+cogl_wayland_renderer_get_compositor (CoglRenderer *renderer);
+
+G_END_DECLS
+
+#endif /* __COGL_WAYLAND_RENDERER_H__ */
diff --git a/cogl/cogl.h b/cogl/cogl.h
index 1aece0b..06f0985 100644
--- a/cogl/cogl.h
+++ b/cogl/cogl.h
@@ -93,6 +93,9 @@ typedef struct _CoglFramebuffer CoglFramebuffer;
 #include <cogl/cogl-xlib.h>
 #include <cogl/cogl-xlib-renderer.h>
 #endif
+#if COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT
+#include <cogl/cogl-wayland-renderer.h>
+#endif
 /* XXX: This will definitly go away once all the Clutter winsys
  * code has been migrated down into Cogl! */
 #include <cogl/cogl-clutter.h>
diff --git a/cogl/winsys/cogl-winsys-egl.c b/cogl/winsys/cogl-winsys-egl.c
index 1c20dc1..867c88e 100644
--- a/cogl/winsys/cogl-winsys-egl.c
+++ b/cogl/winsys/cogl-winsys-egl.c
@@ -1710,7 +1710,7 @@ _cogl_winsys_egl_get_vtable (void)
  * points... */
 #ifdef COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT
 void
-cogl_renderer_wayland_set_foreign_display (CoglRenderer *renderer,
+cogl_wayland_renderer_set_foreign_display (CoglRenderer *renderer,
                                            struct wl_display *display)
 {
   g_return_if_fail (cogl_is_renderer (renderer));
@@ -1722,7 +1722,7 @@ cogl_renderer_wayland_set_foreign_display (CoglRenderer *renderer,
 }
 
 struct wl_display *
-cogl_renderer_wayland_get_display (CoglRenderer *renderer)
+cogl_wayland_renderer_get_display (CoglRenderer *renderer)
 {
   g_return_val_if_fail (cogl_is_renderer (renderer), NULL);
 
@@ -1738,7 +1738,7 @@ cogl_renderer_wayland_get_display (CoglRenderer *renderer)
 }
 
 void
-cogl_renderer_wayland_set_foreign_compositor (CoglRenderer *renderer,
+cogl_wayland_renderer_set_foreign_compositor (CoglRenderer *renderer,
                                               struct wl_compositor *compositor)
 {
   g_return_if_fail (cogl_is_renderer (renderer));
@@ -1750,7 +1750,7 @@ cogl_renderer_wayland_set_foreign_compositor (CoglRenderer *renderer,
 }
 
 struct wl_compositor *
-cogl_renderer_wayland_get_compositor (CoglRenderer *renderer)
+cogl_wayland_renderer_get_compositor (CoglRenderer *renderer)
 {
   g_return_val_if_fail (cogl_is_renderer (renderer), NULL);
 
diff --git a/doc/reference/cogl-2.0-experimental/cogl-sections.txt b/doc/reference/cogl-2.0-experimental/cogl-sections.txt
index d8f1bb7..02f7931 100644
--- a/doc/reference/cogl-2.0-experimental/cogl-sections.txt
+++ b/doc/reference/cogl-2.0-experimental/cogl-sections.txt
@@ -33,10 +33,10 @@ cogl_win32_renderer_remove_native_filter
 cogl_win32_renderer_handle_native_event
 
 <SUBSECTION>
-cogl_renderer_wayland_set_foreign_display
-cogl_renderer_wayland_get_display
-cogl_renderer_wayland_set_foreign_compositor
-cogl_renderer_wayland_get_compositor
+cogl_wayland_renderer_set_foreign_display
+cogl_wayland_renderer_get_display
+cogl_wayland_renderer_set_foreign_compositor
+cogl_wayland_renderer_get_compositor
 </SECTION>
 
 <SECTION>



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