push_internal


Description:

[ Version ( deprecated = true , deprecated_since = "1.10" , since = "1.2" ) ]
public void push_internal ()

Warning: push_internal is deprecated since 1.10.

Should be used by actors implementing the Container and with internal children added through set_parent, for instance:

Note:

All children of an actor are accessible through the Actor API, and Actor implements the Container interface, so this function is only useful for legacy containers overriding the default implementation.

	static void
my_actor_init (MyActor *self)
{
self->priv = my_actor_get_instance_private (self);

clutter_actor_push_internal (CLUTTER_ACTOR (self));

// calling clutter_actor_set_parent() now will result in
// the internal flag being set on a child of MyActor

// internal child - a background texture
self->priv->background_tex = clutter_texture_new ();
clutter_actor_set_parent (self->priv->background_tex,
CLUTTER_ACTOR (self));

// internal child - a label
self->priv->label = clutter_text_new ();
clutter_actor_set_parent (self->priv->label,
CLUTTER_ACTOR (self));

clutter_actor_pop_internal (CLUTTER_ACTOR (self));

// calling clutter_actor_set_parent() now will not result in
// the internal flag being set on a child of MyActor
}

This function will be used by Clutter to toggle an "internal child" flag whenever set_parent is called; internal children are handled differently by Clutter, specifically when destroying their parent.

Call pop_internal when you finished adding internal children.

Nested calls to push_internal are allowed, but each one must by followed by a pop_internal call.

Parameters:

this

a Actor




2022 vala-language.org