Optionalproperties: Partial<St.DrawingArea.ConstructorProps>Internal$signalsCompile-time signal type information.
This instance property is generated only for TypeScript type checking. It is not defined at runtime and should not be accessed in JS code.
Static$gtypeThe 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
Paints a solid fill of the actor's allocation using the specified color.
The Clutter.Actor.background_color property is animatable.
Paints a solid fill of the actor's allocation using the specified color.
The Clutter.Actor.background_color property is animatable.
Applies a transformation matrix on each child of an actor.
Setting this property with a Graphene.Matrix will set the
Clutter.Actor.child_transform_set property to true as a side effect;
setting this property with null will set the
Clutter.Actor.child_transform_set property to false.
The Clutter.Actor.child_transform property is animatable.
Applies a transformation matrix on each child of an actor.
Setting this property with a Graphene.Matrix will set the
Clutter.Actor.child_transform_set property to true as a side effect;
setting this property with null will set the
Clutter.Actor.child_transform_set property to false.
The Clutter.Actor.child_transform property is animatable.
The visible region of the actor, in actor-relative coordinates, expressed as a Graphene.Rect.
Setting this property to null will unset the existing clip.
Setting this property will change the Clutter.Actor.has_clip property as a side effect.
The visible region of the actor, in actor-relative coordinates, expressed as a Graphene.Rect.
Setting this property to null will unset the existing clip.
Setting this property will change the Clutter.Actor.has_clip property as a side effect.
The Clutter.ColorState contains the properties like colorspace for each actors.
The Clutter.ColorState contains the properties like colorspace for each actors.
The Clutter.Content implementation that controls the content of the actor.
The bounding box for the Clutter.Content used by the actor.
The value of this property is controlled by the Clutter.Actor.allocation and Clutter.Actor.content_gravity properties of Clutter.Actor.
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 Clutter.Content set with the Clutter.Actor.content property.
Changing the value of this property will change the bounding box of the content; you can use the Clutter.Actor.content_box property to get the position and size of the content within the actor's allocation.
This property is meaningful only for Clutter.Content implementations that have a preferred size, and if the preferred size is smaller than the actor's allocation.
The Clutter.Actor.content_gravity property is animatable.
The repeat policy for the actor's Clutter.Actor.content.
The bounding box for the Clutter.Content used by the actor.
The value of this property is controlled by the Clutter.Actor.allocation and Clutter.Actor.content_gravity properties of Clutter.Actor.
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 Clutter.Content set with the Clutter.Actor.content property.
Changing the value of this property will change the bounding box of the content; you can use the Clutter.Actor.content_box property to get the position and size of the content within the actor's allocation.
This property is meaningful only for Clutter.Content implementations that have a preferred size, and if the preferred size is smaller than the actor's allocation.
The Clutter.Actor.content_gravity property is animatable.
The repeat policy for the actor's Clutter.Actor.content.
Adds Clutter.Effect to the list of effects be applied on a Clutter.Actor
This flag controls whether the Clutter.Actor.fixed_x and Clutter.Actor.fixed_y properties are used
The fixed X position of the actor in pixels.
Writing this property sets Clutter.Actor.fixed_position_set property as well, as a side effect
The fixed Y position of the actor in pixels.
Writing this property sets the Clutter.Actor.fixed_position_set property as well, as a side effect
This flag controls whether the Clutter.Actor.fixed_x and Clutter.Actor.fixed_y properties are used
The fixed X position of the actor in pixels.
Writing this property sets Clutter.Actor.fixed_position_set property as well, as a side effect
The fixed Y position of the actor in pixels.
Writing this property sets the Clutter.Actor.fixed_position_set property as well, as a side effect
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 Clutter.Actor.height property is animatable.
Whether or not the pointer is currently hovering over the widget. This is
only tracked automatically if St.Widget.track_hover is true, but you can
adjust it manually in any case.
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 Clutter.Actor.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 Clutter.Actor.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 Clutter.Actor.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 Clutter.Actor.margin_top property is animatable.
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 Clutter.Actor.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 Clutter.Actor.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 Clutter.Actor.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 Clutter.Actor.margin_top property is animatable.
A forced minimum height request for the actor, in pixels
Writing this property sets the Clutter.Actor.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 Clutter.Actor.min_height property is used
A forced minimum width request for the actor, in pixels
Writing this property sets the Clutter.Actor.min_width_set property as well, as a side effect.
This property overrides the usual width request of the actor.
A forced minimum height request for the actor, in pixels
Writing this property sets the Clutter.Actor.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 Clutter.Actor.min_height property is used
A forced minimum width request for the actor, in pixels
Writing this property sets the Clutter.Actor.min_width_set property as well, as a side effect.
This property overrides the usual width request of the actor.
A forced natural height request for the actor, in pixels
Writing this property sets the Clutter.Actor.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 Clutter.Actor.natural_height property is used
A forced natural width request for the actor, in pixels
Writing this property sets the Clutter.Actor.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 Clutter.Actor.natural_width property is used
A forced natural height request for the actor, in pixels
Writing this property sets the Clutter.Actor.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 Clutter.Actor.natural_height property is used
A forced natural width request for the actor, in pixels
Writing this property sets the Clutter.Actor.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 Clutter.Actor.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.
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 Clutter.Actor.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 Clutter.Actor.pivot_point property is animatable.
The Z component of the Clutter.Actor.pivot_point, expressed as a value along the Z axis.
The Clutter.Actor.pivot_point_z 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 Clutter.Actor.pivot_point property is animatable.
The Z component of the Clutter.Actor.pivot_point, expressed as a value along the Z axis.
The Clutter.Actor.pivot_point_z property is animatable.
The position of the origin of the actor.
This property is a shorthand for setting and getting the Clutter.Actor.x and Clutter.Actor.y properties at the same time.
The Clutter.Actor.position property is animatable.
The pseudo-class of the actor. Typical values include "hover", "active", "focus".
The pseudo-class of the actor. Typical values include "hover", "active", "focus".
Request mode for the Clutter.Actor. 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 Clutter.Actor "child".
The Clutter.Actor.get_preferred_size function will implement this check for you.
Request mode for the Clutter.Actor. 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 Clutter.Actor "child".
The Clutter.Actor.get_preferred_size function will implement this check for you.
The rotation angle on the X axis.
The Clutter.Actor.rotation_angle_x property is animatable.
The rotation angle on the Y axis
The Clutter.Actor.rotation_angle_y property is animatable.
The rotation angle on the Z axis
The Clutter.Actor.rotation_angle_z property is animatable.
The rotation angle on the X axis.
The Clutter.Actor.rotation_angle_x property is animatable.
The rotation angle on the Y axis
The Clutter.Actor.rotation_angle_y property is animatable.
The rotation angle on the Z axis
The Clutter.Actor.rotation_angle_z property is animatable.
The horizontal scale of the actor.
The Clutter.Actor.scale_x property is animatable.
The vertical scale of the actor.
The Clutter.Actor.scale_y property is animatable.
The scale factor of the actor along the Z axis.
The Clutter.Actor.scale_y property is animatable.
The horizontal scale of the actor.
The Clutter.Actor.scale_x property is animatable.
The vertical scale of the actor.
The Clutter.Actor.scale_y property is animatable.
The scale factor of the actor along the Z axis.
The Clutter.Actor.scale_y property is animatable.
The size of the actor.
This property is a shorthand for setting and getting the Clutter.Actor.width and Clutter.Actor.height at the same time.
The Clutter.Actor.size property is animatable.
Inline style information for the actor as a ';'-separated list of CSS properties.
The style-class of the actor for use in styling.
The style-class of the actor for use in styling.
The direction of the text inside a Clutter.Actor.
The direction of the text inside a Clutter.Actor.
Determines whether the widget tracks pointer hover state. If
true (and the widget is visible and reactive), the
St.Widget.hover property and "hover" style pseudo class will be
adjusted automatically as the pointer moves in and out of the
widget.
Determines whether the widget tracks pointer hover state. If
true (and the widget is visible and reactive), the
St.Widget.hover property and "hover" style pseudo class will be
adjusted automatically as the pointer moves in and out of the
widget.
Overrides the transformations of a Clutter.Actor with a custom matrix.
The matrix specified by the Clutter.Actor.transform property is applied to the actor and its children relative to the actor's Clutter.Actor.allocation and Clutter.Actor.pivot_point.
Application code should rarely need to use this function directly.
Setting this property with a Graphene.Matrix will set the
Clutter.Actor.transform_set property to true as a side effect;
setting this property with null will set the
Clutter.Actor.transform_set property to false.
The Clutter.Actor.transform property is animatable.
An additional translation applied along the X axis, relative to the actor's Clutter.Actor.pivot_point.
The Clutter.Actor.translation_x property is animatable.
An additional translation applied along the Y axis, relative to the actor's Clutter.Actor.pivot_point.
The Clutter.Actor.translation_y property is animatable.
An additional translation applied along the Z axis, relative to the actor's Clutter.Actor.pivot_point.
The Clutter.Actor.translation_z property is animatable.
An additional translation applied along the X axis, relative to the actor's Clutter.Actor.pivot_point.
The Clutter.Actor.translation_x property is animatable.
An additional translation applied along the Y axis, relative to the actor's Clutter.Actor.pivot_point.
The Clutter.Actor.translation_y property is animatable.
An additional translation applied along the Z axis, relative to the actor's Clutter.Actor.pivot_point.
The Clutter.Actor.translation_z property is animatable.
Whether the actor is set to be visible or not
See also Clutter.Actor.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 Clutter.Actor.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 Clutter.Actor.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 Clutter.Actor.x_expand property.
The alignment of an actor on the X axis, if the actor has been given extra space for its allocation. See also the Clutter.Actor.x_expand property.
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 Clutter.Actor.y property is animatable.
The alignment of an actor on the Y axis, if the actor has been given extra space for its allocation.
The alignment of an actor on the Y axis, if the actor has been given extra space for its allocation.
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 Clutter.Actor.z_position does not affect the paint or allocation order.
The Clutter.Actor.z_position property is animatable.
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 Clutter.Actor.z_position does not affect the paint or allocation order.
The Clutter.Actor.z_position property is animatable.
SignalconnectSignalconnect_SignalemitGets the Cairo context to paint to. This function must only be called
from a signal handler or virtual function for the St.DrawingArea::repaint
signal.
JavaScript code must call the special dispose function before returning from the signal handler or virtual function to avoid leaking memory:
function onRepaint(area) {
let cr = area.get_context();
// Draw to the context
cr.$dispose();
}
let area = new St.DrawingArea();
area.connect('repaint', onRepaint);
the Cairo context for the paint operation
Gets the size of the cairo surface being painted to, which is equal to the size of the content area of the widget. This function must only be called from a signal handler for the St.DrawingArea::repaint signal.
Will cause the actor to emit a St.DrawingArea::repaint signal before it is
next drawn to the scene. Useful if some parameters for the area being
drawn other than the size or style have changed. Note that
clutter_actor_queue_redraw() will simply result in the same
contents being drawn to the scene again.
Virtualvfunc_This method adds state as one of the accessible states for
actor. The list of states of an actor describes the current state
of user interface element actor and is provided so that assistive
technologies know how to present actor to the user.
Usually you will have no need to add accessible states for an object, as the accessible object can extract most of the states from the object itself. This method is only required when one cannot extract the information automatically from the object itself (i.e.: a generic container used as a toggle menu item will not automatically include the toggled state).
Atk.StateType state to add
Adds action to the list of actions applied to self
A Clutter.Action can only belong to one actor at a time
The Clutter.Actor 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 Clutter.Action
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 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 depth
of child, and will keep the list of children sorted.
This function will emit the Clutter.Actor::child-added signal
on self.
Adds constraint to the listof {@link Clutter.Constraint}s applied to self`
The Clutter.Actor will hold a reference on the constraint until
either Clutter.Actor.remove_constraint or
Clutter.Actor.clear_constraints is called.
A convenience function for setting the name of a Clutter.Constraint
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
Adds effect to the list of Clutter.Effects applied to self
The Clutter.Actor will hold a reference on the effect until either
Clutter.Actor.remove_effect or Clutter.Actor.clear_effects is
called.
A convenience function for setting the name of a Clutter.Effect
while adding it to the list of effectss applied to self
This function is the logical equivalent of:
clutter_actor_meta_set_name (CLUTTER_ACTOR_META (effect), name);
clutter_actor_add_effect (self, effect);
Adds style_class to actor's style class name list, if it is not
already present.
a style class name string
Adds pseudo_class to actor's pseudo class list, if it is not
already present.
a pseudo class string
Adds a transition to the Clutter.Actor's list of animations.
The name string is a per-actor unique identifier of the transition: only
one Clutter.Transition 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 Clutter.Transition to add
Assigns the size of a Clutter.Actor from the given box.
This function should only be called on the children of an actor when overriding the Clutter.Actor.allocate virtual function.
This function will adjust the stored allocation to take into account the alignment flags set in the Clutter.Actor.x_align and Clutter.Actor.y_align properties, as well as the margin values set in theClutter.Actor.margin_top, Clutter.Actor.margin_right, Clutter.Actor.margin_bottom, and Clutter.Actor.margin_left properties.
This function will respect the easing state of the Clutter.Actor 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
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 Clutter.ActorBox are not set to 0, the
allocation will be offset by their value.
This function takes into consideration the geometry request specified by the Clutter.Actor.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 Clutter.Actor.x_align and Clutter.Actor.y_align properties, instead, and just call Clutter.Actor.allocate inside their Clutter.Actor.allocate implementation.
a Clutter.ActorBox, 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
Allocates self taking into account the Clutter.Actor'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);
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
Allocates the natural size of self.
This function is a utility call for Clutter.Actor 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 Clutter.Actor.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 Clutter.ActorClass.allocate virtual function.
the actor's X coordinate
the actor's Y coordinate
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 Clutter.Stage. 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 Clutter.Actor ancestor, or null to use the default Clutter.Stage
A point as Graphene.Point3D
Transforms point in coordinates relative to the actor
into screen-relative coordinates with the current actor
transformation (i.e. scale, rotation, etc)
A point as Graphene.Point3D
Binds a Gio.ListModel to a Clutter.Actor.
If the Clutter.Actor was already bound to a Gio.ListModel, the previous binding is destroyed.
The existing children of Clutter.Actor are destroyed when setting a
model, and new children are created and added, representing the contents
of the model. The Clutter.Actor is updated whenever the model changes.
If model is null, the Clutter.Actor is left empty.
When a Clutter.Actor is bound to a model, adding and removing children directly is undefined behaviour.4
a function that creates Clutter.Actor 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.Object instance to be updated with the same value of the "active" property of the action GObject.Object instance.
If flags contains GObject.BindingFlags.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
GObject.Binding 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.Object can have multiple bindings.
the property on source to bind
the target GObject.Object
the property on target to bind
flags to pass to GObject.Binding
the GObject.Binding instance representing the binding between the two GObject.Object instances. The binding is released whenever the GObject.Binding reference count reaches zero.
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.Object
the property on target to bind
flags to pass to GObject.Binding
a GObject.Closure wrapping the transformation function from the source to the target, or null to use the default
a GObject.Closure wrapping the transformation function from the target to the source, or null to use the default
the GObject.Binding instance representing the binding between the two GObject.Object instances. The binding is released whenever the GObject.Binding reference count reaches zero.
Blocks a handler of an instance so it will not be called during any signal emissions
Handler ID of the handler to be blocked
Clears the list of actions applied to self
Clears the list of constraints applied to self
Clears the list of effects applied to self
Determines if descendant is contained inside self (either as an
immediate child, or as a deeper descendant). If self and
descendant point to the same actor then it will also return true.
A Clutter.Actor, possibly contained in self
whether descendent is contained within self
Run the next stage of the paint sequence. This function should only be called within the implementation of the ‘run’ virtual of a Clutter.Effect. 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.
Run the next stage of the pick sequence. This function should only be called within the implementation of the ‘pick’ virtual of a Clutter.Effect. It will cause the run method of the next effect to be applied, or it will pick the actual actor if the current effect is the last effect in the chain.
Creates a Pango.Context for the given actor. The Pango.Context is already configured using the appropriate font map, resolution and font options.
See also Clutter.Actor.get_pango_context.
the newly created Pango.Context. Use g_object_unref() on the returned value to deallocate its resources
Creates a new Pango.Layout from the same Pango.Context used
by the Clutter.Actor. The Pango.Layout is already configured
with the font map, resolution and font options, and the
given text.
If you want to keep around a Pango.Layout created by this
function you will have to connect to the Clutter.Backend.SignalSignatures.font_changed | Clutter.Backend::font-changed
and Clutter.Backend.SignalSignatures.resolution_changed | Clutter.Backend::resolution-changed signals, and call
pango_layout_context_changed() in response to them.
the text to set on the Pango.Layout, or null
the newly created Pango.Layout. Use g_object_unref() when done
Creates a Clutter.PaintNode initialized using the state of the given Clutter.Actor, ready to be used inside the implementation of the Clutter.ActorClass.paint_node virtual function.
The returned paint node has the geometry set to the size of the Clutter.Actor.content_box property; it uses the filters specified in the Clutter.Actor.minification_filter and Clutter.Actor.magnification_filter properties; and respects the Clutter.Actor.content_repeat property.
The newly created ClutterPaintNode4
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.
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
Clutter.Actor::destroy signal is emitted on each child of the
actor.
By default, Clutter.Actor will emit the Clutter.Actor::destroy signal
when its reference count drops to 0; the default handler of the
Clutter.Actor::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.
Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
Handler ID of the handler to be disconnected
Ensures that widget has read its style information and propagated any
changes to its children.
This function is used to emit an event on the main stage. You should rarely need to use this function, except for synthetising events.
the return value from the signal emission: true if the actor handled the event, or false if the event was not handled
Finds the GObject.ParamSpec for property_name
the name of the animatable property to find
The GObject.ParamSpec for the given property or null
This function is intended for GObject.Object 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().
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.Object::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 Clutter.ActorBox coordinates as follows:
Returns the accessible object that describes the actor to an assistive technology.
If no class-specific Atk.Object implementation is available for the actor instance in question, it will inherit an Atk.Object implementation from the first ancestor class for which such an implementation is defined.
The documentation of the https://gnome.pages.gitlab.gnome.org/at-spi2-core/atk/ library contains more information about accessible objects and their uses.
the Atk.Object associated with actor
Gets the accessible name for this widget. See
clutter_actor_set_accessible_name() for more information.
a character string representing the accessible name of the widget.
Retrieves the Clutter.Action with the given name in the list
of actions applied to self
the name of the action to retrieve
a Clutter.Action for the given name, or null. The returned Clutter.Action is owned by the actor and it should not be unreferenced directly
Retrieves the list of actions applied to self
a copy of the list of Clutter.Actions. The contents of the list are owned by the Clutter.Actor. Use g_list_free() to free the resources allocated by the returned GLib.List
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 translation; 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.
Retrieves the color set using Clutter.Actor.set_background_color.
Returns the current value of the can-focus property. See
st_widget_set_can_focus() for more information.
current value of can-focus on widget
Retrieves the actor at the given index_ inside the list of
children of self.
the position in the list of children
a pointer to a Clutter.Actor, or null
Retrieves the child transformation matrix set using
Clutter.Actor.set_child_transform; if none is currently set,
the transform matrix will be initialized to the identity matrix.
Retrieves the list of children of self.
A newly allocated GLib.List of Clutter.Actors. Use g_list_free() when done.
Gets the clip area for self, if any is set.
Retrieves the value set using clutter_actor_set_clip_to_allocation()
true if the Clutter.Actor is clipped to its allocation
Retrieves the color_state of a Actor set by Actor.set_color_state.
Retrieves the Clutter.Constraint with the given name in the list
of constraints applied to self
the name of the constraint to retrieve
a Clutter.Constraint for the given name, or null. The returned Clutter.Constraint is owned by the actor and it should not be unreferenced directly
Retrieves the list of constraints applied to self
a copy of the list of Clutter.Constraints. The contents of the list are owned by the Clutter.Actor. Use g_list_free() to free the resources allocated by the returned GLib.List
Retrieves the contents of self.
a pointer to the Clutter.Content instance, or null if none was set
Retrieves the bounding box for the Clutter.Content of self.
The bounding box is relative to the actor's allocation.
If no Clutter.Content 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 Clutter.Actor.
If the Clutter.Content used by the actor has a preferred size, then it is possible to modify the content box by using the Clutter.Actor.content_gravity property.
Retrieves the content gravity as set using Clutter.Actor.set_content_gravity.
the content gravity
Retrieves the repeat policy for a Clutter.Actor set by Clutter.Actor.set_content_repeat.
the content repeat policy
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
the data if found, or null if no such data exists.
Retrieves the delay that should be applied when tweening animatable properties.
a delay, in milliseconds
Retrieves the duration of the tweening for animatable
properties of self for the current easing state.
the duration of the tweening, in milliseconds
Retrieves the easing mode for the tweening of animatable properties
of self for the current easing state.
an easing mode
Retrieves the Clutter.Effect with the given name in the list
of effects applied to self
the name of the effect to retrieve
a Clutter.Effect for the given name, or null. The returned Clutter.Effect is owned by the actor and it should not be unreferenced directly
Retrieves the Clutter.Effects applied on self, if any
a list of Clutter.Effects, or null. The elements of the returned list are owned by Clutter and they should not be freed. You should free the returned list using g_list_free() when done
Retrieves the first child of self.
The returned pointer is only valid until the scene graph changes; it
is not safe to modify the list of children of self while iterating
it.
a pointer to a Clutter.Actor, or null
This function gets the fixed position of the actor, if set. If there
is no fixed position set, this function returns false and doesn't set
the x and y coordinates.
true if the fixed position is set, false if it isn't
Checks whether an actor has a fixed position set (and will thus be unaffected by any layout manager).
true if the fixed position is set on the actor
Gets a list of the focusable children of widget, in "Tab"
order. By default, this returns all visible
(as in Clutter.Actor.is_visible) children of widget.
widget's focusable children
Retrieves the height of a Clutter.Actor.
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 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.
the height of the actor, in pixels
If St.Widget.track_hover is set, this returns whether the pointer is currently over the widget.
current value of hover on widget
Retrieves the current state of property_name and sets value with it
the name of the animatable property to retrieve
a GObject.Value initialized to the type of the property to retrieve
Retrieves the last child of self.
The returned pointer is only valid until the scene graph changes; it
is not safe to modify the list of children of self while iterating
it.
a pointer to a Clutter.Actor, or null
Retrieves the Clutter.LayoutManager used by self.
a pointer to the Clutter.LayoutManager, or null
Retrieves all the components of the margin of a Clutter.Actor.
Retrieves the number of children of self.
the number of children of an actor
Retrieves the name of self.
the name of the actor, or null. The returned string is owned by the actor and should not be modified or freed.
Retrieves the sibling of self that comes after it in the list
of children of self's parent.
The returned pointer is only valid until the scene graph changes; it
is not safe to modify the list of children of self while iterating
it.
a pointer to a Clutter.Actor, or null
Retrieves whether to redirect the actor to an offscreen buffer, as
set by clutter_actor_set_offscreen_redirect().
the value of the offscreen-redirect property of the actor
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().
the opacity of the actor
See clutter_actor_set_opacity_override()
the override value for the actor's opacity, or -1 if no override is set.2
Retrieves the paint volume of the passed Clutter.Actor, 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.
true if a 2D paint box could be determined, else false.
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.
The actor opacity value.
Retrieves the 'paint' visibility of an actor recursively checking for non visible parents.
This is by definition the same as clutter_actor_is_mapped.
true if the actor is visible and will be painted.
Retrieves the paint volume of the passed Clutter.Actor, 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 Clutter.Actor.get_paint_volume virtual function of the Clutter.Actor class. Sub-classes of Clutter.Actor should not usually care about overriding the default implementation, unless they are, for instance: painting outside their allocation, or actors with a depth factor (not in terms of depth but real 3D depth).
Note: 2D actors overriding Clutter.Actor.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.PaintVolume.set_depth.)
a pointer to a Clutter.PaintVolume, or null if no volume could be determined. The returned pointer is not guaranteed to be valid across multiple frames; if you want to keep it, you will need to copy it using Clutter.PaintVolume.copy.
Retrieves the Pango.Context for self. The actor's Pango.Context
is already configured using the appropriate font map, resolution
and font options.
Unlike clutter_actor_create_pango_context(), this context is owend
by the Clutter.Actor and it will be updated each time the options
stored by the Clutter.Backend change.
You can use the returned Pango.Context to create a Pango.Layout
and render text using clutter_show_layout() to reuse the
glyphs cache also used by Clutter.
the Pango.Context for a Clutter.Actor. The returned Pango.Context is owned by the actor and should not be unreferenced by the application code
Retrieves the parent of self.
The Clutter.Actor parent, or null if no parent is set
Retrieves the coordinates of the Clutter.Actor.pivot_point.
Retrieves the Z component of the Clutter.Actor.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 translation; 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 Clutter.Actor.get_preferred_width and Clutter.Actor.get_preferred_height, and check the actor's preferred geometry management using the Clutter.Actor.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 scaleor translation; 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
Retrieves the sibling of self that comes before it in the list
of children of self's parent.
The returned pointer is only valid until the scene graph changes; it
is not safe to modify the list of children of self while iterating
it.
a pointer to a Clutter.Actor, or null
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 GObject.Value.unset.
Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
The name of the property to get
Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
This function gets back user data pointers stored via
g_object_set_qdata().
A GLib.Quark, naming the user data pointer
The user data pointer set, or null
Checks whether actor is marked as reactive.
true if the actor is reactive
Retrieves the geometry request mode of self
the request mode for the actor
Retrieves the resource scale for this actor.
The resource scale refers to the scale the actor should use for its resources. For example if an actor draws a a picture of size 100 x 100 in the stage coordinate space, it should use a texture of twice the size (i.e. 200 x 200) if the resource scale is 2.
The resource scale is determined by calculating the highest Clutter.StageView scale the actor will get painted on.
Note that the scale returned by this function is only guaranteed to be correct when queried during the paint cycle, in all other cases this function will only return a best guess. If your implementation really needs to get a resource scale outside of the paint cycle, make sure to subscribe to the "resource-scale-changed" signal to get notified about the new, correct resource scale before painting.
Also avoid getting the resource scale for actors that are not attached to a stage. There's no sane way for Clutter to guess which Clutter.StageView the actor is going to be painted on, so you'll probably end up receiving the "resource-scale-changed" signal and having to rebuild your resources.
The best guess this function may return is usually just the last resource scale the actor got painted with. If this resource scale couldn't be found because the actor was never painted so far or Clutter was unable to determine its position and size, this function will return the resource scale of a parent.
The resource scale the actor should use for its textures
Retrieves the angle of rotation set by clutter_actor_set_rotation_angle().
the axis of the rotation
the angle of rotation, in degrees
Retrieves an actors scale factors.
Retrieves the scaling factor along the Z axis, as set using Clutter.Actor.set_scale_z.
the scaling factor along the Z axis
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.
Retrieves the Clutter.Stage where actor is contained.
the stage containing the actor, or null
Get the current inline style string. See st_widget_set_style().
The inline style string, or null. The string is owned by the St.Widget and should not be modified or freed.
Get the current style class name
the class name string. The string is owned by the St.Widget and should not be modified or freed.
Get the current style pseudo class list.
Note that an actor can have multiple pseudo classes; if you just
want to test for the presence of a specific pseudo class, use
st_widget_has_style_pseudo_class().
the pseudo class list string. The string is owned by the St.Widget and should not be modified or freed.
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
the Clutter.TextDirection for the actor
Gets the theme node holding style information for the widget. The theme node is used to access standard and custom CSS properties of the widget.
Note: it is a fatal error to call this on a widget that is not been added to a stage.
the theme node for the widget. This is owned by the widget. When attributes of the widget or the environment that affect the styling change (for example the style_class property of the widget), it will be recreated, and the ::style-changed signal will be emitted on the widget.
Returns the current value of the St.Widget.track_hover property. See
st_widget_set_track_hover() for more information.
current value of track-hover on widget
Retrieves the current transformation matrix of a Clutter.Actor.
Gets the transformed bounding rect of an actor, in pixels relative to the
stage. Using this outside of paint() may result in outdated results.
The result can only be assumed valid inside a paint() method, or an
allocate() function of an actor that explicitly gets allocated after self;
anywhere else, it may be out-of-date.
Retrieves the 3D paint volume of an actor like
Clutter.Actor.get_paint_volume does 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.PaintVolume.union.
A Clutter.Actor that is an ancestor of self (or null for the stage)
a pointer to a Clutter.PaintVolume, or null if no volume could be determined.
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 Clutter.Transition of a Clutter.Actor 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_angle (actor, CLUTTER_Y_AXIS, 360.0);
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 Clutter.Actor::transition-stopped signal, using the
transition name as the signal detail.
the name of the transition
a Clutter.Transition, or null if none was found to match the passed name; the returned instance is owned by Clutter and it should not be freed
Retrieves the translation set using clutter_actor_set_translation().
Retrieves the width of a Clutter.Actor.
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 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.
the width of the actor, in pixels
Retrieves the X coordinate of a Clutter.Actor.
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, this function will return that coordinate.
If both the allocation and a fixed position are missing, this function will return 0.
the X coordinate, in pixels, ignoring any transformation (i.e. scaling, rotation)
Retrieves the horizontal alignment policy set using Clutter.Actor.set_x_align.
the horizontal alignment policy.
Retrieves the value set with Clutter.Actor.set_x_expand.
See also: Clutter.Actor.needs_expand
true if the actor has been set to expand
Retrieves the Y coordinate of a Clutter.Actor.
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, this function will return that coordinate.
If both the allocation and a fixed position are missing, this function will return 0.
the Y coordinate, in pixels, ignoring any transformation (i.e. scaling, rotation)
Retrieves the vertical alignment policy set using Clutter.Actor.set_y_align.
the vertical alignment policy.
Retrieves the value set with Clutter.Actor.set_y_expand.
See also: Clutter.Actor.needs_expand
true if the actor has been set to expand
Retrieves the actor's position on the Z axis.
the 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 Clutter.Stage including self
to this Clutter.Actor.
Returns whether the actor has any actions applied.
true if the actor has any actions, false otherwise
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.
true if the actor has an up-to-date allocation
Returns whether the actor has any constraints applied.
true if the actor has any constraints, false otherwise
Returns whether the actor has any effects applied.
true if the actor has any effects, false otherwise
Checks whether self is the Clutter.Actor that has key focus
true if the actor has key focus, and false otherwise
Returns whether a Clutter.Actor or any parent actors have mapped clones
that are clone-painting self.
true if the actor has mapped clones, false otherwise
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 Clutter.Actor.has_overlaps. See Clutter.Actor.set_offscreen_redirect for more information.
true if the actor may have overlapping primitives, and false otherwise
Tests if actor's style class list includes style_class.
a style class string
whether or not actor's style class list includes style_class.
Tests if actor's pseudo class list includes pseudo_class.
a pseudo class string
whether or not actor's pseudo class list includes pseudo_class.
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
Clutter.Actor.show_on_set_parent property will be set to false
as a side-effect.
Increases the culling inhibitor counter. Inhibiting culling forces the actor to be painted even when outside the visible bounds of the stage view.
This is usually necessary when an actor is being painted on another paint context.
Pair with clutter_actor_uninhibit_culling() when the actor doesn't
need to be painted anymore.
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 depth
of child.
This function will emit the Clutter.Actor::child-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 depth
of child.
This function will emit the Clutter.Actor::child-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 depth
of child.
This function will emit the Clutter.Actor::child-added signal
on self.
Asks a Clutter.Animatable implementation to interpolate a
a named property between the initial and final values of
a Clutter.Interval, using progress as the interpolation
value, and store the result inside value.
This function should be used for every property animation involving Clutter.Animatables.
the name of the property to interpolate
a Clutter.Interval with the animation range
the progress to use to interpolate between the initial and final values of the interval
true if the interpolation was successful, and false otherwise
Invalidates the cached paint volume of self. This is needed for
implementations overriding the Clutter.Actor.get_paint_volume
virtual function and has to be called every time the paint volume
returned by that function would change.
Invalidate the cached transformation matrix of self.
This is needed for implementations overriding the apply_transform()
vfunc and has to be called if the matrix returned by apply_transform()
would change.
Checks whether object has a [floating][floating-ref] reference.
true if object has a floating reference
Checks whether self is being currently painted by a Clutter.Clone
This function is useful only inside implementations of the Clutter.Actor.paint virtual function.
This function should not be used by applications
true if the Clutter.Actor is currently being painted by a Clutter.Clone, and false otherwise
Checks whether a Clutter.Actor has been set as mapped.
See also Clutter.Actor.mapped
true if the actor is mapped4
Checks whether actor is marked as no layout.
That means the actor provides an explicit layout management
policy for its children; this will prevent Clutter from automatic
queueing of relayout and will defer all layouting to the actor itself
true if the actor is marked as no layout
Checks whether any rotation is applied to the actor.
true if the actor is rotated.
Checks whether the actor is scaled in either dimension.
true if the actor is scaled.
Checks whether an actor is marked as visible.
true if the actor visible4
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 discouraged: the default implementation of Clutter.Actor.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.
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
additional translation, using clutter_actor_set_translation().
Distance to move Actor on X axis.
Distance to move Actor on Y axis.
Tries to update the keyboard focus within widget in response to a
keyboard event.
If from is a descendant of widget, this attempts to move the
keyboard focus to the next descendant of widget (in the order
implied by direction) that has the St.Widget.can_focus property
set. If from is null, this attempts to focus either widget
itself, or its first descendant in the order implied by
direction. If from is outside of widget, it behaves as if it was
a descendant if direction is one of the directional arrows and as
if it was null otherwise.
If a container type is marked St.Widget.can_focus, the expected behavior is that it will only take up a single slot on the focus chain as a whole, rather than allowing navigation between its child actors (or having a distinction between itself being focused and one of its children being focused).
Some widget classes might have slightly different behavior from the above, where that would make more sense.
If wrap_around is true and from is a child of widget, but the
widget has no further children that can accept the focus in the
given direction, then st_widget_navigate_focus() will try a second
time, using a null from, which should cause it to reset the focus
to the first available widget in the given direction.
the actor that the focus is coming from
the direction focus is moving in
whether focus should wrap around
true if clutter_actor_grab_key_focus() has been called on an actor. false if not.
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
true if the actor should expand
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.:
typedef enum
{
PROP_FOO = 1,
PROP_LAST
} MyObjectProperty;
static GParamSpec *properties[PROP_LAST];
static void
my_object_class_init (MyObjectClass *klass)
{
properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
0, 100,
50,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
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 GObject.ParamSpec 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 call the Clutter.Actor.paint virtual function.
This function does not paint the actor if the actor is set to 0, unless it is performing a pick paint.
Paint the background of the widget. This is meant to be called by subclasses of StWidget that need to paint the background without painting children.
Retrieves the list of Clutter.StageViews the actor is being painted on.
If this function is called during the paint cycle, the list is guaranteed to be up-to-date, if called outside the paint cycle, the list will contain the views the actor was painted on last.
The list returned by this function is not updated when the actors visibility changes: If an actor gets hidden and is not being painted anymore, this function will return the list of views the actor was painted on last.
If an actor is not attached to a stage (realized), this function will always return an empty list.
The list of Clutter.StageViews the actor is being painted on. The list and its contents are owned by the Clutter.Actor and the list may not be freed or modified.
Returns the theme node for the widget if it has already been
computed, null if the widget hasn't been added to a stage or the theme
node hasn't been computed. If null is returned, then ::style-changed
will be reliably emitted before the widget is allocated or painted.
the theme node for the widget. This is owned by the widget. When attributes of the widget or the environment that affect the styling change (for example the style_class property of the widget), it will be recreated, and the ::style-changed signal will be emitted on the widget.
Logs (does a virtual paint of) a rectangle for picking. Note that box is
in the actor's own local coordinates, so is usually {0,0,width,height}
to include the whole actor. That is unless the actor has a shaped input
region in which case you may wish to log the (multiple) smaller rectangles
that make up the input region.
A rectangle in the actor's own local coordinates.
Asks the widget to pop-up a context menu by emitting St.Widget.SignalSignatures.popup_menu | St.Widget::popup-menu.
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.
Indicates that the actor's size request or other layout-affecting properties may have changed. This function is used inside Clutter.Actor subclass implementations, not by applications directly.
Queueing a new layout automatically queues a redraw as well.
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.
Increases the reference count of object.
Since GLib 2.56, if GLIB_VERSION_MAX_ALLOWED is 2.56 or greater, the type
of object will be propagated to the return type (using the GCC typeof()
extension), so any casting the caller needs to do on the return type must be
explicit.
the same object
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().
object
This method removes state as on of the accessible states for
actor. See Clutter.Actor.add_accessible_state for more information.
Removes action from the list of actions applied to self
The reference held by self on the Clutter.Action will be released
Removes the Clutter.Action with the given name from the list
of actions applied to self
the name of the action to remove
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 Clutter.Actor::child-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 Clutter.Constraint will be released
Removes the Clutter.Constraint with the given name from the list
of constraints applied to self
the name of the constraint to remove
Removes effect from the list of effects applied to self
The reference held by self on the Clutter.Effect will be released
Removes the Clutter.Effect with the given name from the list
of effects applied to self
the name of the effect to remove
Removes style_class from actor's style class name, if it is
present.
a style class name string
Removes pseudo_class from actor's pseudo class, if it is present.
a pseudo class string
Removes the transition stored inside a Clutter.Actor 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 Clutter.Actor.
the name of the transition to remove
Replaces old_child with new_child in the list of children of self.
the child of self to replace
the Clutter.Actor to replace old_child
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.
Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
Object containing the properties to set
This method allows to set a customly created accessible object to this widget
NULL is a valid value for accessible. That contemplates the
hypothetical case of not needing anymore a custom accessible object
for the widget. Next call of Clutter.Actor.get_accessible would
create and return a default accessible.
It assumes that the call to atk_object_initialize that bound the gobject with the custom accessible object was already called, so not a responsibility of this method.
This method sets name as the accessible name for self.
Usually you will have no need to set the accessible name for an object, as usually there is a label for most of the interface elements.
a character string to be set as the accessible name
This method sets role as the accessible role for self. This
role describes what kind of user interface element self is and
is provided so that assistive technologies know how to present
self to the user.
Usually you will have no need to set the accessible role for an
object, as this information is extracted from the context of the
object (ie: a StButton has by default a push button role). This
method is only required when you need to redefine the role
currently associated with the widget, for instance if it is being
used in an unusual way (ie: a StButton used as a togglebutton), or
if a generic object is used directly (ie: a container as a menu
item).
If role is #ATK_ROLE_INVALID, the role will not be changed
and the accessible's default role will be used instead.
Stores the allocation of self as defined by box.
This function can only be called from within the implementation of the Clutter.Actor.allocate virtual function.
The allocation box should have been adjusted to take into account
constraints, alignment, and margin properties.
This function should only be used by subclasses of Clutter.Actor that wish to store their allocation but cannot chain up to the parent's implementation; the default implementation of the Clutter.Actor.allocate virtual function will call this function.
Sets the background color of a Clutter.Actor.
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 Clutter.Actor.background_color_set actor property.
The Clutter.Actor.background_color property is animatable.
a Cogl.Color, or null to unset a previously set color
Marks widget as being able to receive keyboard focus via
keyboard navigation.
true if the widget can receive keyboard focus via keyboard navigation
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 Clutter.Actor child of self
a Clutter.Actor 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.
a Clutter.Actor child of self
the new index for 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 Clutter.Actor child of self
a Clutter.Actor 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 Clutter.Actor.child_transform property is animatable.
a Graphene.Matrix, or null
Sets clip area for self. The clip area is always computed from the
upper left corner of the actor.
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 contents of a Clutter.Actor.
a Clutter.Content, or null
Sets the gravity of the Clutter.Content used by self.
See the description of the Clutter.Actor.content_gravity property for more information.
The Clutter.Actor.content_gravity property is animatable.
Sets the policy for repeating the Clutter.Actor.content of a Clutter.Actor. The behaviour is deferred to the Clutter.Content implementation.
the repeat policy
Sets the minification and magnification filter to be applied when scaling the Clutter.Actor.content of a Clutter.Actor.
The Clutter.Actor.minification_filter will be used when reducing the size of the content; the Clutter.Actor.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 GLib.Quark 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 GLib.Quark storage growing unbounded.
name of the key
data to associate with that key
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.AnimationMode.CUSTOM_MODE
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
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 widget's hover property and adds or removes "hover" from its
pseudo class accordingly.
If you have set St.Widget.track_hover, you should not need to call
this directly. You can call st_widget_sync_hover() if the hover
state might be out of sync due to another actor's pointer grab.
whether the pointer is hovering over the widget
Sets label as the Clutter.Actor that identifies (labels)
widget. label can be null to indicate that widget is not
labelled any more
Sets the Clutter.LayoutManager delegate object that will be used to
lay out the children of self.
The Clutter.Actor 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 Clutter.LayoutManager, or null to unset it
Sets the margin from the bottom of a Clutter.Actor.
The Clutter.Actor.margin_bottom property is animatable.
the bottom margin
Sets the margin from the left of a Clutter.Actor.
The Clutter.Actor.margin_left property is animatable.
the left margin
Sets the margin from the right of a Clutter.Actor.
The Clutter.Actor.margin_right property is animatable.
the right margin
Sets the margin from the top of a Clutter.Actor.
The Clutter.Actor.margin_top property is animatable.
the top margin
Sets the given name to self. The name can be used to identify
a Clutter.Actor.
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.OffscreenRedirect.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 Clutter.Actor.opacity property is animatable.
New opacity value for the actor.
Allows overriding the calculated paint opacity (as returned by
clutter_actor_get_paint_opacity()). This is used internally by
ClutterClone and ClutterOffscreenEffect, and should be used by
actors that need to mimic those.
In almost all cases this should not used by applications.
the override opacity value, or -1 to reset
Sets the position of the Clutter.Actor.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 Clutter.Actor.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 to set the property to
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 angle of rotation of a Clutter.Actor on the given axis.
This function is a convenience for setting the rotation properties Clutter.Actor.rotation_angle_x, Clutter.Actor.rotation_angle_y, and Clutter.Actor.rotation_angle_z.
The center of rotation is established by the Clutter.Actor.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 Clutter.Actor.pivot_point.
The Clutter.Actor.scale_x and Clutter.Actor.scale_y properties are animatable.
double factor to scale actor by horizontally.
double factor to scale actor by vertically.
Scales an actor on the Z axis by the given scale_z factor.
The scale transformation is relative the the Clutter.Actor.pivot_point.
The Clutter.Actor.scale_z property is animatable.
the scaling factor along the Z axis
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 inline style string for this widget. The inline style string is an optional ';'-separated list of CSS properties that override the style as determined from the stylesheets of the current theme.
a inline style string, or null
Set the style class name list. style_class_list can either be
null, for no classes, or a space-separated list of style class
names. See also st_widget_add_style_class_name() and
st_widget_remove_style_class_name().
a new style class list string
Set the style pseudo class list. pseudo_class_list can either be
null, for no classes, or a space-separated list of pseudo class
names. See also st_widget_add_style_pseudo_class() and
st_widget_remove_style_pseudo_class().
a new pseudo class list string
Sets the Clutter.TextDirection for an actor
The passed text direction must not be Clutter.TextDirection.DEFAULT
This function will recurse inside all the children of self
the text direction for self
Enables hover tracking on the St.Widget.
If hover tracking is enabled, and the widget is visible and
reactive, then widget's St.Widget.hover property will be updated
automatically to reflect whether the pointer is in widget (or one
of its children), and widget's St.Widget.pseudo_class will have
the "hover" class added and removed from it accordingly.
Note that currently it is not possible to correctly track the hover
state when another actor has a pointer grab. You can use
st_widget_sync_hover() to update the property manually in this
case.
true if the widget should track the pointer hover state
Overrides the transformations of a Clutter.Actor 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 Clutter.Actor.transform property is animatable.
a Graphene.Matrix, or null to unset a custom transformation
Sets an additional translation transformation on a Clutter.Actor, relative to the Clutter.Actor.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 Clutter.Actor.x property is animatable.
the actor's position on the X axis
Sets the horizontal alignment policy of a Clutter.Actor, in case the actor received extra horizontal space.
See also the Clutter.Actor.x_align property.
the horizontal alignment policy
Sets whether a Clutter.Actor 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 Clutter.Actor.y property is animatable.
the actor's position on the Y axis
Sets the vertical alignment policy of a Clutter.Actor, in case the actor received extra vertical space.
See also the Clutter.Actor.y_align property.
the vertical alignment policy
Sets whether a Clutter.Actor 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.
the position on the Z axis
Should be called inside the implementation of the Clutter.Actor.pick virtual function in order to check whether the actor should be picked or not.
This function should never be called directly by applications.
true if the actor should be picked, false otherwise
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
Clutter.Actor.show_on_set_parent will be set to true as a side
effect.
Remove a specified datum from the object's data associations, without invoking the association's destroy handler.
name of the key
the data if found, or null if no such data exists.
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 GLib.Quark, naming the user data pointer
The user data pointer set, or null
Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
Name of the signal to stop emission of
Sets widget's hover state according to the current pointer
position. This can be used to ensure that it is correct after
(or during) a pointer grab.
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.Object::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 Clutter.Actor.paint implementation
x screen coordinate of the point to unproject
y screen coordinate of the point to unproject
true if conversion was successful.
Unblocks a handler so it will be called again during any signal emissions
Handler ID of the handler to be unblocked
Decreases the culling inhibitor counter. See clutter_actor_inhibit_culling()
for when inhibit culling is necessary.
Calling this function without a matching call to
clutter_actor_inhibit_culling() is a programming error.
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 Clutter.Actor implementation of Clutter.Actor.unmap will also unmap any eventual children by default when their parent is unmapped.
When overriding Clutter.Actor.unmap, it is mandatory to chain up to the parent implementation.
It is important to note that the implementation of the Clutter.Actor.unmap virtual function may be called after the Clutter.Actor.destroy or the GObject.Object.dispose implementation, but it is guaranteed to be called before the GObject.Object.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.
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.Object 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.Object instance. Use g_clear_object() for this.
Set self's color state to the default.
Virtualvfunc_Assigns the size of a Clutter.Actor from the given box.
This function should only be called on the children of an actor when overriding the Clutter.Actor.allocate virtual function.
This function will adjust the stored allocation to take into account the alignment flags set in the Clutter.Actor.x_align and Clutter.Actor.y_align properties, as well as the margin values set in theClutter.Actor.margin_top, Clutter.Actor.margin_right, Clutter.Actor.margin_bottom, and Clutter.Actor.margin_left properties.
This function will respect the easing state of the Clutter.Actor 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
Virtualvfunc_virtual function, used when applying the transformations
to an actor before painting it or when transforming coordinates or
the allocation; if the transformation calculated by this function may
have changed, the cached transformation must be invalidated by calling
clutter_actor_invalidate_transform(); it must chain up to the parent's
implementation
Virtualvfunc_Virtualvfunc_Virtualvfunc_Virtualvfunc_Virtualvfunc_Virtualvfunc_Virtualvfunc_the constructed function is called by g_object_new() as the
final step of the object creation process. At the point of the call, all
construction properties have been set on the object. The purpose of this
call is to allow for object initialisation steps that can only be performed
after construction properties have been set. constructed implementors
should chain up to the constructed call of their parent class to allow it
to complete its initialisation.
Virtualvfunc_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.
Virtualvfunc_Virtualvfunc_the dispose function is supposed to drop all references to other
objects, but keep the instance otherwise intact, so that client method
invocations still work. It may be run multiple times (due to reference
loops). Before returning, dispose should chain up to the dispose method
of the parent class.
Virtualvfunc_Virtualvfunc_Virtualvfunc_instance finalization function, should finish the finalization of
the instance begun in dispose and chain up to the finalize method of the
parent class.
Virtualvfunc_Finds the GObject.ParamSpec for property_name
the name of the animatable property to find
Virtualvfunc_Returns the accessible object that describes the actor to an assistive technology.
If no class-specific Atk.Object implementation is available for the actor instance in question, it will inherit an Atk.Object implementation from the first ancestor class for which such an implementation is defined.
The documentation of the https://gnome.pages.gitlab.gnome.org/at-spi2-core/atk/ library contains more information about accessible objects and their uses.
Virtualvfunc_Virtualvfunc_Gets a list of the focusable children of widget, in "Tab"
order. By default, this returns all visible
(as in Clutter.Actor.is_visible) children of widget.
Virtualvfunc_Retrieves the current state of property_name and sets value with it
the name of the animatable property to retrieve
a GObject.Value initialized to the type of the property to retrieve
Virtualvfunc_virtual function, for sub-classes to define their Clutter.PaintVolume
Virtualvfunc_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 translation; 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
Virtualvfunc_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 scaleor translation; 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
Virtualvfunc_Virtualvfunc_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 Clutter.Actor.has_overlaps. See Clutter.Actor.set_offscreen_redirect for more information.
Virtualvfunc_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
Clutter.Actor.show_on_set_parent property will be set to false
as a side-effect.
Virtualvfunc_virtual function for containers and composite actors, to
determine which children should be shown when calling
clutter_actor_hide_all() on the actor. Defaults to calling
clutter_actor_hide(). This virtual function is deprecated and it
should not be overridden.
Virtualvfunc_Asks a Clutter.Animatable implementation to interpolate a
a named property between the initial and final values of
a Clutter.Interval, using progress as the interpolation
value, and store the result inside value.
This function should be used for every property animation involving Clutter.Animatables.
the name of the property to interpolate
a Clutter.Interval with the animation range
the progress to use to interpolate between the initial and final values of the interval
Virtualvfunc_signal class closure for Clutter.Actor::key-focus-in
Virtualvfunc_signal class closure for Clutter.Actor::key-focus-out
Virtualvfunc_Virtualvfunc_Virtualvfunc_Virtualvfunc_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 discouraged: the default implementation of Clutter.Actor.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.
Virtualvfunc_Virtualvfunc_the actor that the focus is coming from
the direction focus is moving in
Virtualvfunc_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.
Virtualvfunc_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 call the Clutter.Actor.paint virtual function.
This function does not paint the actor if the actor is set to 0, unless it is performing a pick paint.
Virtualvfunc_virtual function for creating paint nodes and attaching them to the render tree
Virtualvfunc_Virtualvfunc_Virtualvfunc_Asks the widget to pop-up a context menu by emitting St.Widget.SignalSignatures.popup_menu | St.Widget::popup-menu.
Virtualvfunc_Indicates that the actor's size request or other layout-affecting properties may have changed. This function is used inside Clutter.Actor subclass implementations, not by applications directly.
Queueing a new layout automatically queues a redraw as well.
Virtualvfunc_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.
Virtualvfunc_Virtualvfunc_Virtualvfunc_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
Virtualvfunc_the generic setter for all properties of this type. Should be
overridden for every type with properties. If implementations of
set_property don't emit property change notification explicitly, this will
be done implicitly by the type system. However, if the notify signal is
emitted explicitly, the type system will not emit it a second time.
Virtualvfunc_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
Clutter.Actor.show_on_set_parent will be set to true as a side
effect.
Virtualvfunc_Virtualvfunc_Virtualvfunc_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 Clutter.Actor implementation of Clutter.Actor.unmap will also unmap any eventual children by default when their parent is unmapped.
When overriding Clutter.Actor.unmap, it is mandatory to chain up to the parent implementation.
It is important to note that the implementation of the Clutter.Actor.unmap virtual function may be called after the Clutter.Actor.destroy or the GObject.Object.dispose implementation, but it is guaranteed to be called before the GObject.Object.finalize implementation.
Virtualvfunc_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.
GObject.Closure to watch
Static_Staticcompat_Staticfind_Staticget_Staticget_Staticinstall_Staticinstall_the id for the new property
the GObject.ParamSpec for the new property
Staticinterface_Find the GObject.ParamSpec 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.
Staticinterface_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 GObject.ParamSpec, 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
GObject.TypeInfo.) 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 GObject.ParamSpec for the new property
Staticinterface_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
Staticlist_StaticnewStaticnewvStaticoverride_the new property ID
the name of a property registered in a parent class or in an interface of this class.
Staticset_
A dynamically-sized Cairo drawing area
St.DrawingArea allows drawing via Cairo; the primary difference is that it is dynamically sized. To use, connect to the
St.DrawingArea::repaintsignal, and inside the signal handler, call St.DrawingArea.get_context to get the Cairo context to draw to. TheSt.DrawingArea::repaintsignal will be emitted by default when the area is resized or the CSS style changes; you can use the St.DrawingArea.queue_repaint as well.