*/backend: Clean up the stage creation

Use the default implementation of create_stage() wherever possible.
This commit is contained in:
Emmanuele Bassi 2011-11-04 19:01:32 +00:00
parent 828ca2982f
commit cd1e8da07f
6 changed files with 0 additions and 92 deletions

View File

@ -100,32 +100,6 @@ clutter_backend_cex100_dispose (GObject *gobject)
G_OBJECT_CLASS (clutter_backend_cex100_parent_class)->dispose (gobject);
}
static ClutterStageWindow *
clutter_backend_cex100_create_stage (ClutterBackend *backend,
ClutterStage *wrapper,
GError **error)
{
ClutterBackendCex100 *backend_cex100 = CLUTTER_BACKEND_CEX100 (backend);
ClutterStageWindow *stage;
if (G_UNLIKELY (backend_cex100->stage != NULL))
{
g_set_error (error, CLUTTER_INIT_ERROR,
CLUTTER_INIT_ERROR_BACKEND,
"The Cex100 backend does not support multiple "
"onscreen windows");
return backend_cex100->stage;
}
stage = g_object_new (CLUTTER_TYPE_STAGE_COGL,
"backend", backend,
"wrapper", wrapper,
NULL);
backend_cex100->stage = stage;
return stage;
}
static CoglDisplay *
clutter_backend_cex100_get_display (ClutterBackend *backend,
CoglRenderer *renderer,
@ -172,7 +146,6 @@ clutter_backend_cex100_class_init (ClutterBackendCex100Class *klass)
backend_class->stage_window_type = CLUTTER_TYPE_STAGE_COGL;
backend_class->get_device_manager = clutter_backend_cex100_get_device_manager;
backend_class->create_stage = clutter_backend_cex100_create_stage;
backend_class->get_display = clutter_backend_cex100_get_display;
}

View File

@ -49,9 +49,6 @@ struct _ClutterBackendCex100
{
ClutterBackend parent_instance;
/* main stage singleton */
ClutterStageWindow *stage;
/* device manager (ie evdev) */
ClutterDeviceManager *device_manager;

View File

@ -95,32 +95,6 @@ clutter_backend_egl_native_dispose (GObject *gobject)
G_OBJECT_CLASS (clutter_backend_egl_native_parent_class)->dispose (gobject);
}
static ClutterStageWindow *
clutter_backend_egl_native_create_stage (ClutterBackend *backend,
ClutterStage *wrapper,
GError **error)
{
ClutterBackendEglNative *backend_egl_native = CLUTTER_BACKEND_EGL_NATIVE (backend);
ClutterStageWindow *stage;
if (G_UNLIKELY (backend_egl_native->stage != NULL))
{
g_set_error (error, CLUTTER_INIT_ERROR,
CLUTTER_INIT_ERROR_BACKEND,
"The EglNative backend does not support multiple "
"onscreen windows");
return backend_egl_native->stage;
}
stage = g_object_new (CLUTTER_TYPE_STAGE_COGL,
"backend", backend,
"wrapper", wrapper,
NULL);
backend_egl_native->stage = stage;
return stage;
}
static void
clutter_backend_egl_native_class_init (ClutterBackendEglNativeClass *klass)
{
@ -132,7 +106,6 @@ clutter_backend_egl_native_class_init (ClutterBackendEglNativeClass *klass)
backend_class->stage_window_type = CLUTTER_TYPE_STAGE_COGL;
backend_class->get_device_manager = clutter_backend_egl_native_get_device_manager;
backend_class->create_stage = clutter_backend_egl_native_create_stage;
}
static void

View File

@ -49,9 +49,6 @@ struct _ClutterBackendEglNative
{
ClutterBackend parent_instance;
/* main stage singleton */
ClutterStageWindow *stage;
/* device manager (ie evdev) */
ClutterDeviceManager *device_manager;

View File

@ -367,17 +367,6 @@ clutter_backend_gdk_get_display (ClutterBackend *backend,
return display;
}
static ClutterStageWindow *
clutter_backend_gdk_create_stage (ClutterBackend *backend,
ClutterStage *wrapper,
GError **error)
{
return g_object_new (CLUTTER_TYPE_STAGE_GDK,
"backend", backend,
"wrapper", wrapper,
NULL);
}
static void
clutter_backend_gdk_class_init (ClutterBackendGdkClass *klass)
{
@ -398,7 +387,6 @@ clutter_backend_gdk_class_init (ClutterBackendGdkClass *klass)
backend_class->get_renderer = clutter_backend_gdk_get_renderer;
backend_class->get_display = clutter_backend_gdk_get_display;
backend_class->create_stage = clutter_backend_gdk_create_stage;
}
static void

View File

@ -168,25 +168,6 @@ clutter_backend_win32_get_features (ClutterBackend *backend)
| CLUTTER_FEATURE_STAGE_CURSOR;
}
static ClutterStageWindow *
clutter_backend_win32_create_stage (ClutterBackend *backend,
ClutterStage *wrapper,
GError **error)
{
ClutterBackendWin32 *backend_win32 = CLUTTER_BACKEND_WIN32 (backend);
ClutterStageWin32 *stage_win32;
ClutterStageWindow *stage;
stage = g_object_new (CLUTTER_TYPE_STAGE_WIN32, NULL);
/* copy backend data into the stage */
stage_win32 = CLUTTER_STAGE_WIN32 (stage);
stage_win32->backend = backend_win32;
stage_win32->wrapper = wrapper;
return stage;
}
static ClutterDeviceManager *
clutter_backend_win32_get_device_manager (ClutterBackend *backend)
{
@ -239,7 +220,6 @@ clutter_backend_win32_class_init (ClutterBackendWin32Class *klass)
backend_class->stage_window_type = CLUTTER_TYPE_STAGE_WIN32;
backend_class->init_events = clutter_backend_win32_init_events;
backend_class->create_stage = clutter_backend_win32_create_stage;
backend_class->add_options = clutter_backend_win32_add_options;
backend_class->get_features = clutter_backend_win32_get_features;
backend_class->get_device_manager = clutter_backend_win32_get_device_manager;