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
This commit is contained in:
Daniel Stone 2013-01-30 11:49:38 +11:00 committed by Emmanuele Bassi
parent b37b9d917a
commit dfb145988e
7 changed files with 72 additions and 28 deletions

View File

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

View File

@ -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__ */

View File

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

View File

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

View File

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

View File

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

View File

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