mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
Make ::find_child_by_id() a method of ClutterContainer
Finding a child by its ID is a method that should be used by every container and not only by ClutterGroup. This is needed to actually fix the picking in ClutterStage.
This commit is contained in:
@ -377,3 +377,25 @@ clutter_container_foreach (ClutterContainer *container,
|
||||
CLUTTER_CONTAINER_GET_IFACE (container)->foreach (container, callback, user_data);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_container_find_child_by_id:
|
||||
* @container: a #ClutterContainer
|
||||
* @child_id: the unique id of an actor
|
||||
*
|
||||
* Finds a child actor of a container by its unique ID. Search recurses
|
||||
* into any child container.
|
||||
*
|
||||
* Return value: The child actor with the requested id, or %NULL if no
|
||||
* actor with that id was found
|
||||
*
|
||||
* Since: 0.6
|
||||
*/
|
||||
ClutterActor *
|
||||
clutter_container_find_child_by_id (ClutterContainer *container,
|
||||
guint child_id)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_CONTAINER (container), NULL);
|
||||
|
||||
return CLUTTER_CONTAINER_GET_IFACE (container)->find_child_by_id (container,
|
||||
child_id);
|
||||
}
|
||||
|
Reference in New Issue
Block a user