The ClutterActorClass.paint_node() virtual function is invoked whenever
an actor needs to be painted. The implementation of the virtual function
must only paint the contents of the actor itself, and not the contents of
its children, if the actor has any.

The ClutterPaintNode passed to the virtual function is the local root of
the render tree; any node added to it will be rendered at the correct
position, as defined by the actor's “allocation”.

staticvoidmy_actor_paint_node(ClutterActor*actor,ClutterPaintNode*root){ClutterPaintNode*node;ClutterActorBox box;// where the content of the actor should be paintedclutter_actor_get_allocation_box(actor,&box);// the cogl_texture variable is set elsewhere node =clutter_texture_node_new(cogl_texture, CLUTTER_COLOR_White,CLUTTER_SCALING_FILTER_TRILINEAR,CLUTTER_SCALING_FILTER_LINEAR);// paint the content of the node using the allocationclutter_paint_node_add_rectangle(node,&box);// add the node, and transfer ownershipclutter_paint_node_add_child(root, node);clutter_paint_node_unref(node);}The #ClutterActorClass.paint() virtual function is invoked when the#ClutterActor::paint signal is emitted, and after the other signalhandlers have been invoked. Overriding the paint virtual functiongives total control to the paint sequence of the actor itself,including the children of the actor,if any.It is strongly discouraged to override the #ClutterActorClass.paint()virtual function, as well as connecting to the #ClutterActor::paintsignal. These hooks into the paint sequence are considered legacy, andwill be removed when the Clutter API changes.

Handling events on an actor

A ClutterActor can receive and handle input device events, for
instance pointer events and key events, as long as its
“reactive” property is set to TRUE.

Once an actor has been determined to be the source of an event,
Clutter will traverse the scene graph from the top-level actor towards the
event source, emitting the “captured-event” signal on each
ancestor until it reaches the source; this phase is also called
the "capture" phase. If the event propagation was not stopped, the graph
is walked backwards, from the source actor to the top-level, and the
“event” signal is emitted, alongside eventual event-specific
signals like “button-press-event” or “motion-event”;
this phase is also called the "bubble" phase.

At any point of the signal emission, signal handlers can stop the propagation
through the scene graph by returning CLUTTER_EVENT_STOP; otherwise, they can
continue the propagation by returning CLUTTER_EVENT_PROPAGATE.

Animation

Animation is a core concept of modern user interfaces; Clutter provides a
complete and powerful animation framework that automatically tweens the
actor's state without requiring direct, frame by frame manipulation from
your application code. You have two models at your disposal:

an implicit animation model

an explicit animation model

The implicit animation model of Clutter assumes that all the
changes in an actor state should be gradual and asynchronous; Clutter
will automatically transition an actor's property change between the
current state and the desired one without manual intervention, if the
property is defined to be animatable in its documentation.

By default, in the 1.0 API series, the transition happens with a duration
of zero milliseconds, and the implicit animation is an opt in feature to
retain backwards compatibility.

Implicit animations depend on the current easing state; in order to use
the default easing state for an actor you should call the
clutter_actor_save_easing_state() function:

Changing the easing state will affect all the following property
transitions, but will not affect existing transitions.

It is important to note that if you modify the state on an
animatable property while a transition is in flight, the transition's
final value will be updated, as well as its duration and progress
mode by using the current easing state; for instance, in the following
example:

the first call to clutter_actor_set_x() will begin a transition
of the “x” property from the current value to the value of
200 over a duration of one second; the second call to clutter_actor_set_x()
will change the transition's final value to 100 and the duration to 500
milliseconds.

It is possible to receive a notification of the completion of an
implicit transition by using the “transition-stopped”
signal, decorated with the name of the property. In case you want to
know when all the currently in flight transitions are complete, use
the “transitions-completed” signal instead.

The explicit animation model supported by Clutter requires that
you create a ClutterTransition object, and optionally set the initial
and final values. The transition will not start unless you add it to the
ClutterActor.

The example above will animate the “opacity” property
of an actor between fully opaque and fully transparent, and back, over
a span of 3 seconds. The animation does not begin until it is added to
the actor.

The explicit animation API applies to all GObject properties,
as well as the custom properties defined through the ClutterAnimatable
interface, regardless of whether they are defined as implicitly
animatable or not.

The explicit animation API should also be used when using custom
animatable properties for ClutterAction, ClutterConstraint, and
ClutterEffect instances associated to an actor; see the section on
custom animatable properties below for an example.

Finally, explicit animations are useful for creating animations
that run continuously, for instance:

Implementing an actor

Careful consideration should be given when deciding to implement
a ClutterActor sub-class. It is generally recommended to implement a
sub-class of ClutterActor only for actors that should be used as leaf
nodes of a scene graph.

If your actor should be painted in a custom way, you should
override the “paint” signal class handler. You can either
opt to chain up to the parent class implementation or decide to fully
override the default paint implementation; Clutter will set up the
transformations and clip regions prior to emitting the “paint”
signal.

the section fragment can be one between "actions", "constraints" and "effects"

the meta-name fragment is the name of the action, effect, or constraint, as
specified by the “name” property of ClutterActorMeta

the property-name fragment is the name of the action, effect, or constraint
property to be animated.

The example below animates a ClutterBindConstraint applied to an actor
using an explicit transition. The rect actor has a binding constraint
on the origin actor, and in its initial state is overlapping the actor
to which is bound to.

gbooleanon_button_press(ClutterActor*origin,ClutterEvent*event,ClutterActor*rect){ClutterTransition*transition;// the offset that we want to apply; this will make the actor// slide in from behind the origin and rest at the right of// the origin, plus a padding valuefloat new_offset =clutter_actor_get_width(origin)+ h_padding;// the property we wish to animate; the "@constraints" section// tells Clutter to check inside the constraints associated// with the actor; the "bind-x" section is the name of the// constraint; and the "offset" is the name of the property// on the constraintconstchar*prop ="@constraints.bind-x.offset";// create a new transition for the given property transition =clutter_property_transition_new(prop);// set the easing mode and durationclutter_timeline_set_progress_mode(CLUTTER_TIMELINE(transition),CLUTTER_EASE_OUT_CUBIC);clutter_timeline_set_duration(CLUTTER_TIMELINE(transition),500);// create the interval with the initial and final valuesclutter_transition_set_from(transition, G_TYPE_FLOAT,0.f);clutter_transition_set_to(transition, G_TYPE_FLOAT, new_offset);// add the transition to the actor; this causes the animation// to start. the name "offsetAnimation" can be used to retrieve// the transition laterclutter_actor_add_transition(rect,"offsetAnimation", transition);// we handled the eventreturnCLUTTER_EVENT_STOP;}

Functions

CLUTTER_ACTOR_SET_FLAGS()

#define CLUTTER_ACTOR_SET_FLAGS(a,f)

CLUTTER_ACTOR_SET_FLAGS has been deprecated since version 1.24 and should not be used in newly-written code.

Changing flags directly is heavily discouraged in
newly written code. ClutterActor will take care of setting the
internal state.

It is also important to note that Clutter may delay the changes of
the CLUTTER_ACTOR_MAPPED flag on top-levels due to backend-specific
limitations, or during the reparenting of an actor, to optimize
unnecessary (and potentially expensive) state changes.

The realized state has an actor-dependant interpretation. If an
actor wants to delay allocating resources until it is attached to a
stage, it may use the realize state to do so. However it is
perfectly acceptable for an actor to allocate Cogl resources before
being realized because there is only one drawing context used by Clutter
so any resources will work on any stage. If an actor is mapped it
must also be realized, but an actor can be realized and unmapped
(this is so hiding an actor temporarily doesn't do an expensive
unrealize/realize).

To be realized an actor must be inside a stage, and all its parents
must be realized.

Realization informs the actor that it is attached to a stage. It
can use this to allocate resources if it wanted to delay allocation
until it would be rendered. However it is perfectly acceptable for
an actor to create resources before being realized because Clutter
only ever has a single rendering context so that actor is free to
be moved from one stage to another.

This function does nothing if the actor is already realized.

Because a realized actor must have realized parent actors, calling
clutter_actor_realize() will also realize all parents of the actor.

This function does not realize child actors, except in the special
case that realizing the stage, when the stage is visible, will
suddenly map (and thus realize) the children of the stage.

Unrealization informs the actor that it may be being destroyed or
moved to another stage. The actor may want to destroy any
underlying graphics resources at this point. However it is
perfectly acceptable for it to retain the resources until the actor
is destroyed because Clutter only ever uses a single rendering
context and all of the graphics resources are valid on any stage.

Because mapped actors must be realized, actors may not be
unrealized if they are mapped. This function hides the actor to be
sure it isn't mapped, an application-visible side effect that you
may not be expecting.

This function should not be called by application code.

This function should not really be in the public API, because
there isn't a good reason to call it. ClutterActor will already
unrealize things for you when it's important to do so.

If you were using clutter_actor_unrealize() in a dispose
implementation, then don't, just chain up to ClutterActor's
dispose.

If you were using clutter_actor_unrealize() to implement
unrealizing children of your container, then don't, ClutterActor
will already take care of that.

Parameters

clutter_actor_continue_paint ()

Run the next stage of the paint sequence. This function should only
be called within the implementation of the ‘run’ virtual of a
ClutterEffect. It will cause the run method of the next effect to
be applied, or it will paint the actual actor if the current effect
is the last effect in the chain.

It is important to note that the implementation of the
ClutterActorClass.unmap() virtual function may be called after
the ClutterActorClass.destroy() or the GObjectClass.dispose()
implementation, but it is guaranteed to be called before the
GObjectClass.finalize() implementation.

This function will respect the easing state of the ClutterActor and
interpolate between the current allocation and the new one if the
easing state duration is a positive value.

Actors can know from their allocation box whether they have moved
with respect to their parent actor. The flags
parameter describes
additional information about the allocation, for instance whether
the parent has moved with respect to the stage, for example because
a grandparent's origin has moved.

clutter_actor_allocate_preferred_size ()

This function is a utility call for ClutterActor implementations
that allocates the actor's preferred natural size. It can be used
by fixed layout managers (like ClutterGroup or so called
'composite actors') inside the ClutterActor::allocate
implementation to give each child exactly how much space it
requires, regardless of the size of the parent.

This function is not meant to be used by applications. It is also
not meant to be used outside the implementation of the
ClutterActorClass.allocate virtual function.

The allocation should have been adjusted to take into account constraints,
alignment, and margin properties. If you are implementing a ClutterActor
subclass that provides its own layout management policy for its children
instead of using a ClutterLayoutManager delegate, you should not call
this function on the children of self
; instead, you should call
clutter_actor_allocate(), which will adjust the allocation box for
you.

This function should only be used by subclasses of ClutterActor
that wish to store their allocation but cannot chain up to the
parent's implementation; the default implementation of the
ClutterActorClass.allocate() virtual function will call this
function.

It is important to note that, while chaining up was the recommended
behaviour for ClutterActor subclasses prior to the introduction of
this function, it is recommended to call clutter_actor_set_allocation()
instead.

staticvoidmy_actor_allocate(ClutterActor*actor,constClutterActorBox*allocation,ClutterAllocationFlags flags){ClutterActorBox new_alloc;ClutterAllocationFlags new_flags;adjust_allocation(allocation,&new_alloc); new_flags = flags |CLUTTER_DELEGATE_LAYOUT;// this will use the layout manager set on the actorclutter_actor_set_allocation(actor,&new_alloc, new_flags);}

Parameters

Returns

clutter_actor_has_allocation ()

Checks if the actor has an up-to-date allocation assigned to
it. This means that the actor should have an allocation: it's
visible and has a parent. It also means that there is no
outstanding relayout request in progress for the actor or its
children (There might be other outstanding layout requests in
progress that will cause the actor to get a new allocation
when the stage is laid out, however).

If this function returns FALSE, then the actor will normally
be allocated before it is next drawn on the screen.

Gets the size and position of an actor relative to its parent
actor. This is the same as calling clutter_actor_get_position() and
clutter_actor_get_size(). It tries to "do what you mean" and get the
requested size and position if the actor's allocation is invalid.

Parameters

clutter_actor_set_size ()

Sets the actor's size request in pixels. This overrides any
"normal" size request the actor would have. For example
a text actor might normally request the size of the text;
this function would force a specific size instead.

If width
and/or height
are -1 the actor will use its
"normal" size request instead of overriding it, i.e.
you can "unset" the size with -1.

clutter_actor_get_size ()

This function tries to "do what you mean" and return
the size an actor will have. If the actor has a valid
allocation, the allocation will be returned; otherwise,
the actors natural size request will be returned.

Parameters

clutter_actor_get_position ()

This function tries to "do what you mean" and tell you where the
actor is, prior to any transformations. Retrieves the fixed
position of an actor in pixels, if one has been set; otherwise, if
the allocation is valid, returns the actor's allocated position;
otherwise, returns 0,0.

clutter_actor_transform_stage_point ()

This function translates screen coordinates (x
, y
) to
coordinates relative to the actor. For example, it can be used to translate
screen events from global screen coordinates into actor-local coordinates.

The conversion can fail, notably if the transform stack results in the
actor being projected on the screen as a mere line.

The conversion should not be expected to be pixel-perfect due to the
nature of the operation. In general the error grows when the skewing
of the actor rectangle on screen increases.

When the actor (or one of its ancestors) is rotated around the
X or Y axis, it no longer appears as on the stage as a rectangle, but
as a generic quadrangle; in that case this function returns the size
of the smallest rectangle that encapsulates the entire quad. Please
note that in this case no assumptions can be made about the relative
position of this envelope to the absolute position of the actor, as
returned by clutter_actor_get_transformed_position(); if you need this
information, you need to use clutter_actor_get_abs_allocation_vertices()
to get the coords of the actual quadrangle.

clutter_actor_get_paint_volume ()

Retrieves the paint volume of the passed ClutterActor, or NULL
when a paint volume can't be determined.

The paint volume is defined as the 3D space occupied by an actor
when being painted.

This function will call the ClutterActorClass.get_paint_volume()
virtual function of the ClutterActor class. Sub-classes of ClutterActor
should not usually care about overriding the default implementation,
unless they are, for instance: painting outside their allocation, or
actors with a depth factor (not in terms of “depth” but real
3D depth).

Parameters

Returns

a pointer to a ClutterPaintVolume,
or NULL if no volume could be determined. The returned pointer
is not guaranteed to be valid across multiple frames; if you want
to keep it, you will need to copy it using clutter_paint_volume_copy().

clutter_actor_get_paint_box ()

Retrieves the paint volume of the passed ClutterActor, and
transforms it into a 2D bounding box in stage coordinates.

This function is useful to determine the on screen area occupied by
the actor. The box is only an approximation and may often be
considerably larger due to the optimizations used to calculate the
box. The box is never smaller though, so it can reliably be used
for culling.

There are times when a 2D paint box can't be determined, e.g.
because the actor isn't yet parented under a stage or because
the actor is unable to determine a paint volume.

clutter_actor_get_transformed_paint_volume ()

Retrieves the 3D paint volume of an actor like
clutter_actor_get_paint_volume() does (Please refer to the
documentation of clutter_actor_get_paint_volume() for more
details.) and it additionally transforms the paint volume into the
coordinate space of relative_to_ancestor
. (Or the stage if NULL
is passed for relative_to_ancestor
)

This can be used by containers that base their paint volume on
the volume of their children. Such containers can query the
transformed paint volume of all of its children and union them
together using clutter_paint_volume_union().

Parameters

Returns

a pointer to a ClutterPaintVolume,
or NULL if no volume could be determined. The returned pointer is
not guaranteed to be valid across multiple frames; if you wish to
keep it, you will have to copy it using clutter_paint_volume_copy().

Parameters

Returns

a pointer to the default
ClutterPaintVolume, relative to the ClutterActor, or NULL if
the actor could not compute a valid paint volume. The returned value
is not guaranteed to be stable across multiple frames, so if you
want to retain it, you will need to copy it using
clutter_paint_volume_copy().

Parameters

Returns

clutter_actor_set_opacity_override ()

Allows overriding the calculated paint opacity (as returned by
clutter_actor_get_paint_opacity()). This is used internally by
ClutterClone and ClutterOffscreenEffect, and should be used by
actors that need to mimick those.

clutter_actor_set_offscreen_redirect ()

Defines the circumstances where the actor should be redirected into
an offscreen image. The offscreen image is used to flatten the
actor into a single image while painting for two main reasons.
Firstly, when the actor is painted a second time without any of its
contents changing it can simply repaint the cached image without
descending further down the actor hierarchy. Secondly, it will make
the opacity look correct even if there are overlapping primitives
in the actor.

Caching the actor could in some cases be a performance win and in
some cases be a performance lose so it is important to determine
which value is right for an actor before modifying this value. For
example, there is never any reason to flatten an actor that is just
a single texture (such as a ClutterTexture) because it is
effectively already cached in an image so the offscreen would be
redundant. Also if the actor contains primitives that are far apart
with a large transparent area in the middle (such as a large
CluterGroup with a small actor in the top left and a small actor in
the bottom right) then the cached image will contain the entire
image of the large area and the paint will waste time blending all
of the transparent pixels in the middle.

The default method of implementing opacity on a container simply
forwards on the opacity to all of the children. If the children are
overlapping then it will appear as if they are two separate glassy
objects and there will be a break in the color where they
overlap. By redirecting to an offscreen buffer it will be as if the
two opaque objects are combined into one and then made transparent
which is usually what is expected.

The image below demonstrates the difference between redirecting and
not. The image shows two Clutter groups, each containing a red and
a green rectangle which overlap. The opacity on the group is set to
128 (which is 50%). When the offscreen redirect is not used, the
red rectangle can be seen through the blue rectangle as if the two
rectangles were separately transparent. When the redirect is used
the group as a whole is transparent instead so the red rectangle is
not visible where they overlap.

Figure 1. Sample of using an offscreen redirect for transparency

The default value for this property is 0, so we effectively will
never redirect an actor offscreen by default. This means that there
are times that transparent actors may look glassy as described
above. The reason this is the default is because there is a
performance trade off between quality and performance here. In many
cases the default form of glassy opacity looks good enough, but if
it's not you will need to set the
CLUTTER_OFFSCREEN_REDIRECT_AUTOMATIC_FOR_OPACITY flag to enable
redirection for opacity.

Custom actors that don't contain any overlapping primitives are
recommended to override the has_overlaps() virtual to return FALSE
for maximum efficiency.

Parameters

clutter_actor_destroy_all_children ()

This function releases the reference added by inserting a child
actor in the list of children of self
, and ensures that the
“destroy” signal is emitted on each child of the
actor.

By default, ClutterActor will emit the “destroy” signal
when its reference count drops to 0; the default handler of the
“destroy” signal will destroy all the children of an
actor. This function ensures that all children are destroyed, instead
of just removed from self
, unlike clutter_actor_remove_all_children()
which will merely release the reference and remove each child.

Unless you acquired an additional reference on each child of self
prior to calling clutter_actor_remove_all_children() and want to reuse
the actors, you should use clutter_actor_destroy_all_children() in
order to make sure that children are destroyed and signal handlers
are disconnected even in cases where circular references prevent this
from automatically happening through reference counting alone.

Parameters

ClutterActorCreateChildFunc ()

The usual way to implement this function is to create a ClutterActor
instance and then bind the GObject properties to the actor properties
of interest, using g_object_bind_property(). This way, when the item
in the GListModel changes, the ClutterActor changes as well.

clutter_actor_bind_model ()

If the ClutterActor was already bound to a GListModel, the previous
binding is destroyed.

The existing children of ClutterActor are destroyed when setting a
model, and new children are created and added, representing the contents
of the model
. The ClutterActor is updated whenever the model
changes.
If model
is NULL, the ClutterActor is left empty.

When a ClutterActor is bound to a model, adding and removing children
directly is undefined behaviour.

clutter_actor_bind_model_with_properties ()

Unlike clutter_actor_bind_model(), this function automatically creates
a child ClutterActor of type child_type
, and binds properties on the
items inside the model
to the corresponding properties on the child,
for instance:

clutter_actor_create_pango_layout ()

Creates a new PangoLayout from the same PangoContext used
by the ClutterActor. The PangoLayout is already configured
with the font map, resolution and font options, and the
given text
.

If you want to keep around a PangoLayout created by this
function you will have to connect to the “font-changed”
and “resolution-changed” signals, and call
pango_layout_context_changed() in response to them.

Parameters

Returns

clutter_actor_get_accessible ()

Returns the accessible object that describes the actor to an
assistive technology.

If no class-specific AtkObject implementation is available for the
actor instance in question, it will inherit an AtkObject
implementation from the first ancestor class for which such an
implementation is defined.

The documentation of the ATK
library contains more information about accessible objects and
their uses.

Scales an actor with the given factors around the given
center point. The center point is specified as one of the compass
directions in ClutterGravity. For example, setting it to north
will cause the top of the actor to remain unchanged and the rest of
the actor to expand left, right and downwards.

Retrieves the scale center coordinate in pixels relative to the top
left corner of the actor. If the scale center was specified using a
ClutterGravity this will calculate the pixel offset using the
current size of the actor.

Parameters

Returns

clutter_actor_push_internal ()

clutter_actor_push_internal has been deprecated since version 1.10 and should not be used in newly-written code.

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

staticvoidmy_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 clutter_actor_set_parent() is called; internal children
are handled differently by Clutter, specifically when destroying their
parent.

In reality, calling this function is less useful than it sounds, as some
application code may rely on changes in the intermediate state between
removal and addition of the actor from its old parent to the new_parent
.
Thus, it is strongly encouraged to avoid using this function in application
code.

This will cause the parent of self
to release the reference
acquired when calling clutter_actor_set_parent(), so if you
want to keep self
you will have to acquire a reference of
your own, through g_object_ref().

Sets an anchor point for self
. The anchor point is a point in the
coordinate space of an actor to which the actor position within its
parent is relative; the default is (0, 0), i.e. the top-left corner
of the actor.

Since version 1.0 the anchor point will be stored as a gravity so
that if the actor changes size then the anchor point will move. For
example, if you set the anchor point to CLUTTER_GRAVITY_SOUTH_EAST
and later double the size of the actor, the anchor point will move
to the bottom right.

Sets an anchor point on the actor based on the given gravity, adjusting the
actor postion so that its relative position within its parent remains
unchanged.

Since version 1.0 the anchor point will be stored as a gravity so
that if the actor changes size then the anchor point will move. For
example, if you set the anchor point to CLUTTER_GRAVITY_SOUTH_EAST
and later double the size of the actor, the anchor point will move
to the bottom right.

Sets the rotation angle of self
around the Z axis using the center
point specified as a compass point. For example to rotate such that
the center of the actor remains static you can use
CLUTTER_GRAVITY_CENTER. If the actor changes size the center point
will move accordingly.

Members

show ()

signal class handler for “show”; it must chain
up to the parent's implementation

show_all ()

virtual function for containers and composite actors, to
determine which children should be shown when calling
clutter_actor_show_all() on the actor. Defaults to calling
clutter_actor_show(). This virtual function is deprecated and it
should not be overridden.

hide ()

signal class handler for “hide”; it must chain
up to the parent's implementation

hide_all ()

virtual function for containers and composite actors, to
determine which children should be shown when calling
clutter_actor_hide_all() on the actor. Defaults to calling
clutter_actor_hide(). This virtual function is deprecated and it
should not be overridden.

realize ()

virtual function, used to allocate resources for the actor;
it should chain up to the parent's implementation. This virtual
function is deprecated and should not be overridden in newly
written code.

unrealize ()

virtual function, used to deallocate resources allocated
in ::realize; it should chain up to the parent's implementation. This
function is deprecated and should not be overridden in newly
written code.

map ()

virtual function for containers and composite actors, to
map their children; it must chain up to the parent's implementation.
Overriding this function is optional.

unmap ()

virtual function for containers and composite actors, to
unmap their children; it must chain up to the parent's implementation.
Overriding this function is optional.

The “anchor-gravity” property

It is highly recommended not to use “anchor-x”,
“anchor-y”, and “anchor-gravity” in newly
written code; the anchor point adds an additional translation that
will affect the actor's relative position with regards to its
parent, as well as the position of its children. This change needs
to always be taken into account when positioning the actor. It is
recommended to use the “pivot-point” property instead,
as it will affect only the transformations.

ClutterActor:anchor-gravity has been deprecated since version 1.12 and should not be used in newly-written code.

The “anchor-x” property

“anchor-x” gfloat

The X coordinate of an actor's anchor point, relative to
the actor coordinate space, in pixels.

It is highly recommended not to use “anchor-x”,
“anchor-y”, and “anchor-gravity” in newly
written code; the anchor point adds an additional translation that
will affect the actor's relative position with regards to its
parent, as well as the position of its children. This change needs
to always be taken into account when positioning the actor. It is
recommended to use the “pivot-point” property instead,
as it will affect only the transformations.

ClutterActor:anchor-x has been deprecated since version 1.12 and should not be used in newly-written code.

The “anchor-y” property

“anchor-y” gfloat

The Y coordinate of an actor's anchor point, relative to
the actor coordinate space, in pixels

It is highly recommended not to use “anchor-x”,
“anchor-y”, and “anchor-gravity” in newly
written code; the anchor point adds an additional translation that
will affect the actor's relative position with regards to its
parent, as well as the position of its children. This change needs
to always be taken into account when positioning the actor. It is
recommended to use the “pivot-point” property instead,
as it will affect only the transformations.

ClutterActor:anchor-y has been deprecated since version 1.12 and should not be used in newly-written code.

The “has-pointer” property

The “height” property

“height” gfloat

Height of the actor (in pixels). If written, forces the minimum and
natural size request of the actor to the given height. If read, returns
the allocated height if available, otherwise the height request.

The “offscreen-redirect” property

Determines the conditions in which the actor will be redirected
to an offscreen framebuffer while being painted. For example this
can be used to cache an actor in a framebuffer or for improved
handling of transparent actors. See
clutter_actor_set_offscreen_redirect() for details.

Signal Details

The “allocation-changed” signal

The ::allocation-changed signal is emitted when the
“allocation” property changes. Usually, application
code should just use the notifications for the :allocation property
but if you want to track the allocation flags as well, for instance
to know whether the absolute origin of actor
changed, then you might
want use this signal instead.

The “captured-event” signal

The ::captured-event signal is emitted when an event is captured
by Clutter. This signal will be emitted starting from the top-level
container (the ClutterStage) to the actor which received the event
going down the hierarchy. This signal can be used to intercept every
event before the specialized events (like
ClutterActor::button-press-event or ::key-released-event) are
emitted.

Returns

The “destroy” signal

The ::destroy signal notifies that all references held on the
actor which emitted it should be released.

The ::destroy signal should be used by all holders of a reference
on actor
.

This signal might result in the finalization of the ClutterActor
if all references are released.

Composite actors and actors implementing the ClutterContainer
interface should override the default implementation of the
class handler of this signal and call clutter_actor_destroy() on
their children. When overriding the default class handler, it is
required to chain up to the parent's implementation.

The “event” signal

The ::event signal is emitted each time an event is received
by the actor
. This signal will be emitted on every actor,
following the hierarchy chain, until it reaches the top-level
container (the ClutterStage).

The “pick” signal

The ::pick signal is emitted each time an actor is being painted
in "pick mode". The pick mode is used to identify the actor during
the event handling phase, or by clutter_stage_get_actor_at_pos().
The actor should paint its shape using the passed pick_color
.

Subclasses of ClutterActor should override the class signal handler
and paint themselves in that function.

It is possible to connect a handler to the ::pick signal in order
to set up some custom aspect of a paint in pick mode.

ClutterActor::pick has been deprecated since version 1.12 and should not be used in newly-written code.

The “queue-redraw” signal

The default implementation for ClutterActor chains up to the
parent actor and queues a redraw on the parent, thus "bubbling"
the redraw queue up through the actor graph. The default
implementation for ClutterStage queues a clutter_stage_ensure_redraw()
in a main loop idle handler.

Note that the origin
actor may be the stage, or a container; it
does not have to be a leaf node in the actor graph.

Toolkits embedding a ClutterStage which require a redraw and
relayout cycle can stop the emission of this signal using the
GSignal API, redraw the UI and then call clutter_stage_ensure_redraw()
themselves, like:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

staticvoidon_redraw_complete(gpointer data){ClutterStage*stage = data;// execute the Clutter drawing pipelineclutter_stage_ensure_redraw(stage);}staticvoidon_stage_queue_redraw(ClutterStage*stage){// this prevents the default handler to rung_signal_stop_emission_by_name(stage,"queue-redraw");// queue a redraw with the host toolkit and call// a function when the redraw has been completedqueue_a_redraw(G_CALLBACK(on_redraw_complete), stage);}

The “transition-stopped” signal

The ::transition-stopped signal is emitted once a transition
is stopped; a transition is stopped once it reached its total
duration (including eventual repeats), it has been stopped
using clutter_timeline_stop(), or it has been removed from the
transitions applied on actor
, using clutter_actor_remove_transition().