2008-08-06 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-child-meta.c: (clutter_child_meta_set_property), (clutter_child_meta_class_init): Make the :container and :actor properties of ChildMeta construct-only, to allow bindings to actually use ChildMeta without abusing the API. * clutter/clutter-container.c (create_child_meta): Instead of setting the members of the ChildMeta structure, use the constructor properties.
This commit is contained in:
parent
265f72ff2b
commit
3e31f02211
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
|||||||
|
2008-08-06 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
|
* clutter/clutter-child-meta.c:
|
||||||
|
(clutter_child_meta_set_property),
|
||||||
|
(clutter_child_meta_class_init): Make the :container and
|
||||||
|
:actor properties of ChildMeta construct-only, to allow
|
||||||
|
bindings to actually use ChildMeta without abusing the API.
|
||||||
|
|
||||||
|
* clutter/clutter-container.c (create_child_meta): Instead of
|
||||||
|
setting the members of the ChildMeta structure, use the
|
||||||
|
constructor properties.
|
||||||
|
|
||||||
2008-08-04 Emmanuele Bassi <ebassi@openedhand.com>
|
2008-08-04 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
* clutter/clutter-keysyms.h: Resync with keysymdef.h inside Xorg.
|
* clutter/clutter-keysyms.h: Resync with keysymdef.h inside Xorg.
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
#include "clutter-debug.h"
|
#include "clutter-debug.h"
|
||||||
#include "clutter-private.h"
|
#include "clutter-private.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (ClutterChildMeta, clutter_child_meta, G_TYPE_OBJECT);
|
G_DEFINE_ABSTRACT_TYPE (ClutterChildMeta, clutter_child_meta, G_TYPE_OBJECT);
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
@ -57,6 +57,30 @@ enum
|
|||||||
PROP_ACTOR
|
PROP_ACTOR
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void
|
||||||
|
clutter_child_meta_set_property (GObject *object,
|
||||||
|
guint prop_id,
|
||||||
|
const GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
ClutterChildMeta *child_meta = CLUTTER_CHILD_META (object);
|
||||||
|
|
||||||
|
switch (prop_id)
|
||||||
|
{
|
||||||
|
case PROP_CONTAINER:
|
||||||
|
child_meta->container = g_value_get_object (value);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PROP_ACTOR:
|
||||||
|
child_meta->actor = g_value_get_object (value);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_child_meta_get_property (GObject *object,
|
clutter_child_meta_get_property (GObject *object,
|
||||||
guint prop_id,
|
guint prop_id,
|
||||||
@ -87,6 +111,7 @@ clutter_child_meta_class_init (ClutterChildMetaClass *klass)
|
|||||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||||
GParamSpec *pspec;
|
GParamSpec *pspec;
|
||||||
|
|
||||||
|
gobject_class->set_property = clutter_child_meta_set_property;
|
||||||
gobject_class->get_property = clutter_child_meta_get_property;
|
gobject_class->get_property = clutter_child_meta_get_property;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -100,7 +125,8 @@ clutter_child_meta_class_init (ClutterChildMetaClass *klass)
|
|||||||
"Container",
|
"Container",
|
||||||
"The container that created this data",
|
"The container that created this data",
|
||||||
CLUTTER_TYPE_CONTAINER,
|
CLUTTER_TYPE_CONTAINER,
|
||||||
CLUTTER_PARAM_READABLE);
|
G_PARAM_CONSTRUCT_ONLY |
|
||||||
|
CLUTTER_PARAM_READWRITE);
|
||||||
g_object_class_install_property (gobject_class, PROP_CONTAINER, pspec);
|
g_object_class_install_property (gobject_class, PROP_CONTAINER, pspec);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -114,7 +140,8 @@ clutter_child_meta_class_init (ClutterChildMetaClass *klass)
|
|||||||
"Actor",
|
"Actor",
|
||||||
"The actor wrapped by this data",
|
"The actor wrapped by this data",
|
||||||
CLUTTER_TYPE_ACTOR,
|
CLUTTER_TYPE_ACTOR,
|
||||||
CLUTTER_PARAM_READABLE);
|
G_PARAM_CONSTRUCT_ONLY |
|
||||||
|
CLUTTER_PARAM_READWRITE);
|
||||||
g_object_class_install_property (gobject_class, PROP_ACTOR, pspec);
|
g_object_class_install_property (gobject_class, PROP_ACTOR, pspec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -641,9 +641,10 @@ create_child_meta (ClutterContainer *container,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
child_meta = g_object_new (iface->child_meta_type, NULL);
|
child_meta = g_object_new (iface->child_meta_type,
|
||||||
child_meta->container = container;
|
"container", container,
|
||||||
child_meta->actor = actor;
|
"actor", actor,
|
||||||
|
NULL);
|
||||||
|
|
||||||
data_list = g_object_get_qdata (G_OBJECT (container), quark_child_meta);
|
data_list = g_object_get_qdata (G_OBJECT (container), quark_child_meta);
|
||||||
data_list = g_slist_prepend (data_list, child_meta);
|
data_list = g_slist_prepend (data_list, child_meta);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user