[clutter/clutter-1.14] wayland: Only include Wayland headers in private



commit ee3e08a47ea36801a944d3e545c9429fc356b72c
Author: Daniel Stone <daniel fooishbar org>
Date:   Wed Jan 30 11:49:38 2013 +1100

    wayland: Only include Wayland headers in private
    
    As wayland-client.h and wayland-server.h can't be included together,
    split the Wayland backend file into clutter-backend-wayland.h, which
    only defines the types, and clutter-backend-wayland-priv.h, which
    actually uses the Wayland client types.
    
    Signed-off-by: Daniel Stone <daniel fooishbar org>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=692851

 clutter/Makefile.am                              |    1 +
 clutter/wayland/clutter-backend-wayland-priv.h   |   67 ++++++++++++++++++++++
 clutter/wayland/clutter-backend-wayland.c        |    1 +
 clutter/wayland/clutter-backend-wayland.h        |   28 ---------
 clutter/wayland/clutter-device-manager-wayland.c |    1 +
 clutter/wayland/clutter-input-device-wayland.c   |    1 +
 clutter/wayland/clutter-stage-wayland.c          |    1 +
 7 files changed, 72 insertions(+), 28 deletions(-)
---
diff --git a/clutter/Makefile.am b/clutter/Makefile.am
index b6d0922..c0d3d5a 100644
--- a/clutter/Makefile.am
+++ b/clutter/Makefile.am
@@ -651,6 +651,7 @@ egl_source_c = $(srcdir)/egl/clutter-backend-eglnative.c
 if SUPPORT_WAYLAND
 backend_source_h_priv += \
        $(srcdir)/wayland/clutter-backend-wayland.h             \
+       $(srcdir)/wayland/clutter-backend-wayland-priv.h        \
        $(srcdir)/wayland/clutter-stage-wayland.h               \
        $(srcdir)/wayland/clutter-event-wayland.h               \
        $(srcdir)/wayland/clutter-input-device-wayland.h        \
diff --git a/clutter/wayland/clutter-backend-wayland-priv.h b/clutter/wayland/clutter-backend-wayland-priv.h
new file mode 100644
index 0000000..e917b7f
--- /dev/null
+++ b/clutter/wayland/clutter-backend-wayland-priv.h
@@ -0,0 +1,67 @@
+/*
+ * Clutter.
+ *
+ * An OpenGL based 'interactive canvas' library.
+ *
+ * Copyright (C) 2010, 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, see <http://www.gnu.org/licenses/>.
+
+ * Authors:
+ *  Matthew Allum
+ *  Robert Bragg
+ *  Kristian Høgsberg
+ */
+
+#ifndef __CLUTTER_BACKEND_WAYLAND_PRIV_H__
+#define __CLUTTER_BACKEND_WAYLAND_PRIV_H__
+
+#include <glib-object.h>
+#include <clutter/clutter-event.h>
+#include <clutter/clutter-backend.h>
+#include <clutter/clutter-device-manager.h>
+
+#include "clutter-backend-private.h"
+#include "clutter-backend-wayland.h"
+
+G_BEGIN_DECLS
+
+struct _ClutterBackendWayland
+{
+  ClutterBackend parent_instance;
+
+  ClutterDeviceManager *device_manager;
+
+  struct wl_display *wayland_display;
+  struct wl_registry *wayland_registry;
+  struct wl_compositor *wayland_compositor;
+  struct wl_shell *wayland_shell;
+  struct wl_shm *wayland_shm;
+  struct wl_surface *cursor_surface;
+  struct wl_buffer *cursor_buffer;
+  struct wl_output *wayland_output;
+  struct wl_cursor_theme *cursor_theme;
+
+  gint cursor_x, cursor_y;
+  gint output_width, output_height;
+
+  GSource *wayland_source;
+
+  /* event timer */
+  GTimer *event_timer;
+};
+
+G_END_DECLS
+
+#endif /* __CLUTTER_BACKEND_WAYLAND_PRIV_H__ */
diff --git a/clutter/wayland/clutter-backend-wayland.c b/clutter/wayland/clutter-backend-wayland.c
index 1630b53..77ed8c4 100644
--- a/clutter/wayland/clutter-backend-wayland.c
+++ b/clutter/wayland/clutter-backend-wayland.c
@@ -42,6 +42,7 @@
 #include "clutter-stage-private.h"
 
 #include "wayland/clutter-backend-wayland.h"
+#include "wayland/clutter-backend-wayland-priv.h"
 #include "wayland/clutter-device-manager-wayland.h"
 #include "wayland/clutter-event-wayland.h"
 #include "wayland/clutter-stage-wayland.h"
diff --git a/clutter/wayland/clutter-backend-wayland.h b/clutter/wayland/clutter-backend-wayland.h
index 3f14132..b916e53 100644
--- a/clutter/wayland/clutter-backend-wayland.h
+++ b/clutter/wayland/clutter-backend-wayland.h
@@ -32,9 +32,6 @@
 #include <clutter/clutter-backend.h>
 #include <clutter/clutter-device-manager.h>
 
-#include <wayland-client.h>
-#include <wayland-cursor.h>
-
 #include "clutter-backend-private.h"
 
 G_BEGIN_DECLS
@@ -49,31 +46,6 @@ G_BEGIN_DECLS
 typedef struct _ClutterBackendWayland       ClutterBackendWayland;
 typedef struct _ClutterBackendWaylandClass  ClutterBackendWaylandClass;
 
-struct _ClutterBackendWayland
-{
-  ClutterBackend parent_instance;
-
-  ClutterDeviceManager *device_manager;
-
-  struct wl_display *wayland_display;
-  struct wl_registry *wayland_registry;
-  struct wl_compositor *wayland_compositor;
-  struct wl_shell *wayland_shell;
-  struct wl_shm *wayland_shm;
-  struct wl_surface *cursor_surface;
-  struct wl_buffer *cursor_buffer;
-  struct wl_output *wayland_output;
-  struct wl_cursor_theme *cursor_theme;
-
-  gint cursor_x, cursor_y;
-  gint output_width, output_height;
-
-  GSource *wayland_source;
-
-  /* event timer */
-  GTimer *event_timer;
-};
-
 struct _ClutterBackendWaylandClass
 {
   ClutterBackendClass parent_class;
diff --git a/clutter/wayland/clutter-device-manager-wayland.c 
b/clutter/wayland/clutter-device-manager-wayland.c
index 17d61cd..009e4dc 100644
--- a/clutter/wayland/clutter-device-manager-wayland.c
+++ b/clutter/wayland/clutter-device-manager-wayland.c
@@ -32,6 +32,7 @@
 
 #include "clutter-backend.h"
 #include "wayland/clutter-backend-wayland.h"
+#include "wayland/clutter-backend-wayland-priv.h"
 #include "clutter-debug.h"
 #include "clutter-device-manager-private.h"
 #include "clutter-private.h"
diff --git a/clutter/wayland/clutter-input-device-wayland.c b/clutter/wayland/clutter-input-device-wayland.c
index fe534f7..8f08ff6 100644
--- a/clutter/wayland/clutter-input-device-wayland.c
+++ b/clutter/wayland/clutter-input-device-wayland.c
@@ -42,6 +42,7 @@
 #include "evdev/clutter-xkb-utils.h"
 #include "clutter-input-device-wayland.h"
 #include "clutter-backend-wayland.h"
+#include "clutter-backend-wayland-priv.h"
 #include "clutter-stage-private.h"
 #include "clutter-wayland.h"
 
diff --git a/clutter/wayland/clutter-stage-wayland.c b/clutter/wayland/clutter-stage-wayland.c
index ce0e05a..5179eb6 100644
--- a/clutter/wayland/clutter-stage-wayland.c
+++ b/clutter/wayland/clutter-stage-wayland.c
@@ -33,6 +33,7 @@
 #include "clutter-wayland.h"
 #include "clutter-stage-wayland.h"
 #include "clutter-backend-wayland.h"
+#include "clutter-backend-wayland-priv.h"
 #include "clutter-stage-window.h"
 #include "clutter-stage-private.h"
 #include "clutter-event-private.h"


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