Use G_DEFINE_BOXED_TYPE for all boxed types

We actually need a couple more macros for registering GValue
transformation functions. Those should be added to upstream
GLib.
This commit is contained in:
Emmanuele Bassi
2010-10-08 15:21:57 +01:00
parent 09a830d294
commit 7dd09e2186
13 changed files with 123 additions and 280 deletions

View File

@ -51,6 +51,10 @@ typedef struct _ClutterEventPrivate {
static GHashTable *all_events = NULL;
G_DEFINE_BOXED_TYPE (ClutterEvent, clutter_event,
clutter_event_copy,
clutter_event_free);
static gboolean
is_event_allocated (const ClutterEvent *event)
{
@ -630,18 +634,6 @@ clutter_event_get_device (const ClutterEvent *event)
return device;
}
GType
clutter_event_get_type (void)
{
static GType our_type = 0;
if (!our_type)
our_type = g_boxed_type_register_static (I_("ClutterEvent"),
(GBoxedCopyFunc) clutter_event_copy,
(GBoxedFreeFunc) clutter_event_free);
return our_type;
}
/**
* clutter_event_new:
* @type: The type of event.