Clutter.Container

g Clutter.Container Clutter.Container GObject.GInterface GObject.GInterface GObject.GInterface->Clutter.Container

Implementations:
 Clutter.Actor

Methods

class class_find_child_property (klass, property_name)
class class_list_child_properties (klass)
  add_actor (actor)
  child_get_property (child, property, value)
  child_notify (child, pspec)
  child_set_property (child, property, value)
  create_child_meta (actor)
  destroy_child_meta (actor)
  find_child_by_name (child_name)
  foreach (callback, *user_data)
  foreach_with_internals (callback, *user_data)
  get_child_meta (actor)
  get_children ()
  lower_child (actor, sibling)
  raise_child (actor, sibling)
  remove_actor (actor)
  sort_depth_order ()

Virtual Methods

  do_actor_added (actor)
  do_actor_removed (actor)
  do_add (actor)
  do_child_notify (child, pspec)
  do_create_child_meta (actor)
  do_destroy_child_meta (actor)
  do_foreach (callback, *user_data)
  do_foreach_with_internals (callback, *user_data)
  do_get_child_meta (actor)
  do_lower (actor, sibling)
  do_raise_ (actor, sibling)
  do_remove (actor)
  do_sort_depth_order ()

Properties

None

Signals

Name Short Description
actor-added The ::actor-added signal is emitted each time an actor has been added to container.
actor-removed The ::actor-removed signal is emitted each time an actor is removed from container.
child-notify The ::child-notify signal is emitted each time a property is being set through the clutter_container_child_set() and Clutter.Container.child_set_property() calls.

Fields

None

Class Details

class Clutter.Container
Bases:GObject.GInterface
Structure:Clutter.ContainerIface

Clutter.Container is an opaque structure whose members cannot be directly accessed

New in version 0.4.

classmethod class_find_child_property(klass, property_name)
Parameters:
Returns:

The GObject.ParamSpec for the property or None if no such property exist.

Return type:

GObject.ParamSpec

Looks up the GObject.ParamSpec for a child property of klass.

New in version 0.8.

classmethod class_list_child_properties(klass)
Parameters:klass (GObject.ObjectClass) – a GObject.ObjectClass implementing the Clutter.Container interface.
Returns:an array of GObject.ParamSpec s which should be freed after use.
Return type:[GObject.ParamSpec]

Returns an array of GObject.ParamSpec for all child properties.

New in version 0.8.

add_actor(actor)
Parameters:actor (Clutter.Actor) – the first Clutter.Actor to add

Adds a Clutter.Actor to self. This function will emit the “actor-added” signal. The actor should be parented to self. You cannot add a Clutter.Actor to more than one Clutter.Container.

This function will call Clutter.Container.do_add(), which is a deprecated virtual function. The default implementation will call Clutter.Actor.add_child().

New in version 0.4.

Deprecated since version 1.10: Use Clutter.Actor.add_child() instead.

child_get_property(child, property, value)
Parameters:

Gets a container specific property of a child of self, In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset().

Note that Clutter.Container.child_set_property() is really intended for language bindings, clutter_container_child_set() is much more convenient for C programming.

New in version 0.8.

child_notify(child, pspec)
Parameters:

Calls the Clutter.Container.do_child_notify() virtual function of Clutter.Container. The default implementation will emit the Clutter.Container ::child-notify signal.

New in version 1.6.

child_set_property(child, property, value)
Parameters:

Sets a container-specific property on a child of self.

New in version 0.8.

create_child_meta(actor)
Parameters:actor (Clutter.Actor) – a Clutter.Actor

Creates the Clutter.ChildMeta wrapping actor inside the self, if the #ClutterContainerIface::child_meta_type class member is not set to GObject.TYPE_INVALID.

This function is only useful when adding a Clutter.Actor to a Clutter.Container implementation outside of the Clutter.Container ::add() virtual function implementation.

Applications should not call this function.

New in version 1.2.

destroy_child_meta(actor)
Parameters:actor (Clutter.Actor) – a Clutter.Actor

Destroys the Clutter.ChildMeta wrapping actor inside the self, if any.

This function is only useful when removing a Clutter.Actor to a Clutter.Container implementation outside of the Clutter.Container ::add() virtual function implementation.

Applications should not call this function.

New in version 1.2.

find_child_by_name(child_name)
Parameters:child_name (str) – the name of the requested child.
Returns:The child actor with the requested name, or None if no actor with that name was found.
Return type:Clutter.Actor

Finds a child actor of a container by its name. Search recurses into any child container.

New in version 0.6.

foreach(callback, *user_data)
Parameters:

Calls callback for each child of self that was added by the application (with Clutter.Container.add_actor()). Does not iterate over “internal” children that are part of the container’s own implementation, if any.

This function calls the Clutter.Container.do_foreach() virtual function, which has been deprecated.

New in version 0.4.

Deprecated since version 1.10: Use Clutter.Actor.get_first_child() or Clutter.Actor.get_last_child() to retrieve the beginning of the list of children, and Clutter.Actor.get_next_sibling() and Clutter.Actor.get_previous_sibling() to iterate over it; alternatively, use the Clutter.ActorIter API.

foreach_with_internals(callback, *user_data)
Parameters:

Calls callback for each child of self, including “internal” children built in to the container itself that were never added by the application.

This function calls the Clutter.Container.do_foreach_with_internals() virtual function, which has been deprecated.

New in version 1.0.

Deprecated since version 1.10: See Clutter.Container.foreach().

get_child_meta(actor)
Parameters:actor (Clutter.Actor) – a Clutter.Actor that is a child of self.
Returns:the Clutter.ChildMeta for the actor child of self or None if the specifiec actor does not exist or the container is not configured to provide Clutter.ChildMeta s
Return type:Clutter.ChildMeta

Retrieves the Clutter.ChildMeta which contains the data about the self specific state for actor.

New in version 0.8.

get_children()
Returns:a list of Clutter.Actor s. Use g_list_free() on the returned list when done.
Return type:[Clutter.Actor]

Retrieves all the children of self.

New in version 0.4.

Deprecated since version 1.10: Use Clutter.Actor.get_children() instead.

lower_child(actor, sibling)
Parameters:

Lowers actor to sibling level, in the depth ordering.

This function calls the Clutter.Container.do_lower() virtual function, which has been deprecated. The default implementation will call Clutter.Actor.set_child_below_sibling().

New in version 0.6.

Deprecated since version 1.10: Use Clutter.Actor.set_child_below_sibling() instead.

raise_child(actor, sibling)
Parameters:

Raises actor to sibling level, in the depth ordering.

This function calls the Clutter.Container.do_raise() virtual function, which has been deprecated. The default implementation will call Clutter.Actor.set_child_above_sibling().

New in version 0.6.

Deprecated since version 1.10: Use Clutter.Actor.set_child_above_sibling() instead.

remove_actor(actor)
Parameters:actor (Clutter.Actor) – a Clutter.Actor

Removes actor from self. The actor should be unparented, so if you want to keep it around you must hold a reference to it yourself, using GObject.Object.ref(). When the actor has been removed, the “actor-removed” signal is emitted by self.

This function will call Clutter.Container.do_remove(), which is a deprecated virtual function. The default implementation will call Clutter.Actor.remove_child().

New in version 0.4.

Deprecated since version 1.10: Use Clutter.Actor.remove_child() instead.

sort_depth_order()

Sorts a container’s children using their depth. This function should not be normally used by applications.

New in version 0.6.

Deprecated since version 1.10: The Clutter.Container.do_sort_depth_order() virtual function should not be used any more; the default implementation in Clutter.Container does not do anything.

do_actor_added(actor) virtual
Parameters:actor (Clutter.Actor) –
do_actor_removed(actor) virtual
Parameters:actor (Clutter.Actor) –
do_add(actor) virtual
Parameters:actor (Clutter.Actor) – the first Clutter.Actor to add

Adds a Clutter.Actor to container. This function will emit the “actor-added” signal. The actor should be parented to container. You cannot add a Clutter.Actor to more than one Clutter.Container.

This function will call Clutter.Container.do_add(), which is a deprecated virtual function. The default implementation will call Clutter.Actor.add_child().

New in version 0.4.

Deprecated since version 1.10: Use Clutter.Actor.add_child() instead.

do_child_notify(child, pspec) virtual
Parameters:

Calls the Clutter.Container.do_child_notify() virtual function of Clutter.Container. The default implementation will emit the Clutter.Container ::child-notify signal.

New in version 1.6.

do_create_child_meta(actor) virtual
Parameters:actor (Clutter.Actor) – a Clutter.Actor

Creates the Clutter.ChildMeta wrapping actor inside the container, if the #ClutterContainerIface::child_meta_type class member is not set to GObject.TYPE_INVALID.

This function is only useful when adding a Clutter.Actor to a Clutter.Container implementation outside of the Clutter.Container ::add() virtual function implementation.

Applications should not call this function.

New in version 1.2.

do_destroy_child_meta(actor) virtual
Parameters:actor (Clutter.Actor) – a Clutter.Actor

Destroys the Clutter.ChildMeta wrapping actor inside the container, if any.

This function is only useful when removing a Clutter.Actor to a Clutter.Container implementation outside of the Clutter.Container ::add() virtual function implementation.

Applications should not call this function.

New in version 1.2.

do_foreach(callback, *user_data) virtual
Parameters:

Calls callback for each child of container that was added by the application (with Clutter.Container.add_actor()). Does not iterate over “internal” children that are part of the container’s own implementation, if any.

This function calls the Clutter.Container.do_foreach() virtual function, which has been deprecated.

New in version 0.4.

Deprecated since version 1.10: Use Clutter.Actor.get_first_child() or Clutter.Actor.get_last_child() to retrieve the beginning of the list of children, and Clutter.Actor.get_next_sibling() and Clutter.Actor.get_previous_sibling() to iterate over it; alternatively, use the Clutter.ActorIter API.

do_foreach_with_internals(callback, *user_data) virtual
Parameters:

Calls callback for each child of container, including “internal” children built in to the container itself that were never added by the application.

This function calls the Clutter.Container.do_foreach_with_internals() virtual function, which has been deprecated.

New in version 1.0.

Deprecated since version 1.10: See Clutter.Container.foreach().

do_get_child_meta(actor) virtual
Parameters:actor (Clutter.Actor) – a Clutter.Actor that is a child of container.
Returns:the Clutter.ChildMeta for the actor child of container or None if the specifiec actor does not exist or the container is not configured to provide Clutter.ChildMeta s
Return type:Clutter.ChildMeta

Retrieves the Clutter.ChildMeta which contains the data about the container specific state for actor.

New in version 0.8.

do_lower(actor, sibling) virtual
Parameters:

Lowers actor to sibling level, in the depth ordering.

This function calls the Clutter.Container.do_lower() virtual function, which has been deprecated. The default implementation will call Clutter.Actor.set_child_below_sibling().

New in version 0.6.

Deprecated since version 1.10: Use Clutter.Actor.set_child_below_sibling() instead.

do_raise_(actor, sibling) virtual
Parameters:

Raises actor to sibling level, in the depth ordering.

This function calls the Clutter.Container.do_raise() virtual function, which has been deprecated. The default implementation will call Clutter.Actor.set_child_above_sibling().

New in version 0.6.

Deprecated since version 1.10: Use Clutter.Actor.set_child_above_sibling() instead.

do_remove(actor) virtual
Parameters:actor (Clutter.Actor) – a Clutter.Actor

Removes actor from container. The actor should be unparented, so if you want to keep it around you must hold a reference to it yourself, using GObject.Object.ref(). When the actor has been removed, the “actor-removed” signal is emitted by container.

This function will call Clutter.Container.do_remove(), which is a deprecated virtual function. The default implementation will call Clutter.Actor.remove_child().

New in version 0.4.

Deprecated since version 1.10: Use Clutter.Actor.remove_child() instead.

do_sort_depth_order() virtual

Sorts a container’s children using their depth. This function should not be normally used by applications.

New in version 0.6.

Deprecated since version 1.10: The Clutter.Container.do_sort_depth_order() virtual function should not be used any more; the default implementation in Clutter.Container does not do anything.

Signal Details

Clutter.Container.signals.actor_added(container, actor)
Signal Name:

actor-added

Flags:

RUN_FIRST

Parameters:

The ::actor-added signal is emitted each time an actor has been added to container.

New in version 0.4.

Clutter.Container.signals.actor_removed(container, actor)
Signal Name:

actor-removed

Flags:

RUN_FIRST

Parameters:

The ::actor-removed signal is emitted each time an actor is removed from container.

New in version 0.4.

Clutter.Container.signals.child_notify(container, actor, pspec)
Signal Name:

child-notify

Flags:

RUN_FIRST, DETAILED

Parameters:

The ::child-notify signal is emitted each time a property is being set through the clutter_container_child_set() and Clutter.Container.child_set_property() calls.

New in version 0.8.