[clutter/fosdem-2012] test-wayland-surface: Move the TWSSurface struct to a separate header
- From: Neil Roberts <nroberts src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/fosdem-2012] test-wayland-surface: Move the TWSSurface struct to a separate header
- Date: Tue, 10 Jan 2012 18:36:52 +0000 (UTC)
commit 61b53c4375d8909f84f4b0059b3ef0f84d2ee5d0
Author: Neil Roberts <neil linux intel com>
Date: Tue Jan 10 18:19:56 2012 +0000
test-wayland-surface: Move the TWSSurface struct to a separate header
The hope is to make the input support be self contained in a separate
file so that it can be more easily moved to Mutter. The input support
needs to get a ClutterActor pointer from a TWSSurface so the easiest
way to do this is to share the struct.
tests/interactive/Makefile.am | 5 ++++-
tests/interactive/test-wayland-surface.c | 22 +---------------------
tests/interactive/tws-compositor.h | 29 +++++++++++++++++++++++++++++
3 files changed, 34 insertions(+), 22 deletions(-)
---
diff --git a/tests/interactive/Makefile.am b/tests/interactive/Makefile.am
index 6474b06..c34408b 100644
--- a/tests/interactive/Makefile.am
+++ b/tests/interactive/Makefile.am
@@ -64,9 +64,12 @@ if X11_TESTS
UNIT_TESTS += test-pixmap.c
endif
+test_interactive_SOURCES =
+
if SUPPORT_WAYLAND_COMPOSITOR
if HAVE_WAYLAND_EXTENSION_PROTOCOLS_DIR
UNIT_TESTS += test-wayland-surface.c
+test_interactive_SOURCES += tws-compositor.h
endif
endif
@@ -155,7 +158,7 @@ common_ldadd = $(top_builddir)/clutter/libclutter- CLUTTER_API_VERSION@.la
noinst_PROGRAMS = test-interactive
-test_interactive_SOURCES = \
+test_interactive_SOURCES += \
test-main.c \
test-unit-names.h
diff --git a/tests/interactive/test-wayland-surface.c b/tests/interactive/test-wayland-surface.c
index 8840f17..b1a2dfe 100644
--- a/tests/interactive/test-wayland-surface.c
+++ b/tests/interactive/test-wayland-surface.c
@@ -18,27 +18,7 @@
#include <wayland-server.h>
#include "xserver-server-protocol.h"
-
-typedef struct _TWSCompositor TWSCompositor;
-
-typedef struct
-{
- struct wl_buffer *wayland_buffer;
- GList *surfaces_attached_to;
- struct wl_listener buffer_destroy_listener;
-} TWSBuffer;
-
-typedef struct
-{
- struct wl_surface wayland_surface;
- TWSCompositor *compositor;
- int x;
- int y;
- TWSBuffer *buffer;
- ClutterActor *actor;
- gboolean has_shell_surface;
- struct wl_listener surface_destroy_listener;
-} TWSSurface;
+#include "tws-compositor.h"
typedef struct
{
diff --git a/tests/interactive/tws-compositor.h b/tests/interactive/tws-compositor.h
new file mode 100644
index 0000000..93b28c5
--- /dev/null
+++ b/tests/interactive/tws-compositor.h
@@ -0,0 +1,29 @@
+#ifndef __TWS_COMPOSITOR_H__
+#define __TWS_COMPOSITOR_H__
+
+#include <glib.h>
+#include <wayland-server.h>
+#include <clutter/clutter.h>
+
+typedef struct _TWSCompositor TWSCompositor;
+
+typedef struct
+{
+ struct wl_buffer *wayland_buffer;
+ GList *surfaces_attached_to;
+ struct wl_listener buffer_destroy_listener;
+} TWSBuffer;
+
+typedef struct
+{
+ struct wl_surface wayland_surface;
+ TWSCompositor *compositor;
+ int x;
+ int y;
+ TWSBuffer *buffer;
+ ClutterActor *actor;
+ gboolean has_shell_surface;
+ struct wl_listener surface_destroy_listener;
+} TWSSurface;
+
+#endif /* __TWS_COMPOSITOR_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]