Clutter.Actor¶
- Subclasses:
Clutter.Box
,Clutter.Clone
,Clutter.Group
,Clutter.Rectangle
,Clutter.ScrollActor
,Clutter.Text
,Clutter.Texture
Methods¶
- Inherited:
GObject.Object (37), Clutter.Animatable (5), Clutter.Container (17), Clutter.Scriptable (4)
- Structs:
Virtual Methods¶
- Inherited:
GObject.Object (7), Clutter.Animatable (5), Clutter.Container (13), Clutter.Scriptable (4)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
w |
Adds an action to the actor |
||
r |
The actor’s allocation |
||
d/r/w |
The anchor point as a |
||
d/r/w |
X coordinate of the anchor point |
||
d/r/w |
Y coordinate of the anchor point |
||
r/w |
The actor’s background color |
||
r |
Whether the background color is set |
||
r/w |
Children transformation matrix |
||
r |
Whether the child-transform property is set |
||
r/w |
The clip region for the actor |
||
r/w |
The visible region of the actor |
||
r/w |
Sets the clip region to track the actor’s allocation |
||
w |
Adds a constraint to the actor |
||
r/w |
Delegate object for painting the actor’s content |
||
r |
The bounding box of the actor’s content |
||
r/w |
Alignment of the actor’s content |
||
r/w |
The repeat policy for the actor’s content |
||
d/r/w |
Position on the Z axis |
||
w |
Add an effect to be applied on the actor |
||
r |
The actor’s first child |
||
r/w |
Whether to use fixed positioning for the actor |
||
r/w |
Forced X position of the actor |
||
r/w |
Forced Y position of the actor |
||
r |
Whether the actor has a clip set |
||
r |
Whether the actor contains the pointer of an input device |
||
r/w |
Height of the actor |
||
r |
The actor’s last child |
||
r/w |
The object controlling the layout of an actor’s children |
||
r/w |
The filter used when increasing the size of the content |
||
r |
Whether the actor will be painted |
||
r/w |
Extra space at the bottom |
||
r/w |
Extra space at the left |
||
r/w |
Extra space at the right |
||
r/w |
Extra space at the top |
||
r/w |
Forced minimum height request for the actor |
||
r/w |
Whether to use the min-height property |
||
r/w |
Forced minimum width request for the actor |
||
r/w |
Whether to use the min-width property |
||
r/w |
The filter used when reducing the size of the content |
||
r/w |
Name of the actor |
||
r/w |
Forced natural height request for the actor |
||
r/w |
Whether to use the natural-height property |
||
r/w |
Forced natural width request for the actor |
||
r/w |
Whether to use the natural-width property |
||
r/w |
Flags controlling when to flatten the actor into a single image |
||
r/w |
Opacity of an actor |
||
r/w |
The point around which the scaling and rotation occur |
||
r/w |
Z component of the pivot point |
||
r/w |
The position of the origin of the actor |
||
r/w |
Whether the actor is reactive to events |
||
r |
Whether the actor has been realized |
||
r/w |
The actor’s request mode |
||
r/w |
The rotation angle on the X axis |
||
r/w |
The rotation angle on the Y axis |
||
r/w |
The rotation angle on the Z axis |
||
d/r/w |
The rotation center on the X axis |
||
d/r/w |
The rotation center on the Y axis |
||
d/r/w |
The rotation center on the Z axis |
||
d/r/w |
Center point for rotation around the Z axis |
||
d/r/w |
Horizontal scale center |
||
d/r/w |
Vertical scale center |
||
d/r/w |
The center of scaling |
||
r/w |
Scale factor on the X axis |
||
r/w |
Scale factor on the Y axis |
||
r/w |
Scale factor on the Z axis |
||
r/w |
Whether the actor is shown when parented |
||
r/w |
The size of the actor |
||
r/w |
Direction of the text |
||
r/w |
Transformation matrix |
||
r |
Whether the transform property is set |
||
r/w |
Translation along the X axis |
||
r/w |
Translation along the Y axis |
||
r/w |
Translation along the Z axis |
||
r/w |
Whether the actor is visible or not |
||
r/w |
Width of the actor |
||
r/w |
X coordinate of the actor |
||
r/w |
The alignment of the actor on the X axis within its allocation |
||
r/w |
Whether extra horizontal space should be assigned to the actor |
||
r/w |
Y coordinate of the actor |
||
r/w |
The alignment of the actor on the Y axis within its allocation |
||
r/w |
Whether extra vertical space should be assigned to the actor |
||
r/w |
The actor’s position on the Z axis |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
This signal is emitted when the parent of the actor changes. |
|
The |
|
The ::queue_redraw signal is emitted when |
|
The ::queue_layout signal is emitted when |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
flags |
r |
||
parent_instance |
r |
||
private_flags |
r |
Class Details¶
- class Clutter.Actor(**kwargs)¶
- Bases:
GObject.InitiallyUnowned
,Atk.ImplementorIface
,Clutter.Animatable
,Clutter.Container
,Clutter.Scriptable
- Abstract:
No
- Structure:
Base class for actors.
- classmethod new()¶
- Returns:
the newly created
Clutter.Actor
- Return type:
Creates a new
Clutter.Actor
.A newly created actor has a floating reference, which will be sunk when it is added to another actor.
New in version 1.10.
- add_action(action)¶
- Parameters:
action (
Clutter.Action
) – aClutter.Action
Adds action to the list of actions applied to self
A
Clutter.Action
can only belong to one actor at a timeThe
Clutter.Actor
will hold a reference on action until eitherClutter.Actor.remove_action
() orClutter.Actor.clear_actions
() is calledNew in version 1.4.
- add_action_with_name(name, action)¶
- Parameters:
name (
str
) – the name to set on the actionaction (
Clutter.Action
) – aClutter.Action
A convenience function for setting the name of a
Clutter.Action
while adding it to the list of actions applied to selfThis function is the logical equivalent of:
clutter_actor_meta_set_name (CLUTTER_ACTOR_META (action), name); clutter_actor_add_action (self, action);
New in version 1.4.
- add_child(child)¶
- Parameters:
child (
Clutter.Actor
) – aClutter.Actor
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
Clutter.Actor
:depth
of child, and will keep the list of children sorted.This function will emit the
Clutter.Container
::actor-added
signal on self.New in version 1.10.
- add_constraint(constraint)¶
- Parameters:
constraint (
Clutter.Constraint
) – aClutter.Constraint
Adds constraint to the list of
Clutter.Constraint
s applied to selfThe
Clutter.Actor
will hold a reference on the constraint until eitherClutter.Actor.remove_constraint
() orClutter.Actor.clear_constraints
() is called.New in version 1.4.
- add_constraint_with_name(name, constraint)¶
- Parameters:
name (
str
) – the name to set on the constraintconstraint (
Clutter.Constraint
) – aClutter.Constraint
A convenience function for setting the name of a
Clutter.Constraint
while adding it to the list of constraints applied to selfThis function is the logical equivalent of:
clutter_actor_meta_set_name (CLUTTER_ACTOR_META (constraint), name); clutter_actor_add_constraint (self, constraint);
New in version 1.4.
- add_effect(effect)¶
- Parameters:
effect (
Clutter.Effect
) – aClutter.Effect
Adds effect to the list of
Clutter.Effect
s applied to selfThe
Clutter.Actor
will hold a reference on the effect until eitherClutter.Actor.remove_effect
() orClutter.Actor.clear_effects
() is called.Note that as
Clutter.Effect
is initially unowned,Clutter.Actor.add_effect
() will sink any floating reference on effect.New in version 1.4.
- add_effect_with_name(name, effect)¶
- Parameters:
name (
str
) – the name to set on the effecteffect (
Clutter.Effect
) – aClutter.Effect
A convenience function for setting the name of a
Clutter.Effect
while adding it to the list of effects applied to self.Note that as
Clutter.Effect
is initially unowned,Clutter.Actor.add_effect_with_name
() will sink any floating reference on effect.This function is the logical equivalent of:
clutter_actor_meta_set_name (CLUTTER_ACTOR_META (effect), name); clutter_actor_add_effect (self, effect);
New in version 1.4.
- add_transition(name, transition)¶
- Parameters:
name (
str
) – the name of the transition to addtransition (
Clutter.Transition
) – theClutter.Transition
to add
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.
New in version 1.10.
- allocate(box, flags)¶
- Parameters:
box (
Clutter.ActorBox
) – new allocation of the actor, in parent-relative coordinatesflags (
Clutter.AllocationFlags
) – flags that control the allocation
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.do_allocate
() virtual function.This function will adjust the stored allocation to take into account the alignment flags set in the
Clutter.Actor
:x-align
andClutter.Actor
:y-align
properties, as well as the margin values set in theClutter.Actor
:margin-top
,Clutter.Actor
:margin-right
,Clutter.Actor
:margin-bottom
, andClutter.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 in version 0.8.
- allocate_align_fill(box, x_align, y_align, x_fill, y_fill, flags)¶
- Parameters:
box (
Clutter.ActorBox
) – aClutter.ActorBox
, containing the available width and heightx_align (
float
) – the horizontal alignment, between 0 and 1y_align (
float
) – the vertical alignment, between 0 and 1x_fill (
bool
) – whether the actor should fill horizontallyy_fill (
bool
) – whether the actor should fill verticallyflags (
Clutter.AllocationFlags
) – allocation flags to be passed toClutter.Actor.allocate
()
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
andClutter.Actor
:y-align
properties, instead, and just callClutter.Actor.allocate
() inside theirClutter.Actor.do_allocate
() implementation.New in version 1.4.
- allocate_available_size(x, y, available_width, available_height, flags)¶
- Parameters:
x (
float
) – the actor’s X coordinatey (
float
) – the actor’s Y coordinateavailable_width (
float
) – the maximum available width, or -1 to use the actor’s natural widthavailable_height (
float
) – the maximum available height, or -1 to use the actor’s natural heightflags (
Clutter.AllocationFlags
) – flags controlling the allocation
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, flags);
This function can be used by fluid layout managers to allocate an actor’s preferred size without making it bigger than the area available for the container.
New in version 1.0.
- allocate_preferred_size(flags)¶
- Parameters:
flags (
Clutter.AllocationFlags
) – flags controlling the allocation
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 (likeClutter.Group
or so called ‘composite actors’) inside theClutter.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.
New in version 0.8.
- animate_with_alphav(alpha, properties, values)¶
- Parameters:
alpha (
Clutter.Alpha
) – aClutter.Alpha
properties ([
str
]) – a vector containing the property names to setvalues ([
GObject.Value
]) – a vector containing the property values to set
- Returns:
a
Clutter.Animation
object. The object is owned by theClutter.Actor
and should not be unreferenced withGObject.Object.unref
()- Return type:
Animates the given list of properties of self between the current value for each property and a new final value. The animation has a definite behaviour given by the passed alpha.
See clutter_actor_animate() for further details.
This function is useful if you want to use an existing
Clutter.Alpha
to animate self.This is the vector-based variant of clutter_actor_animate_with_alpha(), useful for language bindings.
Unlike clutter_actor_animate_with_alpha(), this function will not allow you to specify “signal::” names and callbacks.
New in version 1.0.
Deprecated since version 1.10: Use the implicit transition for animatable properties in
Clutter.Actor
instead. SeeClutter.Actor.save_easing_state
(),Clutter.Actor.set_easing_mode
(),Clutter.Actor.set_easing_duration
(),Clutter.Actor.set_easing_delay
(), andClutter.Actor.restore_easing_state
().
- animate_with_timelinev(mode, timeline, properties, values)¶
- Parameters:
mode (
int
) – an animation mode logical idtimeline (
Clutter.Timeline
) – aClutter.Timeline
properties ([
str
]) – a vector containing the property names to setvalues ([
GObject.Value
]) – a vector containing the property values to set
- Returns:
a
Clutter.Animation
object. The object is owned by theClutter.Actor
and should not be unreferenced withGObject.Object.unref
()- Return type:
Animates the given list of properties of self between the current value for each property and a new final value. The animation has a definite duration given by timeline and a speed given by the mode.
See clutter_actor_animate() for further details.
This function is useful if you want to use an existing timeline to animate self.
This is the vector-based variant of clutter_actor_animate_with_timeline(), useful for language bindings.
Unlike clutter_actor_animate_with_timeline(), this function will not allow you to specify “signal::” names and callbacks.
New in version 1.0.
Deprecated since version 1.12: Use the implicit transition for animatable properties in
Clutter.Actor
instead. SeeClutter.Actor.save_easing_state
(),Clutter.Actor.set_easing_mode
(),Clutter.Actor.set_easing_duration
(),Clutter.Actor.set_easing_delay
(), andClutter.Actor.restore_easing_state
().
- animatev(mode, duration, properties, values)¶
- Parameters:
mode (
int
) – an animation mode logical idduration (
int
) – duration of the animation, in millisecondsproperties ([
str
]) – a vector containing the property names to setvalues ([
GObject.Value
]) – a vector containing the property values to set
- Returns:
a
Clutter.Animation
object. The object is owned by theClutter.Actor
and should not be unreferenced withGObject.Object.unref
()- Return type:
Animates the given list of properties of self between the current value for each property and a new final value. The animation has a definite duration and a speed given by the mode.
This is the vector-based variant of clutter_actor_animate(), useful for language bindings.
Unlike clutter_actor_animate(), this function will not allow you to specify “signal::” names and callbacks.
New in version 1.0.
Deprecated since version 1.12: Use the implicit transition for animatable properties in
Clutter.Actor
instead. SeeClutter.Actor.save_easing_state
(),Clutter.Actor.set_easing_mode
(),Clutter.Actor.set_easing_duration
(),Clutter.Actor.set_easing_delay
(), andClutter.Actor.restore_easing_state
().
- apply_relative_transform_to_point(ancestor, point)¶
- Parameters:
ancestor (
Clutter.Actor
orNone
) – AClutter.Actor
ancestor, orNone
to use the defaultClutter.Stage
point (
Clutter.Vertex
) – A point asClutter.Vertex
- Returns:
The translated
Clutter.Vertex
- Return type:
vertex:
Clutter.Vertex
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
None
the ancestor will be theClutter.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 ofClutter.Actor.apply_transform_to_point
().New in version 0.6.
- apply_transform_to_point(point)¶
- Parameters:
point (
Clutter.Vertex
) – A point asClutter.Vertex
- Returns:
The translated
Clutter.Vertex
- Return type:
vertex:
Clutter.Vertex
Transforms point in coordinates relative to the actor into screen-relative coordinates with the current actor transformation (i.e. scale, rotation, etc)
New in version 0.4.
- bind_model(model, create_child_func, *user_data)¶
- Parameters:
model (
Gio.ListModel
orNone
) – aGio.ListModel
create_child_func (
Clutter.ActorCreateChildFunc
) – a function that createsClutter.Actor
instances from the contents of the modeluser_data (
object
orNone
) – user data passed to create_child_func
Binds a
Gio.ListModel
to aClutter.Actor
.If the
Clutter.Actor
was already bound to aGio.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. TheClutter.Actor
is updated whenever the model changes. If model isNone
, theClutter.Actor
is left empty.When a
Clutter.Actor
is bound to a model, adding and removing children directly is undefined behaviour.New in version 1.24.
- clear_actions()¶
Clears the list of actions applied to self
New in version 1.4.
- clear_constraints()¶
Clears the list of constraints applied to self
New in version 1.4.
- clear_effects()¶
Clears the list of effects applied to self
New in version 1.4.
- contains(descendant)¶
- Parameters:
descendant (
Clutter.Actor
) – AClutter.Actor
, possibly contained in self- Returns:
whether descendent is contained within self
- Return type:
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
.New in version 1.4.
- continue_paint()¶
Run the next stage of the paint sequence. This function should only be called within the implementation of the ‘run’ virtual of a
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.New in version 1.8.
- create_pango_context()¶
- Returns:
the newly created
Pango.Context
. UseGObject.Object.unref
() on the returned value to deallocate its resources- Return type:
Creates a
Pango.Context
for the given actor. ThePango.Context
is already configured using the appropriate font map, resolution and font options.See also
Clutter.Actor.get_pango_context
().New in version 1.0.
- create_pango_layout(text)¶
- Parameters:
text (
str
orNone
) – the text to set on thePango.Layout
, orNone
- Returns:
the newly created
Pango.Layout
. UseGObject.Object.unref
() when done- Return type:
Creates a new
Pango.Layout
from the samePango.Context
used by theClutter.Actor
. ThePango.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 theClutter.Backend
::font-changed
andClutter.Backend
::resolution-changed
signals, and callPango.Layout.context_changed
() in response to them.New in version 1.0.
- destroy()¶
Destroys an actor. When an actor is destroyed, it will break any references it holds to other objects. If the actor is inside a container, the actor will be removed.
When you destroy a container, its children will be destroyed as well.
Note: you cannot destroy the
Clutter.Stage
returned byClutter.Stage.get_default
().
- destroy_all_children()¶
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 theClutter.Actor
::destroy
signal when its reference count drops to 0; the default handler of theClutter.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, unlikeClutter.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 useClutter.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.New in version 1.10.
- detach_animation()¶
Detaches the
Clutter.Animation
used by self, if clutter_actor_animate() has been called on self.Once the animation has been detached, it loses a reference. If it was the only reference then the
Clutter.Animation
becomes invalid.The
Clutter.Animation
::completed
signal will not be emitted.New in version 1.4.
Deprecated since version 1.12: Use the implicit transition for animatable properties in
Clutter.Actor
instead, andClutter.Actor.remove_transition
() to remove the transition.
- event(event, capture)¶
- Parameters:
event (
Clutter.Event
) – aClutter.Event
capture (
bool
) –True
if event in in capture phase,False
otherwise.
- Returns:
the return value from the signal emission:
True
if the actor handled the event, orFalse
if the event was not handled- Return type:
This function is used to emit an event on the main stage. You should rarely need to use this function, except for synthetising events.
New in version 0.6.
- get_abs_allocation_vertices()¶
- Returns:
Pointer to a location of an array of 4
Clutter.Vertex
where to store the result.- Return type:
verts: [
Clutter.Vertex
]
Calculates the transformed screen coordinates of the four corners of the actor; the returned vertices relate to the
Clutter.ActorBox
coordinates as follows:v[0] contains (x1, y1)
v[1] contains (x2, y1)
v[2] contains (x1, y2)
v[3] contains (x2, y2)
New in version 0.4.
- get_accessible()¶
- Returns:
the
Atk.Object
associated with actor- Return type:
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 anAtk.Object
implementation from the first ancestor class for which such an implementation is defined.The documentation of the ATK library contains more information about accessible objects and their uses.
- get_action(name)¶
- Parameters:
name (
str
) – the name of the action to retrieve- Returns:
a
Clutter.Action
for the given name, orNone
. The returnedClutter.Action
is owned by the actor and it should not be unreferenced directly- Return type:
Retrieves the
Clutter.Action
with the given name in the list of actions applied to selfNew in version 1.4.
- get_actions()¶
- Returns:
a copy of the list of
Clutter.Action
s. The contents of the list are owned by theClutter.Actor
. Use g_list_free() to free the resources allocated by the returnedGLib.List
- Return type:
Retrieves the list of actions applied to self
New in version 1.4.
- get_allocation_box()¶
- Returns:
the function fills this in with the actor’s allocation
- Return type:
box:
Clutter.ActorBox
Gets the layout box an actor has been assigned. The allocation can only be assumed valid inside a paint() method; anywhere else, it may be out-of-date.
An allocation does not incorporate the actor’s scale or anchor point; those transformations do not affect layout, only rendering.
Do not call any of the clutter_actor_get_allocation_*() family of functions inside the implementation of the get_preferred_width() or get_preferred_height() virtual functions.
New in version 0.8.
- get_allocation_geometry()¶
- Returns:
allocation geometry in pixels
- Return type:
geom:
Clutter.Geometry
Gets the layout box an actor has been assigned. The allocation can only be assumed valid inside a paint() method; anywhere else, it may be out-of-date.
An allocation does not incorporate the actor’s scale or anchor point; those transformations do not affect layout, only rendering.
The returned rectangle is in pixels.
New in version 0.8.
Deprecated since version 1.12: Use
Clutter.Actor.get_allocation_box
() instead.
- get_allocation_vertices(ancestor)¶
- Parameters:
ancestor (
Clutter.Actor
orNone
) – AClutter.Actor
to calculate the vertices against, orNone
to use theClutter.Stage
- Returns:
return location for an array of 4
Clutter.Vertex
in which to store the result- Return type:
verts: [
Clutter.Vertex
]
Calculates the transformed coordinates of the four corners of the actor in the plane of ancestor. The returned vertices relate to the
Clutter.ActorBox
coordinates as follows:verts[0] contains (x1, y1)
verts[1] contains (x2, y1)
verts[2] contains (x1, y2)
verts[3] contains (x2, y2)
If ancestor is
None
the ancestor will be theClutter.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 ofClutter.Actor.get_abs_allocation_vertices
().New in version 0.6.
- get_anchor_point()¶
- Returns:
- anchor_x:
return location for the X coordinate of the anchor point
- anchor_y:
return location for the Y coordinate of the anchor point
- Return type:
Gets the current anchor point of the actor in pixels.
New in version 0.6.
Deprecated since version 1.12: Use
Clutter.Actor
:pivot-point
instead
- get_anchor_point_gravity()¶
- Returns:
the
Clutter.Gravity
used by the anchor point- Return type:
Retrieves the anchor position expressed as a
Clutter.Gravity
. If the anchor point was specified using pixels or units this will returnClutter.Gravity.NONE
.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.Actor
:pivot-point
instead.
- get_animation()¶
- Returns:
a
Clutter.Animation
, orNone
- Return type:
Retrieves the
Clutter.Animation
used by self, if clutter_actor_animate() has been called on self.New in version 1.0.
Deprecated since version 1.12: Use the implicit transition for animatable properties in
Clutter.Actor
instead, andClutter.Actor.get_transition
() to retrieve the transition.
- get_background_color()¶
- Returns:
return location for a
Clutter.Color
- Return type:
color:
Clutter.Color
Retrieves the color set using
Clutter.Actor.set_background_color
().New in version 1.10.
- get_child_at_index(index_)¶
- Parameters:
index (
int
) – the position in the list of children- Returns:
a pointer to a
Clutter.Actor
, orNone
- Return type:
Retrieves the actor at the given index_ inside the list of children of self.
New in version 1.10.
- get_child_transform()¶
- Returns:
- Return type:
transform:
Clutter.Matrix
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.New in version 1.12.
- get_children()¶
- Returns:
A newly allocated
GLib.List
ofClutter.Actor
s. Use g_list_free() when done.- Return type:
Retrieves the list of children of self.
New in version 1.10.
- get_clip()¶
- Returns:
- Return type:
Gets the clip area for self, if any is set.
New in version 0.6.
- get_clip_to_allocation()¶
- Returns:
True
if theClutter.Actor
is clipped to its allocation- Return type:
Retrieves the value set using
Clutter.Actor.set_clip_to_allocation
()New in version 1.4.
- get_constraint(name)¶
- Parameters:
name (
str
) – the name of the constraint to retrieve- Returns:
a
Clutter.Constraint
for the given name, orNone
. The returnedClutter.Constraint
is owned by the actor and it should not be unreferenced directly- Return type:
Retrieves the
Clutter.Constraint
with the given name in the list of constraints applied to selfNew in version 1.4.
- get_constraints()¶
- Returns:
a copy of the list of
Clutter.Constraint
s. The contents of the list are owned by theClutter.Actor
. Use g_list_free() to free the resources allocated by the returnedGLib.List
- Return type:
Retrieves the list of constraints applied to self
New in version 1.4.
- get_content()¶
- Returns:
a pointer to the
Clutter.Content
instance, orNone
if none was set- Return type:
Retrieves the contents of self.
New in version 1.10.
- get_content_box()¶
- Returns:
the return location for the bounding box for the
Clutter.Content
- Return type:
box:
Clutter.ActorBox
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 theClutter.Actor
:content-gravity
property.New in version 1.10.
- get_content_gravity()¶
- Returns:
the content gravity
- Return type:
Retrieves the content gravity as set using
Clutter.Actor.set_content_gravity
().New in version 1.10.
- get_content_repeat()¶
- Returns:
the content repeat policy
- Return type:
Retrieves the repeat policy for a
Clutter.Actor
set byClutter.Actor.set_content_repeat
().New in version 1.12.
- get_content_scaling_filters()¶
- Returns:
- Return type:
(min_filter:
Clutter.ScalingFilter
, mag_filter:Clutter.ScalingFilter
)
Retrieves the values set using
Clutter.Actor.set_content_scaling_filters
().New in version 1.10.
- get_default_paint_volume()¶
- Returns:
a pointer to the default
Clutter.PaintVolume
, relative to theClutter.Actor
, orNone
if the actor could not compute a valid paint volume. The returned value is not guaranteed to be stable across multiple frames, so if you want to retain it, you will need to copy it usingClutter.PaintVolume.copy
().- Return type:
Retrieves the default paint volume for self.
This function provides the same
Clutter.PaintVolume
that would be computed by the default implementation insideClutter.Actor
of theClutter.Actor.do_get_paint_volume
() virtual function.This function should only be used by
Clutter.Actor
subclasses that cannot chain up to the parent implementation when computing their paint volume.New in version 1.10.
- get_depth()¶
- Returns:
the depth of the actor
- Return type:
Retrieves the depth of self.
Deprecated since version 1.12: Use
Clutter.Actor.get_z_position
() instead.
- get_easing_delay()¶
- Returns:
a delay, in milliseconds
- Return type:
Retrieves the delay that should be applied when tweening animatable properties.
New in version 1.10.
- get_easing_duration()¶
- Returns:
the duration of the tweening, in milliseconds
- Return type:
Retrieves the duration of the tweening for animatable properties of self for the current easing state.
New in version 1.10.
- get_easing_mode()¶
- Returns:
an easing mode
- Return type:
Retrieves the easing mode for the tweening of animatable properties of self for the current easing state.
New in version 1.10.
- get_effect(name)¶
- Parameters:
name (
str
) – the name of the effect to retrieve- Returns:
a
Clutter.Effect
for the given name, orNone
. The returnedClutter.Effect
is owned by the actor and it should not be unreferenced directly- Return type:
Retrieves the
Clutter.Effect
with the given name in the list of effects applied to selfNew in version 1.4.
- get_effects()¶
- Returns:
a list of
Clutter.Effect
s, orNone
. 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- Return type:
Retrieves the
Clutter.Effect
s applied on self, if anyNew in version 1.4.
- get_first_child()¶
- Returns:
a pointer to a
Clutter.Actor
, orNone
- Return type:
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.
New in version 1.10.
- get_fixed_position_set()¶
-
Checks whether an actor has a fixed position set (and will thus be unaffected by any layout manager).
New in version 0.8.
- get_flags()¶
- Returns:
a bitwise or of
Clutter.ActorFlags
or 0- Return type:
Retrieves the flags set on self
New in version 1.0.
- get_geometry()¶
- Returns:
A location to store actors
Clutter.Geometry
- Return type:
geometry:
Clutter.Geometry
Gets the size and position of an actor relative to its parent actor. This is the same as calling
Clutter.Actor.get_position
() andClutter.Actor.get_size
(). It tries to “do what you mean” and get the requested size and position if the actor’s allocation is invalid.Deprecated since version 1.10: Use
Clutter.Actor.get_position
() andClutter.Actor.get_size
(), orClutter.Actor.get_allocation_geometry
() instead.
- get_gid()¶
- Returns:
Globally unique value for this object instance.
- Return type:
Retrieves the unique id for self.
New in version 0.6.
Deprecated since version 1.8: The id is not used any longer, and this function always returns 0.
- get_height()¶
- Returns:
the height of the actor, in pixels
- Return type:
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 orClutter.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.
- get_last_child()¶
- Returns:
a pointer to a
Clutter.Actor
, orNone
- Return type:
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.
New in version 1.10.
- get_layout_manager()¶
- Returns:
a pointer to the
Clutter.LayoutManager
, orNone
- Return type:
Retrieves the
Clutter.LayoutManager
used by self.New in version 1.10.
- get_margin()¶
- Returns:
return location for a
Clutter.Margin
- Return type:
margin:
Clutter.Margin
Retrieves all the components of the margin of a
Clutter.Actor
.New in version 1.10.
- get_margin_bottom()¶
- Returns:
the bottom margin
- Return type:
Retrieves the bottom margin of a
Clutter.Actor
.New in version 1.10.
- get_margin_left()¶
- Returns:
the left margin
- Return type:
Retrieves the left margin of a
Clutter.Actor
.New in version 1.10.
- get_margin_right()¶
- Returns:
the right margin
- Return type:
Retrieves the right margin of a
Clutter.Actor
.New in version 1.10.
- get_margin_top()¶
- Returns:
the top margin
- Return type:
Retrieves the top margin of a
Clutter.Actor
.New in version 1.10.
- get_n_children()¶
- Returns:
the number of children of an actor
- Return type:
Retrieves the number of children of self.
New in version 1.10.
- get_name()¶
- Returns:
the name of the actor, or
None
. The returned string is owned by the actor and should not be modified or freed.- Return type:
Retrieves the name of self.
- get_next_sibling()¶
- Returns:
a pointer to a
Clutter.Actor
, orNone
- Return type:
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.
New in version 1.10.
- get_offscreen_redirect()¶
- Returns:
the value of the offscreen-redirect property of the actor
- Return type:
Retrieves whether to redirect the actor to an offscreen buffer, as set by
Clutter.Actor.set_offscreen_redirect
().New in version 1.8.
- get_opacity()¶
- Returns:
the opacity of the actor
- Return type:
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
().
- get_paint_box()¶
- Returns:
True
if a 2D paint box could be determined, elseFalse
.- box:
return location for a
Clutter.ActorBox
- Return type:
(
bool
, box:Clutter.ActorBox
)
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.
New in version 1.6.
- get_paint_opacity()¶
- Returns:
The actor opacity value.
- Return type:
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.
New in version 0.8.
- get_paint_visibility()¶
-
Retrieves the ‘paint’ visibility of an actor recursively checking for non visible parents.
This is by definition the same as %CLUTTER_ACTOR_IS_MAPPED.
New in version 0.8.
- get_paint_volume()¶
- Returns:
a pointer to a
Clutter.PaintVolume
, orNone
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 usingClutter.PaintVolume.copy
().- Return type:
Retrieves the paint volume of the passed
Clutter.Actor
, orNone
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.do_get_paint_volume
() virtual function of theClutter.Actor
class. Sub-classes ofClutter.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 ofClutter.Actor
:depth
but real 3D depth).Note: 2D actors overriding
Clutter.Actor.do_get_paint_volume
() should ensure that their volume has a depth of 0. (This will be true as long as you don’t callClutter.PaintVolume.set_depth
().)New in version 1.6.
- get_pango_context()¶
- Returns:
the
Pango.Context
for aClutter.Actor
. The returnedPango.Context
is owned by the actor and should not be unreferenced by the application code- Return type:
Retrieves the
Pango.Context
for self. The actor’sPango.Context
is already configured using the appropriate font map, resolution and font options.Unlike
Clutter.Actor.create_pango_context
(), this context is owend by theClutter.Actor
and it will be updated each time the options stored by theClutter.Backend
change.You can use the returned
Pango.Context
to create aPango.Layout
and render text usingCoglPango.render_layout
() to reuse the glyphs cache also used by Clutter.New in version 1.0.
- get_parent()¶
- Returns:
The
Clutter.Actor
parent, orNone
if no parent is set- Return type:
Retrieves the parent of self.
- get_pivot_point()¶
- Returns:
- Return type:
Retrieves the coordinates of the
Clutter.Actor
:pivot-point
.New in version 1.12.
- get_pivot_point_z()¶
- Return type:
Retrieves the Z component of the
Clutter.Actor
:pivot-point
.New in version 1.12.
- get_position()¶
- Returns:
- Return type:
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.
New in version 0.6.
- get_preferred_height(for_width)¶
- Parameters:
for_width (
float
) – available width to assume in computing desired height, or a negative value to indicate that no width is defined- Returns:
- Return type:
Computes the requested minimum and natural heights for an actor, or if they are already computed, returns the cached values.
An actor may not get its request - depending on the layout manager that’s in effect.
A request should not incorporate the actor’s scale or anchor point; those transformations do not affect layout, only rendering.
New in version 0.8.
- get_preferred_size()¶
- Returns:
- Return type:
(min_width_p:
float
, min_height_p:float
, natural_width_p:float
, natural_height_p:float
)
Computes the preferred minimum and natural size of an actor, taking into account the actor’s geometry management (either height-for-width or width-for-height).
The width and height used to compute the preferred height and preferred width are the actor’s natural ones.
If you need to control the height for the preferred width, or the width for the preferred height, you should use
Clutter.Actor.get_preferred_width
() andClutter.Actor.get_preferred_height
(), and check the actor’s preferred geometry management using theClutter.Actor
:request-mode
property.New in version 0.8.
- get_preferred_width(for_height)¶
- Parameters:
for_height (
float
) – available height when computing the preferred width, or a negative value to indicate that no height is defined- Returns:
- Return type:
Computes the requested minimum and natural widths for an actor, optionally depending on the specified height, or if they are already computed, returns the cached values.
An actor may not get its request - depending on the layout manager that’s in effect.
A request should not incorporate the actor’s scale or anchor point; those transformations do not affect layout, only rendering.
New in version 0.8.
- get_previous_sibling()¶
- Returns:
a pointer to a
Clutter.Actor
, orNone
- Return type:
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.
New in version 1.10.
- get_reactive()¶
-
Checks whether self is marked as reactive.
New in version 0.6.
- get_request_mode()¶
- Returns:
the request mode for the actor
- Return type:
Retrieves the geometry request mode of self
New in version 1.2.
- get_rotation(axis)¶
- Parameters:
axis (
Clutter.RotateAxis
) – the axis of rotation- Returns:
the angle of rotation
- x:
return value for the X coordinate of the center of rotation
- y:
return value for the Y coordinate of the center of rotation
- z:
return value for the Z coordinate of the center of rotation
- Return type:
Retrieves the angle and center of rotation on the given axis, set using
Clutter.Actor.set_rotation
().New in version 0.8.
Deprecated since version 1.12: Use
Clutter.Actor.get_rotation_angle
() andClutter.Actor.get_pivot_point
() instead.
- get_rotation_angle(axis)¶
- Parameters:
axis (
Clutter.RotateAxis
) – the axis of the rotation- Returns:
the angle of rotation, in degrees
- Return type:
Retrieves the angle of rotation set by
Clutter.Actor.set_rotation_angle
().New in version 1.12.
- get_scale()¶
- Returns:
- Return type:
Retrieves an actors scale factors.
New in version 0.2.
- get_scale_center()¶
- Returns:
- Return type:
Retrieves the scale center coordinate in pixels relative to the top left corner of the actor. If the scale center was specified using a
Clutter.Gravity
this will calculate the pixel offset using the current size of the actor.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.Actor.get_pivot_point
() instead.
- get_scale_gravity()¶
- Returns:
the scale gravity
- Return type:
Retrieves the scale center as a compass direction. If the scale center was specified in pixels or units this will return
Clutter.Gravity.NONE
.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.Actor.get_pivot_point
() instead.
- get_scale_z()¶
- Returns:
the scaling factor along the Z axis
- Return type:
Retrieves the scaling factor along the Z axis, as set using
Clutter.Actor.set_scale_z
().New in version 1.12.
- get_shader()¶
- Returns:
The currently set
Clutter.Shader
orNone
if no shader is set.- Return type:
Queries the currently set
Clutter.Shader
on self.New in version 0.6.
Deprecated since version 1.8: Use
Clutter.Actor.get_effect
() instead.
- get_size()¶
- Returns:
- Return type:
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
() orClutter.Actor.get_preferred_width
().New in version 0.2.
- get_stage()¶
- Returns:
the stage containing the actor, or
None
- Return type:
Retrieves the
Clutter.Stage
where self is contained.New in version 0.8.
- get_text_direction()¶
- Returns:
the
Clutter.TextDirection
for the actor- Return type:
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 insteadNew in version 1.2.
- get_transform()¶
- Returns:
- Return type:
transform:
Clutter.Matrix
Retrieves the current transformation matrix of a
Clutter.Actor
.New in version 1.12.
- get_transformation_matrix()¶
- Returns:
the return location for a
Clutter.Matrix
- Return type:
matrix:
Clutter.Matrix
Retrieves the transformations applied to self relative to its parent.
New in version 1.0.
Deprecated since version 1.12: Use
Clutter.Actor.get_transform
() instead
- get_transformed_paint_volume(relative_to_ancestor)¶
- Parameters:
relative_to_ancestor (
Clutter.Actor
) – AClutter.Actor
that is an ancestor of self (orNone
for the stage)- Returns:
a pointer to a
Clutter.PaintVolume
, orNone
if no volume could be determined. The returned pointer is not guaranteed to be valid across multiple frames; if you wish to keep it, you will have to copy it usingClutter.PaintVolume.copy
().- Return type:
Retrieves the 3D paint volume of an actor like
Clutter.Actor.get_paint_volume
() does (Please refer to the documentation ofClutter.Actor.get_paint_volume
() for more details.) and it additionally transforms the paint volume into the coordinate space of relative_to_ancestor. (Or the stage ifNone
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
().New in version 1.6.
- get_transformed_position()¶
- Returns:
- Return type:
Gets the absolute position of an actor, in pixels relative to the stage.
New in version 0.8.
- get_transformed_size()¶
- Returns:
- Return type:
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 useClutter.Actor.get_abs_allocation_vertices
() to get the coords of the actual quadrangle.New in version 0.8.
- get_transition(name)¶
- Parameters:
name (
str
) – the name of the transition- Returns:
a
Clutter.Transition
, orNone
is none was found to match the passed name; the returned instance is owned by Clutter and it should not be freed- Return type:
Retrieves the
Clutter.Transition
of aClutter.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 (actor, CLUTTER_Y_AXIS, 360.0, x, y, z); transition = clutter_actor_get_transition (actor, "rotation-angle-y"); g_signal_connect (transition, "stopped", G_CALLBACK (on_transition_stopped), actor);
will call the
on_transition_stopped
callback when the transition is finished.If you just want to get notifications of the completion of a transition, you should use the
Clutter.Actor
::transition-stopped
signal, using the transition name as the signal detail.New in version 1.10.
- get_translation()¶
-
Retrieves the translation set using
Clutter.Actor.set_translation
().New in version 1.12.
- get_width()¶
- Returns:
the width of the actor, in pixels
- Return type:
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 orClutter.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.
- get_x()¶
- Returns:
the X coordinate, in pixels, ignoring any transformation (i.e. scaling, rotation)
- Return type:
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
() orClutter.Actor.set_geometry
(), this function will return that coordinate.If both the allocation and a fixed position are missing, this function will return 0.
- get_x_align()¶
- Returns:
the horizontal alignment policy.
- Return type:
Retrieves the horizontal alignment policy set using
Clutter.Actor.set_x_align
().New in version 1.10.
- get_x_expand()¶
-
Retrieves the value set with
Clutter.Actor.set_x_expand
().See also:
Clutter.Actor.needs_expand
()New in version 1.12.
- get_y()¶
- Returns:
the Y coordinate, in pixels, ignoring any transformation (i.e. scaling, rotation)
- Return type:
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
() orClutter.Actor.set_geometry
(), this function will return that coordinate.If both the allocation and a fixed position are missing, this function will return 0.
- get_y_align()¶
- Returns:
the vertical alignment policy.
- Return type:
Retrieves the vertical alignment policy set using
Clutter.Actor.set_y_align
().New in version 1.10.
- get_y_expand()¶
-
Retrieves the value set with
Clutter.Actor.set_y_expand
().See also:
Clutter.Actor.needs_expand
()New in version 1.12.
- get_z_position()¶
- Returns:
the position on the Z axis.
- Return type:
Retrieves the actor’s position on the Z axis.
New in version 1.12.
- get_z_rotation_gravity()¶
- Returns:
the Z rotation center
- Return type:
Retrieves the center for the rotation around the Z axis as a compass direction. If the center was specified in pixels or units this will return
Clutter.Gravity.NONE
.New in version 1.0.
Deprecated since version 1.12: Use the
Clutter.Actor
:pivot-point
instead of aClutter.Gravity
- grab_key_focus()¶
Sets the key focus of the
Clutter.Stage
including self to thisClutter.Actor
.New in version 1.0.
- has_actions()¶
-
Returns whether the actor has any actions applied.
New in version 1.10.
- has_allocation()¶
-
Checks if the actor has an up-to-date allocation assigned to it. This means that the actor should have an allocation: it’s visible and has a parent. It also means that there is no outstanding relayout request in progress for the actor or its children (There might be other outstanding layout requests in progress that will cause the actor to get a new allocation when the stage is laid out, however).
If this function returns
False
, then the actor will normally be allocated before it is next drawn on the screen.New in version 1.4.
- has_clip()¶
-
Determines whether the actor has a clip area set or not.
New in version 0.2.
- has_constraints()¶
-
Returns whether the actor has any constraints applied.
New in version 1.10.
- has_effects()¶
-
Returns whether the actor has any effects applied.
New in version 1.10.
- has_key_focus()¶
-
Checks whether self is the
Clutter.Actor
that has key focusNew in version 1.4.
- has_overlaps()¶
-
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.do_has_overlaps
() virtual function. SeeClutter.Actor.set_offscreen_redirect
() for more information.New in version 1.8.
- has_pointer()¶
-
Checks whether an actor contains the pointer of a
Clutter.InputDevice
New in version 1.2.
- hide()¶
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 toFalse
as a side-effect.
- hide_all()¶
Calls
Clutter.Actor.hide
() on all child actors (if any).New in version 0.2.
Deprecated since version 1.10: Using
Clutter.Actor.hide
() on the actor will prevent its children from being painted as well.
- insert_child_above(child, sibling)¶
- Parameters:
child (
Clutter.Actor
) – aClutter.Actor
sibling (
Clutter.Actor
orNone
) – a child of self, orNone
Inserts child into the list of children of self, above another child of self or, if sibling is
None
, 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
Clutter.Actor
:depth
of child.This function will emit the
Clutter.Container
::actor-added
signal on self.New in version 1.10.
- insert_child_at_index(child, index_)¶
- Parameters:
child (
Clutter.Actor
) – aClutter.Actor
index (
int
) – the index
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
Clutter.Actor
:depth
of child.This function will emit the
Clutter.Container
::actor-added
signal on self.New in version 1.10.
- insert_child_below(child, sibling)¶
- Parameters:
child (
Clutter.Actor
) – aClutter.Actor
sibling (
Clutter.Actor
orNone
) – a child of self, orNone
Inserts child into the list of children of self, below another child of self or, if sibling is
None
, 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
Clutter.Actor
:depth
of child.This function will emit the
Clutter.Container
::actor-added
signal on self.New in version 1.10.
- is_in_clone_paint()¶
- Returns:
True
if theClutter.Actor
is currently being painted by aClutter.Clone
, andFalse
otherwise- Return type:
Checks whether self is being currently painted by a
Clutter.Clone
This function is useful only inside the
::paint
virtual function implementations or within handlers for theClutter.Actor
::paint
signalThis function should not be used by applications
New in version 1.0.
- is_mapped()¶
-
Checks whether a
Clutter.Actor
has been set as mapped.See also %CLUTTER_ACTOR_IS_MAPPED and
Clutter.Actor
:mapped
New in version 1.24.
- is_realized()¶
-
Checks whether a
Clutter.Actor
is realized.See also %CLUTTER_ACTOR_IS_REALIZED and
Clutter.Actor
:realized
.New in version 1.24.
- is_rotated()¶
-
Checks whether any rotation is applied to the actor.
New in version 0.6.
- is_scaled()¶
-
Checks whether the actor is scaled in either dimension.
New in version 0.6.
- is_visible()¶
-
Checks whether an actor is marked as visible.
See also %CLUTTER_ACTOR_IS_VISIBLE and
Clutter.Actor
:visible
.New in version 1.24.
- lower(above)¶
- Parameters:
above (
Clutter.Actor
orNone
) – AClutter.Actor
to lower below
Puts self below above.
Both actors must have the same parent, and the parent must implement the
Clutter.Container
interface.This function calls
Clutter.Container.lower_child
() internally.Deprecated since version 1.10: Use
Clutter.Actor.set_child_below_sibling
() instead.
- lower_bottom()¶
Lowers self to the bottom.
This function calls
Clutter.Actor.lower
() internally.Deprecated since version 1.10: Use
Clutter.Actor.set_child_below_sibling
() with aNone
sibling, instead.
- map()¶
Sets the
Clutter.ActorFlags.MAPPED
flag on the actor and possibly maps and realizes its children if they are visible. Does nothing if the actor is not visible.Calling this function is strongly disencouraged: the default implementation of
Clutter.Actor.do_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.
New in version 1.0.
- move_anchor_point(anchor_x, anchor_y)¶
- Parameters:
Sets an anchor point for the actor, and adjusts the actor postion so that the relative position of the actor toward its parent remains the same.
New in version 0.6.
Deprecated since version 1.12: Use
Clutter.Actor
:pivot-point
andClutter.Actor.set_translation
() instead.
- move_anchor_point_from_gravity(gravity)¶
- Parameters:
gravity (
Clutter.Gravity
) –Clutter.Gravity
.
Sets an anchor point on the actor based on the given gravity, adjusting the actor postion so that its relative position within its parent remains unchanged.
Since version 1.0 the anchor point will be stored as a gravity so that if the actor changes size then the anchor point will move. For example, if you set the anchor point to
Clutter.Gravity.SOUTH_EAST
and later double the size of the actor, the anchor point will move to the bottom right.New in version 0.6.
Deprecated since version 1.12: Use
Clutter.Actor
:pivot-point
andClutter.Actor.set_translation
() instead.
- move_by(dx, dy)¶
- Parameters:
Moves an actor by the specified distance relative to its current position in pixels.
This function modifies the fixed position of an actor and thus removes it from any layout management. Another way to move an actor is with an anchor point, see
Clutter.Actor.set_anchor_point
(), or with an additional translation, usingClutter.Actor.set_translation
().New in version 0.2.
- needs_expand(orientation)¶
- Parameters:
orientation (
Clutter.Orientation
) – the direction of expansion- Returns:
True
if the actor should expand- Return type:
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
() orClutter.Actor.get_y_expand
().New in version 1.12.
- paint()¶
Renders the actor to display.
This function should not be called directly by applications. Call
Clutter.Actor.queue_redraw
() to queue paints, instead.This function is context-aware, and will either cause a regular paint or a pick paint.
This function will emit the
Clutter.Actor
::paint
signal or theClutter.Actor
::pick
signal, depending on the context.This function does not paint the actor if the actor is set to 0, unless it is performing a pick paint.
- pop_internal()¶
Disables the effects of
Clutter.Actor.push_internal
().New in version 1.2.
Deprecated since version 1.10: All children of an actor are accessible through the
Clutter.Actor
API. This function is only useful for legacy containers overriding the default implementation of theClutter.Container
interface.
- push_internal()¶
Should be used by actors implementing the
Clutter.Container
and with internal children added throughClutter.Actor.set_parent
(), for instance:static void my_actor_init (MyActor *self) { self->priv = my_actor_get_instance_private (self); clutter_actor_push_internal (CLUTTER_ACTOR (self)); // calling clutter_actor_set_parent() now will result in // the internal flag being set on a child of MyActor // internal child - a background texture self->priv->background_tex = clutter_texture_new (); clutter_actor_set_parent (self->priv->background_tex, CLUTTER_ACTOR (self)); // internal child - a label self->priv->label = clutter_text_new (); clutter_actor_set_parent (self->priv->label, CLUTTER_ACTOR (self)); clutter_actor_pop_internal (CLUTTER_ACTOR (self)); // calling clutter_actor_set_parent() now will not result in // the internal flag being set on a child of MyActor }
This function will be used by Clutter to toggle an “internal child” flag whenever
Clutter.Actor.set_parent
() is called; internal children are handled differently by Clutter, specifically when destroying their parent.Call
Clutter.Actor.pop_internal
() when you finished adding internal children.Nested calls to
Clutter.Actor.push_internal
() are allowed, but each one must by followed by aClutter.Actor.pop_internal
() call.New in version 1.2.
Deprecated since version 1.10: All children of an actor are accessible through the
Clutter.Actor
API, andClutter.Actor
implements theClutter.Container
interface, so this function is only useful for legacy containers overriding the default implementation.
- queue_redraw()¶
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.
- queue_redraw_with_clip(clip)¶
- Parameters:
clip (
cairo.RectangleInt
orNone
) – a rectangular clip region, orNone
Queues a redraw on self limited to a specific, actor-relative rectangular area.
If clip is
None
this function is equivalent toClutter.Actor.queue_redraw
().New in version 1.10.
- queue_relayout()¶
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.
New in version 0.8.
- raise_(below)¶
- Parameters:
below (
Clutter.Actor
orNone
) – AClutter.Actor
to raise above.
Puts self above below.
Both actors must have the same parent, and the parent must implement the
Clutter.Container
interfaceThis function calls
Clutter.Container.raise_child
() internally.Deprecated since version 1.10: Use
Clutter.Actor.set_child_above_sibling
() instead.
- raise_top()¶
Raises self to the top.
This function calls
Clutter.Actor.raise_
() internally.Deprecated since version 1.10: Use
Clutter.Actor.set_child_above_sibling
() with aNone
sibling, instead.
- realize()¶
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.
Deprecated since version 1.16: Actors are automatically realized, and nothing requires explicit realization.
- remove_action(action)¶
- Parameters:
action (
Clutter.Action
) – aClutter.Action
Removes action from the list of actions applied to self
The reference held by self on the
Clutter.Action
will be releasedNew in version 1.4.
- remove_action_by_name(name)¶
- Parameters:
name (
str
) – the name of the action to remove
Removes the
Clutter.Action
with the given name from the list of actions applied to selfNew in version 1.4.
- remove_all_children()¶
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
().New in version 1.10.
- remove_all_transitions()¶
Removes all transitions associated to self.
New in version 1.10.
- remove_child(child)¶
- Parameters:
child (
Clutter.Actor
) – aClutter.Actor
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.Container
::actor-removed
signal on self.New in version 1.10.
- remove_clip()¶
Removes clip area from self.
- remove_constraint(constraint)¶
- Parameters:
constraint (
Clutter.Constraint
) – aClutter.Constraint
Removes constraint from the list of constraints applied to self
The reference held by self on the
Clutter.Constraint
will be releasedNew in version 1.4.
- remove_constraint_by_name(name)¶
- Parameters:
name (
str
) – the name of the constraint to remove
Removes the
Clutter.Constraint
with the given name from the list of constraints applied to selfNew in version 1.4.
- remove_effect(effect)¶
- Parameters:
effect (
Clutter.Effect
) – aClutter.Effect
Removes effect from the list of effects applied to self
The reference held by self on the
Clutter.Effect
will be releasedNew in version 1.4.
- remove_effect_by_name(name)¶
- Parameters:
name (
str
) – the name of the effect to remove
Removes the
Clutter.Effect
with the given name from the list of effects applied to selfNew in version 1.4.
- remove_transition(name)¶
- Parameters:
name (
str
) – the name of the transition to remove
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
.New in version 1.10.
- reparent(new_parent)¶
- Parameters:
new_parent (
Clutter.Actor
) – the newClutter.Actor
parent
Resets the parent actor of self.
This function is logically equivalent to calling
Clutter.Actor.unparent
() andClutter.Actor.set_parent
(), but more efficiently implemented, as it ensures the child is not finalized when unparented, and emits theClutter.Actor
::parent-set
signal only once.In reality, calling this function is less useful than it sounds, as some application code may rely on changes in the intermediate state between removal and addition of the actor from its old parent to the new_parent. Thus, it is strongly encouraged to avoid using this function in application code.
New in version 0.2.
Deprecated since version 1.10: Use
Clutter.Actor.remove_child
() andClutter.Actor.add_child
() instead; remember to take a reference on the actor being removed before callingClutter.Actor.remove_child
() to avoid the reference count dropping to zero and the actor being destroyed.
- replace_child(old_child, new_child)¶
- Parameters:
old_child (
Clutter.Actor
) – the child of self to replacenew_child (
Clutter.Actor
) – theClutter.Actor
to replace old_child
Replaces old_child with new_child in the list of children of self.
New in version 1.10.
- restore_easing_state()¶
Restores the easing state as it was prior to a call to
Clutter.Actor.save_easing_state
().New in version 1.10.
- save_easing_state()¶
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.
New in version 1.10.
- set_allocation(box, flags)¶
- Parameters:
box (
Clutter.ActorBox
) – aClutter.ActorBox
flags (
Clutter.AllocationFlags
) – allocation flags
Stores the allocation of self as defined by box.
This function can only be called from within the implementation of the
Clutter.Actor.do_allocate
() virtual function.The allocation should have been adjusted to take into account constraints, alignment, and margin properties. If you are implementing a
Clutter.Actor
subclass that provides its own layout management policy for its children instead of using aClutter.LayoutManager
delegate, you should not call this function on the children of self; instead, you should callClutter.Actor.allocate
(), which will adjust the allocation box for you.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 theClutter.Actor.do_allocate
() virtual function will call this function.It is important to note that, while chaining up was the recommended behaviour for
Clutter.Actor
subclasses prior to the introduction of this function, it is recommended to callClutter.Actor.set_allocation
() instead.If the
Clutter.Actor
is using aClutter.LayoutManager
delegate object to handle the allocation of its children, this function will call theClutter.LayoutManager.allocate
() function only if theClutter.AllocationFlags.DELEGATE_LAYOUT
flag is set on flags, otherwise it is expected that the subclass will callClutter.LayoutManager.allocate
() by itself. For instance, the following code:static void my_actor_allocate (ClutterActor *actor, const ClutterActorBox *allocation, ClutterAllocationFlags flags) { ClutterActorBox new_alloc; ClutterAllocationFlags new_flags; adjust_allocation (allocation, &new_alloc); new_flags = flags | CLUTTER_DELEGATE_LAYOUT; // this will use the layout manager set on the actor clutter_actor_set_allocation (actor, &new_alloc, new_flags); }
is equivalent to this:
static void my_actor_allocate (ClutterActor *actor, const ClutterActorBox *allocation, ClutterAllocationFlags flags) { ClutterLayoutManager *layout; ClutterActorBox new_alloc; adjust_allocation (allocation, &new_alloc); clutter_actor_set_allocation (actor, &new_alloc, flags); layout = clutter_actor_get_layout_manager (actor); clutter_layout_manager_allocate (layout, CLUTTER_CONTAINER (actor), &new_alloc, flags); }
New in version 1.10.
- set_anchor_point(anchor_x, anchor_y)¶
- Parameters:
Sets an anchor point for self. The anchor point is a point in the coordinate space of an actor to which the actor position within its parent is relative; the default is (0, 0), i.e. the top-left corner of the actor.
New in version 0.6.
Deprecated since version 1.12: Use
Clutter.Actor
:pivot-point
instead.
- set_anchor_point_from_gravity(gravity)¶
- Parameters:
gravity (
Clutter.Gravity
) –Clutter.Gravity
.
Sets an anchor point on the actor, based on the given gravity (this is a convenience function wrapping
Clutter.Actor.set_anchor_point
()).Since version 1.0 the anchor point will be stored as a gravity so that if the actor changes size then the anchor point will move. For example, if you set the anchor point to
Clutter.Gravity.SOUTH_EAST
and later double the size of the actor, the anchor point will move to the bottom right.New in version 0.6.
Deprecated since version 1.12: Use
Clutter.Actor
:pivot-point
andClutter.Actor.set_translation
() instead. E.g. ForClutter.Gravity.CENTER
set pivot_point to (0.5,0.5) and the translation to (width/2,height/2).
- set_background_color(color)¶
- Parameters:
color (
Clutter.Color
orNone
) – aClutter.Color
, orNone
to unset a previously set color
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.New in version 1.10.
- set_child_above_sibling(child, sibling)¶
- Parameters:
child (
Clutter.Actor
) – aClutter.Actor
child of selfsibling (
Clutter.Actor
orNone
) – aClutter.Actor
child of self, orNone
Sets child to be above sibling in the list of children of self.
If sibling is
None
, 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.New in version 1.10.
- set_child_at_index(child, index_)¶
- Parameters:
child (
Clutter.Actor
) – aClutter.Actor
child of selfindex (
int
) – the new index for child
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.New in version 1.10.
- set_child_below_sibling(child, sibling)¶
- Parameters:
child (
Clutter.Actor
) – aClutter.Actor
child of selfsibling (
Clutter.Actor
orNone
) – aClutter.Actor
child of self, orNone
Sets child to be below sibling in the list of children of self.
If sibling is
None
, 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.New in version 1.10.
- set_child_transform(transform)¶
- Parameters:
transform (
Clutter.Matrix
orNone
) – aClutter.Matrix
, orNone
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
None
, the child transform will be unset.The
Clutter.Actor
:child-transform
property is animatable.New in version 1.12.
- set_clip(xoff, yoff, width, height)¶
- Parameters:
Sets clip area for self. The clip area is always computed from the upper left corner of the actor, even if the anchor point is set otherwise.
New in version 0.6.
- set_clip_to_allocation(clip_set)¶
-
Sets whether self should be clipped to the same size as its allocation
New in version 1.4.
- set_content(content)¶
- Parameters:
content (
Clutter.Content
orNone
) – aClutter.Content
, orNone
Sets the contents of a
Clutter.Actor
.New in version 1.10.
- set_content_gravity(gravity)¶
- Parameters:
gravity (
Clutter.ContentGravity
) – theClutter.ContentGravity
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.New in version 1.10.
- set_content_repeat(repeat)¶
- Parameters:
repeat (
Clutter.ContentRepeat
) – the repeat policy
Sets the policy for repeating the
Clutter.Actor
:content
of aClutter.Actor
. The behaviour is deferred to theClutter.Content
implementation.New in version 1.12.
- set_content_scaling_filters(min_filter, mag_filter)¶
- Parameters:
min_filter (
Clutter.ScalingFilter
) – the minification filter for the contentmag_filter (
Clutter.ScalingFilter
) – the magnification filter for the content
Sets the minification and magnification filter to be applied when scaling the
Clutter.Actor
:content
of aClutter.Actor
.The
Clutter.Actor
:minification-filter
will be used when reducing the size of the content; theClutter.Actor
:magnification-filter
will be used when increasing the size of the content.New in version 1.10.
- set_depth(depth)¶
- Parameters:
depth (
float
) – Z co-ord
Sets the Z coordinate of self to depth.
The unit used by depth is dependant on the perspective setup. See also
Clutter.Stage.set_perspective
().Deprecated since version 1.12: Use
Clutter.Actor.set_z_position
() instead.
- set_easing_delay(msecs)¶
- Parameters:
msecs (
int
) – the delay before the start of the tweening, in milliseconds
Sets the delay that should be applied before tweening animatable properties.
New in version 1.10.
- set_easing_duration(msecs)¶
-
Sets the duration of the tweening for animatable properties of self for the current easing state.
New in version 1.10.
- set_easing_mode(mode)¶
- Parameters:
mode (
Clutter.AnimationMode
) – an easing mode, excludingClutter.AnimationMode.CUSTOM_MODE
Sets the easing mode for the tweening of animatable properties of self.
New in version 1.10.
- set_fixed_position_set(is_set)¶
- Parameters:
is_set (
bool
) – whether to use fixed position
Sets whether an actor has a fixed position set (and will thus be unaffected by any layout manager).
New in version 0.8.
- set_flags(flags)¶
- Parameters:
flags (
Clutter.ActorFlags
) – the flags to set
Sets flags on self
This function will emit notifications for the changed properties
New in version 1.0.
- set_geometry(geometry)¶
- Parameters:
geometry (
Clutter.Geometry
) – AClutter.Geometry
Sets the actor’s fixed position and forces its minimum and natural size, in pixels. This means the untransformed actor will have the given geometry. This is the same as calling
Clutter.Actor.set_position
() andClutter.Actor.set_size
().Deprecated since version 1.10: Use
Clutter.Actor.set_position
() andClutter.Actor.set_size
() instead.
- set_height(height)¶
- Parameters:
height (
float
) – Requested new height for the actor, in pixels, or -1
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.
New in version 0.2.
- set_layout_manager(manager)¶
- Parameters:
manager (
Clutter.LayoutManager
orNone
) – aClutter.LayoutManager
, orNone
to unset it
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.New in version 1.10.
- set_margin(margin)¶
- Parameters:
margin (
Clutter.Margin
) – aClutter.Margin
Sets all the components of the margin of a
Clutter.Actor
.New in version 1.10.
- set_margin_bottom(margin)¶
- Parameters:
margin (
float
) – the bottom margin
Sets the margin from the bottom of a
Clutter.Actor
.The
Clutter.Actor
:margin-bottom
property is animatable.New in version 1.10.
- set_margin_left(margin)¶
- Parameters:
margin (
float
) – the left margin
Sets the margin from the left of a
Clutter.Actor
.The
Clutter.Actor
:margin-left
property is animatable.New in version 1.10.
- set_margin_right(margin)¶
- Parameters:
margin (
float
) – the right margin
Sets the margin from the right of a
Clutter.Actor
.The
Clutter.Actor
:margin-right
property is animatable.New in version 1.10.
- set_margin_top(margin)¶
- Parameters:
margin (
float
) – the top margin
Sets the margin from the top of a
Clutter.Actor
.The
Clutter.Actor
:margin-top
property is animatable.New in version 1.10.
- set_name(name)¶
- Parameters:
name (
str
) – Textual tag to apply to actor
Sets the given name to self. The name can be used to identify a
Clutter.Actor
.
- set_offscreen_redirect(redirect)¶
- Parameters:
redirect (
Clutter.OffscreenRedirect
) – New offscreen redirect flags for the 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
Clutter.Texture
) 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.
- Sample of using an offscreen redirect for transparency
The default value for this property is 0, so we effectively will never redirect an actor offscreen by default. This means that there are times that transparent actors may look glassy as described above. The reason this is the default is because there is a performance trade off between quality and performance here. In many cases the default form of glassy opacity looks good enough, but if it’s not you will need to set the
Clutter.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 in version 1.8.
- set_opacity(opacity)¶
- Parameters:
opacity (
int
) – New opacity value 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.
- set_parent(parent)¶
- Parameters:
parent (
Clutter.Actor
) – A newClutter.Actor
parent
Sets the parent of self to parent.
This function will result in parent acquiring a reference on self, eventually by sinking its floating reference first. The reference will be released by
Clutter.Actor.unparent
().This function should only be called by legacy
Clutter.Actor
s implementing theClutter.Container
interface.Deprecated since version 1.10: Use
Clutter.Actor.add_child
() instead.
- set_pivot_point(pivot_x, pivot_y)¶
- Parameters:
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.
New in version 1.12.
- set_pivot_point_z(pivot_z)¶
- Parameters:
pivot_z (
float
) – the Z coordinate of the actor’s 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.
New in version 1.12.
- set_position(x, y)¶
- Parameters:
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.
- set_reactive(reactive)¶
- Parameters:
reactive (
bool
) – whether the actor should be reactive to events
Sets self as reactive. Reactive actors will receive events.
New in version 0.6.
- set_request_mode(mode)¶
- Parameters:
mode (
Clutter.RequestMode
) – the request mode
Sets the geometry request mode of self.
The mode determines the order for invoking
Clutter.Actor.get_preferred_width
() andClutter.Actor.get_preferred_height
()New in version 1.2.
- set_rotation(axis, angle, x, y, z)¶
- Parameters:
axis (
Clutter.RotateAxis
) – the axis of rotationangle (
float
) – the angle of rotationx (
float
) – X coordinate of the rotation centery (
float
) – Y coordinate of the rotation centerz (
float
) – Z coordinate of the rotation center
Sets the rotation angle of self around the given axis.
The rotation center coordinates used depend on the value of axis:
Clutter.RotateAxis.X_AXIS
requires y and zClutter.RotateAxis.Y_AXIS
requires x and zClutter.RotateAxis.Z_AXIS
requires x and y
The rotation coordinates are relative to the anchor point of the actor, set using
Clutter.Actor.set_anchor_point
(). If no anchor point is set, the upper left corner is assumed as the origin.New in version 0.8.
Deprecated since version 1.12: Use
Clutter.Actor.set_rotation_angle
() andClutter.Actor.set_pivot_point
() instead.
- set_rotation_angle(axis, angle)¶
- Parameters:
axis (
Clutter.RotateAxis
) – the axis to set the angle oneangle (
float
) – the angle of rotation, in degrees
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
, andClutter.Actor
:rotation-angle-z
.The center of rotation is established by the
Clutter.Actor
:pivot-point
property.New in version 1.12.
- set_scale(scale_x, scale_y)¶
- Parameters:
Scales an actor with the given factors.
The scale transformation is relative the the
Clutter.Actor
:pivot-point
.The
Clutter.Actor
:scale-x
andClutter.Actor
:scale-y
properties are animatable.New in version 0.2.
- set_scale_full(scale_x, scale_y, center_x, center_y)¶
- Parameters:
Scales an actor with the given factors around the given center point. The center point is specified in pixels relative to the anchor point (usually the top left corner of the actor).
The
Clutter.Actor
:scale-x
andClutter.Actor
:scale-y
properties are animatable.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.Actor.set_pivot_point
() to control the scale center
- set_scale_with_gravity(scale_x, scale_y, gravity)¶
- Parameters:
scale_x (
float
) – double factor to scale actor by horizontally.scale_y (
float
) – double factor to scale actor by vertically.gravity (
Clutter.Gravity
) – the location of the scale center expressed as a compass direction.
Scales an actor with the given factors around the given center point. The center point is specified as one of the compass directions in
Clutter.Gravity
. For example, setting it to north will cause the top of the actor to remain unchanged and the rest of the actor to expand left, right and downwards.The
Clutter.Actor
:scale-x
andClutter.Actor
:scale-y
properties are animatable.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.Actor.set_pivot_point
() to set the scale center using normalized coordinates instead.
- set_scale_z(scale_z)¶
- Parameters:
scale_z (
float
) – the scaling factor along the Z axis
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.New in version 1.12.
- set_shader(shader)¶
- Parameters:
shader (
Clutter.Shader
orNone
) – aClutter.Shader
orNone
to unset the shader.- Returns:
True
if the shader was successfully applied or removed- Return type:
Sets the
Clutter.Shader
to be used when rendering self.If shader is
None
this function will unset any currently set shader for the actor.Any
Clutter.Effect
applied to self will take the precedence over theClutter.Shader
set using this function.New in version 0.6.
Deprecated since version 1.8: Use
Clutter.ShaderEffect
andClutter.Actor.add_effect
() instead.
- set_shader_param(param, value)¶
- Parameters:
param (
str
) – the name of the parametervalue (
GObject.Value
) – the value of the parameter
Sets the value for a named parameter of the shader applied to actor.
New in version 1.0.
Deprecated since version 1.8: Use
Clutter.ShaderEffect.set_uniform_value
() instead
- set_shader_param_float(param, value)¶
-
Sets the value for a named float parameter of the shader applied to actor.
New in version 0.8.
Deprecated since version 1.8: Use clutter_shader_effect_set_uniform() instead
- set_shader_param_int(param, value)¶
-
Sets the value for a named int parameter of the shader applied to actor.
New in version 0.8.
Deprecated since version 1.8: Use clutter_shader_effect_set_uniform() instead
- set_size(width, height)¶
- Parameters:
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.
- set_text_direction(text_dir)¶
- Parameters:
text_dir (
Clutter.TextDirection
) – the text direction for self
Sets the
Clutter.TextDirection
for an actorThe passed text direction must not be
Clutter.TextDirection.DEFAULT
If self implements
Clutter.Container
then this function will recurse inside all the children of self (including the internal ones).Composite actors not implementing
Clutter.Container
, or actors requiring special handling when the text direction changes, should connect to theGObject.Object
::notify
signal for theClutter.Actor
:text-direction
propertyNew in version 1.2.
- set_transform(transform)¶
- Parameters:
transform (
Clutter.Matrix
orNone
) – aClutter.Matrix
, orNone
to unset a custom transformation
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.New in version 1.12.
- set_translation(translate_x, translate_y, translate_z)¶
- Parameters:
Sets an additional translation transformation on a
Clutter.Actor
, relative to theClutter.Actor
:pivot-point
.New in version 1.12.
- set_width(width)¶
- Parameters:
width (
float
) – Requested new width for the actor, in pixels, or -1
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.
New in version 0.2.
- set_x(x)¶
- Parameters:
x (
float
) – the actor’s position on the X axis
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.New in version 0.6.
- set_x_align(x_align)¶
- Parameters:
x_align (
Clutter.ActorAlign
) – the horizontal alignment policy
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.New in version 1.10.
- set_x_expand(expand)¶
- Parameters:
expand (
bool
) – whether the actor should expand horizontally
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.
New in version 1.12.
- set_y(y)¶
- Parameters:
y (
float
) – the actor’s position on the Y axis
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.New in version 0.6.
- set_y_align(y_align)¶
- Parameters:
y_align (
Clutter.ActorAlign
) – the vertical alignment policy
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.New in version 1.10.
- set_y_expand(expand)¶
- Parameters:
expand (
bool
) – whether the actor should expand vertically
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.
New in version 1.12.
- set_z_position(z_position)¶
- Parameters:
z_position (
float
) – the position on the Z axis
Sets the actor’s position on the Z axis.
See
Clutter.Actor
:z-position
.New in version 1.12.
- set_z_rotation_from_gravity(angle, gravity)¶
- Parameters:
angle (
float
) – the angle of rotationgravity (
Clutter.Gravity
) – the center point of the rotation
Sets the rotation angle of self around the Z axis using the center point specified as a compass point. For example to rotate such that the center of the actor remains static you can use
Clutter.Gravity.CENTER
. If the actor changes size the center point will move accordingly.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.Actor.set_rotation_angle
() andClutter.Actor.set_pivot_point
() instead.
- should_pick_paint()¶
-
Should be called inside the implementation of the
Clutter.Actor
::pick
virtual function in order to check whether the actor should paint itself in pick mode or not.This function should never be called directly by applications.
- show()¶
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 toTrue
as a side effect.
- show_all()¶
Calls
Clutter.Actor.show
() on all children of an actor (if any).New in version 0.2.
Deprecated since version 1.10: Actors are visible by default
- transform_stage_point(x, y)¶
- Parameters:
- Returns:
True
if conversion was successful.- x_out:
return location for the unprojected x coordinance
- y_out:
return location for the unprojected y coordinance
- Return type:
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.do_paint
() implementationNew in version 0.6.
- unmap()¶
Unsets the
Clutter.ActorFlags.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 ofClutter.Actor.do_unmap
() will also unmap any eventual children by default when their parent is unmapped.When overriding
Clutter.Actor.do_unmap
(), it is mandatory to chain up to the parent implementation.It is important to note that the implementation of the
Clutter.Actor.do_unmap
() virtual function may be called after theClutter.Actor.do_destroy
() or theGObject.Object.do_dispose
() implementation, but it is guaranteed to be called before theGObject.Object.do_finalize
() implementation.New in version 1.0.
- unparent()¶
Removes the parent of self.
This will cause the parent of self to release the reference acquired when calling
Clutter.Actor.set_parent
(), so if you want to keep self you will have to acquire a reference of your own, throughGObject.Object.ref
().This function should only be called by legacy
Clutter.Actor
s implementing theClutter.Container
interface.New in version 0.2.
Deprecated since version 1.10: Use
Clutter.Actor.remove_child
() instead.
- unrealize()¶
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.
Clutter.Actor
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 toClutter.Actor
's dispose.If you were using
Clutter.Actor.unrealize
() to implement unrealizing children of your container, then don’t,Clutter.Actor
will already take care of that.Deprecated since version 1.16: Actors are automatically unrealized, and nothing requires explicit realization.
- unset_flags(flags)¶
- Parameters:
flags (
Clutter.ActorFlags
) – the flags to unset
Unsets flags on self
This function will emit notifications for the changed properties
New in version 1.0.
- do_allocate(box, flags) virtual¶
- Parameters:
box (
Clutter.ActorBox
) – new allocation of the actor, in parent-relative coordinatesflags (
Clutter.AllocationFlags
) – flags that control the allocation
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.do_allocate
() virtual function.This function will adjust the stored allocation to take into account the alignment flags set in the
Clutter.Actor
:x-align
andClutter.Actor
:y-align
properties, as well as the margin values set in theClutter.Actor
:margin-top
,Clutter.Actor
:margin-right
,Clutter.Actor
:margin-bottom
, andClutter.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 in version 0.8.
- do_apply_transform(matrix) virtual¶
- Parameters:
matrix (
Clutter.Matrix
) –
- do_button_press_event(event) virtual¶
- Parameters:
event (
Clutter.ButtonEvent
) –- Return type:
- do_button_release_event(event) virtual¶
- Parameters:
event (
Clutter.ButtonEvent
) –- Return type:
- do_captured_event(event) virtual¶
- Parameters:
event (
Clutter.Event
) –- Return type:
- do_destroy() virtual¶
Destroys an actor. When an actor is destroyed, it will break any references it holds to other objects. If the actor is inside a container, the actor will be removed.
When you destroy a container, its children will be destroyed as well.
Note: you cannot destroy the
Clutter.Stage
returned byClutter.Stage.get_default
().
- do_enter_event(event) virtual¶
- Parameters:
event (
Clutter.CrossingEvent
) –- Return type:
- do_event(event) virtual¶
- Parameters:
event (
Clutter.Event
) –- Return type:
- do_get_accessible() virtual¶
- Returns:
the
Atk.Object
associated with actor- Return type:
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 anAtk.Object
implementation from the first ancestor class for which such an implementation is defined.The documentation of the ATK library contains more information about accessible objects and their uses.
- do_get_paint_volume(volume) virtual¶
- Parameters:
volume (
Clutter.PaintVolume
) –- Return type:
- do_get_preferred_height(for_width) virtual¶
- Parameters:
for_width (
float
) – available width to assume in computing desired height, or a negative value to indicate that no width is defined- Returns:
- Return type:
Computes the requested minimum and natural heights for an actor, or if they are already computed, returns the cached values.
An actor may not get its request - depending on the layout manager that’s in effect.
A request should not incorporate the actor’s scale or anchor point; those transformations do not affect layout, only rendering.
New in version 0.8.
- do_get_preferred_width(for_height) virtual¶
- Parameters:
for_height (
float
) – available height when computing the preferred width, or a negative value to indicate that no height is defined- Returns:
- Return type:
Computes the requested minimum and natural widths for an actor, optionally depending on the specified height, or if they are already computed, returns the cached values.
An actor may not get its request - depending on the layout manager that’s in effect.
A request should not incorporate the actor’s scale or anchor point; those transformations do not affect layout, only rendering.
New in version 0.8.
- do_has_overlaps() virtual¶
-
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.do_has_overlaps
() virtual function. SeeClutter.Actor.set_offscreen_redirect
() for more information.New in version 1.8.
- do_hide() virtual¶
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 toFalse
as a side-effect.
- do_hide_all() virtual¶
Calls
Clutter.Actor.hide
() on all child actors (if any).New in version 0.2.
Deprecated since version 1.10: Using
Clutter.Actor.hide
() on the actor will prevent its children from being painted as well.
- do_key_focus_in() virtual¶
- do_key_focus_out() virtual¶
- do_key_press_event(event) virtual¶
- Parameters:
event (
Clutter.KeyEvent
) –- Return type:
- do_key_release_event(event) virtual¶
- Parameters:
event (
Clutter.KeyEvent
) –- Return type:
- do_leave_event(event) virtual¶
- Parameters:
event (
Clutter.CrossingEvent
) –- Return type:
- do_map() virtual¶
Sets the
Clutter.ActorFlags.MAPPED
flag on the actor and possibly maps and realizes its children if they are visible. Does nothing if the actor is not visible.Calling this function is strongly disencouraged: the default implementation of
Clutter.Actor.do_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.
New in version 1.0.
- do_motion_event(event) virtual¶
- Parameters:
event (
Clutter.MotionEvent
) –- Return type:
- do_paint() virtual¶
Renders the actor to display.
This function should not be called directly by applications. Call
Clutter.Actor.queue_redraw
() to queue paints, instead.This function is context-aware, and will either cause a regular paint or a pick paint.
This function will emit the
Clutter.Actor
::paint
signal or theClutter.Actor
::pick
signal, depending on the context.This function does not paint the actor if the actor is set to 0, unless it is performing a pick paint.
- do_paint_node(root) virtual¶
- Parameters:
root (
Clutter.PaintNode
) –
- do_parent_set(old_parent) virtual¶
- Parameters:
old_parent (
Clutter.Actor
) –
- do_pick(color) virtual¶
- Parameters:
color (
Clutter.Color
) –
- do_queue_redraw(leaf_that_queued) virtual¶
- Parameters:
leaf_that_queued (
Clutter.Actor
) –
- do_queue_relayout() virtual¶
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.
New in version 0.8.
- do_realize() virtual¶
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.
Deprecated since version 1.16: Actors are automatically realized, and nothing requires explicit realization.
- do_scroll_event(event) virtual¶
- Parameters:
event (
Clutter.ScrollEvent
) –- Return type:
- do_show() virtual¶
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 toTrue
as a side effect.
- do_show_all() virtual¶
Calls
Clutter.Actor.show
() on all children of an actor (if any).New in version 0.2.
Deprecated since version 1.10: Actors are visible by default
- do_touch_event(event) virtual¶
- Parameters:
event (
Clutter.TouchEvent
) –- Return type:
- do_unmap() virtual¶
Unsets the
Clutter.ActorFlags.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 ofClutter.Actor.do_unmap
() will also unmap any eventual children by default when their parent is unmapped.When overriding
Clutter.Actor.do_unmap
(), it is mandatory to chain up to the parent implementation.It is important to note that the implementation of the
Clutter.Actor.do_unmap
() virtual function may be called after theClutter.Actor.do_destroy
() or theGObject.Object.do_dispose
() implementation, but it is guaranteed to be called before theGObject.Object.do_finalize
() implementation.New in version 1.0.
- do_unrealize() virtual¶
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.
Clutter.Actor
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 toClutter.Actor
's dispose.If you were using
Clutter.Actor.unrealize
() to implement unrealizing children of your container, then don’t,Clutter.Actor
will already take care of that.Deprecated since version 1.16: Actors are automatically unrealized, and nothing requires explicit realization.
Signal Details¶
- Clutter.Actor.signals.allocation_changed(actor, box, flags)¶
- Signal Name:
allocation-changed
- Flags:
- Parameters:
actor (
Clutter.Actor
) – The object which received the signalbox (
Clutter.ActorBox
) – aClutter.ActorBox
with the new allocationflags (
Clutter.AllocationFlags
) –Clutter.AllocationFlags
for the allocation
The
::allocation-changed
signal is emitted when theClutter.Actor
:allocation
property changes. Usually, application code should just use the notifications for the:allocation
property but if you want to track the allocation flags as well, for instance to know whether the absolute origin of actor changed, then you might want use this signal instead.New in version 1.0.
- Clutter.Actor.signals.button_press_event(actor, event)¶
- Signal Name:
button-press-event
- Flags:
- Parameters:
actor (
Clutter.Actor
) – The object which received the signalevent (
Clutter.ButtonEvent
) – aClutter.ButtonEvent
- Returns:
True
if the event has been handled by the actor, orFalse
to continue the emission.- Return type:
The
::button-press-event
signal is emitted each time a mouse button is pressed on actor.New in version 0.6.
- Clutter.Actor.signals.button_release_event(actor, event)¶
- Signal Name:
button-release-event
- Flags:
- Parameters:
actor (
Clutter.Actor
) – The object which received the signalevent (
Clutter.ButtonEvent
) – aClutter.ButtonEvent
- Returns:
True
if the event has been handled by the actor, orFalse
to continue the emission.- Return type:
The
::button-release-event
signal is emitted each time a mouse button is released on actor.New in version 0.6.
- Clutter.Actor.signals.captured_event(actor, event)¶
- Signal Name:
captured-event
- Flags:
- Parameters:
actor (
Clutter.Actor
) – The object which received the signalevent (
Clutter.Event
) – aClutter.Event
- Returns:
True
if the event has been handled by the actor, orFalse
to continue the emission.- Return type:
The
::captured-event
signal is emitted when an event is captured by Clutter. This signal will be emitted starting from the top-level container (theClutter.Stage
) to the actor which received the event going down the hierarchy. This signal can be used to intercept every event before the specialized events (likeClutter.Actor
::button-press-event
or::key-released-event
) are emitted.New in version 0.6.
- Clutter.Actor.signals.destroy(actor)¶
- Signal Name:
destroy
- Flags:
- Parameters:
actor (
Clutter.Actor
) – The object which received the signal
The
::destroy
signal notifies that all references held on the actor which emitted it should be released.The
::destroy
signal should be used by all holders of a reference on actor.This signal might result in the finalization of the
Clutter.Actor
if all references are released.Composite actors and actors implementing the
Clutter.Container
interface should override the default implementation of the class handler of this signal and callClutter.Actor.destroy
() on their children. When overriding the default class handler, it is required to chain up to the parent’s implementation.New in version 0.2.
- Clutter.Actor.signals.enter_event(actor, event)¶
- Signal Name:
enter-event
- Flags:
- Parameters:
actor (
Clutter.Actor
) – The object which received the signalevent (
Clutter.CrossingEvent
) – aClutter.CrossingEvent
- Returns:
True
if the event has been handled by the actor, orFalse
to continue the emission.- Return type:
The
::enter-event
signal is emitted when the pointer enters the actorNew in version 0.6.
- Clutter.Actor.signals.event(actor, event)¶
- Signal Name:
event
- Flags:
- Parameters:
actor (
Clutter.Actor
) – The object which received the signalevent (
Clutter.Event
) – aClutter.Event
- Returns:
True
if the event has been handled by the actor, orFalse
to continue the emission.- Return type:
The
::event
signal is emitted each time an event is received by the actor. This signal will be emitted on every actor, following the hierarchy chain, until it reaches the top-level container (theClutter.Stage
).New in version 0.6.
- Clutter.Actor.signals.hide(actor)¶
- Signal Name:
hide
- Flags:
- Parameters:
actor (
Clutter.Actor
) – The object which received the signal
The
::hide
signal is emitted when an actor is no longer rendered on the stage.New in version 0.2.
- Clutter.Actor.signals.key_focus_in(actor)¶
- Signal Name:
key-focus-in
- Flags:
- Parameters:
actor (
Clutter.Actor
) – The object which received the signal
The
::key-focus-in
signal is emitted when actor receives key focus.New in version 0.6.
- Clutter.Actor.signals.key_focus_out(actor)¶
- Signal Name:
key-focus-out
- Flags:
- Parameters:
actor (
Clutter.Actor
) – The object which received the signal
The
::key-focus-out
signal is emitted when actor loses key focus.New in version 0.6.
- Clutter.Actor.signals.key_press_event(actor, event)¶
- Signal Name:
key-press-event
- Flags:
- Parameters:
actor (
Clutter.Actor
) – The object which received the signalevent (
Clutter.KeyEvent
) – aClutter.KeyEvent
- Returns:
True
if the event has been handled by the actor, orFalse
to continue the emission.- Return type:
The
::key-press-event
signal is emitted each time a keyboard button is pressed while actor has key focus (seeClutter.Stage.set_key_focus
()).New in version 0.6.
- Clutter.Actor.signals.key_release_event(actor, event)¶
- Signal Name:
key-release-event
- Flags:
- Parameters:
actor (
Clutter.Actor
) – The object which received the signalevent (
Clutter.KeyEvent
) – aClutter.KeyEvent
- Returns:
True
if the event has been handled by the actor, orFalse
to continue the emission.- Return type:
The
::key-release-event
signal is emitted each time a keyboard button is released while actor has key focus (seeClutter.Stage.set_key_focus
()).New in version 0.6.
- Clutter.Actor.signals.leave_event(actor, event)¶
- Signal Name:
leave-event
- Flags:
- Parameters:
actor (
Clutter.Actor
) – The object which received the signalevent (
Clutter.CrossingEvent
) – aClutter.CrossingEvent
- Returns:
True
if the event has been handled by the actor, orFalse
to continue the emission.- Return type:
The
::leave-event
signal is emitted when the pointer leaves the actor.New in version 0.6.
- Clutter.Actor.signals.motion_event(actor, event)¶
- Signal Name:
motion-event
- Flags:
- Parameters:
actor (
Clutter.Actor
) – The object which received the signalevent (
Clutter.MotionEvent
) – aClutter.MotionEvent
- Returns:
True
if the event has been handled by the actor, orFalse
to continue the emission.- Return type:
The
::motion-event
signal is emitted each time the mouse pointer is moved over actor.New in version 0.6.
- Clutter.Actor.signals.paint(actor)¶
- Signal Name:
paint
- Flags:
- Parameters:
actor (
Clutter.Actor
) – The object which received the signal
The
::paint
signal is emitted each time an actor is being painted.Subclasses of
Clutter.Actor
should override the Clutter.ActorClass.paint virtual function paint themselves in that function.It is strongly discouraged to connect a signal handler to the
Clutter.Actor
::paint
signal; if you want to change the paint sequence of an existingClutter.Actor
instance, either create a newClutter.Actor
class and override the Clutter.ActorClass.paint virtual function, or use aClutter.Effect
. TheClutter.Actor
::paint
signal will be removed in a future version of Clutter.New in version 0.8.
Deprecated since version 1.12: Override the Clutter.ActorClass.paint virtual function, use a
Clutter.Content
implementation, or aClutter.Effect
instead of connecting to this signal.
- Clutter.Actor.signals.parent_set(actor, old_parent)¶
- Signal Name:
parent-set
- Flags:
- Parameters:
actor (
Clutter.Actor
) – The object which received the signalold_parent (
Clutter.Actor
orNone
) – the previous parent of the actor, orNone
This signal is emitted when the parent of the actor changes.
New in version 0.2.
- Clutter.Actor.signals.pick(actor, color)¶
- Signal Name:
pick
- Flags:
- Parameters:
actor (
Clutter.Actor
) – The object which received the signalcolor (
Clutter.Color
) – theClutter.Color
to be used when picking
The
::pick
signal is emitted each time an actor is being painted in “pick mode”. The pick mode is used to identify the actor during the event handling phase, or byClutter.Stage.get_actor_at_pos
(). The actor should paint its shape using the passed pick_color.Subclasses of
Clutter.Actor
should override the class signal handler and paint themselves in that function.It is possible to connect a handler to the
::pick
signal in order to set up some custom aspect of a paint in pick mode.New in version 1.0.
Deprecated since version 1.12: Override the Clutter.ActorClass.pick virtual function instead.
- Clutter.Actor.signals.queue_redraw(actor, origin)¶
- Signal Name:
queue-redraw
- Flags:
- Parameters:
actor (
Clutter.Actor
) – The object which received the signalorigin (
Clutter.Actor
) – the actor which initiated the redraw request
The ::queue_redraw signal is emitted when
Clutter.Actor.queue_redraw
() is called on origin.The default implementation for
Clutter.Actor
chains up to the parent actor and queues a redraw on the parent, thus “bubbling” the redraw queue up through the actor graph. The default implementation forClutter.Stage
queues aClutter.Stage.ensure_redraw
() in a main loop idle handler.Note that the origin actor may be the stage, or a container; it does not have to be a leaf node in the actor graph.
Toolkits embedding a
Clutter.Stage
which require a redraw and relayout cycle can stop the emission of this signal using the GSignal API, redraw the UI and then callClutter.Stage.ensure_redraw
() themselves, like:static void on_redraw_complete (gpointer data) { ClutterStage *stage = data; // execute the Clutter drawing pipeline clutter_stage_ensure_redraw (stage); } static void on_stage_queue_redraw (ClutterStage *stage) { // this prevents the default handler to run g_signal_stop_emission_by_name (stage, "queue-redraw"); // queue a redraw with the host toolkit and call // a function when the redraw has been completed queue_a_redraw (G_CALLBACK (on_redraw_complete), stage); }
Note: This signal is emitted before the Clutter paint pipeline is executed. If you want to know when the pipeline has been completed you should use
Clutter.threads_add_repaint_func
() orClutter.threads_add_repaint_func_full
().New in version 1.0.
- Clutter.Actor.signals.queue_relayout(actor)¶
- Signal Name:
queue-relayout
- Flags:
- Parameters:
actor (
Clutter.Actor
) – The object which received the signal
The ::queue_layout signal is emitted when
Clutter.Actor.queue_relayout
() is called on an actor.The default implementation for
Clutter.Actor
chains up to the parent actor and queues a relayout on the parent, thus “bubbling” the relayout queue up through the actor graph.The main purpose of this signal is to allow relayout to be propagated properly in the presence of
Clutter.Clone
actors. Applications will not normally need to connect to this signal.New in version 1.2.
- Clutter.Actor.signals.realize(actor)¶
- Signal Name:
realize
- Flags:
- Parameters:
actor (
Clutter.Actor
) – The object which received the signal
The
::realize
signal is emitted each time an actor is being realized.New in version 0.8.
Deprecated since version 1.16: The signal should not be used in newly written code
- Clutter.Actor.signals.scroll_event(actor, event)¶
- Signal Name:
scroll-event
- Flags:
- Parameters:
actor (
Clutter.Actor
) – The object which received the signalevent (
Clutter.ScrollEvent
) – aClutter.ScrollEvent
- Returns:
True
if the event has been handled by the actor, orFalse
to continue the emission.- Return type:
The
::scroll-event
signal is emitted each time the mouse is scrolled on actorNew in version 0.6.
- Clutter.Actor.signals.show(actor)¶
- Signal Name:
show
- Flags:
- Parameters:
actor (
Clutter.Actor
) – The object which received the signal
The
::show
signal is emitted when an actor is visible and rendered on the stage.New in version 0.2.
- Clutter.Actor.signals.touch_event(actor, event)¶
- Signal Name:
touch-event
- Flags:
- Parameters:
actor (
Clutter.Actor
) – The object which received the signalevent (
Clutter.Event
) – aClutter.Event
- Returns:
Clutter.EVENT_STOP
if the event has been handled by the actor, orClutter.EVENT_PROPAGATE
to continue the emission.- Return type:
The
::touch-event
signal is emitted each time a touch begin/end/update/cancel event.New in version 1.12.
- Clutter.Actor.signals.transition_stopped(actor, name, is_finished)¶
- Signal Name:
transition-stopped
- Flags:
- Parameters:
actor (
Clutter.Actor
) – The object which received the signalname (
str
) – the name of the transitionis_finished (
bool
) – whether the transition was finished, or stopped
The
::transition-stopped
signal is emitted once a transition is stopped; a transition is stopped once it reached its total duration (including eventual repeats), it has been stopped usingClutter.Timeline.stop
(), or it has been removed from the transitions applied on actor, usingClutter.Actor.remove_transition
().New in version 1.12.
- Clutter.Actor.signals.transitions_completed(actor)¶
- Signal Name:
transitions-completed
- Flags:
- Parameters:
actor (
Clutter.Actor
) – The object which received the signal
The
::transitions-completed
signal is emitted once all transitions involving actor are complete.New in version 1.10.
- Clutter.Actor.signals.unrealize(actor)¶
- Signal Name:
unrealize
- Flags:
- Parameters:
actor (
Clutter.Actor
) – The object which received the signal
The
::unrealize
signal is emitted each time an actor is being unrealized.New in version 0.8.
Deprecated since version 1.16: The signal should not be used in newly written code
Property Details¶
- Clutter.Actor.props.actions¶
- Name:
actions
- Type:
- Default Value:
- Flags:
Adds a
Clutter.Action
to the actorNew in version 1.4.
- Clutter.Actor.props.allocation¶
- Name:
allocation
- Type:
- Default Value:
- Flags:
The allocation for the actor, in pixels
This is property is read-only, but you might monitor it to know when an actor moves or resizes
New in version 0.8.
- Clutter.Actor.props.anchor_gravity¶
- Name:
anchor-gravity
- Type:
- Default Value:
- Flags:
The anchor point expressed as a
Clutter.Gravity
It is highly recommended not to use
Clutter.Actor
:anchor-x
,Clutter.Actor
:anchor-y
, andClutter.Actor
:anchor-gravity
in newly written code; the anchor point adds an additional translation that will affect the actor’s relative position with regards to its parent, as well as the position of its children. This change needs to always be taken into account when positioning the actor. It is recommended to use theClutter.Actor
:pivot-point
property instead, as it will affect only the transformations.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.Actor
:pivot-point
instead
- Clutter.Actor.props.anchor_x¶
- Name:
anchor-x
- Type:
- Default Value:
0.0
- Flags:
The X coordinate of an actor’s anchor point, relative to the actor coordinate space, in pixels.
It is highly recommended not to use
Clutter.Actor
:anchor-x
,Clutter.Actor
:anchor-y
, andClutter.Actor
:anchor-gravity
in newly written code; the anchor point adds an additional translation that will affect the actor’s relative position with regards to its parent, as well as the position of its children. This change needs to always be taken into account when positioning the actor. It is recommended to use theClutter.Actor
:pivot-point
property instead, as it will affect only the transformations.New in version 0.8.
Deprecated since version 1.12: Use
Clutter.Actor
:pivot-point
instead
- Clutter.Actor.props.anchor_y¶
- Name:
anchor-y
- Type:
- Default Value:
0.0
- Flags:
The Y coordinate of an actor’s anchor point, relative to the actor coordinate space, in pixels
It is highly recommended not to use
Clutter.Actor
:anchor-x
,Clutter.Actor
:anchor-y
, andClutter.Actor
:anchor-gravity
in newly written code; the anchor point adds an additional translation that will affect the actor’s relative position with regards to its parent, as well as the position of its children. This change needs to always be taken into account when positioning the actor. It is recommended to use theClutter.Actor
:pivot-point
property instead, as it will affect only the transformations.New in version 0.8.
Deprecated since version 1.12: Use
Clutter.Actor
:pivot-point
instead
- Clutter.Actor.props.background_color¶
- Name:
background-color
- Type:
- Default Value:
<Color structure at 0x000000000000 (ClutterColor at 0x0000000)>
- Flags:
Paints a solid fill of the actor’s allocation using the specified color.
The
Clutter.Actor
:background-color
property is animatable.New in version 1.10.
- Clutter.Actor.props.background_color_set¶
-
Whether the
Clutter.Actor
:background-color
property has been set.New in version 1.10.
- Clutter.Actor.props.child_transform¶
- Name:
child-transform
- Type:
- Default Value:
- Flags:
Applies a transformation matrix on each child of an actor.
Setting this property with a
Clutter.Matrix
will set theClutter.Actor
:child-transform-set
property toTrue
as a side effect; setting this property withNone
will set theClutter.Actor
:child-transform-set
property toFalse
.The
Clutter.Actor
:child-transform
property is animatable.New in version 1.12.
- Clutter.Actor.props.child_transform_set¶
-
Whether the
Clutter.Actor
:child-transform
property is set.New in version 1.12.
- Clutter.Actor.props.clip¶
- Name:
clip
- Type:
- Default Value:
- Flags:
The visible region of the actor, in actor-relative coordinates
Deprecated since version 1.12: Use
Clutter.Actor
:clip-rect
instead.
- Clutter.Actor.props.clip_rect¶
- Name:
clip-rect
- Type:
- Default Value:
- Flags:
The visible region of the actor, in actor-relative coordinates, expressed as a
Clutter.Rect
.Setting this property to
None
will unset the existing clip.Setting this property will change the
Clutter.Actor
:has-clip
property as a side effect.New in version 1.12.
- Clutter.Actor.props.clip_to_allocation¶
-
Whether the clip region should track the allocated area of the actor.
This property is ignored if a clip area has been explicitly set using
Clutter.Actor.set_clip
().New in version 1.0.
- Clutter.Actor.props.constraints¶
- Name:
constraints
- Type:
- Default Value:
- Flags:
Adds a
Clutter.Constraint
to the actorNew in version 1.4.
- Clutter.Actor.props.content¶
- Name:
content
- Type:
- Default Value:
- Flags:
The
Clutter.Content
implementation that controls the content of the actor.New in version 1.10.
- Clutter.Actor.props.content_box¶
- Name:
content-box
- Type:
- Default Value:
- Flags:
The bounding box for the
Clutter.Content
used by the actor.The value of this property is controlled by the
Clutter.Actor
:allocation
andClutter.Actor
:content-gravity
properties ofClutter.Actor
.The bounding box for the content is guaranteed to never exceed the allocation’s of the actor.
New in version 1.10.
- Clutter.Actor.props.content_gravity¶
- Name:
content-gravity
- Type:
- Default Value:
- Flags:
The alignment that should be honoured by the
Clutter.Content
set with theClutter.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.New in version 1.10.
- Clutter.Actor.props.content_repeat¶
- Name:
content-repeat
- Type:
- Default Value:
- Flags:
The repeat policy for the actor’s
Clutter.Actor
:content
.New in version 1.12.
- Clutter.Actor.props.depth¶
- Name:
depth
- Type:
- Default Value:
0.0
- Flags:
The position of the actor on the Z axis.
The
Clutter.Actor
:depth
property is relative to the parent’s modelview matrix.Setting this property will call
Clutter.Container.do_sort_depth_order
() which is usually a no-op, and it’s most likely not what you want.The
Clutter.Actor
:depth
property is animatable.New in version 0.6.
Deprecated since version 1.12: Use
Clutter.Actor
:z-position
instead.
- Clutter.Actor.props.effect¶
- Name:
effect
- Type:
- Default Value:
- Flags:
Adds
Clutter.Effect
to the list of effects be applied on aClutter.Actor
New in version 1.4.
- Clutter.Actor.props.first_child¶
- Name:
first-child
- Type:
- Default Value:
- Flags:
The actor’s first child.
New in version 1.10.
- Clutter.Actor.props.fixed_position_set¶
-
This flag controls whether the
Clutter.Actor
:fixed-x
andClutter.Actor
:fixed-y
properties are usedNew in version 0.8.
- Clutter.Actor.props.fixed_x¶
-
The fixed X position of the actor in pixels.
Writing this property sets
Clutter.Actor
:fixed-position-set
property as well, as a side effectNew in version 0.8.
- Clutter.Actor.props.fixed_y¶
-
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 effectNew in version 0.8.
- Clutter.Actor.props.has_clip¶
-
Whether the actor has the
Clutter.Actor
:clip
property set or not
- Clutter.Actor.props.has_pointer¶
-
Whether the actor contains the pointer of a
Clutter.InputDevice
or not.New in version 1.2.
- Clutter.Actor.props.height¶
-
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.
- Clutter.Actor.props.last_child¶
- Name:
last-child
- Type:
- Default Value:
- Flags:
The actor’s last child.
New in version 1.10.
- Clutter.Actor.props.layout_manager¶
- Name:
layout-manager
- Type:
- Default Value:
- Flags:
A delegate object for controlling the layout of the children of an actor.
New in version 1.10.
- Clutter.Actor.props.magnification_filter¶
- Name:
magnification-filter
- Type:
- Default Value:
- Flags:
The filter used when increasing the size of the content
- Clutter.Actor.props.mapped¶
-
Whether the actor is mapped (will be painted when the stage to which it belongs is mapped)
New in version 1.0.
- Clutter.Actor.props.margin_bottom¶
-
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.New in version 1.10.
- Clutter.Actor.props.margin_left¶
-
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.New in version 1.10.
- Clutter.Actor.props.margin_right¶
-
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.New in version 1.10.
- Clutter.Actor.props.margin_top¶
-
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.New in version 1.10.
- Clutter.Actor.props.min_height¶
-
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.New in version 0.8.
- Clutter.Actor.props.min_height_set¶
-
This flag controls whether the
Clutter.Actor
:min-height
property is usedNew in version 0.8.
- Clutter.Actor.props.min_width¶
-
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.
New in version 0.8.
- Clutter.Actor.props.min_width_set¶
-
This flag controls whether the
Clutter.Actor
:min-width
property is usedNew in version 0.8.
- Clutter.Actor.props.minification_filter¶
- Name:
minification-filter
- Type:
- Default Value:
- Flags:
The filter used when reducing the size of the content
- Clutter.Actor.props.name¶
-
The name of the actor
New in version 0.2.
- Clutter.Actor.props.natural_height¶
-
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 actorNew in version 0.8.
- Clutter.Actor.props.natural_height_set¶
-
This flag controls whether the
Clutter.Actor
:natural-height
property is usedNew in version 0.8.
- Clutter.Actor.props.natural_width¶
-
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 actorNew in version 0.8.
- Clutter.Actor.props.natural_width_set¶
-
This flag controls whether the
Clutter.Actor
:natural-width
property is usedNew in version 0.8.
- Clutter.Actor.props.offscreen_redirect¶
- Name:
offscreen-redirect
- Type:
- Default Value:
0
- Flags:
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.New in version 1.8.
- Clutter.Actor.props.opacity¶
-
Opacity of an actor, between 0 (fully transparent) and 255 (fully opaque)
The
Clutter.Actor
:opacity
property is animatable.
- Clutter.Actor.props.pivot_point¶
- Name:
pivot-point
- Type:
- Default Value:
- Flags:
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.New in version 1.12.
- Clutter.Actor.props.pivot_point_z¶
-
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.New in version 1.12.
- Clutter.Actor.props.position¶
- Name:
position
- Type:
- Default Value:
- Flags:
The position of the origin of the actor.
This property is a shorthand for setting and getting the
Clutter.Actor
:x
andClutter.Actor
:y
properties at the same time.The
Clutter.Actor
:position
property is animatable.New in version 1.12.
- Clutter.Actor.props.reactive¶
-
Whether the actor is reactive to events or not
Only reactive actors will emit event-related signals
New in version 0.6.
- Clutter.Actor.props.realized¶
-
Whether the actor has been realized
New in version 1.0.
- Clutter.Actor.props.request_mode¶
- Name:
request-mode
- Type:
- Default Value:
- Flags:
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.New in version 0.8.
- Clutter.Actor.props.rotation_angle_x¶
-
The rotation angle on the X axis.
The
Clutter.Actor
:rotation-angle-x
property is animatable.New in version 0.6.
- Clutter.Actor.props.rotation_angle_y¶
-
The rotation angle on the Y axis
The
Clutter.Actor
:rotation-angle-y
property is animatable.New in version 0.6.
- Clutter.Actor.props.rotation_angle_z¶
-
The rotation angle on the Z axis
The
Clutter.Actor
:rotation-angle-z
property is animatable.New in version 0.6.
- Clutter.Actor.props.rotation_center_x¶
- Name:
rotation-center-x
- Type:
- Default Value:
- Flags:
The rotation center on the X axis.
New in version 0.6.
Deprecated since version 1.12: Use
Clutter.Actor
:pivot-point
instead
- Clutter.Actor.props.rotation_center_y¶
- Name:
rotation-center-y
- Type:
- Default Value:
- Flags:
The rotation center on the Y axis.
New in version 0.6.
Deprecated since version 1.12: Use
Clutter.Actor
:pivot-point
instead
- Clutter.Actor.props.rotation_center_z¶
- Name:
rotation-center-z
- Type:
- Default Value:
- Flags:
The rotation center on the Z axis.
New in version 0.6.
Deprecated since version 1.12: Use
Clutter.Actor
:pivot-point
instead
- Clutter.Actor.props.rotation_center_z_gravity¶
- Name:
rotation-center-z-gravity
- Type:
- Default Value:
- Flags:
The rotation center on the Z axis expressed as a
Clutter.Gravity
.New in version 1.0.
Deprecated since version 1.12: Use
Clutter.Actor
:pivot-point
instead
- Clutter.Actor.props.scale_center_x¶
- Name:
scale-center-x
- Type:
- Default Value:
0.0
- Flags:
The horizontal center point for scaling
New in version 1.0.
Deprecated since version 1.12: Use
Clutter.Actor
:pivot-point
instead
- Clutter.Actor.props.scale_center_y¶
- Name:
scale-center-y
- Type:
- Default Value:
0.0
- Flags:
The vertical center point for scaling
New in version 1.0.
Deprecated since version 1.12: Use
Clutter.Actor
:pivot-point
instead
- Clutter.Actor.props.scale_gravity¶
- Name:
scale-gravity
- Type:
- Default Value:
- Flags:
The center point for scaling expressed as a
Clutter.Gravity
New in version 1.0.
Deprecated since version 1.12: Use
Clutter.Actor
:pivot-point
instead
- Clutter.Actor.props.scale_x¶
-
The horizontal scale of the actor.
The
Clutter.Actor
:scale-x
property is animatable.New in version 0.6.
- Clutter.Actor.props.scale_y¶
-
The vertical scale of the actor.
The
Clutter.Actor
:scale-y
property is animatable.New in version 0.6.
- Clutter.Actor.props.scale_z¶
-
The scale factor of the actor along the Z axis.
The
Clutter.Actor
:scale-y
property is animatable.New in version 1.12.
- Clutter.Actor.props.show_on_set_parent¶
-
If
True
, the actor is automatically shown when parented.Calling
Clutter.Actor.hide
() on an actor which has not been parented will set this property toFalse
as a side effect.New in version 0.8.
- Clutter.Actor.props.size¶
- Name:
size
- Type:
- Default Value:
- Flags:
The size of the actor.
This property is a shorthand for setting and getting the
Clutter.Actor
:width
andClutter.Actor
:height
at the same time.The
Clutter.Actor
:size
property is animatable.New in version 1.12.
- Clutter.Actor.props.text_direction¶
- Name:
text-direction
- Type:
- Default Value:
- Flags:
The direction of the text inside a
Clutter.Actor
.New in version 1.0.
- Clutter.Actor.props.transform¶
- Name:
transform
- Type:
- Default Value:
- Flags:
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’sClutter.Actor
:allocation
andClutter.Actor
:pivot-point
.Application code should rarely need to use this function directly.
Setting this property with a
Clutter.Matrix
will set theClutter.Actor
:transform-set
property toTrue
as a side effect; setting this property withNone
will set theClutter.Actor
:transform-set
property toFalse
.The
Clutter.Actor
:transform
property is animatable.New in version 1.12.
- Clutter.Actor.props.transform_set¶
-
Whether the
Clutter.Actor
:transform
property is set.New in version 1.12.
- Clutter.Actor.props.translation_x¶
-
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.New in version 1.12.
- Clutter.Actor.props.translation_y¶
-
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.New in version 1.12.
- Clutter.Actor.props.translation_z¶
-
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.New in version 1.12.
- Clutter.Actor.props.visible¶
-
Whether the actor is set to be visible or not
See also
Clutter.Actor
:mapped
- Clutter.Actor.props.width¶
-
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.
- Clutter.Actor.props.x¶
-
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.
- Clutter.Actor.props.x_align¶
- Name:
x-align
- Type:
- Default Value:
- Flags:
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.New in version 1.10.
- Clutter.Actor.props.x_expand¶
-
Whether a layout manager should assign more space to the actor on the X axis.
New in version 1.12.
- Clutter.Actor.props.y¶
-
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.
- Clutter.Actor.props.y_align¶
- Name:
y-align
- Type:
- Default Value:
- Flags:
The alignment of an actor on the Y axis, if the actor has been given extra space for its allocation.
New in version 1.10.
- Clutter.Actor.props.y_expand¶
-
Whether a layout manager should assign more space to the actor on the Y axis.
New in version 1.12.
- Clutter.Actor.props.z_position¶
-
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.New in version 1.12.