Add a new GDK backend

This commit introduces a new flavour for Clutter, that uses GDK
for handling all window system specific interactions (except for
creating the cogl context, as cogl does not know about GDK), including
in particular events. This is not compatible with the X11 (glx)
flavour, and this is reflected by the different soname (libclutter-gdk-1.0.so),
as all X11 specific functions and classes are not available. If you
wish to be compatible, you should check for CLUTTER_WINDOWING_X11.
Other than that, this backend should be on feature parity with X11,
including XInput 2, XSettings and EMWH (with much, much less code)

https://bugzilla.gnome.org/show_bug.cgi?id=657434
This commit is contained in:
Giovanni Campagna
2011-08-26 03:09:18 +02:00
committed by Emmanuele Bassi
parent db53ca382c
commit 610a9c17ba
20 changed files with 2232 additions and 53 deletions

View File

@@ -4,7 +4,7 @@
static const ClutterColor stage_color = { 0x00, 0x00, 0x00, 0xff };
#ifdef COGL_HAS_XLIB
#ifdef CLUTTER_WINDOWING_X11
#include <clutter/x11/clutter-x11.h>
#include <cogl/cogl-texture-pixmap-x11.h>
@@ -195,13 +195,13 @@ queue_redraw (gpointer stage)
return TRUE;
}
#endif /* COGL_HAS_XLIB */
#endif /* CLUTTER_WINDOWING_X11 */
void
test_cogl_texture_pixmap_x11 (TestConformSimpleFixture *fixture,
gconstpointer data)
{
#ifdef COGL_HAS_XLIB
#ifdef CLUTTER_WINDOWING_X11
TestState state;
guint idle_handler;
@@ -235,11 +235,11 @@ test_cogl_texture_pixmap_x11 (TestConformSimpleFixture *fixture,
if (g_test_verbose ())
g_print ("OK\n");
#else /* COGL_HAS_XLIB */
#else /* CLUTTER_WINDOWING_X11 */
if (g_test_verbose ())
g_print ("Skipping\n");
#endif /* COGL_HAS_XLIB */
#endif /* CLUTTER_WINDOWING_X11 */
}

View File

@@ -3,7 +3,7 @@
#include <clutter/clutter.h>
#include <stdlib.h>
#ifdef COGL_HAS_XLIB
#ifdef CLUTTER_WINDOWING_X11
#include <X11/Xlib.h>
#include <clutter/x11/clutter-x11.h>
#endif
@@ -48,7 +48,7 @@ test_conform_simple_fixture_setup (TestConformSimpleFixture *fixture,
g_assert (clutter_init (shared_state->argc_addr, shared_state->argv_addr)
== CLUTTER_INIT_SUCCESS);
#ifdef COGL_HAS_XLIB
#ifdef CLUTTER_WINDOWING_X11
/* A lot of the tests depend on a specific stage / framebuffer size
* when they read pixels back to verify the results of the test.
*