mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 08:30:42 -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
|
||||
clutter_group_get_n_children (ClutterGroup *self)
|
||||
{
|
||||
GList *children;
|
||||
gint retval;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_GROUP (self), 0);
|
||||
|
||||
children = clutter_actor_get_children (CLUTTER_ACTOR (self));
|
||||
retval = g_list_length (children);
|
||||
|
||||
g_list_free (children);
|
||||
|
||||
return retval;
|
||||
return clutter_actor_get_n_children (CLUTTER_ACTOR (self));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -275,18 +267,12 @@ ClutterActor *
|
||||
clutter_group_get_nth_child (ClutterGroup *self,
|
||||
gint index_)
|
||||
{
|
||||
ClutterActor *retval;
|
||||
GList *children;
|
||||
ClutterActor *actor;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_GROUP (self), NULL);
|
||||
|
||||
children = clutter_actor_get_children (CLUTTER_ACTOR (self));
|
||||
if (children == NULL)
|
||||
return NULL;
|
||||
actor = CLUTTER_ACTOR (self);
|
||||
g_return_val_if_fail (index_ <= clutter_actor_get_n_children (actor), NULL);
|
||||
|
||||
retval = g_list_nth_data (children, index_);
|
||||
|
||||
g_list_free (children);
|
||||
|
||||
return retval;
|
||||
return clutter_actor_get_child_at_index (actor, index_);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user