cogl_source_h =
cogl_source_c = \
- $(srcdir)/cogl/clutter-backend-cogl.c \
$(srcdir)/cogl/clutter-stage-cogl.c \
$(NULL)
cogl_source_h_priv = \
- $(srcdir)/cogl/clutter-backend-cogl.h \
$(srcdir)/cogl/clutter-stage-cogl.h \
$(NULL)
+++ /dev/null
-/*
- * 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
- * Emmanuele Bassi
- * Robert Bragg
- * Neil Roberts
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-#include <errno.h>
-
-#include "clutter-backend-cogl.h"
-#include "clutter-stage-cogl.h"
-
-#include "clutter-debug.h"
-#include "clutter-private.h"
-#include "clutter-main.h"
-#include "clutter-stage-private.h"
-
-static ClutterBackendCogl *backend_singleton = NULL;
-
-G_DEFINE_TYPE (ClutterBackendCogl, _clutter_backend_cogl, CLUTTER_TYPE_BACKEND);
-
-static void
-clutter_backend_cogl_finalize (GObject *gobject)
-{
- if (backend_singleton)
- backend_singleton = NULL;
-
- G_OBJECT_CLASS (_clutter_backend_cogl_parent_class)->finalize (gobject);
-}
-
-static void
-clutter_backend_cogl_dispose (GObject *gobject)
-{
- ClutterBackend *backend = CLUTTER_BACKEND (gobject);
-
- if (backend->cogl_context)
- {
- cogl_object_unref (backend->cogl_context);
- backend->cogl_context = NULL;
- }
-
- G_OBJECT_CLASS (_clutter_backend_cogl_parent_class)->dispose (gobject);
-}
-
-static GObject *
-clutter_backend_cogl_constructor (GType gtype,
- guint n_params,
- GObjectConstructParam *params)
-{
- GObjectClass *parent_class;
- GObject *retval;
-
- if (backend_singleton == NULL)
- {
- parent_class = G_OBJECT_CLASS (_clutter_backend_cogl_parent_class);
- retval = parent_class->constructor (gtype, n_params, params);
-
- backend_singleton = CLUTTER_BACKEND_COGL (retval);
-
- return retval;
- }
-
- g_warning ("Attempting to create a new backend object. This should "
- "never happen, so we return the singleton instance.");
-
- return g_object_ref (backend_singleton);
-}
-
-static void
-_clutter_backend_cogl_class_init (ClutterBackendCoglClass *klass)
-{
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-
- gobject_class->constructor = clutter_backend_cogl_constructor;
- gobject_class->dispose = clutter_backend_cogl_dispose;
- gobject_class->finalize = clutter_backend_cogl_finalize;
-}
-
-static void
-_clutter_backend_cogl_init (ClutterBackendCogl *backend_cogl)
-{
-}
+++ /dev/null
-/* Clutter.
- * An OpenGL based 'interactive canvas' library.
- *
- * Copyright (C) 2006, 2007 OpenedHand
- * Copyright (C) 2010 Intel Corp
- *
- * 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
- */
-
-#ifndef __CLUTTER_BACKEND_COGL_H__
-#define __CLUTTER_BACKEND_COGL_H__
-
-#include <glib-object.h>
-#include <clutter/clutter-event.h>
-#include <clutter/clutter-backend.h>
-#include <clutter/clutter-device-manager.h>
-
-#ifdef COGL_HAS_XLIB_SUPPORT
-#include <X11/Xlib.h>
-#include <X11/Xatom.h>
-#endif
-
-#include "clutter-backend-private.h"
-
-G_BEGIN_DECLS
-
-#define CLUTTER_TYPE_BACKEND_COGL (_clutter_backend_cogl_get_type ())
-#define CLUTTER_BACKEND_COGL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_BACKEND_COGL, ClutterBackendCogl))
-#define CLUTTER_IS_BACKEND_COGL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_BACKEND_COGL))
-#define CLUTTER_BACKEND_COGL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_BACKEND_COGL, ClutterBackendCoglClass))
-#define CLUTTER_IS_BACKEND_COGL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_BACKEND_COGL))
-#define CLUTTER_BACKEND_COGL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_BACKEND_COGL, ClutterBackendCoglClass))
-
-typedef struct _ClutterBackendCogl ClutterBackendCogl;
-typedef struct _ClutterBackendCoglClass ClutterBackendCoglClass;
-
-struct _ClutterBackendCogl
-{
- ClutterBackend parent_instance;
-
- gboolean can_blit_sub_buffer;
-};
-
-struct _ClutterBackendCoglClass
-{
- ClutterBackendClass parent_class;
-};
-
-GType _clutter_backend_cogl_get_type (void) G_GNUC_CONST;
-
-G_END_DECLS
-
-#endif /* __CLUTTER_BACKEND_COGL_H__ */
#include "clutter-config.h"
#include "clutter-stage-cogl.h"
-#include "clutter-backend-cogl.h"
+#include "clutter-actor-private.h"
+#include "clutter-backend-private.h"
#include "clutter-debug.h"
#include "clutter-event.h"
#include "clutter-enum-types.h"
#include "clutter-feature.h"
#include "clutter-main.h"
#include "clutter-private.h"
-#include "clutter-actor-private.h"
#include "clutter-stage-private.h"
#include "clutter-util.h"
switch (prop_id)
{
case PROP_WRAPPER:
- self->wrapper = CLUTTER_STAGE (g_value_get_object (value));
+ self->wrapper = g_value_get_object (value);
break;
case PROP_BACKEND:
- self->backend = CLUTTER_BACKEND_COGL (g_value_get_object (value));
+ self->backend = g_value_get_object (value);
break;
default:
g_param_spec_object ("backend",
"ClutterBackend",
"The Clutter backend singleton",
- CLUTTER_TYPE_BACKEND_COGL,
+ CLUTTER_TYPE_BACKEND,
CLUTTER_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}
#ifndef __CLUTTER_STAGE_COGL_H__
#define __CLUTTER_STAGE_COGL_H__
-#include <glib-object.h>
#include <cairo.h>
+#include <clutter/clutter-backend.h>
#include <clutter/clutter-stage.h>
#ifdef COGL_HAS_X11_SUPPORT
#include <X11/Xutil.h>
#endif
-#include "clutter-backend-cogl.h"
-
G_BEGIN_DECLS
#define CLUTTER_TYPE_STAGE_COGL (_clutter_stage_cogl_get_type ())
GObject parent_instance;
/* the stage wrapper */
- ClutterStage *wrapper;
+ ClutterStage *wrapper;
/* back pointer to the backend */
- ClutterBackendCogl *backend;
+ ClutterBackend *backend;
CoglOnscreen *onscreen;
#define clutter_backend_egl_native_get_type _clutter_backend_egl_native_get_type
-G_DEFINE_TYPE (ClutterBackendEglNative, clutter_backend_egl_native, CLUTTER_TYPE_BACKEND_COGL);
+G_DEFINE_TYPE (ClutterBackendEglNative, clutter_backend_egl_native, CLUTTER_TYPE_BACKEND);
static ClutterDeviceManager *
clutter_backend_egl_native_get_device_manager (ClutterBackend *backend)
#include <clutter/clutter-device-manager.h>
#include "clutter-backend-private.h"
-#include "cogl/clutter-backend-cogl.h"
G_BEGIN_DECLS
struct _ClutterBackendEglNative
{
- ClutterBackendCogl parent_instance;
+ ClutterBackend parent_instance;
/* main stage singleton */
ClutterStageWindow *stage;
struct _ClutterBackendEglNativeClass
{
- ClutterBackendCoglClass parent_class;
+ ClutterBackendClass parent_class;
};
GType _clutter_backend_egl_native_get_type (void) G_GNUC_CONST;
#include "clutter-private.h"
#define clutter_backend_gdk_get_type _clutter_backend_gdk_get_type
-G_DEFINE_TYPE (ClutterBackendGdk, clutter_backend_gdk, CLUTTER_TYPE_BACKEND_COGL);
+G_DEFINE_TYPE (ClutterBackendGdk, clutter_backend_gdk, CLUTTER_TYPE_BACKEND);
/* global for pre init setup calls */
static GdkDisplay *_foreign_dpy = NULL;
#include "clutter-gdk.h"
#include "clutter-backend-private.h"
-#include "cogl/clutter-backend-cogl.h"
G_BEGIN_DECLS
struct _ClutterBackendGdk
{
- ClutterBackendCogl parent_instance;
+ ClutterBackend parent_instance;
GdkDisplay *display;
GdkScreen *screen;
struct _ClutterBackendGdkClass
{
- ClutterBackendCoglClass parent_class;
+ ClutterBackendClass parent_class;
/* nothing here, for now */
};
#define clutter_backend_x11_get_type _clutter_backend_x11_get_type
-G_DEFINE_TYPE (ClutterBackendX11, clutter_backend_x11, CLUTTER_TYPE_BACKEND_COGL);
+G_DEFINE_TYPE (ClutterBackendX11, clutter_backend_x11, CLUTTER_TYPE_BACKEND);
/* atoms; remember to add the code that assigns the atom value to
* the member of the ClutterBackendX11 structure if you add an
#include "clutter-backend-private.h"
#include "clutter-keymap-x11.h"
-#include "cogl/clutter-backend-cogl.h"
#include "xsettings/xsettings-client.h"
struct _ClutterBackendX11
{
- ClutterBackendCogl parent_instance;
+ ClutterBackend parent_instance;
Display *xdpy;
gchar *display_name;
struct _ClutterBackendX11Class
{
- ClutterBackendCoglClass parent_class;
+ ClutterBackendClass parent_class;
};
GType _clutter_backend_x11_get_type (void) G_GNUC_CONST;
clutter_stage_x11_dispose (GObject *gobject)
{
ClutterEventTranslator *translator = CLUTTER_EVENT_TRANSLATOR (gobject);
- ClutterBackendCogl *backend = CLUTTER_STAGE_COGL (gobject)->backend;
+ ClutterBackend *backend = CLUTTER_STAGE_COGL (gobject)->backend;
- _clutter_backend_remove_event_translator (CLUTTER_BACKEND (backend),
- translator);
+ _clutter_backend_remove_event_translator (backend, translator);
G_OBJECT_CLASS (clutter_stage_x11_parent_class)->dispose (gobject);
}