clutter/container: Remove clutter_container_get_children

This one is a trivial wrapper around clutter_actor_get_children(), so just
use that in the two places where clutter_container_get_children() is used,
and remove clutter_container_get_children().

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2057>
This commit is contained in:
Georges Basile Stavracas Neto 2021-09-15 22:55:48 -03:00
parent 8d1105ae6c
commit fbcb078513
3 changed files with 2 additions and 27 deletions

View File

@ -420,28 +420,6 @@ clutter_container_remove_actor (ClutterContainer *container,
container_remove_actor (container, actor); container_remove_actor (container, actor);
} }
/**
* clutter_container_get_children:
* @container: a #ClutterContainer
*
* Retrieves all the children of @container.
*
* Return value: (element-type Clutter.Actor) (transfer container): a list
* of #ClutterActor<!-- -->s. Use g_list_free() on the returned
* list when done.
*
* Since: 0.4
*
* Deprecated: 1.10: Use clutter_actor_get_children() instead.
*/
GList *
clutter_container_get_children (ClutterContainer *container)
{
g_return_val_if_fail (CLUTTER_IS_CONTAINER (container), NULL);
return clutter_actor_get_children (CLUTTER_ACTOR (container));
}
/** /**
* clutter_container_find_child_by_name: * clutter_container_find_child_by_name:
* @container: a #ClutterContainer * @container: a #ClutterContainer
@ -466,7 +444,7 @@ clutter_container_find_child_by_name (ClutterContainer *container,
g_return_val_if_fail (CLUTTER_IS_CONTAINER (container), NULL); g_return_val_if_fail (CLUTTER_IS_CONTAINER (container), NULL);
g_return_val_if_fail (child_name != NULL, NULL); g_return_val_if_fail (child_name != NULL, NULL);
children = clutter_container_get_children (container); children = clutter_actor_get_children (CLUTTER_ACTOR (container));
for (iter = children; iter; iter = g_list_next (iter)) for (iter = children; iter; iter = g_list_next (iter))
{ {

View File

@ -52,9 +52,6 @@ CLUTTER_DEPRECATED_FOR(clutter_actor_remove_child)
void clutter_container_remove_actor (ClutterContainer *container, void clutter_container_remove_actor (ClutterContainer *container,
ClutterActor *actor); ClutterActor *actor);
CLUTTER_DEPRECATED_FOR(clutter_actor_get_children)
GList * clutter_container_get_children (ClutterContainer *container);
G_END_DECLS G_END_DECLS
#endif /* __CLUTTER_CONTAINER_DEPRECATED_H__ */ #endif /* __CLUTTER_CONTAINER_DEPRECATED_H__ */

View File

@ -29,7 +29,7 @@ on_idle (gpointer data)
static int frame_count = 0; static int frame_count = 0;
/* Remove all of the children of the stage */ /* Remove all of the children of the stage */
children = clutter_container_get_children (CLUTTER_CONTAINER (stage)); children = clutter_actor_get_children (stage);
for (node = children; node; node = node->next) for (node = children; node; node = node->next)
clutter_container_remove_actor (CLUTTER_CONTAINER (stage), clutter_container_remove_actor (CLUTTER_CONTAINER (stage),
CLUTTER_ACTOR (node->data)); CLUTTER_ACTOR (node->data));