Clutter.Container¶
- Implementations:
Methods¶
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
None
Signals¶
Name |
Short Description |
|---|---|
The |
|
The |
|
The |
Fields¶
None
Class Details¶
- class Clutter.Container¶
- Bases:
- Structure:
Clutter.Containeris an opaque structure whose members cannot be directly accessedNew in version 0.4.
- classmethod class_find_child_property(klass, property_name)¶
- Parameters:
klass (
GObject.ObjectClass) – aGObject.ObjectClassimplementing theClutter.Containerinterface.property_name (
str) – a property name.
- Returns:
The
GObject.ParamSpecfor the property orNoneif no such property exist.- Return type:
Looks up the
GObject.ParamSpecfor a child property of klass.New in version 0.8.
- classmethod class_list_child_properties(klass)¶
- Parameters:
klass (
GObject.ObjectClass) – aGObject.ObjectClassimplementing theClutter.Containerinterface.- Returns:
an array of
GObject.ParamSpecs which should be freed after use.- Return type:
Returns an array of
GObject.ParamSpecfor all child properties.New in version 0.8.
- add_actor(actor)¶
- Parameters:
actor (
Clutter.Actor) – the firstClutter.Actorto add
Adds a
Clutter.Actorto self. This function will emit the “actor-added” signal. The actor should be parented to self. You cannot add aClutter.Actorto more than oneClutter.Container.This function will call
Clutter.Container.do_add(), which is a deprecated virtual function. The default implementation will callClutter.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:
child (
Clutter.Actor) – aClutter.Actorthat is a child of self.property (
str) – the name of the property to set.value (
GObject.Value) – the value.
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:
child (
Clutter.Actor) – aClutter.Actorpspec (
GObject.ParamSpec) – aGObject.ParamSpec
Calls the
Clutter.Container.do_child_notify() virtual function ofClutter.Container. The default implementation will emit theClutter.Container::child-notifysignal.New in version 1.6.
- child_set_property(child, property, value)¶
- Parameters:
child (
Clutter.Actor) – aClutter.Actorthat is a child of self.property (
str) – the name of the property to set.value (
GObject.Value) – the value.
Sets a container-specific property on a child of self.
New in version 0.8.
- create_child_meta(actor)¶
- Parameters:
actor (
Clutter.Actor) – aClutter.Actor
Creates the
Clutter.ChildMetawrapping actor inside the self, if the #ClutterContainerIface::child_meta_type class member is not set toGObject.TYPE_INVALID.This function is only useful when adding a
Clutter.Actorto aClutter.Containerimplementation outside of theClutter.Container::add() virtual function implementation.Applications should not call this function.
New in version 1.2.
- destroy_child_meta(actor)¶
- Parameters:
actor (
Clutter.Actor) – aClutter.Actor
Destroys the
Clutter.ChildMetawrapping actor inside the self, if any.This function is only useful when removing a
Clutter.Actorto aClutter.Containerimplementation outside of theClutter.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
Noneif no actor with that name was found.- Return type:
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:
callback (
Clutter.Callback) – a function to be called for each childuser_data (
objectorNone) – data to be passed to the function, orNone
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() orClutter.Actor.get_last_child() to retrieve the beginning of the list of children, andClutter.Actor.get_next_sibling() andClutter.Actor.get_previous_sibling() to iterate over it; alternatively, use theClutter.ActorIterAPI.
- foreach_with_internals(callback, *user_data)¶
- Parameters:
callback (
Clutter.Callback) – a function to be called for each childuser_data (
objectorNone) – data to be passed to the function, orNone
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) – aClutter.Actorthat is a child of self.- Returns:
the
Clutter.ChildMetafor the actor child of self orNoneif the specifiec actor does not exist or the container is not configured to provideClutter.ChildMetas- Return type:
Retrieves the
Clutter.ChildMetawhich contains the data about the self specific state for actor.New in version 0.8.
- get_children()¶
- Returns:
a list of
Clutter.Actors. Use g_list_free() on the returned list when done.- Return type:
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:
actor (
Clutter.Actor) – the actor to raisesibling (
Clutter.ActororNone) – the sibling to lower to, orNoneto lower to the bottom
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 callClutter.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:
actor (
Clutter.Actor) – the actor to raisesibling (
Clutter.ActororNone) – the sibling to raise to, orNoneto raise to the top
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 callClutter.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) – aClutter.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 callClutter.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 inClutter.Containerdoes not do anything.
- do_actor_added(actor) virtual¶
- Parameters:
actor (
Clutter.Actor) –
class handler for
Clutter.Container::actor-added
- do_actor_removed(actor) virtual¶
- Parameters:
actor (
Clutter.Actor) –
class handler for
Clutter.Container::actor-removed
- do_add(actor) virtual¶
- Parameters:
actor (
Clutter.Actor) – the firstClutter.Actorto add
Adds a
Clutter.Actorto container. This function will emit the “actor-added” signal. The actor should be parented to container. You cannot add aClutter.Actorto more than oneClutter.Container.This function will call
Clutter.Container.do_add(), which is a deprecated virtual function. The default implementation will callClutter.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:
child (
Clutter.Actor) – aClutter.Actorpspec (
GObject.ParamSpec) – aGObject.ParamSpec
Calls the
Clutter.Container.do_child_notify() virtual function ofClutter.Container. The default implementation will emit theClutter.Container::child-notifysignal.New in version 1.6.
- do_create_child_meta(actor) virtual¶
- Parameters:
actor (
Clutter.Actor) – aClutter.Actor
Creates the
Clutter.ChildMetawrapping actor inside the container, if the #ClutterContainerIface::child_meta_type class member is not set toGObject.TYPE_INVALID.This function is only useful when adding a
Clutter.Actorto aClutter.Containerimplementation outside of theClutter.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) – aClutter.Actor
Destroys the
Clutter.ChildMetawrapping actor inside the container, if any.This function is only useful when removing a
Clutter.Actorto aClutter.Containerimplementation outside of theClutter.Container::add() virtual function implementation.Applications should not call this function.
New in version 1.2.
- do_foreach(callback, *user_data) virtual¶
- Parameters:
callback (
Clutter.Callback) – a function to be called for each childuser_data (
objectorNone) – data to be passed to the function, orNone
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() orClutter.Actor.get_last_child() to retrieve the beginning of the list of children, andClutter.Actor.get_next_sibling() andClutter.Actor.get_previous_sibling() to iterate over it; alternatively, use theClutter.ActorIterAPI.
- do_foreach_with_internals(callback, *user_data) virtual¶
- Parameters:
callback (
Clutter.Callback) – a function to be called for each childuser_data (
objectorNone) – data to be passed to the function, orNone
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) – aClutter.Actorthat is a child of container.- Returns:
the
Clutter.ChildMetafor the actor child of container orNoneif the specifiec actor does not exist or the container is not configured to provideClutter.ChildMetas- Return type:
Retrieves the
Clutter.ChildMetawhich contains the data about the container specific state for actor.New in version 0.8.
- do_lower(actor, sibling) virtual¶
- Parameters:
actor (
Clutter.Actor) – the actor to raisesibling (
Clutter.ActororNone) – the sibling to lower to, orNoneto lower to the bottom
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 callClutter.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:
actor (
Clutter.Actor) – the actor to raisesibling (
Clutter.ActororNone) – the sibling to raise to, orNoneto raise to the top
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 callClutter.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) – aClutter.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 callClutter.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 inClutter.Containerdoes not do anything.
Signal Details¶
- Clutter.Container.signals.actor_added(container, actor)¶
- Signal Name:
actor-added- Flags:
- Parameters:
container (
Clutter.Container) – The object which received the signalactor (
Clutter.Actor) – the new child that has been added to container
The
::actor-addedsignal 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:
- Parameters:
container (
Clutter.Container) – The object which received the signalactor (
Clutter.Actor) – the child that has been removed from container
The
::actor-removedsignal 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:
- Parameters:
container (
Clutter.Container) – The object which received the signalactor (
Clutter.Actor) – the child that has had a property setpspec (
GObject.ParamSpec) – theGObject.ParamSpecof the property set
The
::child-notifysignal is emitted each time a property is being set through the clutter_container_child_set() andClutter.Container.child_set_property() calls.New in version 0.8.