Add internal constructor function for each backend

We're going to use it to create an instance of each backend without
using the get_type() function.
This commit is contained in:
Emmanuele Bassi
2015-12-11 14:23:38 +00:00
parent 407d7ca436
commit 7ca28e0974
14 changed files with 67 additions and 21 deletions

View File

@ -56,8 +56,6 @@
#include <cogl/cogl.h>
#include <cogl/cogl-wayland-client.h>
#define clutter_backend_wayland_get_type _clutter_backend_wayland_get_type
G_DEFINE_TYPE (ClutterBackendWayland, clutter_backend_wayland, CLUTTER_TYPE_BACKEND);
static struct wl_display *_foreign_display = NULL;
@ -322,6 +320,12 @@ clutter_backend_wayland_init (ClutterBackendWayland *backend_wayland)
{
}
ClutterBackend *
clutter_backend_wayland_new (void)
{
return g_object_new (CLUTTER_TYPE_BACKEND_WAYLAND, NULL);
}
/**
* clutter_wayland_set_display
* @display: pointer to a wayland display