mirror of
https://github.com/brl/mutter.git
synced 2024-11-27 10:30:47 -05:00
group: Proxy last few methods to Actor
At this point, ClutterGroup is basically just a shim layer on top of ClutterActor.
This commit is contained in:
parent
4acf8de8b4
commit
8caee3e97e
@ -246,17 +246,9 @@ clutter_group_remove_all (ClutterGroup *self)
|
|||||||
gint
|
gint
|
||||||
clutter_group_get_n_children (ClutterGroup *self)
|
clutter_group_get_n_children (ClutterGroup *self)
|
||||||
{
|
{
|
||||||
GList *children;
|
|
||||||
gint retval;
|
|
||||||
|
|
||||||
g_return_val_if_fail (CLUTTER_IS_GROUP (self), 0);
|
g_return_val_if_fail (CLUTTER_IS_GROUP (self), 0);
|
||||||
|
|
||||||
children = clutter_actor_get_children (CLUTTER_ACTOR (self));
|
return clutter_actor_get_n_children (CLUTTER_ACTOR (self));
|
||||||
retval = g_list_length (children);
|
|
||||||
|
|
||||||
g_list_free (children);
|
|
||||||
|
|
||||||
return retval;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -275,18 +267,12 @@ ClutterActor *
|
|||||||
clutter_group_get_nth_child (ClutterGroup *self,
|
clutter_group_get_nth_child (ClutterGroup *self,
|
||||||
gint index_)
|
gint index_)
|
||||||
{
|
{
|
||||||
ClutterActor *retval;
|
ClutterActor *actor;
|
||||||
GList *children;
|
|
||||||
|
|
||||||
g_return_val_if_fail (CLUTTER_IS_GROUP (self), NULL);
|
g_return_val_if_fail (CLUTTER_IS_GROUP (self), NULL);
|
||||||
|
|
||||||
children = clutter_actor_get_children (CLUTTER_ACTOR (self));
|
actor = CLUTTER_ACTOR (self);
|
||||||
if (children == NULL)
|
g_return_val_if_fail (index_ <= clutter_actor_get_n_children (actor), NULL);
|
||||||
return NULL;
|
|
||||||
|
|
||||||
retval = g_list_nth_data (children, index_);
|
return clutter_actor_get_child_at_index (actor, index_);
|
||||||
|
|
||||||
g_list_free (children);
|
|
||||||
|
|
||||||
return retval;
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user