container: Add child_notify() wrapper
authorEmmanuele Bassi <ebassi@linux.intel.com>
Thu, 30 Sep 2010 13:58:23 +0000 (14:58 +0100)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Thu, 30 Sep 2010 13:58:23 +0000 (14:58 +0100)
The child_notify() virtual function on ClutterContainer does not have a
wrapper for implementations to call.

clutter/clutter-container.c
clutter/clutter-container.h
doc/reference/clutter/clutter-sections.txt

index b18aec5..df063b4 100644 (file)
@@ -1225,3 +1225,31 @@ clutter_container_child_get (ClutterContainer *container,
 
   va_end (var_args);
 }
+
+/**
+ * clutter_container_child_notify:
+ * @container: a #ClutterContainer
+ * @child: a #ClutterActor
+ * @pspec: a #GParamSpec
+ *
+ * Calls the <function>child_notify()</function> virtual function of
+ * #ClutterContainer. The default implementation will emit the
+ * #ClutterContainer::child-notify signal.
+ *
+ * Since: 1.6
+ */
+void
+clutter_container_child_notify (ClutterContainer *container,
+                                ClutterActor     *child,
+                                GParamSpec       *pspec)
+{
+  g_return_if_fail (CLUTTER_IS_CONTAINER (container));
+  g_return_if_fail (CLUTTER_IS_ACTOR (child));
+  g_return_if_fail (pspec != NULL);
+
+  g_return_if_fail (clutter_actor_get_parent (child) == CLUTTER_ACTOR (container));
+
+  CLUTTER_CONTAINER_GET_IFACE (container)->child_notify (container,
+                                                         child,
+                                                         pspec);
+}
index cd89e19..2b5534d 100644 (file)
@@ -202,6 +202,9 @@ void              clutter_container_child_get                   (ClutterContaine
                                                                  const gchar      *first_prop,
                                                                  ...) G_GNUC_NULL_TERMINATED;
 
+void              clutter_container_child_notify                (ClutterContainer *container,
+                                                                 ClutterActor     *child,
+                                                                 GParamSpec       *pspec);
 
 G_END_DECLS
 
index f0109fe..485b77c 100644 (file)
@@ -203,6 +203,7 @@ clutter_container_child_set_property
 clutter_container_child_get_property
 clutter_container_child_set
 clutter_container_child_get
+clutter_container_child_notify
 
 <SUBSECTION>
 clutter_container_create_child_meta