Adds a #ClutterAction to the actor
The allocation for the actor, in pixels
This is property is read-only, but you might monitor it to know when an actor moves or resizes
The anchor point expressed as a #ClutterGravity
It is highly recommended not to use #ClutterActor:anchor-x, #ClutterActor:anchor-y, and #ClutterActor: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 #ClutterActor:pivot-point property instead, as it will affect only the transformations.
The X coordinate of an actor's anchor point, relative to the actor coordinate space, in pixels.
It is highly recommended not to use #ClutterActor:anchor-x, #ClutterActor:anchor-y, and #ClutterActor: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 #ClutterActor:pivot-point property instead, as it will affect only the transformations.
The Y coordinate of an actor's anchor point, relative to the actor coordinate space, in pixels
It is highly recommended not to use #ClutterActor:anchor-x, #ClutterActor:anchor-y, and #ClutterActor: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 #ClutterActor:pivot-point property instead, as it will affect only the transformations.
Paints a solid fill of the actor's allocation using the specified color.
The #ClutterActor:background-color property is animatable.
Whether the #ClutterActor:background-color property has been set.
Applies a transformation matrix on each child of an actor.
Setting this property with a #ClutterMatrix will set the #ClutterActor:child-transform-set property to %TRUE as a side effect; setting this property with %NULL will set the #ClutterActor:child-transform-set property to %FALSE.
The #ClutterActor:child-transform property is animatable.
Whether the #ClutterActor:child-transform property is set.
The visible region of the actor, in actor-relative coordinates
The visible region of the actor, in actor-relative coordinates, expressed as a #ClutterRect.
Setting this property to %NULL will unset the existing clip.
Setting this property will change the #ClutterActor:has-clip property as a side effect.
Whether the clip region should track the allocated area of the actor.
This property is ignored if a clip area has been explicitly set using clutter_actor_set_clip().
Adds a #ClutterConstraint to the actor
The #ClutterContent implementation that controls the content of the actor.
The bounding box for the #ClutterContent used by the actor.
The value of this property is controlled by the #ClutterActor:allocation and #ClutterActor:content-gravity properties of #ClutterActor.
The bounding box for the content is guaranteed to never exceed the allocation's of the actor.
The alignment that should be honoured by the #ClutterContent set with the #ClutterActor:content property.
Changing the value of this property will change the bounding box of the content; you can use the #ClutterActor:content-box property to get the position and size of the content within the actor's allocation.
This property is meaningful only for #ClutterContent implementations that have a preferred size, and if the preferred size is smaller than the actor's allocation.
The #ClutterActor:content-gravity property is animatable.
The repeat policy for the actor's #ClutterActor:content.
The position of the actor on the Z axis.
The #ClutterActor:depth property is relative to the parent's modelview matrix.
Setting this property will call #ClutterContainerIface.sort_depth_order() which is usually a no-op, and it's most likely not what you want.
The #ClutterActor:depth property is animatable.
Adds #ClutterEffect to the list of effects be applied on a #ClutterActor
The actor's first child.
This flag controls whether the #ClutterActor:fixed-x and #ClutterActor:fixed-y properties are used
The fixed X position of the actor in pixels.
Writing this property sets #ClutterActor:fixed-position-set property as well, as a side effect
The fixed Y position of the actor in pixels.
Writing this property sets the #ClutterActor:fixed-position-set property as well, as a side effect
#ClutterActorFlags
Whether the actor has the #ClutterActor:clip property set or not
Whether the actor contains the pointer of a #ClutterInputDevice or not.
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 #ClutterActor:height property is animatable.
The actor's last child.
A delegate object for controlling the layout of the children of an actor.
Whether the actor is mapped (will be painted when the stage to which it belongs is mapped)
The margin (in pixels) from the bottom of the actor.
This property adds a margin to the actor's preferred size; the margin will be automatically taken into account when allocating the actor.
The #ClutterActor:margin-bottom property is animatable.
The margin (in pixels) from the left of the actor.
This property adds a margin to the actor's preferred size; the margin will be automatically taken into account when allocating the actor.
The #ClutterActor:margin-left property is animatable.
The margin (in pixels) from the right of the actor.
This property adds a margin to the actor's preferred size; the margin will be automatically taken into account when allocating the actor.
The #ClutterActor:margin-right property is animatable.
The margin (in pixels) from the top of the actor.
This property adds a margin to the actor's preferred size; the margin will be automatically taken into account when allocating the actor.
The #ClutterActor:margin-top property is animatable.
#MxMenu associated with the widget.
A forced minimum height request for the actor, in pixels
Writing this property sets the #ClutterActor:min-height-set property as well, as a side effect. This property overrides the usual height request of the actor.
This flag controls whether the #ClutterActor:min-height property is used
A forced minimum width request for the actor, in pixels
Writing this property sets the #ClutterActor:min-width-set property as well, as a side effect.
This property overrides the usual width request of the actor.
This flag controls whether the #ClutterActor:min-width property is used
The name of the actor
A forced natural height request for the actor, in pixels
Writing this property sets the #ClutterActor:natural-height-set property as well, as a side effect. This property overrides the usual height request of the actor
This flag controls whether the #ClutterActor:natural-height property is used
A forced natural width request for the actor, in pixels
Writing this property sets the #ClutterActor:natural-width-set property as well, as a side effect. This property overrides the usual width request of the actor
This flag controls whether the #ClutterActor:natural-width property is used
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.
Opacity of an actor, between 0 (fully transparent) and 255 (fully opaque)
The #ClutterActor:opacity property is animatable.
The point around which the scaling and rotation transformations occur.
The pivot point is expressed in normalized coordinates space, with (0, 0) being the top left corner of the actor and (1, 1) the bottom right corner of the actor.
The default pivot point is located at (0, 0).
The #ClutterActor:pivot-point property is animatable.
The Z component of the #ClutterActor:pivot-point, expressed as a value along the Z axis.
The #ClutterActor:pivot-point-z property is animatable.
The position of the origin of the actor.
This property is a shorthand for setting and getting the #ClutterActor:x and #ClutterActor:y properties at the same time.
The #ClutterActor:position property is animatable.
Whether the actor is reactive to events or not
Only reactive actors will emit event-related signals
Whether the actor has been realized
Request mode for the #ClutterActor. The request mode determines the type of geometry management used by the actor, either height for width (the default) or width for height.
For actors implementing height for width, the parent container should get the preferred width first, and then the preferred height for that width.
For actors implementing width for height, the parent container should get the preferred height first, and then the preferred width for that height.
For instance:
ClutterRequestMode mode;
gfloat natural_width, min_width;
gfloat natural_height, min_height;
mode = clutter_actor_get_request_mode (child);
if (mode == CLUTTER_REQUEST_HEIGHT_FOR_WIDTH)
{
clutter_actor_get_preferred_width (child, -1,
&min_width,
&natural_width);
clutter_actor_get_preferred_height (child, natural_width,
&min_height,
&natural_height);
}
else if (mode == CLUTTER_REQUEST_WIDTH_FOR_HEIGHT)
{
clutter_actor_get_preferred_height (child, -1,
&min_height,
&natural_height);
clutter_actor_get_preferred_width (child, natural_height,
&min_width,
&natural_width);
}
else if (mode == CLUTTER_REQUEST_CONTENT_SIZE)
{
ClutterContent *content = clutter_actor_get_content (child);
min_width, min_height = 0;
natural_width = natural_height = 0;
if (content != NULL)
clutter_content_get_preferred_size (content, &natural_width, &natural_height);
}
will retrieve the minimum and natural width and height depending on the preferred request mode of the #ClutterActor "child".
The clutter_actor_get_preferred_size() function will implement this check for you.
The rotation angle on the X axis.
The #ClutterActor:rotation-angle-x property is animatable.
The rotation angle on the Y axis
The #ClutterActor:rotation-angle-y property is animatable.
The rotation angle on the Z axis
The #ClutterActor:rotation-angle-z property is animatable.
The rotation center on the X axis.
The rotation center on the Y axis.
The rotation center on the Z axis.
The rotation center on the Z axis expressed as a #ClutterGravity.
The horizontal center point for scaling
The vertical center point for scaling
The center point for scaling expressed as a #ClutterGravity
The horizontal scale of the actor.
The #ClutterActor:scale-x property is animatable.
The vertical scale of the actor.
The #ClutterActor:scale-y property is animatable.
The scale factor of the actor along the Z axis.
The #ClutterActor:scale-y property is animatable.
If %TRUE, the actor is automatically shown when parented.
Calling clutter_actor_hide() on an actor which has not been parented will set this property to %FALSE as a side effect.
The size of the actor.
This property is a shorthand for setting and getting the #ClutterActor:width and #ClutterActor:height at the same time.
The #ClutterActor:size property is animatable.
The direction of the text inside a #ClutterActor.
text displayed on the tooltip
Overrides the transformations of a #ClutterActor with a custom matrix.
The matrix specified by the #ClutterActor:transform property is applied to the actor and its children relative to the actor's #ClutterActor:allocation and #ClutterActor:pivot-point.
Application code should rarely need to use this function directly.
Setting this property with a #ClutterMatrix will set the #ClutterActor:transform-set property to %TRUE as a side effect; setting this property with %NULL will set the #ClutterActor:transform-set property to %FALSE.
The #ClutterActor:transform property is animatable.
Whether the #ClutterActor:transform property is set.
An additional translation applied along the X axis, relative to the actor's #ClutterActor:pivot-point.
The #ClutterActor:translation-x property is animatable.
An additional translation applied along the Y axis, relative to the actor's #ClutterActor:pivot-point.
The #ClutterActor:translation-y property is animatable.
An additional translation applied along the Z axis, relative to the actor's #ClutterActor:pivot-point.
The #ClutterActor:translation-z property is animatable.
Whether the actor is set to be visible or not
See also #ClutterActor:mapped
Width of the actor (in pixels). If written, forces the minimum and natural size request of the actor to the given width. If read, returns the allocated width if available, otherwise the width request.
The #ClutterActor:width property is animatable.
X coordinate of the actor in pixels. If written, forces a fixed position for the actor. If read, returns the fixed position if any, otherwise the allocation if available, otherwise 0.
The #ClutterActor:x property is animatable.
The alignment of an actor on the X axis, if the actor has been given extra space for its allocation. See also the #ClutterActor:x-expand property.
Whether a layout manager should assign more space to the actor on the X axis.
Y coordinate of the actor in pixels. If written, forces a fixed position for the actor. If read, returns the fixed position if any, otherwise the allocation if available, otherwise 0.
The #ClutterActor:y property is animatable.
The alignment of an actor on the Y axis, if the actor has been given extra space for its allocation.
Whether a layout manager should assign more space to the actor on the Y axis.
The actor's position on the Z axis, relative to the parent's transformations.
Positive values will bring the actor's position nearer to the user, whereas negative values will bring the actor's position farther from the user.
The #ClutterActor:z-position does not affect the paint or allocation order.
The #ClutterActor:z-position property is animatable.
Adds action
to the list of actions applied to self
A #ClutterAction can only belong to one actor at a time
The #ClutterActor will hold a reference on action
until either
clutter_actor_remove_action() or clutter_actor_clear_actions()
is called
A convenience function for setting the name of a #ClutterAction
while adding it to the list of actions applied to self
This function is the logical equivalent of:
clutter_actor_meta_set_name (CLUTTER_ACTOR_META (action), name);
clutter_actor_add_action (self, action);
Adds a #ClutterActor to container
. This function will emit the
"actor-added" signal. The actor should be parented to
container
. You cannot add a #ClutterActor to more than one
#ClutterContainer.
This function will call #ClutterContainerIface.add(), which is a deprecated virtual function. The default implementation will call clutter_actor_add_child().
Adds an attribute mapping between the current model and the objects from the cell renderer.
Name of the attribute
Column number
Adds child
to the children of self
.
This function will acquire a reference on child
that will only
be released when calling clutter_actor_remove_child().
This function will take into consideration the #ClutterActor:depth
of child,
and will keep the list of children sorted.
This function will emit the #ClutterContainer::actor-added signal
on self
.
Adds constraint
to the list of #ClutterConstraints applied
to self
The #ClutterActor will hold a reference on the constraint
until
either clutter_actor_remove_constraint() or
clutter_actor_clear_constraints() is called.
a #ClutterConstraint
A convenience function for setting the name of a #ClutterConstraint
while adding it to the list of constraints applied to self
This function is the logical equivalent of:
clutter_actor_meta_set_name (CLUTTER_ACTOR_META (constraint), name);
clutter_actor_add_constraint (self, constraint);
the name to set on the constraint
a #ClutterConstraint
Adds effect
to the list of #ClutterEffects applied to self
The #ClutterActor will hold a reference on the effect
until either
clutter_actor_remove_effect() or clutter_actor_clear_effects() is
called.
Note that as #ClutterEffect is initially unowned,
clutter_actor_add_effect() will sink any floating reference on effect
.
A convenience function for setting the name of a #ClutterEffect
while adding it to the list of effects applied to self
.
Note that as #ClutterEffect is initially unowned,
clutter_actor_add_effect_with_name() will sink any floating
reference on effect
.
This function is the logical equivalent of:
clutter_actor_meta_set_name (CLUTTER_ACTOR_META (effect), name);
clutter_actor_add_effect (self, effect);
Adds a transition
to the #ClutterActor's list of animations.
The name
string is a per-actor unique identifier of the transition:
only
one #ClutterTransition can be associated to the specified name
.
The transition
will be started once added.
This function will take a reference on the transition
.
This function is usually called implicitly when modifying an animatable property.
the name of the transition to add
the #ClutterTransition to add
Assigns the size of a #ClutterActor from the given box
.
This function should only be called on the children of an actor when overriding the #ClutterActorClass.allocate() virtual function.
This function will adjust the stored allocation to take into account the alignment flags set in the #ClutterActor:x-align and #ClutterActor:y-align properties, as well as the margin values set in the #ClutterActor:margin-top, #ClutterActor:margin-right, #ClutterActor:margin-bottom, and #ClutterActor:margin-left properties.
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.
new allocation of the actor, in parent-relative coordinates
flags that control the allocation
Allocates self
by taking into consideration the available allocation
area; an alignment factor on either axis; and whether the actor should
fill the allocation on either axis.
The box
should contain the available allocation width and height;
if the x1 and y1 members of #ClutterActorBox are not set to 0, the
allocation will be offset by their value.
This function takes into consideration the geometry request specified by the #ClutterActor:request-mode property, and the text direction.
This function is useful for fluid layout managers using legacy alignment flags. Newly written layout managers should use the #ClutterActor:x-align and #ClutterActor:y-align properties, instead, and just call clutter_actor_allocate() inside their #ClutterActorClass.allocate() implementation.
a #ClutterActorBox, containing the available width and height
the horizontal alignment, between 0 and 1
the vertical alignment, between 0 and 1
whether the actor should fill horizontally
whether the actor should fill vertically
allocation flags to be passed to clutter_actor_allocate()
Allocates self
taking into account the #ClutterActor's
preferred size, but limiting it to the maximum available width
and height provided.
This function will do the right thing when dealing with the actor's request mode.
The implementation of this function is equivalent to:
if (request_mode == CLUTTER_REQUEST_HEIGHT_FOR_WIDTH)
{
clutter_actor_get_preferred_width (self, available_height,
&min_width,
&natural_width);
width = CLAMP (natural_width, min_width, available_width);
clutter_actor_get_preferred_height (self, width,
&min_height,
&natural_height);
height = CLAMP (natural_height, min_height, available_height);
}
else if (request_mode == CLUTTER_REQUEST_WIDTH_FOR_HEIGHT)
{
clutter_actor_get_preferred_height (self, available_width,
&min_height,
&natural_height);
height = CLAMP (natural_height, min_height, available_height);
clutter_actor_get_preferred_width (self, height,
&min_width,
&natural_width);
width = CLAMP (natural_width, min_width, available_width);
}
else if (request_mode == CLUTTER_REQUEST_CONTENT_SIZE)
{
clutter_content_get_preferred_size (content, &natural_width, &natural_height);
width = CLAMP (natural_width, 0, available_width);
height = CLAMP (natural_height, 0, available_height);
}
box.x1 = x; box.y1 = y;
box.x2 = box.x1 + available_width;
box.y2 = box.y1 + available_height;
clutter_actor_allocate (self, &box, flags);
This function can be used by fluid layout managers to allocate an actor's preferred size without making it bigger than the area available for the container.
the actor's X coordinate
the actor's Y coordinate
the maximum available width, or -1 to use the actor's natural width
the maximum available height, or -1 to use the actor's natural height
flags controlling the allocation
Allocates the natural size of self
.
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.
flags controlling the allocation
Calls the animate_property() virtual function for animatable
.
The initial_value
and final_value
#GValues must contain
the same type; value
must have been initialized to the same
type of initial_value
and final_value
.
All implementation of the #ClutterAnimatable interface must implement this function.
a #ClutterAnimation
the name of the animated property
the initial value of the animation interval
the final value of the animation interval
the progress factor
return location for the animation value
Animates the given list of properties of actor
between the current
value for each property and a new final value. The animation has a
definite behaviour given by the passed alpha
.
See clutter_actor_animate() for further details.
This function is useful if you want to use an existing #ClutterAlpha
to animate actor
.
This is the vector-based variant of clutter_actor_animate_with_alpha(), useful for language bindings.
Unlike clutter_actor_animate_with_alpha(), this function will not allow you to specify "signal::" names and callbacks.
a #ClutterAlpha
a vector containing the property names to set
a vector containing the property values to set
Animates the given list of properties of actor
between the current
value for each property and a new final value. The animation has a
definite duration given by timeline
and a speed given by the mode
.
See clutter_actor_animate() for further details.
This function is useful if you want to use an existing timeline
to animate actor
.
This is the vector-based variant of clutter_actor_animate_with_timeline(), useful for language bindings.
Unlike clutter_actor_animate_with_timeline(), this function will not allow you to specify "signal::" names and callbacks.
an animation mode logical id
a #ClutterTimeline
a vector containing the property names to set
a vector containing the property values to set
Animates the given list of properties of actor
between the current
value for each property and a new final value. The animation has a
definite duration and a speed given by the mode
.
This is the vector-based variant of clutter_actor_animate(), useful for language bindings.
Unlike clutter_actor_animate(), this function will not allow you to specify "signal::" names and callbacks.
an animation mode logical id
duration of the animation, in milliseconds
a vector containing the property names to set
a vector containing the property values to set
Transforms point
in coordinates relative to the actor into
ancestor-relative coordinates using the relevant transform
stack (i.e. scale, rotation, etc).
If ancestor
is %NULL the ancestor will be the #ClutterStage. In
this case, the coordinates returned will be the coordinates on
the stage before the projection is applied. This is different from
the behaviour of clutter_actor_apply_transform_to_point().
A #ClutterActor ancestor, or %NULL to use the default #ClutterStage
A point as #ClutterVertex
Binds a #GListModel to a #ClutterActor.
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.
a #GListModel
a function that creates #ClutterActor instances from the contents of the model
Creates a binding between source_property
on source
and target_property
on target
.
Whenever the source_property
is changed the target_property
is
updated using the same value. For instance:
g_object_bind_property (action, "active", widget, "sensitive", 0);
Will result in the "sensitive" property of the widget #GObject instance to be updated with the same value of the "active" property of the action #GObject instance.
If flags
contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
if target_property
on target
changes then the source_property
on source
will be updated as well.
The binding will automatically be removed when either the source
or the
target
instances are finalized. To remove the binding without affecting the
source
and the target
you can just call g_object_unref() on the returned
#GBinding instance.
Removing the binding by calling g_object_unref() on it must only be done if
the binding, source
and target
are only used from a single thread and it
is clear that both source
and target
outlive the binding. Especially it
is not safe to rely on this if the binding, source
or target
can be
finalized from different threads. Keep another reference to the binding and
use g_binding_unbind() instead to be on the safe side.
A #GObject can have multiple bindings.
the property on source
to bind
the target #GObject
the property on target
to bind
flags to pass to #GBinding
Creates a binding between source_property
on source
and target_property
on target,
allowing you to set the transformation functions to be used by
the binding.
This function is the language bindings friendly version of g_object_bind_property_full(), using #GClosures instead of function pointers.
the property on source
to bind
the target #GObject
the property on target
to bind
flags to pass to #GBinding
a #GClosure wrapping the transformation function from the source
to the target,
or %NULL to use the default
a #GClosure wrapping the transformation function from the target
to the source,
or %NULL to use the default
Gets a container specific property of a child of container,
In general,
a copy is made of the property contents and the caller is responsible for
freeing the memory by calling g_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.
a #ClutterActor that is a child of container
.
the name of the property to set.
the value.
Clears the list of actions applied to self
Clears the list of constraints applied to self
Clears the list of effects applied to self
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.
Creates the #ClutterChildMeta wrapping actor
inside the
container,
if the #ClutterContainerIface::child_meta_type
class member is not set to %G_TYPE_INVALID.
This function is only useful when adding a #ClutterActor to a #ClutterContainer implementation outside of the #ClutterContainer::add() virtual function implementation.
Applications should not call this function.
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 #ClutterBackend::font-changed and #ClutterBackend::resolution-changed signals, and call pango_layout_context_changed() in response to them.
the text to set on the #PangoLayout, or %NULL
Destroys an actor. When an actor is destroyed, it will break any references it holds to other objects. If the actor is inside a container, the actor will be removed.
When you destroy a container, its children will be destroyed as well.
Note: you cannot destroy the #ClutterStage returned by clutter_stage_get_default().
Destroys all children of self
.
This function releases the reference added by inserting a child
actor in the list of children of self,
and ensures that the
#ClutterActor::destroy signal is emitted on each child of the
actor.
By default, #ClutterActor will emit the #ClutterActor::destroy signal
when its reference count drops to 0; the default handler of the
#ClutterActor::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.
Destroys the #ClutterChildMeta wrapping actor
inside the
container,
if any.
This function is only useful when removing a #ClutterActor to a #ClutterContainer implementation outside of the #ClutterContainer::add() virtual function implementation.
Applications should not call this function.
Detaches the #ClutterAnimation used by actor,
if clutter_actor_animate()
has been called on actor
.
Once the animation has been detached, it loses a reference. If it was the only reference then the #ClutterAnimation becomes invalid.
The #ClutterAnimation::completed signal will not be emitted.
Finds the #GParamSpec for property_name
the name of the animatable property to find
This function is intended for #GObject implementations to re-enforce a [floating][floating-ref] object reference. Doing this is seldom required: all #GInitiallyUnowneds are created with a floating reference which usually just needs to be sunken by calling g_object_ref_sink().
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 #ClutterContainerIface.foreach() virtual function, which has been deprecated.
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 #ClutterContainerIface.foreach_with_internals() virtual function, which has been deprecated.
Freeze the view. This means that the view will not act on changes to the model until it is thawed. Call #mx_item_view_thaw to thaw the view
Increases the freeze count on object
. If the freeze count is
non-zero, the emission of "notify" signals on object
is
stopped. The signals are queued until the freeze count is decreased
to zero. Duplicate notifications are squashed so that at most one
#GObject::notify signal is emitted for each property modified while the
object is frozen.
This is necessary for accessors that modify multiple properties to prevent premature notification while the object is still being modified.
Calculates the transformed screen coordinates of the four corners of the actor; the returned vertices relate to the #ClutterActorBox coordinates as follows:
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
Gets the adjustment objects that store the offsets of the scrollable widget into its possible scrolling area.
Gets the layout box an actor has been assigned. The allocation can only be assumed valid inside a paint() method; anywhere else, it may be out-of-date.
An allocation does not incorporate the actor's scale or anchor point; those transformations do not affect layout, only rendering.
Do not call any of the clutter_actor_get_allocation_*() family of functions inside the implementation of the get_preferred_width() or get_preferred_height() virtual functions.
Gets the layout box an actor has been assigned. The allocation can only be assumed valid inside a paint() method; anywhere else, it may be out-of-date.
An allocation does not incorporate the actor's scale or anchor point; those transformations do not affect layout, only rendering.
The returned rectangle is in pixels.
Calculates the transformed coordinates of the four corners of the
actor in the plane of ancestor
. The returned vertices relate to
the #ClutterActorBox coordinates as follows:
verts[
0] contains (x1, y1)verts[
1] contains (x2, y1)verts[
2] contains (x1, y2)verts[
3] contains (x2, y2)If ancestor
is %NULL the ancestor will be the #ClutterStage. In
this case, the coordinates returned will be the coordinates on
the stage before the projection is applied. This is different from
the behaviour of clutter_actor_get_abs_allocation_vertices().
A #ClutterActor to calculate the vertices against, or %NULL to use the #ClutterStage
Gets the current anchor point of the actor
in pixels.
Get the color used as the background. This is set using the "background-color" CSS property. This function should normally only be used by subclasses.
Get the texture used as the background image. This is set using the "background-image" CSS property. This function should normally only be used by subclasses.
Gets the clip area for self,
if any is set.
Retrieves the value set using clutter_actor_set_clip_to_allocation()
Retrieves the #ClutterConstraint with the given name in the list
of constraints applied to self
the name of the constraint to retrieve
Retrieves the list of constraints applied to self
Retrieves the bounding box for the #ClutterContent of self
.
The bounding box is relative to the actor's allocation.
If no #ClutterContent is set for self,
or if self
has not been
allocated yet, then the result is undefined.
The content box is guaranteed to be, at most, as big as the allocation of the #ClutterActor.
If the #ClutterContent used by the actor has a preferred size, then it is possible to modify the content box by using the #ClutterActor:content-gravity property.
Retrieves the content gravity as set using clutter_actor_set_content_gravity().
Retrieves the repeat policy for a #ClutterActor set by clutter_actor_set_content_repeat().
Retrieves the values set using clutter_actor_set_content_scaling_filters().
Gets a named field from the objects table of associations (see g_object_set_data()).
name of the key for that association
Retrieves the default paint volume for self
.
This function provides the same #ClutterPaintVolume that would be computed by the default implementation inside #ClutterActor of the #ClutterActorClass.get_paint_volume() virtual function.
This function should only be used by #ClutterActor subclasses that cannot chain up to the parent implementation when computing their paint volume.
Query stylable
for the default value of property property_name
and
fill value_out
with the result.
name of the property to query
Retrieves the depth of self
.
Get the value of the "disabled" property.
Retrieves the delay that should be applied when tweening animatable properties.
Retrieves the duration of the tweening for animatable
properties of self
for the current easing state.
Retrieves the easing mode for the tweening of animatable properties
of self
for the current easing state.
Gets the #MxItemFactory used for creating new items.
Checks whether an actor has a fixed position set (and will thus be unaffected by any layout manager).
Retrieves the flags set on self
Retrieves the unique id for self
.
Retrieves the height of a #ClutterActor.
If the actor has a valid allocation, this function will return the height of the allocated area given to the actor.
If the actor does not have a valid allocation, this function will return the actor's natural height, that is the preferred height of the actor.
If you care whether you get the preferred height or the height that has been assigned to the actor, you should probably call a different function like clutter_actor_get_allocation_box() to retrieve the allocated size or clutter_actor_get_preferred_height() to retrieve the preferred height.
If an actor has a fixed height, for instance a height that has been assigned using clutter_actor_set_height(), the height returned will be the same value.
Retrieves the id of scriptable
set using clutter_scriptable_set_id().
Retrieves the current state of property_name
and sets value
with it
the name of the animatable property to retrieve
a #GValue initialized to the type of the property to retrieve
Get the item type currently being used to create items
Retrieves the #ClutterLayoutManager used by self
.
Retrieves all the components of the margin of a #ClutterActor.
Retrieves the bottom margin of a #ClutterActor.
Retrieves the left margin of a #ClutterActor.
Retrieves the right margin of a #ClutterActor.
Retrieves the top margin of a #ClutterActor.
Retrieves the number of children of self
.
Retrieves the name of self
.
Retrieves whether to redirect the actor to an offscreen buffer, as set by clutter_actor_set_offscreen_redirect().
Retrieves the opacity value of an actor, as set by clutter_actor_set_opacity().
For retrieving the absolute opacity of the actor inside a paint virtual function, see clutter_actor_get_paint_opacity().
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.
Retrieves the absolute opacity of the actor, as it appears on the stage.
This function traverses the hierarchy chain and composites the opacity of the actor with that of its parents.
This function is intended for subclasses to use in the paint virtual function, to paint themselves with the correct opacity.
Retrieves the 'paint' visibility of an actor recursively checking for non visible parents.
This is by definition the same as %CLUTTER_ACTOR_IS_MAPPED.
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 #ClutterActor:depth but real 3D depth).
Note: 2D actors overriding #ClutterActorClass.get_paint_volume() should ensure that their volume has a depth of 0. (This will be true as long as you don't call clutter_paint_volume_set_depth().)
Retrieves the #PangoContext for self
. The actor's #PangoContext
is already configured using the appropriate font map, resolution
and font options.
Unlike clutter_actor_create_pango_context(), this context is owend by the #ClutterActor and it will be updated each time the options stored by the #ClutterBackend change.
You can use the returned #PangoContext to create a #PangoLayout and render text using cogl_pango_render_layout() to reuse the glyphs cache also used by Clutter.
Retrieves the coordinates of the #ClutterActor:pivot-point.
Retrieves the Z component of the #ClutterActor:pivot-point.
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.
The returned position is in pixels.
Computes the requested minimum and natural heights for an actor, or if they are already computed, returns the cached values.
An actor may not get its request - depending on the layout manager that's in effect.
A request should not incorporate the actor's scale or anchor point; those transformations do not affect layout, only rendering.
available width to assume in computing desired height, or a negative value to indicate that no width is defined
Computes the preferred minimum and natural size of an actor, taking into account the actor's geometry management (either height-for-width or width-for-height).
The width and height used to compute the preferred height and preferred width are the actor's natural ones.
If you need to control the height for the preferred width, or the width for the preferred height, you should use clutter_actor_get_preferred_width() and clutter_actor_get_preferred_height(), and check the actor's preferred geometry management using the #ClutterActor:request-mode property.
Computes the requested minimum and natural widths for an actor, optionally depending on the specified height, or if they are already computed, returns the cached values.
An actor may not get its request - depending on the layout manager that's in effect.
A request should not incorporate the actor's scale or anchor point; those transformations do not affect layout, only rendering.
available height when computing the preferred width, or a negative value to indicate that no height is defined
Gets a property of an object.
The value
can be:
In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling g_value_unset().
Note that g_object_get_property() is really intended for language bindings, g_object_get() is much more convenient for C programming.
the name of the property to get
return location for the property value
This function gets back user data pointers stored via g_object_set_qdata().
A #GQuark, naming the user data pointer
Checks whether actor
is marked as reactive.
Retrieves the geometry request mode of self
Retrieves the angle and center of rotation on the given axis, set using clutter_actor_set_rotation().
the axis of rotation
Retrieves the angle of rotation set by clutter_actor_set_rotation_angle().
the axis of the rotation
Retrieves an actors scale factors.
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.
Retrieves the scaling factor along the Z axis, as set using clutter_actor_set_scale_z().
Queries the currently set #ClutterShader on self
.
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.
If you care whether you get the request vs. the allocation, you should probably call a different function like clutter_actor_get_allocation_box() or clutter_actor_get_preferred_width().
Get the current style class name
Retrieves the value of property_name
for stylable,
and puts it
into value
.
the name of the property
Get the current style pseudo class. This can contain multiple pseudo class names, separated by ':'.
Retrieves the value set using clutter_actor_set_text_direction()
If no text direction has been previously set, the default text direction, as returned by clutter_get_default_text_direction(), will be returned instead
Get the value of the "tooltip-delay" property.
Get the current tooltip string
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().
A #ClutterActor that is an ancestor of self
(or %NULL for the stage)
Gets the absolute position of an actor, in pixels relative to the stage.
Gets the absolute size of an actor in pixels, taking into account the scaling factors.
If the actor has a valid allocation, the allocated size will be used. If the actor has not a valid allocation then the preferred size will be transformed and returned.
If you want the transformed allocation, see clutter_actor_get_abs_allocation_vertices() instead.
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.
Retrieves the #ClutterTransition of a #ClutterActor by using the
transition name
.
Transitions created for animatable properties use the name of the property itself, for instance the code below:
clutter_actor_set_easing_duration (actor, 1000);
clutter_actor_set_rotation (actor, CLUTTER_Y_AXIS, 360.0, x, y, z);
transition = clutter_actor_get_transition (actor, "rotation-angle-y");
g_signal_connect (transition, "stopped",
G_CALLBACK (on_transition_stopped),
actor);
will call the on_transition_stopped
callback when the transition
is finished.
If you just want to get notifications of the completion of a transition, you should use the #ClutterActor::transition-stopped signal, using the transition name as the signal detail.
the name of the transition
Retrieves the translation set using clutter_actor_set_translation().
Retrieves the width of a #ClutterActor.
If the actor has a valid allocation, this function will return the width of the allocated area given to the actor.
If the actor does not have a valid allocation, this function will return the actor's natural width, that is the preferred width of the actor.
If you care whether you get the preferred width or the width that has been assigned to the actor, you should probably call a different function like clutter_actor_get_allocation_box() to retrieve the allocated size or clutter_actor_get_preferred_width() to retrieve the preferred width.
If an actor has a fixed width, for instance a width that has been assigned using clutter_actor_set_width(), the width returned will be the same value.
Retrieves the X coordinate of a #ClutterActor.
This function tries to "do what you mean", by returning the correct value depending on the actor's state.
If the actor has a valid allocation, this function will return the X coordinate of the origin of the allocation box.
If the actor has any fixed coordinate set using clutter_actor_set_x(), clutter_actor_set_position() or clutter_actor_set_geometry(), this function will return that coordinate.
If both the allocation and a fixed position are missing, this function will return 0.
Retrieves the horizontal alignment policy set using clutter_actor_set_x_align().
Retrieves the value set with clutter_actor_set_x_expand().
See also: clutter_actor_needs_expand()
Retrieves the Y coordinate of a #ClutterActor.
This function tries to "do what you mean", by returning the correct value depending on the actor's state.
If the actor has a valid allocation, this function will return the Y coordinate of the origin of the allocation box.
If the actor has any fixed coordinate set using clutter_actor_set_y(), clutter_actor_set_position() or clutter_actor_set_geometry(), this function will return that coordinate.
If both the allocation and a fixed position are missing, this function will return 0.
Retrieves the vertical alignment policy set using clutter_actor_set_y_align().
Retrieves the value set with clutter_actor_set_y_expand().
See also: clutter_actor_needs_expand()
Retrieves the actor's position on the Z axis.
Gets n_properties
properties for an object
.
Obtained properties will be set to values
. All properties must be valid.
Warnings will be emitted and undefined behaviour may result if invalid
properties are passed in.
the names of each property to get
the values of each property to get
Sets the key focus of the #ClutterStage including self
to this #ClutterActor.
Returns whether the actor has any actions applied.
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.
Returns whether the actor has any constraints applied.
Returns whether the actor has any effects applied.
Checks whether self
is the #ClutterActor that has key focus
Asks the actor's implementation whether it may contain overlapping primitives.
For example; Clutter may use this to determine whether the painting should be redirected to an offscreen buffer to correctly implement the opacity property.
Custom actors can override the default response by implementing the #ClutterActorClass.has_overlaps() virtual function. See clutter_actor_set_offscreen_redirect() for more information.
Flags an actor to be hidden. A hidden actor will not be rendered on the stage.
Actors are visible by default.
If this function is called on an actor without a parent, the #ClutterActor:show-on-set-parent property will be set to %FALSE as a side-effect.
Calls clutter_actor_hide() on all child actors (if any).
Hide the tooltip for widget
Inserts child
into the list of children of self,
above another
child of self
or, if sibling
is %NULL, above all the children
of self
.
This function will acquire a reference on child
that will only
be released when calling clutter_actor_remove_child().
This function will not take into consideration the #ClutterActor:depth
of child
.
This function will emit the #ClutterContainer::actor-added signal
on self
.
Inserts child
into the list of children of self,
using the
given index_
. If index_
is greater than the number of children
in self,
or is less than 0, then the new child is added at the end.
This function will acquire a reference on child
that will only
be released when calling clutter_actor_remove_child().
This function will not take into consideration the #ClutterActor:depth
of child
.
This function will emit the #ClutterContainer::actor-added signal
on self
.
Inserts child
into the list of children of self,
below another
child of self
or, if sibling
is %NULL, below all the children
of self
.
This function will acquire a reference on child
that will only
be released when calling clutter_actor_remove_child().
This function will not take into consideration the #ClutterActor:depth
of child
.
This function will emit the #ClutterContainer::actor-added signal
on self
.
Asks a #ClutterAnimatable implementation to interpolate a
a named property between the initial and final values of
a #ClutterInterval, using progress
as the interpolation
value, and store the result inside value
.
This function should be used for every property animation involving #ClutterAnimatables.
This function replaces clutter_animatable_animate_property().
the name of the property to interpolate
a #ClutterInterval with the animation range
the progress to use to interpolate between the initial and final values of the interval
Checks whether object
has a [floating][floating-ref] reference.
Checks whether self
is being currently painted by a #ClutterClone
This function is useful only inside the ::paint virtual function implementations or within handlers for the #ClutterActor::paint signal
This function should not be used by applications
Checks whether a #ClutterActor has been set as mapped.
See also %CLUTTER_ACTOR_IS_MAPPED and #ClutterActor:mapped
Checks whether a #ClutterActor is realized.
See also %CLUTTER_ACTOR_IS_REALIZED and #ClutterActor:realized.
Checks whether any rotation is applied to the actor.
Checks whether the actor is scaled in either dimension.
Checks whether an actor is marked as visible.
See also %CLUTTER_ACTOR_IS_VISIBLE and #ClutterActor:visible.
Retrieves all the #GParamSpecs installed by stylable
.
Cancel a long-press timeout if one is running and emit the signal to notify that the long-press has been cancelled.
Lowers self
to the bottom.
This function calls clutter_actor_lower() internally.
Lowers actor
to sibling
level, in the depth ordering.
This function calls the #ClutterContainerIface.lower() virtual function, which has been deprecated. The default implementation will call clutter_actor_set_child_below_sibling().
the actor to raise
the sibling to lower to, or %NULL to lower to the bottom
Sets the %CLUTTER_ACTOR_MAPPED flag on the actor and possibly maps and realizes its children if they are visible. Does nothing if the actor is not visible.
Calling this function is strongly disencouraged: the default implementation of #ClutterActorClass.map() will map all the children of an actor when mapping its parent.
When overriding map, it is mandatory to chain up to the parent implementation.
Sets an anchor point for the actor, and adjusts the actor postion so that the relative position of the actor toward its parent remains the same.
X coordinate of the anchor point
Y coordinate of the anchor point
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.
Moves an actor by the specified distance relative to its current position in pixels.
This function modifies the fixed position of an actor and thus removes it from any layout management. Another way to move an actor is with an anchor point, see clutter_actor_set_anchor_point(), or with an additional translation, using clutter_actor_set_translation().
Distance to move Actor on X axis.
Distance to move Actor on Y axis.
Checks whether an actor, or any of its children, is set to expand horizontally or vertically.
This function should only be called by layout managers that can assign extra space to their children.
If you want to know whether the actor was explicitly set to expand, use clutter_actor_get_x_expand() or clutter_actor_get_y_expand().
the direction of expansion
Emits a "notify" signal for the property property_name
on object
.
When possible, eg. when signaling a property change from within the class that registered the property, you should use g_object_notify_by_pspec() instead.
Note that emission of the notify signal may be blocked with g_object_freeze_notify(). In this case, the signal emissions are queued and will be emitted (in reverse order) when g_object_thaw_notify() is called.
the name of a property installed on the class of object
.
Emits a "notify" signal for the property specified by pspec
on object
.
This function omits the property name lookup, hence it is faster than g_object_notify().
One way to avoid using g_object_notify() from within the class that registered the properties, and using g_object_notify_by_pspec() instead, is to store the GParamSpec used with g_object_class_install_property() inside a static array, e.g.:
enum
{
PROP_0,
PROP_FOO,
PROP_LAST
};
static GParamSpec *properties[PROP_LAST];
static void
my_object_class_init (MyObjectClass *klass)
{
properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
0, 100,
50,
G_PARAM_READWRITE);
g_object_class_install_property (gobject_class,
PROP_FOO,
properties[PROP_FOO]);
}
and then notify a change on the "foo" property with:
g_object_notify_by_pspec (self, properties[PROP_FOO]);
the #GParamSpec of a property installed on the class of object
.
Renders the actor to display.
This function should not be called directly by applications. Call clutter_actor_queue_redraw() to queue paints, instead.
This function is context-aware, and will either cause a regular paint or a pick paint.
This function will emit the #ClutterActor::paint signal or the #ClutterActor::pick signal, depending on the context.
This function does not paint the actor if the actor is set to 0, unless it is performing a pick paint.
Parses the passed JSON node. The implementation must set the type of the passed #GValue pointer using g_value_init().
the #ClutterScript creating the scriptable instance
the generic value to be set
the name of the node
the JSON node to be parsed
Disables the effects of clutter_actor_push_internal().
Should be used by actors implementing the #ClutterContainer and with internal children added through clutter_actor_set_parent(), for instance:
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 clutter_actor_set_parent() is called; internal children are handled differently by Clutter, specifically when destroying their parent.
Call clutter_actor_pop_internal() when you finished adding internal children.
Nested calls to clutter_actor_push_internal() are allowed, but each one must by followed by a clutter_actor_pop_internal() call.
Queues up a redraw of an actor and any children. The redraw occurs once the main loop becomes idle (after the current batch of events has been processed, roughly).
Applications rarely need to call this, as redraws are handled automatically by modification functions.
This function will not do anything if self
is not visible, or
if the actor is inside an invisible part of the scenegraph.
Also be aware that painting is a NOP for actors with an opacity of 0
When you are implementing a custom actor you must queue a redraw whenever some private state changes that will affect painting or picking of your actor.
Queues a redraw on self
limited to a specific, actor-relative
rectangular area.
If clip
is %NULL this function is equivalent to
clutter_actor_queue_redraw().
a rectangular clip region, or %NULL
Indicates that the actor's size request or other layout-affecting properties may have changed. This function is used inside #ClutterActor subclass implementations, not by applications directly.
Queueing a new layout automatically queues a redraw as well.
Raises actor
to sibling
level, in the depth ordering.
This function calls the #ClutterContainerIface.raise() virtual function, which has been deprecated. The default implementation will call clutter_actor_set_child_above_sibling().
the actor to raise
the sibling to raise to, or %NULL to raise to the top
Raises self
to the top.
This function calls clutter_actor_raise() internally.
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.
Increase the reference count of object,
and possibly remove the
[floating][floating-ref] reference, if object
has a floating reference.
In other words, if the object is floating, then this call "assumes ownership" of the floating reference, converting it to a normal reference by clearing the floating flag while leaving the reference count unchanged. If the object is not floating, then this call adds a new normal reference increasing the reference count by one.
Since GLib 2.56, the type of object
will be propagated to the return type
under the same conditions as for g_object_ref().
Removes the #ClutterAction with the given name from the list
of actions applied to self
the name of the action to remove
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 g_object_ref(). When the actor has been removed,
the "actor-removed" signal is emitted by container
.
This function will call #ClutterContainerIface.remove(), which is a deprecated virtual function. The default implementation will call clutter_actor_remove_child().
Removes all children of self
.
This function releases the reference added by inserting a child actor
in the list of children of self
.
If the reference count of a child drops to zero, the child will be
destroyed. If you want to ensure the destruction of all the children
of self,
use clutter_actor_destroy_all_children().
Removes all transitions associated to self
.
Removes child
from the children of self
.
This function will release the reference added by
clutter_actor_add_child(), so if you want to keep using child
you will have to acquire a referenced on it before calling this
function.
This function will emit the #ClutterContainer::actor-removed
signal on self
.
Removes clip area from self
.
Removes constraint
from the list of constraints applied to self
The reference held by self
on the #ClutterConstraint will be released
a #ClutterConstraint
Removes the #ClutterConstraint with the given name from the list
of constraints applied to self
the name of the constraint to remove
Removes the #ClutterEffect with the given name from the list
of effects applied to self
the name of the effect to remove
Removes the transition stored inside a #ClutterActor using name
identifier.
If the transition is currently in progress, it will be stopped.
This function releases the reference acquired when the transition was added to the #ClutterActor.
the name of the transition to remove
Resets the parent actor of self
.
This function is logically equivalent to calling clutter_actor_unparent() and clutter_actor_set_parent(), but more efficiently implemented, as it ensures the child is not finalized when unparented, and emits the #ClutterActor::parent-set signal only once.
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.
Restores the easing state as it was prior to a call to clutter_actor_save_easing_state().
Releases all references to other objects. This can be used to break reference cycles.
This function should only be called from object system implementations.
Saves the current easing state for animatable properties, and creates a new state with the default values for easing mode and duration.
New transitions created after calling this function will inherit the duration, easing mode, and delay of the new easing state; this also applies to transitions modified in flight.
Stores the allocation of self
as defined by box
.
This function can only be called from within 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.
If the #ClutterActor is using a #ClutterLayoutManager delegate object
to handle the allocation of its children, this function will call
the clutter_layout_manager_allocate() function only if the
%CLUTTER_DELEGATE_LAYOUT flag is set on flags,
otherwise it is
expected that the subclass will call clutter_layout_manager_allocate()
by itself. For instance, the following code:
static void
my_actor_allocate (ClutterActor *actor,
const ClutterActorBox *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 actor
clutter_actor_set_allocation (actor, &new_alloc, new_flags);
}
is equivalent to this:
static void
my_actor_allocate (ClutterActor *actor,
const ClutterActorBox *allocation,
ClutterAllocationFlags flags)
{
ClutterLayoutManager *layout;
ClutterActorBox new_alloc;
adjust_allocation (allocation, &new_alloc);
clutter_actor_set_allocation (actor, &new_alloc, flags);
layout = clutter_actor_get_layout_manager (actor);
clutter_layout_manager_allocate (layout,
CLUTTER_CONTAINER (actor),
&new_alloc,
flags);
}
a #ClutterActorBox
allocation flags
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.
X coordinate of the anchor point
Y coordinate of the anchor point
Sets an anchor point on the actor, based on the given gravity (this is a convenience function wrapping clutter_actor_set_anchor_point()).
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 background color of a #ClutterActor.
The background color will be used to cover the whole allocation of the actor. The default background color of an actor is transparent.
To check whether an actor has a background color, you can use the #ClutterActor:background-color-set actor property.
The #ClutterActor:background-color property is animatable.
Sets child
to be above sibling
in the list of children of self
.
If sibling
is %NULL, child
will be the new last child of self
.
This function is logically equivalent to removing child
and using
clutter_actor_insert_child_above(), but it will not emit signals
or change state on child
.
a #ClutterActor child of self
a #ClutterActor child of self,
or %NULL
Changes the index of child
in the list of children of self
.
This function is logically equivalent to removing child
and
calling clutter_actor_insert_child_at_index(), but it will not
emit signals or change state on child
.
Sets child
to be below sibling
in the list of children of self
.
If sibling
is %NULL, child
will be the new first child of self
.
This function is logically equivalent to removing self
and using
clutter_actor_insert_child_below(), but it will not emit signals
or change state on child
.
a #ClutterActor child of self
a #ClutterActor child of self,
or %NULL
Sets the transformation matrix to be applied to all the children
of self
prior to their own transformations. The default child
transformation is the identity matrix.
If transform
is %NULL, the child transform will be unset.
The #ClutterActor:child-transform property is animatable.
Sets clip area for self
. The clip area is always computed from the
upper left corner of the actor, even if the anchor point is set
otherwise.
X offset of the clip rectangle
Y offset of the clip rectangle
Width of the clip rectangle
Height of the clip rectangle
Sets whether self
should be clipped to the same size as its
allocation
%TRUE to apply a clip tracking the allocation
Sets the gravity of the #ClutterContent used by self
.
See the description of the #ClutterActor:content-gravity property for more information.
The #ClutterActor:content-gravity property is animatable.
the #ClutterContentGravity
Sets the policy for repeating the #ClutterActor:content of a #ClutterActor. The behaviour is deferred to the #ClutterContent implementation.
the repeat policy
Sets the minification and magnification filter to be applied when scaling the #ClutterActor:content of a #ClutterActor.
The #ClutterActor:minification-filter will be used when reducing the size of the content; the #ClutterActor:magnification-filter will be used when increasing the size of the content.
the minification filter for the content
the magnification filter for the content
Each object carries around a table of associations from strings to pointers. This function lets you set an association.
If the object already had an association with that name, the old association will be destroyed.
Internally, the key
is converted to a #GQuark using g_quark_from_string().
This means a copy of key
is kept permanently (even after object
has been
finalized) — so it is recommended to only use a small, bounded set of values
for key
in your program, to avoid the #GQuark storage growing unbounded.
name of the key
data to associate with that key
Sets the Z coordinate of self
to depth
.
The unit used by depth
is dependant on the perspective setup. See
also clutter_stage_set_perspective().
Z co-ord
Set the disabled property. Disabled widgets have a "disabled" pseudo-class until disabled is set to #FALSE.
value to set
Sets the delay that should be applied before tweening animatable properties.
the delay before the start of the tweening, in milliseconds
Sets the duration of the tweening for animatable properties
of self
for the current easing state.
the duration of the easing, or %NULL
Sets the easing mode for the tweening of animatable properties
of self
.
an easing mode, excluding %CLUTTER_CUSTOM_MODE
Sets factory
to be the factory used for creating new items
A #MxItemFactory
Sets the current state of property_name
to value
the name of the animatable property to set
the value of the animatable property to set
Sets whether an actor has a fixed position set (and will thus be unaffected by any layout manager).
whether to use fixed position
Sets flags
on self
This function will emit notifications for the changed properties
the flags to set
Sets the actor's fixed position and forces its minimum and natural size, in pixels. This means the untransformed actor will have the given geometry. This is the same as calling clutter_actor_set_position() and clutter_actor_set_size().
Forces a height on an actor, causing the actor's preferred width and height (if any) to be ignored.
If height
is -1 the actor will use its preferred height instead of
overriding it, i.e. you can "unset" the height with -1.
This function sets both the minimum and natural size of the actor.
Requested new height for the actor, in pixels, or -1
Sets id_
as the unique Clutter script it for this instance of
#ClutterScriptableIface.
This name can be used by user interface designer applications to define a unique name for an object constructable using the UI definition language parsed by #ClutterScript.
the #ClutterScript id of the object
Set the item type used to create items representing each row in the model
A #GType
Sets the #ClutterLayoutManager delegate object that will be used to
lay out the children of self
.
The #ClutterActor will take a reference on the passed manager
which
will be released either when the layout manager is removed, or when
the actor is destroyed.
a #ClutterLayoutManager, or %NULL to unset it
Sets all the components of the margin of a #ClutterActor.
a #ClutterMargin
Sets the margin from the bottom of a #ClutterActor.
The #ClutterActor:margin-bottom property is animatable.
the bottom margin
Sets the margin from the left of a #ClutterActor.
The #ClutterActor:margin-left property is animatable.
the left margin
Sets the margin from the right of a #ClutterActor.
The #ClutterActor:margin-right property is animatable.
the right margin
Sets the margin from the top of a #ClutterActor.
The #ClutterActor:margin-top property is animatable.
the top margin
Sets the given name to self
. The name can be used to identify
a #ClutterActor.
Textual tag to apply to actor
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.
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.
New offscreen redirect flags for the actor.
Sets the actor's opacity, with zero being completely transparent and 255 (0xff) being fully opaque.
The #ClutterActor:opacity property is animatable.
New opacity value for the actor.
Sets the parent of self
to parent
.
This function will result in parent
acquiring a reference on self,
eventually by sinking its floating reference first. The reference
will be released by clutter_actor_unparent().
This function should only be called by legacy #ClutterActors implementing the #ClutterContainer interface.
Sets the position of the #ClutterActor:pivot-point around which the scaling and rotation transformations occur.
The pivot point's coordinates are in normalized space, with the (0, 0) point being the top left corner of the actor, and the (1, 1) point being the bottom right corner.
the normalized X coordinate of the pivot point
the normalized Y coordinate of the pivot point
Sets the component on the Z axis of the #ClutterActor:pivot-point around which the scaling and rotation transformations occur.
The pivot_z
value is expressed as a distance along the Z axis.
the Z coordinate of the actor's pivot point
Sets the actor's fixed position in pixels relative to any parent actor.
If a layout manager is in use, this position will override the layout manager and force a fixed position.
New left position of actor in pixels.
New top position of actor in pixels.
Sets a property on an object.
the name of the property to set
the value
Sets actor
as reactive. Reactive actors will receive events.
whether the actor should be reactive to events
Sets the geometry request mode of self
.
The mode
determines the order for invoking
clutter_actor_get_preferred_width() and
clutter_actor_get_preferred_height()
the request mode
Sets the rotation angle of self
around the given axis.
The rotation center coordinates used depend on the value of axis:
y
and z
x
and z
x
and y
The rotation coordinates are relative to the anchor point of the actor, set using clutter_actor_set_anchor_point(). If no anchor point is set, the upper left corner is assumed as the origin.
the axis of rotation
the angle of rotation
X coordinate of the rotation center
Y coordinate of the rotation center
Z coordinate of the rotation center
Sets the angle
of rotation of a #ClutterActor on the given axis
.
This function is a convenience for setting the rotation properties #ClutterActor:rotation-angle-x, #ClutterActor:rotation-angle-y, and #ClutterActor:rotation-angle-z.
The center of rotation is established by the #ClutterActor:pivot-point property.
the axis to set the angle one
the angle of rotation, in degrees
Scales an actor with the given factors.
The scale transformation is relative the the #ClutterActor:pivot-point.
The #ClutterActor:scale-x and #ClutterActor:scale-y properties are animatable.
double factor to scale actor by horizontally.
double factor to scale actor by vertically.
Scales an actor with the given factors around the given center point. The center point is specified in pixels relative to the anchor point (usually the top left corner of the actor).
The #ClutterActor:scale-x and #ClutterActor:scale-y properties are animatable.
double factor to scale actor by horizontally.
double factor to scale actor by vertically.
X coordinate of the center of the scaling
Y coordinate of the center of the scaling
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.
The #ClutterActor:scale-x and #ClutterActor:scale-y properties are animatable.
double factor to scale actor by horizontally.
double factor to scale actor by vertically.
the location of the scale center expressed as a compass direction.
Scales an actor on the Z axis by the given scale_z
factor.
The scale transformation is relative the the #ClutterActor:pivot-point.
The #ClutterActor:scale-z property is animatable.
the scaling factor along the Z axis
Sets the #ClutterShader to be used when rendering self
.
If shader
is %NULL this function will unset any currently set shader
for the actor.
Any #ClutterEffect applied to self
will take the precedence
over the #ClutterShader set using this function.
a #ClutterShader or %NULL to unset the shader.
Sets the value for a named parameter of the shader applied
to actor
.
the name of the parameter
the value of the parameter
Sets the value for a named float parameter of the shader applied
to actor
.
the name of the parameter
the value of the parameter
Sets the value for a named int parameter of the shader applied to
actor
.
the name of the parameter
the value of the parameter
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.
This function sets or unsets both the minimum and natural size.
New width of actor in pixels, or -1
New height of actor in pixels, or -1
Set the style class name
a new style class string
Set the style pseudo class. The string can contain multiple pseudo class names, separated by ':'.
a new pseudo class string
Sets the #ClutterTextDirection for an actor
The passed text direction must not be %CLUTTER_TEXT_DIRECTION_DEFAULT
If self
implements #ClutterContainer then this function will recurse
inside all the children of self
(including the internal ones).
Composite actors not implementing #ClutterContainer, or actors requiring special handling when the text direction changes, should connect to the #GObject::notify signal for the #ClutterActor:text-direction property
the text direction for self
Set the value, in milliseconds, of the "tooltip-delay" property. This is initially set to MX_WIDGET_TOOLTIP_TIMEOUT.
Set the tooltip text of the widget. Note that setting tooltip text will cause the widget to be set reactive. If you no longer need tooltips and you do not need the widget to be reactive, you must set ClutterActor::reactive to %FALSE.
text to set as the tooltip
Overrides the transformations of a #ClutterActor with a custom matrix, which will be applied relative to the origin of the actor's allocation and to the actor's pivot point.
The #ClutterActor:transform property is animatable.
Sets an additional translation transformation on a #ClutterActor, relative to the #ClutterActor:pivot-point.
the translation along the X axis
the translation along the Y axis
the translation along the Z axis
Forces a width on an actor, causing the actor's preferred width and height (if any) to be ignored.
If width
is -1 the actor will use its preferred width request
instead of overriding it, i.e. you can "unset" the width with -1.
This function sets both the minimum and natural size of the actor.
Requested new width for the actor, in pixels, or -1
Sets the actor's X coordinate, relative to its parent, in pixels.
Overrides any layout manager and forces a fixed position for the actor.
The #ClutterActor:x property is animatable.
the actor's position on the X axis
Sets the horizontal alignment policy of a #ClutterActor, in case the actor received extra horizontal space.
See also the #ClutterActor:x-align property.
the horizontal alignment policy
Sets whether a #ClutterActor should expand horizontally; this means that layout manager should allocate extra space for the actor, if possible.
Setting an actor to expand will also make all its parent expand, so that it's possible to build an actor tree and only set this flag on its leaves and not on every single actor.
whether the actor should expand horizontally
Sets the actor's Y coordinate, relative to its parent, in pixels.#
Overrides any layout manager and forces a fixed position for the actor.
The #ClutterActor:y property is animatable.
the actor's position on the Y axis
Sets the vertical alignment policy of a #ClutterActor, in case the actor received extra vertical space.
See also the #ClutterActor:y-align property.
the vertical alignment policy
Sets whether a #ClutterActor should expand horizontally; this means that layout manager should allocate extra space for the actor, if possible.
Setting an actor to expand will also make all its parent expand, so that it's possible to build an actor tree and only set this flag on its leaves and not on every single actor.
whether the actor should expand vertically
Sets the actor's position on the Z axis.
See #ClutterActor:z-position.
the position on the Z axis
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.
Should be called inside the implementation of the #ClutterActor::pick virtual function in order to check whether the actor should paint itself in pick mode or not.
This function should never be called directly by applications.
Flags an actor to be displayed. An actor that isn't shown will not be rendered on the stage.
Actors are visible by default.
If this function is called on an actor without a parent, the #ClutterActor:show-on-set-parent will be set to %TRUE as a side effect.
Calls clutter_actor_show() on all children of an actor (if any).
Show the tooltip for widget
Sorts a container's children using their depth. This function should not be normally used by applications.
Remove a specified datum from the object's data associations, without invoking the association's destroy handler.
name of the key
This function gets back user data pointers stored via
g_object_set_qdata() and removes the data
from object
without invoking its destroy() function (if any was
set).
Usually, calling this function is only required to update
user data pointers with a destroy notifier, for example:
void
object_add_to_user_list (GObject *object,
const gchar *new_string)
{
// the quark, naming the object data
GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
// retrieve the old string list
GList *list = g_object_steal_qdata (object, quark_string_list);
// prepend new string
list = g_list_prepend (list, g_strdup (new_string));
// this changed 'list', so we need to set it again
g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
}
static void
free_string_list (gpointer data)
{
GList *node, *list = data;
for (node = list; node; node = node->next)
g_free (node->data);
g_list_free (list);
}
Using g_object_get_qdata() in the above example, instead of g_object_steal_qdata() would have left the destroy function set, and thus the partial string list would have been freed upon g_object_set_qdata_full().
A #GQuark, naming the user data pointer
Emit the "style-changed" signal on stylable
to notify it that one or more
of the style properties has changed.
If stylable
is a #ClutterContainer then the "style-changed" notification is
propagated to it's children, since their style may depend on one or more
properties of the parent.
flags that control the style changing
Add a pseudo-class name to the list of pseudo classes, contained in the #MxStylable:style-pseudo-class property.
A pseudo-class name to add
Check if the given pseudo-class name is contained in the list of set pseudo classes on this #MxStylable object.
A pseudo-class name
Remove the specified pseudo class name from the list of pseudo classes contained in the #MxStylable:style-pseudo-class property.
A pseudo class name to remove
Thaw the view. This means that the view will now act on changes to the model.
Reverts the effect of a previous call to
g_object_freeze_notify(). The freeze count is decreased on object
and when it reaches zero, queued "notify" signals are emitted.
Duplicate notifications for each property are squashed so that at most one #GObject::notify signal is emitted for each property, in the reverse order in which they have been queued.
It is an error to call this function when the freeze count is zero.
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.
This function can be computationally intensive.
This function only works when the allocation is up-to-date, i.e. inside of the #ClutterActorClass.paint() implementation
x screen coordinate of the point to unproject
y screen coordinate of the point to unproject
Unsets the %CLUTTER_ACTOR_MAPPED flag on the actor and possibly unmaps its children if they were mapped.
Calling this function is not encouraged: the default #ClutterActor implementation of #ClutterActorClass.unmap() will also unmap any eventual children by default when their parent is unmapped.
When overriding #ClutterActorClass.unmap(), it is mandatory to chain up to the parent implementation.
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.
Removes the parent of self
.
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().
This function should only be called by legacy #ClutterActors implementing the #ClutterContainer interface.
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.
Decreases the reference count of object
. When its reference count
drops to 0, the object is finalized (i.e. its memory is freed).
If the pointer to the #GObject may be reused in future (for example, if it is an instance variable of another object), it is recommended to clear the pointer to %NULL rather than retain a dangling pointer to a potentially invalid #GObject instance. Use g_clear_object() for this.
Unsets flags
on self
This function will emit notifications for the changed properties
the flags to unset
Adds a #ClutterActor to container
. This function will emit the
"actor-added" signal. The actor should be parented to
container
. You cannot add a #ClutterActor to more than one
#ClutterContainer.
This function will call #ClutterContainerIface.add(), which is a deprecated virtual function. The default implementation will call clutter_actor_add_child().
Assigns the size of a #ClutterActor from the given box
.
This function should only be called on the children of an actor when overriding the #ClutterActorClass.allocate() virtual function.
This function will adjust the stored allocation to take into account the alignment flags set in the #ClutterActor:x-align and #ClutterActor:y-align properties, as well as the margin values set in the #ClutterActor:margin-top, #ClutterActor:margin-right, #ClutterActor:margin-bottom, and #ClutterActor:margin-left properties.
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.
new allocation of the actor, in parent-relative coordinates
flags that control the allocation
Calls the animate_property() virtual function for animatable
.
The initial_value
and final_value
#GValues must contain
the same type; value
must have been initialized to the same
type of initial_value
and final_value
.
All implementation of the #ClutterAnimatable interface must implement this function.
a #ClutterAnimation
the name of the animated property
the initial value of the animation interval
the final value of the animation interval
the progress factor
return location for the animation value
Creates the #ClutterChildMeta wrapping actor
inside the
container,
if the #ClutterContainerIface::child_meta_type
class member is not set to %G_TYPE_INVALID.
This function is only useful when adding a #ClutterActor to a #ClutterContainer implementation outside of the #ClutterContainer::add() virtual function implementation.
Applications should not call this function.
Destroys an actor. When an actor is destroyed, it will break any references it holds to other objects. If the actor is inside a container, the actor will be removed.
When you destroy a container, its children will be destroyed as well.
Note: you cannot destroy the #ClutterStage returned by clutter_stage_get_default().
Destroys the #ClutterChildMeta wrapping actor
inside the
container,
if any.
This function is only useful when removing a #ClutterActor to a #ClutterContainer implementation outside of the #ClutterContainer::add() virtual function implementation.
Applications should not call this function.
Finds the #GParamSpec for property_name
the name of the animatable property to find
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 #ClutterContainerIface.foreach() virtual function, which has been deprecated.
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 #ClutterContainerIface.foreach_with_internals() virtual function, which has been deprecated.
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
Gets the adjustment objects that store the offsets of the scrollable widget into its possible scrolling area.
Retrieves the id of scriptable
set using clutter_scriptable_set_id().
Retrieves the current state of property_name
and sets value
with it
the name of the animatable property to retrieve
a #GValue initialized to the type of the property to retrieve
Computes the requested minimum and natural heights for an actor, or if they are already computed, returns the cached values.
An actor may not get its request - depending on the layout manager that's in effect.
A request should not incorporate the actor's scale or anchor point; those transformations do not affect layout, only rendering.
available width to assume in computing desired height, or a negative value to indicate that no width is defined
Computes the requested minimum and natural widths for an actor, optionally depending on the specified height, or if they are already computed, returns the cached values.
An actor may not get its request - depending on the layout manager that's in effect.
A request should not incorporate the actor's scale or anchor point; those transformations do not affect layout, only rendering.
available height when computing the preferred width, or a negative value to indicate that no height is defined
Get the current style class name
Get the current style pseudo class. This can contain multiple pseudo class names, separated by ':'.
Asks the actor's implementation whether it may contain overlapping primitives.
For example; Clutter may use this to determine whether the painting should be redirected to an offscreen buffer to correctly implement the opacity property.
Custom actors can override the default response by implementing the #ClutterActorClass.has_overlaps() virtual function. See clutter_actor_set_offscreen_redirect() for more information.
Flags an actor to be hidden. A hidden actor will not be rendered on the stage.
Actors are visible by default.
If this function is called on an actor without a parent, the #ClutterActor:show-on-set-parent property will be set to %FALSE as a side-effect.
Calls clutter_actor_hide() on all child actors (if any).
Asks a #ClutterAnimatable implementation to interpolate a
a named property between the initial and final values of
a #ClutterInterval, using progress
as the interpolation
value, and store the result inside value
.
This function should be used for every property animation involving #ClutterAnimatables.
This function replaces clutter_animatable_animate_property().
the name of the property to interpolate
a #ClutterInterval with the animation range
the progress to use to interpolate between the initial and final values of the interval
Lowers actor
to sibling
level, in the depth ordering.
This function calls the #ClutterContainerIface.lower() virtual function, which has been deprecated. The default implementation will call clutter_actor_set_child_below_sibling().
the actor to raise
the sibling to lower to, or %NULL to lower to the bottom
Sets the %CLUTTER_ACTOR_MAPPED flag on the actor and possibly maps and realizes its children if they are visible. Does nothing if the actor is not visible.
Calling this function is strongly disencouraged: the default implementation of #ClutterActorClass.map() will map all the children of an actor when mapping its parent.
When overriding map, it is mandatory to chain up to the parent implementation.
Emits a "notify" signal for the property property_name
on object
.
When possible, eg. when signaling a property change from within the class that registered the property, you should use g_object_notify_by_pspec() instead.
Note that emission of the notify signal may be blocked with g_object_freeze_notify(). In this case, the signal emissions are queued and will be emitted (in reverse order) when g_object_thaw_notify() is called.
Renders the actor to display.
This function should not be called directly by applications. Call clutter_actor_queue_redraw() to queue paints, instead.
This function is context-aware, and will either cause a regular paint or a pick paint.
This function will emit the #ClutterActor::paint signal or the #ClutterActor::pick signal, depending on the context.
This function does not paint the actor if the actor is set to 0, unless it is performing a pick paint.
Parses the passed JSON node. The implementation must set the type of the passed #GValue pointer using g_value_init().
the #ClutterScript creating the scriptable instance
the generic value to be set
the name of the node
the JSON node to be parsed
Indicates that the actor's size request or other layout-affecting properties may have changed. This function is used inside #ClutterActor subclass implementations, not by applications directly.
Queueing a new layout automatically queues a redraw as well.
Raises actor
to sibling
level, in the depth ordering.
This function calls the #ClutterContainerIface.raise() virtual function, which has been deprecated. The default implementation will call clutter_actor_set_child_above_sibling().
the actor to raise
the sibling to raise to, or %NULL to raise to the top
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.
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 g_object_ref(). When the actor has been removed,
the "actor-removed" signal is emitted by container
.
This function will call #ClutterContainerIface.remove(), which is a deprecated virtual function. The default implementation will call clutter_actor_remove_child().
Sets the current state of property_name
to value
the name of the animatable property to set
the value of the animatable property to set
Sets id_
as the unique Clutter script it for this instance of
#ClutterScriptableIface.
This name can be used by user interface designer applications to define a unique name for an object constructable using the UI definition language parsed by #ClutterScript.
the #ClutterScript id of the object
Set the style class name
a new style class string
Set the style pseudo class. The string can contain multiple pseudo class names, separated by ':'.
a new pseudo class string
Flags an actor to be displayed. An actor that isn't shown will not be rendered on the stage.
Actors are visible by default.
If this function is called on an actor without a parent, the #ClutterActor:show-on-set-parent will be set to %TRUE as a side effect.
Calls clutter_actor_show() on all children of an actor (if any).
Sorts a container's children using their depth. This function should not be normally used by applications.
Emit the "style-changed" signal on stylable
to notify it that one or more
of the style properties has changed.
If stylable
is a #ClutterContainer then the "style-changed" notification is
propagated to it's children, since their style may depend on one or more
properties of the parent.
flags that control the style changing
Unsets the %CLUTTER_ACTOR_MAPPED flag on the actor and possibly unmaps its children if they were mapped.
Calling this function is not encouraged: the default #ClutterActor implementation of #ClutterActorClass.unmap() will also unmap any eventual children by default when their parent is unmapped.
When overriding #ClutterActorClass.unmap(), it is mandatory to chain up to the parent implementation.
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.
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.
This function essentially limits the life time of the closure
to
the life time of the object. That is, when the object is finalized,
the closure
is invalidated by calling g_closure_invalidate() on
it, in order to prevent invocations of the closure with a finalized
(nonexisting) object. Also, g_object_ref() and g_object_unref() are
added as marshal guards to the closure,
to ensure that an extra
reference count is held on object
during invocation of the
closure
. Usually, this function will be called on closures that
use this object
as closure data.
#GClosure to watch
Find the #GParamSpec with the given name for an
interface. Generally, the interface vtable passed in as g_iface
will be the default vtable from g_type_default_interface_ref(), or,
if you know the interface has already been loaded,
g_type_default_interface_peek().
any interface vtable for the interface, or the default vtable for the interface
name of a property to look up.
Add a property to an interface; this is only useful for interfaces that are added to GObject-derived types. Adding a property to an interface forces all objects classes with that interface to have a compatible property. The compatible property could be a newly created #GParamSpec, but normally g_object_class_override_property() will be used so that the object class only needs to provide an implementation and inherits the property description, default value, bounds, and so forth from the interface property.
This function is meant to be called from the interface's default
vtable initialization function (the class_init
member of
#GTypeInfo.) It must not be called after after class_init
has
been called for any object types implementing this interface.
If pspec
is a floating reference, it will be consumed.
any interface vtable for the interface, or the default vtable for the interface.
the #GParamSpec for the new property
Lists the properties of an interface.Generally, the interface
vtable passed in as g_iface
will be the default vtable from
g_type_default_interface_ref(), or, if you know the interface has
already been loaded, g_type_default_interface_peek().
any interface vtable for the interface, or the default vtable for the interface
Creates a new instance of a #GObject subtype and sets its properties.
Construction parameters (see %G_PARAM_CONSTRUCT, %G_PARAM_CONSTRUCT_ONLY) which are not explicitly specified are set to their default values.
the type id of the #GObject subtype to instantiate
an array of #GParameter
The contents of the this structure are private and should only be accessed through the public API.