clutter.Actor

clutter.Actor — clutter.Actor — Base abstract class for all visual stage actors.

Synopsis

class clutter.Actor(gobject.GInitiallyUnowned):
    def show()
def show_all()
def hide()
def hide_all()
def realize()
def unrealize()
def paint()
def pick(color)
def queue_redraw()
def destroy()
def set_geometry(geometry)
def get_geometry()
def set_size(width, height)
def set_position(x, y)
def get_position()
def set_x(x)
def set_y(y)
def set_width(width)
def get_width()
def set_height(height)
def get_height()
def get_x()
def get_y()
def set_rotation(axis, angle, x, y, z)
def get_rotation(axis)
def set_opacity(opacity)
def get_opacity()
def set_name(name)
def get_name()
def get_gid()
def set_clip(x_offset, y_offset, width, height)
def remove_clip()
def has_clip()
def set_parent(parent)
def get_parent()
def reparent(new_parent)
def unparent()
def raise_actor(below=None)
def lower_actor(above=None)
def raise_top()
def lower_bottom()
def set_depth(depth)
def get_depth()
def set_scale(scale_x, scale_y)
def get_scale()
def get_size()
def move_by(dx, dy)
def apply_transform_to_point(point, vertex)
def is_scaled()
def is_rotated()
def apply_relative_transform_to_point(ancestor, point)
def get_clip()
def set_reactive(reactive)
def get_reactive()
def event(event, capture)
def should_pick_paint()
def set_shader(shader)
def get_shader()
def set_shader_param(param, value)
def set_anchor_point(anchor_x, anchor_y)
def move_anchor_point(anchor_x, anchor_y)
def get_anchor_point()
def set_anchor_point_from_gravity(gravity)
def move_anchor_point_from_gravity(gravity)
def transform_stage_point(x, y)
def queue_relayout()
def get_preferred_width(for_height)
def get_preferred_height(for_width)
def get_preferred_size()
def allocate(box, absolute_origin_changed)
def allocate_preferred_size(absolute_origin_changed)
def get_allocation_coords()
def get_allocation_box()
def get_allocation_geometry()
def get_allocation_vertices(ancestor)
def get_transformed_size()
def get_transformed_position()
def get_fixed_position_set()
def set_fixed_position_set(is_set)
def get_paint_opacity()
def get_stage()

Ancestry

gobject.GObject
+-- gobject.GInitiallyUnowned
   +-- clutter.Actor

Properties

"clip"Read-WriteThe clip region for the actor.
"depth"Read-WriteDepth of the actor. Default value: 0. Since 0.6.
"has-clip"ReadWhether the actor has the clip property set or not. Allowed values: >= -2147483647. Default value: False.
"height"Read-WriteHeight of the actor (in pixels). Allowed values: >= 0. Default value: 0.
"name"Read-WriteThe name of the actor. Default value: None. Since 0.2.
"opacity"Read-WriteOpacity of the actor. Default value: 255.
"reactive"Read-WriteWhether the actor is reactive or not. Default value: False. Since 0.6.
"rotation-angle-x"Read-WriteThe rotation angle on the X axis. Allowed values: >= 0. Default value: 0.
"rotation-angle-y"Read-WriteThe rotation angle on the Y axis. Allowed values: >= 0. Default value: 0.
"rotation-angle-z"Read-WriteThe rotation angle on the Z axis. Allowed values: >= 0. Default value: 0.
"rotation-center-x"Read-WriteThe rotation center on the X axis.
"rotation-center-y"Read-WriteThe rotation center on the Y axis.
"rotation-center-z"Read-WriteThe rotation center on the Z axis.
"scale-x"Read-WriteScale X. Allowed values: >= 0. Default value: 1.
"scale-y"Read-WriteScale Y. Allowed values: >= 0. Default value: 1.
"scale-z"Read-WriteScale Z. Allowed values: >= 0. Default value: 1.
"visible"Read-WriteWhether the actor is visible or not. Default value: False.
"width"Read-WriteWidth of the actor (in pixels). Allowed values: >= 0. Default value: 0.
"x"Read-WriteX coordinate of the actor. Allowed values: >= -2147483647. Default value: 0.
"y"Read-WriteY coordinate of the actor. Allowed values: >= -2147483647. Default value: 0.

Signal Prototypes

"button-press-event"

def callback(actor, event, user_param1, ...)

"button-release-event"

def callback(actor, event, user_param1, ...)

"captured-event"

def callback(actor, event, user_param1, ...)

"destroy"

def callback(actor, user_param1, ...)

"enter-event"

def callback(actor, event, user_param1, ...)

"event"

def callback(actor, event, user_param1, ...)

"focus-in"

def callback(actor, user_param1, ...)

"focus-out"

def callback(actor, user_param1, ...)

"key-press-event"

def callback(actor, event, user_param1, ...)

"key-release-event"

def callback(actor, event, user_param1, ...)

"leave-event"

def callback(actor, event, user_param1, ...)

"motion-event"

def callback(actor, event, user_param1, ...)

"scroll-event"

def callback(actor, event, user_param1, ...)

"parent-set"

def callback(actor, old_parent, user_param1, ...)

"show"

def callback(actor, user_param1, ...)

"hide"

def callback(actor, user_param1, ...)

"paint"

def callback(actor, user_param1, ...)

"realize"

def callback(actor, user_param1, ...)

"unrealize"

def callback(actor, user_param1, ...)

Ancestry

+-- clutter.Actor
    

Description

clutter.Actor is a base abstract class for all visual elements on the stage. Every object that must appear on the main clutter.Stage must also be a clutter.Actor, either by using one of the classes provided by Clutter, or by implementing a new clutter.Actor subclass.

Methods

clutter.Actor.show

      def 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.

clutter.Actor.show_all

    def show_all()

Calls show() on all children of an actor (if any).

clutter.Actor.hide

    def hide()

Flags an actor to be hidden. A hidden actor will not be rendered on the stage.

Actors are visible by default

clutter.Actor.hide_all

    def hide_all()

Calls hide() on all child actors (if any).

clutter.Actor.realize

    def realize()

Creates any underlying graphics resources needed by the actor to be displayed.

clutter.Actor.unrealize

    def unrealize()

Frees up any underlying graphics resources needed by the actor to be displayed.

clutter.Actor.paint

    def paint()

Renders the actor to display.

This function should not be called directly by applications. Call queue_redraw() to queue paints, instead.

clutter.Actor.queue_redraw

    def 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.

clutter.Actor.queue_relayout

    def 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.

clutter.Actor.destroy

    def 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.

clutter.Actor.event

    def event(event, capture)

event :

a clutter.Event

capture :

True if event in in capture phase, False otherwise.

Returns :

the return value from the signal emission: True if the actor handled the event, or False if the event was not handled

This function is used to emit an event on the main stage. You should rarely need to use this function, except for synthetising events.

clutter.Actor.pick

    def pick(color)

color :

a clutter.Color

Renders a silhouette of the actor using the supplied color. Used internally for mapping pointer events to actors.

This function should never be called directly by applications. Use paint() instead.

Subclasses overiding the pick() method should call should_pick_paint() to decide whether to render their silhouette. Containers should always recursively call paint for each child.

clutter.Actor.set_geometry

    def set_geometry(geometry)

geometry :

a clutter.Geometry or a 4-tuple of integers

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 set_position() and set_size().

clutter.Actor.get_geometry

    def get_geometry(geometry)

Returns :

a 4-tuple containing the actor's geometry

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

clutter.Actor.set_size

    def set_size(width, height)

width :

the width in pixels

height :

the height in pixels

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

clutter.Actor.get_size

    def get_size()

Returns :

a 2-tuple containing the actor's width and height

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 get_allocation_coords() or get_preferred_width()

clutter.Actor.set_position

    def set_position(x, y)

x :

the X coordinate

y :

the Y coordinate

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.

clutter.Actor.get_position

    def get_position()

Returns :

a 2-tuple containing the actor's X and Y position

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

The returned position is in pixels.

clutter.Actor.set_x

    def set_x(x)

x :

the X coordinate

Sets the actor's X coordinate, relative to its parent, in pixels.

Overrides any layout manager and forces a fixed position for the actor.

clutter.Actor.get_x

    def get_x()

Returns :

the X coordinate

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 set_x(), set_position()or set_geometry(), this function will return that coordinate.

If both the allocation and a fixed position are missing, this function will return 0.

clutter.Actor.set_y

    def set_y(y)

y :

the Y coordinate

Sets the actor's Y coordinate, relative to its parent, in pixels.

Overrides any layout manager and forces a fixed position for the actor.

clutter.Actor.get_y

    def get_y()

Returns :

the Y coordinate

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 set_y(), set_position()or set_geometry(), this function will return that coordinate.

If both the allocation and a fixed position are missing, this function will return 0.

clutter.Actor.set_width

    def set_width(width)

width :

the width of the actor, in pixels

Forces a width on an actor, causing the actor's preferred width and height (if any) to be ignored.

This function sets both the minimum and natural size of the actor.

clutter.Actor.get_width

    def get_width()

Returns :

the width of the actor, in pixels

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 get_allocation_coords() to retrieve the allocated size or get_preferred_width() to retrieve the preferred width.

If an actor has a fixed width, for instance a width that has been assigned using set_width(), the width returned will be the same value.

clutter.Actor.set_height

    def set_height(height)

height :

the height of the actor, in pixels

Forces a height on an actor, causing the actor's preferred width and height (if any) to be ignored.

This function sets both the minimum and natural size of the actor.

clutter.Actor.get_height

    def get_height()

Returns :

the height of the actor, in pixels

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 get_allocation_coords() to retrieve the allocated size or get_preferred_height() to retrieve the preferred height.

If an actor has a fixed height, for instance a height that has been assigned using set_height(), the height returned will be the same value.

clutter.Actor.set_rotation

    def set_rotation(axis, angle, x, y, z)

axis :

a clutter.RotateAxis

angle :

the rotation angle

x :

X coordinate of the center of rotation, relative to the anchor point

y :

Y coordinate of the center of rotation, relative to the anchor point

z :

Z coordinate of the center of rotation, relative to the anchor point

Sets the rotation angle of self around the given axis.

The rotation center coordinates used depend on the value of axis:

  • clutter.X_AXIS requires y and z
  • clutter.Y_AXIS requires x and z
  • clutter.Z_AXIS requires x and y

The rotation coordinates are relative to the anchor point of the actor, set using set_anchor_point(). If no anchor point is set, the upper left corner is assumed as the origin.

clutter.Actor.get_rotation

    def get_rotation(axis)

axis :

a clutter.RotateAxis

Returns :

a 4-tuple containing the angle and the coordinates of the center of rotation on all three axes

Retrieves the angle and center of rotation on the given axis.

The coordinates of the center returned by this function depend on the axis passed.

clutter.Actor.set_opacity

    def set_opacity(opacity)

opacity :

the new opacity

Sets the actor's opacity, with zero being completely transparent and 255 (0xff) being fully opaque.

clutter.Actor.get_opacity

    def get_opacity()

Returns :

the opacity of the actor

Retrieves the opacity value of an actor, as set by set_opacity().

For retrieving the absolute opacity of the actor inside a paint virtual function, see get_paint_opacity().

clutter.Actor.set_name

    def set_name(name)

name :

a string

Sets the given name to self. The name can be used to identify a clutter.Actor.

clutter.Actor.get_name

    def get_name()

Returns :

a string

Retrieves the actors name.

clutter.Actor.get_gid

    def get_gid()

Returns :

an integer identifier

Retrieves the actors unique id

clutter.Actor.set_clip

    def set_clip(x_offset, y_offset, width, height)

x_offset :

the X offset of the clip

y_offset :

the Y offset of the clip

width :

the width of the clip

height :

the height of the clip

Sets clip area in pixels for self. The clip area is always computed from the upper left corner of the actor, even if the anchor point is set otherwise.

clutter.Actor.remove_clip

    def remove_clip()

Removes clip area from the actor.

clutter.Actor.has_clip

    def has_clip()

Returns :

a boolean value

Determines whether the actor has a clip area set or not.

clutter.Actor.get_clip

    def get_clip()

Returns :

a 4-tuple containing the X and Y offsets, and the width and height of the clip

Gets the clip area for the actor, in pixels.

clutter.Actor.set_parent

    def set_parent(parent)

parent :

a clutter.Actor

Sets the parent of self to parent. The opposite function is unparent().

This function should not be used by applications, but by custom container actor subclasses.

clutter.Actor.get_parent

    def get_parent()

Returns :

a clutter.Actor

Retrieves the parent of the actor.

clutter.Actor.reparent

    def reparent(new_parent)

new_parent :

a clutter.Actor

This function resets the parent actor of the actor. It is logically equivalent to calling unparent() and set_parent().

clutter.Actor.unparent

    def unparent()

This function should not be used in applications. It should be called by implementations of container actors, to dissociate a child from the container.

clutter.Actor.raise_actor

    def raise_actor(above=None)

above :

a clutter.Actor, or None

Raises the actor above a sibling.

Both actors must have the same parent.

This function is the equivalent of clutter.Container.raise_child().

clutter.Actor.lower_actor

    def lower_actor(below=None)

below :

a clutter.Actor, or None

Lowers the actor below a sibling

Both actors must have the same parent.

This function is the equivalent of clutter.Container.lower_child().

clutter.Actor.raise_top

    def raise_top()

Raises an actor to the top.

This function calls raise() internally.

clutter.Actor.lower_bottom

    def lower_bottom()

Lowers an actor to the bottom.

This function calls lower_actor() internally.

clutter.Actor.set_depth

    def set_depth(depth)

depth :

the Z coordinate of the actor

Sets the Z co-ordinate of self to depth. The Units of which are dependant on the perspective setup.

clutter.Actor.get_depth

    def get_depth()

Returns :

the Z coordinate of the actor, in pixels

Retrieves the depth of self.

clutter.Actor.set_scale

    def set_scale(scale_x, scale_y)

scale_x :

the scaling factor on the X axis

scale_y :

the scaling factor on the Y axis

Scales an actor with the given factors. The scaling is always relative to the anchor point.

clutter.Actor.get_scale

    def get_scale()

Returns :

a 2-tuple containing the scaling factors on the X and Y axes

Retrieves an actors scale factors.

clutter.Actor.move_by

    def move_by(dx, dy)

dx :

a gint

dy :

a gint

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 set_anchor_point().

clutter.Actor.apply_transform_to_point

    def apply_transform_to_point(point, vertex)

point :

a clutter.Vertex

vertex :

a clutter.Vertex

Transforms point in coordinates relative to the actor into screen-relative coordinates with the current actor transformation (i.e. scale, rotation, etc)

clutter.Actor.is_scaled

    def is_scaled()

Returns :

a gboolean

Checks whether the actor is scaled in either dimension.

clutter.Actor.is_rotated

    def is_rotated()

Returns :

a gboolean

Checks whether any rotation is applied to the actor.

clutter.Actor.apply_relative_transform_to_point

    def apply_relative_transform_to_point(ancestor, point, vertex)

ancestor :

a clutter.Actor

point :

a clutter.Vertex

vertex :

a 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 the clutter.Stage. In this case, the coordinates returned will be the coordinates on the stage before the projection is applied. This is different from the behaviour of apply_transform_to_point().

clutter.Actor.set_reactive

    def set_reactive(reactive)

reactive :

a gboolean

Sets the actor to be reactive. Reactive actors will receive events.

clutter.Actor.get_reactive

    def get_reactive()

Returns :

a gboolean

Checks whether actor is marked as reactive.

clutter.Actor.should_pick_paint

    def should_pick_paint()

Returns :

a gboolean

Utility call for subclasses overiding the pick method.

This function should never be called directly by applications.

clutter.Actor.set_shader

    def set_shader(shader)

shader :

a clutter.Shader

Returns :

a gboolean

Sets the clutter.Shader to be used when rendering self. If shader is None it will unset any currently set shader for the actor.

clutter.Actor.get_shader

    def get_shader()

Returns :

a clutter.Shader

Queries the currently set clutter.Shader on the actor.

clutter.Actor.set_shader_param

    def set_shader_param(param, value)

param :

a string

value :

a float

Sets the value for a named parameter of the shader applied to actor.

clutter.Actor.set_anchor_point

    def set_anchor_point(anchor_x, anchor_y)

anchor_x :

a gint

anchor_y :

a gint

Sets an anchor point for the actor. 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.

clutter.Actor.move_anchor_point

    def move_anchor_point(anchor_x, anchor_y)

anchor_x :

a gint

anchor_y :

a gint

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.

clutter.Actor.get_anchor_point

    def get_anchor_point()

Returns the current anchor point of the actor in pixels.

clutter.Actor.set_anchor_point_from_gravity

    def set_anchor_point_from_gravity(gravity)

gravity :

a ClutterGravity

Sets an anchor point on the actor, based on the given gravity (this is a convenience function wrapping set_anchor_point()

clutter.Actor.move_anchor_point_from_gravity

    def move_anchor_point_from_gravity(gravity)

gravity :

a ClutterGravity

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.

clutter.Actor.transform_stage_point

    def transform_stage_point(x, y, x_out, y_out)

x :

a gint32

y :

a gint32

x_out :

a gint32*

y_out :

a gint32*

Returns :

a gboolean

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.

Caution

This function is fairly computationally intensive.

This function only works when the allocation is up-to-date, i.e. inside of paint()

clutter.Actor.get_preferred_width

    def get_preferred_width(for_height, min_width_p, natural_width_p)

for_height :

a gint32

min_width_p :

a gint32*

natural_width_p :

a gint32*

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.

clutter.Actor.get_preferred_height

    def get_preferred_height(for_width, min_height_p, natural_height_p)

for_width :

a gint32

min_height_p :

a gint32*

natural_height_p :

a gint32*

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.

clutter.Actor.get_preferred_size

    def get_preferred_size(min_width_p, min_height_p, natural_width_p, natural_height_p)

min_width_p :

a gint32*

min_height_p :

a gint32*

natural_width_p :

a gint32*

natural_height_p :

a gint32*

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 get_preferred_width() and get_preferred_height(), and check the actor's preferred geometry management using the "request-mode" property.

clutter.Actor.allocate

    def allocate(box, absolute_origin_changed)

box :

a clutter.ActorBox

absolute_origin_changed :

a boolean

Called by the parent of an actor to assign the actor its size. Should never be called by applications (except when implementing a container or layout manager).

Actors can know from their allocation box whether they have moved with respect to their parent actor. The absolute_origin_changed parameter additionally indicates whether the parent has moved with respect to the stage, for example because a grandparent's origin has moved.

clutter.Actor.allocate_preferred_size

    def allocate_preferred_size(absolute_origin_changed)

absolute_origin_changed :

a gboolean

Allocates the natural size of the actor.

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

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

clutter.Actor.get_allocation_coords

      def get_allocation_coords()

x_1 :

a gint*

y_1 :

a gint*

x_2 :

a gint*

y_2 :

a gint*

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 coordinates are in pixels.

clutter.Actor.get_allocation_box

    def get_allocation_box(box)

box :

a 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.

Note

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.

clutter.Actor.get_allocation_geometry

    def get_allocation_geometry(geom)

geom :

a 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.

clutter.Actor.get_allocation_vertices

    def get_allocation_vertices(ancestor, verts[4])

ancestor :

a clutter.Actor

verts[4] :

a 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:

  • v[0] contains (x1, y1)
  • v[1] contains (x2, y1)
  • v[2] contains (x1, y2)
  • v[3] contains (x2, y2)

If ancestor is NONE the ancestor will be the ClutterStage. In this case, the coordinates returned will be the coordinates on the stage before the projection is applied. This is different from the behaviour of get_abs_allocation_vertices() .

clutter.Actor.get_transformed_size

    def get_transformed_size()

Returns the absolute size of an actor taking into account any scaling factors

clutter.Actor.get_transformed_position

    def get_transformed_position()

Returns the absolute position of an actor, in pixels, relative to the stage.

clutter.Actor.get_fixed_position_set

    def get_fixed_position_set()

Returns :

a gboolean

Checks whether an actor has a fixed position set (and will thus be unaffected by any layout manager).

clutter.Actor.set_fixed_position_set

    def set_fixed_position_set(is_set)

is_set :

a gboolean

Sets whether an actor has a fixed position set (and will thus be unaffected by any layout manager).

clutter.Actor.get_paint_opacity

    def get_paint_opacity()

Returns :

a guint8

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.

clutter.Actor.get_stage

    def get_stage()

Returns :

a clutter.Actor

Retrieves the ClutterStage where the actor is contained.

clutter.Actor.get_abs_allocation_vertices

    def get_abs_allocation_vertices(verts[4])

verts[4] :

a 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)

Signals

The "button-press-event" clutter.Actor signal

    def callback(actor, event, user_param1, ...)

actor :

the object which received the event

event :

a clutter.ButtonEvent

user_param1 :

the first user parameter (if any) specified with the connect() method

... :

additional user parameters (if any)

The "button-press-event" signal is emitted each time a mouse button is pressed on actor.

The "button-release-event" clutter.Actor signal

    def callback(actor, event, user_param1, ...)

actor :

the object which received the event

event :

a clutter.ButtonEvent

user_param1 :

the first user parameter (if any) specified with the connect() method

... :

additional user parameters (if any)

The "button-release-event" signal is emitted each time a mouse button is released on actor.

The "captured-event" clutter.Actor signal

    def callback(actor, event, user_param1, ...)

actor :

the object which received the signal

event :

a clutter.Event

user_param1 :

the first user parameter (if any) specified with the connect() method

... :

additional user parameters (if any)

The "captured-event" signal is emitted when an event is captured by Clutter. This signal will be emitted starting from the top-level container (the clutter.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 (like "button-press-event" or "key-released-event") are emitted.

The "destroy" clutter.Actor signal

    def callback(actor, user_param1, ...)

actor :

the object which received the signal

user_param1 :

the first user parameter (if any) specified with the connect() method

... :

additional user parameters (if any)

The "destroy" signal is emitted when an actor is destroyed, either by direct invocation of clutter.Actor.destroy() or when the clutter.Group that contains the actor is destroyed.

The "enter-event" clutter.Actor signal

    def callback(actor, event, user_param1, ...)

actor :

the object which the pointer has entered

event :

a clutter.CrossingEvent

user_param1 :

the first user parameter (if any) specified with the connect() method

... :

additional user parameters (if any)

Returns :

True if the event has been handled by the actor, or False to continue the emission.

The "event-event" signal is emitted when the pointer enters the actor.

The "event" clutter.Actor signal

    def callback(actor, event, user_param1, ...)

actor :

the object which received the event

event :

a clutter.Event

user_param1 :

the first user parameter (if any) specified with the connect() method

... :

additional user parameters (if any)

Returns :

True if the event has been handled by the actor, or False to continue the emission.

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

The "focus-in" clutter.Actor signal

    def callback(actor, user_param1, ...)

actor :

the actor which now now has key focus

user_param1 :

the first user parameter (if any) specified with the connect() method

... :

additional user parameters (if any)

The "focus-in" signal is emitted when actor recieves key focus.

The "focus-out" clutter.Actor signal

    def callback(actor, user_param1, ...)

actor :

the actor which now now has key focus

user_param1 :

the first user parameter (if any) specified with the connect() method

... :

additional user parameters (if any)

The "focus-out" signal is emitted when actor loses key focus.

The "hide" clutter.Actor signal

    def callback(actor, user_param1, ...)

actor :

the object which received the signal

user_param1 :

the first user parameter (if any) specified with the connect() method

... :

additional user parameters (if any)

The "hide" signal is emitted when an actor is no longer visible.

The "key-press-event" clutter.Actor signal

    def callback(actor, event, user_param1, ...)

actor :

the actor which received the event

event :

a clutter.KeyEvent

user_param1 :

the first user parameter (if any) specified with the connect() method

... :

additional user parameters (if any)

Returns :

True if the event has been handled by the actor, or False to continue the emission.

The "key-press-event" signal is emitted each time a keyboard button is pressed on actor.

The "key-release-event" clutter.Actor signal

    def callback(actor, event, user_param1, ...)

actor :

the actor which received the event

event :

a clutter.KeyEvent

user_param1 :

the first user parameter (if any) specified with the connect() method

... :

additional user parameters (if any)

Returns :

True if the event has been handled by the actor, or False to continue the emission.

The "key-press-event" signal is emitted each time a keyboard button is released on actor.

The "leave-event" clutter.Actor signal

    def callback(actor, event, user_param1, ...)

actor :

the actor which the pointer has left

event :

a clutter.CrossingEvent

user_param1 :

the first user parameter (if any) specified with the connect() method

... :

additional user parameters (if any)

Returns :

True if the event has been handled by the actor, or False to continue the emission.

The "leave-event" signal is emitted when the pointer leaves the actor.

The "motion-event" clutter.Actor signal

    def callback(actor, event, user_param1, ...)

actor :

the actor which the pointer has moved on

event :

a clutter.MotionEvent

user_param1 :

the first user parameter (if any) specified with the connect() method

... :

additional user parameters (if any)

Returns :

True if the event has been handled by the actor, or False to continue the emission.

The "motion-event" signal is emitted each time the mouse pointer is moved on actor.

The "parent-set" clutter.Actor signal

    def callback(actor, old_parent, user_param1, ...)

actor :

the actor which received the signal

old_parent :

the previous parent of the actor, or None

user_param1 :

the first user parameter (if any) specified with the connect() method

... :

additional user parameters (if any)

The "parent-set" signal is emitted when the parent of the actor changes.

The "scroll-event" clutter.Actor signal

    def callback(actor, event, user_param1, ...)

actor :

the actor which received the event

event :

a clutter.ScrollEvent

user_param1 :

the first user parameter (if any) specified with the connect() method

... :

additional user parameters (if any)

Returns :

True if the event has been handled by the actor, or False to continue the emission.

The "scroll-event" signal is emitted each time the mouse is scrolled on actor.

The "show" clutter.Actor signal

    def callback(actor, user_param1, ...)

actor :

the actor which received the event

user_param1 :

the first user parameter (if any) specified with the connect() method

... :

additional user parameters (if any)

The "show" signal is emitted when an actor becomes visible.

The "paint" clutter.Actor signal

    def callback(actor, user_param1, ...)

actor :

the actor which received the event

user_param1 :

the first user parameter (if any) specified with the connect() method

... :

additional user parameters (if any)

The "paint" signal is emitted when an actor is being painted.

The "realize" clutter.Actor signal

    def callback(actor, user_param1, ...)

actor :

the actor which received the event

user_param1 :

the first user parameter (if any) specified with the connect() method

... :

additional user parameters (if any)

The "realize" signal is emitted when an actor is being realized.

The "unrealize" clutter.Actor signal

    def callback(actor, user_param1, ...)

actor :

the actor which received the event

user_param1 :

the first user parameter (if any) specified with the connect() method

... :

additional user parameters (if any)

The "unrealize" signal is emitted when an actor is being unrealized.