Class: Clutter::Actor

Inherits:
GObject::InitiallyUnowned
  • Object
show all
Defined in:
lib/clutter/actor.rb

Overview

Base class for actors.

Direct Known Subclasses

Box, Clone, Group, Rectangle, ScrollActor, Text, Texture

Instance Method Summary collapse

Constructor Details

#initializeClutter::Actor

Creates a new Clutter::Actor.

A newly created actor has a floating reference, which will be sunk when it is added to another actor.

Instance Method Details

#accessibleAtk::Object

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

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

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

Returns:

  • (Atk::Object)

    the Atk::Object associated with actor

#actionsGLib::List<Clutter::Action>

Retrieves the list of actions applied to self

Returns:

  • (GLib::List<Clutter::Action>)

    a copy of the list of Clutter::Actions. The contents of the list are owned by the Clutter::Actor. Use g_list_free() to free the resources allocated by the returned #GList

#actions=(actions) ⇒ Clutter::Action

Adds a Clutter::Action to the actor

Parameters:

Returns:

#add_action(action) ⇒ nil

Adds action to the list of actions applied to self

A Clutter::Action can only belong to one actor at a time

The Clutter::Actor will hold a reference on action until either clutter_actor_remove_action() or clutter_actor_clear_actions() is called

Parameters:

Returns:

  • (nil)

#add_action_with_name(name, action) ⇒ nil

A convenience function for setting the name of a Clutter::Action while adding it to the list of actions applied to self

This function is the logical equivalent of:

  clutter_actor_meta_set_name (CLUTTER_ACTOR_META (action), name);
  clutter_actor_add_action (self, action);

Parameters:

  • name (String)

    the name to set on the action

  • action (Clutter::Action)

    a Clutter::Action

Returns:

  • (nil)

#add_child(child) ⇒ nil

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.

Parameters:

Returns:

  • (nil)

#add_constraint(constraint) ⇒ nil

Adds constraint to the list of Clutter::Constraints applied to self

The Clutter::Actor will hold a reference on the constraint until either clutter_actor_remove_constraint() or clutter_actor_clear_constraints() is called.

Parameters:

Returns:

  • (nil)

#add_constraint_with_name(name, constraint) ⇒ nil

A convenience function for setting the name of a Clutter::Constraint while adding it to the list of constraints applied to self

This function is the logical equivalent of:

  clutter_actor_meta_set_name (CLUTTER_ACTOR_META (constraint), name);
  clutter_actor_add_constraint (self, constraint);

Parameters:

  • name (String)

    the name to set on the constraint

  • constraint (Clutter::Constraint)

    a Clutter::Constraint

Returns:

  • (nil)

#add_effect(effect) ⇒ nil

Adds effect to the list of Clutter::Effects applied to self

The Clutter::Actor will hold a reference on the effect until either clutter_actor_remove_effect() or clutter_actor_clear_effects() is called.

Note that as Clutter::Effect is initially unowned, clutter_actor_add_effect() will sink any floating reference on effect.

Parameters:

Returns:

  • (nil)

#add_effect_with_name(name, effect) ⇒ nil

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

Parameters:

  • name (String)

    the name to set on the effect

  • effect (Clutter::Effect)

    a Clutter::Effect

Returns:

  • (nil)

#add_transition(name, transition) ⇒ nil

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.

Parameters:

  • name (String)

    the name of the transition to add

  • transition (Clutter::Transition)

    the Clutter::Transition to add

Returns:

  • (nil)

#allocate(box, flags) ⇒ nil

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::ActorClass.allocate() virtual function.

This function will adjust the stored allocation to take into account the alignment flags set in the Clutter::Actor:x-align and Clutter::Actor:y-align properties, as well as the margin values set in the Clutter::Actor:margin-top, #ClutterActor:margin-right, Clutter::Actor:margin-bottom, and #ClutterActor: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.

Parameters:

  • box (Clutter::ActorBox)

    new allocation of the actor, in parent-relative coordinates

  • flags (Clutter::AllocationFlags)

    flags that control the allocation

Returns:

  • (nil)

#allocate_align_fill(box, x_align, y_align, x_fill, y_fill, flags) ⇒ nil

Allocates self by taking into consideration the available allocation area; an alignment factor on either axis; and whether the actor should fill the allocation on either axis.

The box should contain the available allocation width and height; if the x1 and y1 members of Clutter::ActorBox are not set to 0, the allocation will be offset by their value.

This function takes into consideration the geometry request specified by the Clutter::Actor:request-mode property, and the text direction.

This function is useful for fluid layout managers using legacy alignment flags. Newly written layout managers should use the Clutter::Actor:x-align and Clutter::Actor:y-align properties, instead, and just call clutter_actor_allocate() inside their Clutter::ActorClass.allocate() implementation.

Parameters:

  • box (Clutter::ActorBox)

    a Clutter::ActorBox, containing the available width and height

  • x_align (Float)

    the horizontal alignment, between 0 and 1

  • y_align (Float)

    the vertical alignment, between 0 and 1

  • x_fill (Boolean)

    whether the actor should fill horizontally

  • y_fill (Boolean)

    whether the actor should fill vertically

  • flags (Clutter::AllocationFlags)

    allocation flags to be passed to clutter_actor_allocate()

Returns:

  • (nil)

#allocate_available_size(x, y, available_width, available_height, flags) ⇒ nil

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.

Parameters:

  • x (Clutter::gfloat)

    the actor's X coordinate

  • y (Clutter::gfloat)

    the actor's Y coordinate

  • available_width (Clutter::gfloat)

    the maximum available width, or -1 to use the actor's natural width

  • available_height (Clutter::gfloat)

    the maximum available height, or -1 to use the actor's natural height

  • flags (Clutter::AllocationFlags)

    flags controlling the allocation

Returns:

  • (nil)

#allocate_preferred_size(flags) ⇒ nil

Allocates the natural size of self.

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

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

Parameters:

Returns:

  • (nil)

#allocationClutter::ActorBox

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

Returns:

  • (Clutter::ActorBox)

    allocation

#allocation=(allocation) ⇒ Clutter::ActorBox

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

Parameters:

  • allocation (Clutter::ActorBox)

Returns:

  • (Clutter::ActorBox)

    allocation

  • (Clutter::ActorBox)

    allocation

#anchor_gravityClutter::Gravity

The anchor point expressed as a Clutter::Gravity

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

Returns:

#anchor_gravity=(anchor_gravity) ⇒ Clutter::Gravity

The anchor point expressed as a Clutter::Gravity

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

Parameters:

Returns:

#anchor_point_from_gravity=(gravity) ⇒ nil

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.

Parameters:

Returns:

  • (nil)

#anchor_point_gravityClutter::Gravity

Retrieves the anchor position expressed as a Clutter::Gravity. If the anchor point was specified using pixels or units this will return %CLUTTER_GRAVITY_NONE.

Returns:

#anchor_xClutter::gfloat

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

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

Returns:

  • (Clutter::gfloat)

    anchor-x

#anchor_x=(anchor_x) ⇒ Clutter::gfloat

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

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

Parameters:

  • anchor_x (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    anchor-x

  • (Clutter::gfloat)

    anchor-x

#anchor_yClutter::gfloat

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

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

Returns:

  • (Clutter::gfloat)

    anchor-y

#anchor_y=(anchor_y) ⇒ Clutter::gfloat

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

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

Parameters:

  • anchor_y (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    anchor-y

  • (Clutter::gfloat)

    anchor-y

#animate(mode, duration, first_property_name, array) ⇒ Clutter::Animation

Animates the given list of properties of actor between the current value for each property and a new final value. The animation has a definite duration and a speed given by the mode.

For example, this:

  static void
  on_animation_completed (ClutterAnimation *animation,
                          ClutterActor     *actor)
  {
    clutter_actor_animate (actor, CLUTTER_EASE_OUT_CUBIC, 250,
                           "x", 500.0,
                           "y", 500.0,
                           NULL);
  }

    ...
    animation = clutter_actor_animate (actor, CLUTTER_EASE_IN_CUBIC, 250,
                                       "x", 100.0,
                                       "y", 100.0,
                                       NULL);
    g_signal_connect (animation, "completed",
                      G_CALLBACK (on_animation_completed),
                      actor);
    ...

Parameters:

  • mode (Clutter::gulong)

    an animation mode logical id

  • duration (Integer)

    duration of the animation, in milliseconds

  • first_property_name (String)

    the name of a property

  • array (Array)

    a nil terminated list of property names and property values

Returns:

  • (Clutter::Animation)

    a Clutter::Animation object. The object is owned by the Clutter::Actor and should not be unreferenced with g_object_unref()

#animate_with_alpha(alpha, first_property_name, array) ⇒ Clutter::Animation

Animates the given list of properties of actor between the current value for each property and a new final value. The animation has a definite behaviour given by the passed alpha.

See clutter_actor_animate() for further details.

This function is useful if you want to use an existing Clutter::Alpha to animate actor.

Parameters:

  • alpha (Clutter::Alpha)

    a Clutter::Alpha

  • first_property_name (String)

    the name of a property

  • array (Array)

    a nil terminated list of property names and property values

Returns:

  • (Clutter::Animation)

    a Clutter::Animation object. The object is owned by the Clutter::Actor and should not be unreferenced with g_object_unref()

#animate_with_alphav(alpha, n_properties, properties, values) ⇒ Clutter::Animation

Animates the given list of properties of actor between the current value for each property and a new final value. The animation has a definite behaviour given by the passed alpha.

See clutter_actor_animate() for further details.

This function is useful if you want to use an existing Clutter::Alpha to animate actor.

This is the vector-based variant of clutter_actor_animate_with_alpha(), useful for language bindings.

Unlike clutter_actor_animate_with_alpha(), this function will not allow you to specify "signal::" names and callbacks.

Parameters:

  • alpha (Clutter::Alpha)

    a Clutter::Alpha

  • n_properties (Integer)

    number of property names and values

  • properties (Array<String>)

    a vector containing the property names to set

  • values (Array<GObject::Value>)

    a vector containing the property values to set

Returns:

  • (Clutter::Animation)

    a Clutter::Animation object. The object is owned by the Clutter::Actor and should not be unreferenced with g_object_unref()

#animate_with_timeline(mode, timeline, first_property_name, array) ⇒ Clutter::Animation

Animates the given list of properties of actor between the current value for each property and a new final value. The animation has a definite duration given by timeline and a speed given by the mode.

See clutter_actor_animate() for further details.

This function is useful if you want to use an existing timeline to animate actor.

Parameters:

  • mode (Clutter::gulong)

    an animation mode logical id

  • timeline (Clutter::Timeline)

    a Clutter::Timeline

  • first_property_name (String)

    the name of a property

  • array (Array)

    a nil terminated list of property names and property values

Returns:

  • (Clutter::Animation)

    a Clutter::Animation object. The object is owned by the Clutter::Actor and should not be unreferenced with g_object_unref()

#animate_with_timelinev(mode, timeline, n_properties, properties, values) ⇒ Clutter::Animation

Animates the given list of properties of actor between the current value for each property and a new final value. The animation has a definite duration given by timeline and a speed given by the mode.

See clutter_actor_animate() for further details.

This function is useful if you want to use an existing timeline to animate actor.

This is the vector-based variant of clutter_actor_animate_with_timeline(), useful for language bindings.

Unlike clutter_actor_animate_with_timeline(), this function will not allow you to specify "signal::" names and callbacks.

Parameters:

  • mode (Clutter::gulong)

    an animation mode logical id

  • timeline (Clutter::Timeline)

    a Clutter::Timeline

  • n_properties (Integer)

    number of property names and values

  • properties (Array<String>)

    a vector containing the property names to set

  • values (Array<GObject::Value>)

    a vector containing the property values to set

Returns:

  • (Clutter::Animation)

    a Clutter::Animation object. The object is owned by the Clutter::Actor and should not be unreferenced with g_object_unref()

#animatev(mode, duration, n_properties, properties, values) ⇒ Clutter::Animation

Animates the given list of properties of actor between the current value for each property and a new final value. The animation has a definite duration and a speed given by the mode.

This is the vector-based variant of clutter_actor_animate(), useful for language bindings.

Unlike clutter_actor_animate(), this function will not allow you to specify "signal::" names and callbacks.

Parameters:

  • mode (Clutter::gulong)

    an animation mode logical id

  • duration (Integer)

    duration of the animation, in milliseconds

  • n_properties (Integer)

    number of property names and values

  • properties (Array<String>)

    a vector containing the property names to set

  • values (Array<GObject::Value>)

    a vector containing the property values to set

Returns:

  • (Clutter::Animation)

    a Clutter::Animation object. The object is owned by the Clutter::Actor and should not be unreferenced with g_object_unref()

#animationClutter::Animation

Retrieves the Clutter::Animation used by actor, if clutter_actor_animate() has been called on actor.

Returns:

#apply_relative_transform_to_point(ancestor, point, vertex) ⇒ nil

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

Parameters:

  • ancestor (Clutter::Actor)

    A Clutter::Actor ancestor, or nil to use the default Clutter::Stage

  • point (Clutter::Vertex)

    A point as Clutter::Vertex

  • vertex (Clutter::Vertex)

    The translated Clutter::Vertex

Returns:

  • (nil)

#apply_transform_to_point(point, vertex) ⇒ nil

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

Parameters:

  • point (Clutter::Vertex)

    A point as Clutter::Vertex

  • vertex (Clutter::Vertex)

    The translated Clutter::Vertex

Returns:

  • (nil)

#background_colorClutter::Color

Paints a solid fill of the actor's allocation using the specified color.

The Clutter::Actor:background-color property is animatable.

Returns:

#background_color=(background_color) ⇒ Clutter::Color

Paints a solid fill of the actor's allocation using the specified color.

The Clutter::Actor:background-color property is animatable.

Parameters:

Returns:

#background_color_set=(background_color_set) ⇒ Boolean

Whether the Clutter::Actor:background-color property has been set.

Parameters:

  • background_color_set (Boolean)

Returns:

  • (Boolean)

    background-color-set

  • (Boolean)

    background-color-set

#background_color_set?Boolean

Whether the Clutter::Actor:background-color property has been set.

Returns:

  • (Boolean)

    background-color-set

#bind_model(model, create_child_func, user_data, notify) ⇒ nil

Binds a GList::Model to a #ClutterActor.

If the Clutter::Actor was already bound to a #GListModel, the previous binding is destroyed.

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

When a Clutter::Actor is bound to a model, adding and removing children directly is undefined behaviour.

Parameters:

  • model (Gio::ListModel)

    a GList::Model

  • create_child_func (Clutter::ActorCreateChildFunc)

    a function that creates Clutter::Actor instances from the contents of the model

  • user_data (GObject)

    user data passed to create_child_func

  • notify (GLib::DestroyNotify)

    function called when unsetting the model

Returns:

  • (nil)

#bind_model_with_properties(model, child_type, first_model_property, array) ⇒ nil

Binds a GList::Model to a #ClutterActor.

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

  ClutterActor *res = g_object_new (MY_TYPE_CHILD_VIEW, NULL);

  g_object_bind_property (item, "label", res, "text", G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE);
  g_object_bind_property (item, "icon", res, "image", G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE);
  g_object_bind_property (item, "selected", res, "selected", G_BINDING_BIDIRECTIONAL);
  g_object_bind_property (item, "active", res, "active", G_BINDING_BIDIRECTIONAL);

  return res;

If the Clutter::Actor was already bound to a #GListModel, the previous binding is destroyed.

When a Clutter::Actor is bound to a model, adding and removing children directly is undefined behaviour.

See also: clutter_actor_bind_model()

Parameters:

  • model (Gio::ListModel)

    a GList::Model

  • child_type (GLib::Type)

    the type of Clutter::Actor to use when creating children mapping to items inside the model

  • first_model_property (String)

    the first property of model to bind

  • array (Array)

    tuples of property names on the model, on the child, and the GBinding::Flags used to bind them, terminated by nil

Returns:

  • (nil)

#child_transformClutter::Matrix

Applies a transformation matrix on each child of an actor.

Setting this property with a Clutter::Matrix will set the Clutter::Actor:child-transform-set property to true as a side effect; setting this property with nil will set the Clutter::Actor:child-transform-set property to false.

The Clutter::Actor:child-transform property is animatable.

Returns:

  • (Clutter::Matrix)

    child-transform

#child_transform=(child_transform) ⇒ Clutter::Matrix

Applies a transformation matrix on each child of an actor.

Setting this property with a Clutter::Matrix will set the Clutter::Actor:child-transform-set property to true as a side effect; setting this property with nil will set the Clutter::Actor:child-transform-set property to false.

The Clutter::Actor:child-transform property is animatable.

Parameters:

  • child_transform (Clutter::Matrix)

Returns:

  • (Clutter::Matrix)

    child-transform

  • (Clutter::Matrix)

    child-transform

#child_transform_set=(child_transform_set) ⇒ Boolean

Whether the Clutter::Actor:child-transform property is set.

Parameters:

  • child_transform_set (Boolean)

Returns:

  • (Boolean)

    child-transform-set

  • (Boolean)

    child-transform-set

#child_transform_set?Boolean

Whether the Clutter::Actor:child-transform property is set.

Returns:

  • (Boolean)

    child-transform-set

#childrenGLib::List<Clutter::Actor>

Retrieves the list of children of self.

Returns:

  • (GLib::List<Clutter::Actor>)

    A newly allocated #GList of Clutter::Actors. Use g_list_free() when done.

#clear_actionsnil

Clears the list of actions applied to self

Returns:

  • (nil)

#clear_constraintsnil

Clears the list of constraints applied to self

Returns:

  • (nil)

#clear_effectsnil

Clears the list of effects applied to self

Returns:

  • (nil)

#clipClutter::Geometry

The visible region of the actor, in actor-relative coordinates

Returns:

  • (Clutter::Geometry)

    clip

#clip=(clip) ⇒ Clutter::Geometry

The visible region of the actor, in actor-relative coordinates

Parameters:

  • clip (Clutter::Geometry)

Returns:

  • (Clutter::Geometry)

    clip

  • (Clutter::Geometry)

    clip

#clip_rectClutter::Rect

The visible region of the actor, in actor-relative coordinates, expressed as a Clutter::Rect.

Setting this property to nil will unset the existing clip.

Setting this property will change the Clutter::Actor:has-clip property as a side effect.

Returns:

  • (Clutter::Rect)

    clip-rect

#clip_rect=(clip_rect) ⇒ Clutter::Rect

The visible region of the actor, in actor-relative coordinates, expressed as a Clutter::Rect.

Setting this property to nil will unset the existing clip.

Setting this property will change the Clutter::Actor:has-clip property as a side effect.

Parameters:

  • clip_rect (Clutter::Rect)

Returns:

  • (Clutter::Rect)

    clip-rect

  • (Clutter::Rect)

    clip-rect

#clip_to_allocationBoolean

Retrieves the value set using clutter_actor_set_clip_to_allocation()

Returns:

  • (Boolean)

    true if the Clutter::Actor is clipped to its allocation

#clip_to_allocation=(clip_to_allocation) ⇒ Boolean

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

Parameters:

  • clip_to_allocation (Boolean)

Returns:

  • (Boolean)

    clip-to-allocation

  • (Boolean)

    clip-to-allocation

#clip_to_allocation?Boolean

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

Returns:

  • (Boolean)

    clip-to-allocation

#constraintsGLib::List<Clutter::Constraint>

Retrieves the list of constraints applied to self

Returns:

  • (GLib::List<Clutter::Constraint>)

    a copy of the list of Clutter::Constraints. The contents of the list are owned by the Clutter::Actor. Use g_list_free() to free the resources allocated by the returned #GList

#constraints=(constraints) ⇒ Clutter::Constraint

Adds a Clutter::Constraint to the actor

Parameters:

Returns:

#contains(descendant) ⇒ Boolean

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.

Parameters:

  • descendant (Clutter::Actor)

    A Clutter::Actor, possibly contained in self

Returns:

  • (Boolean)

    whether descendent is contained within self

#contentClutter::Content

The Clutter::Content implementation that controls the content of the actor.

Returns:

#content=(content) ⇒ Clutter::Content

The Clutter::Content implementation that controls the content of the actor.

Parameters:

Returns:

#content_boxClutter::ActorBox

The bounding box for the Clutter::Content used by the actor.

The value of this property is controlled by the Clutter::Actor:allocation and Clutter::Actor:content-gravity properties of #ClutterActor.

The bounding box for the content is guaranteed to never exceed the allocation's of the actor.

Returns:

  • (Clutter::ActorBox)

    content-box

#content_box=(content_box) ⇒ Clutter::ActorBox

The bounding box for the Clutter::Content used by the actor.

The value of this property is controlled by the Clutter::Actor:allocation and Clutter::Actor:content-gravity properties of #ClutterActor.

The bounding box for the content is guaranteed to never exceed the allocation's of the actor.

Parameters:

  • content_box (Clutter::ActorBox)

Returns:

  • (Clutter::ActorBox)

    content-box

  • (Clutter::ActorBox)

    content-box

#content_gravityClutter::ContentGravity

The alignment that should be honoured by the Clutter::Content set with the Clutter::Actor:content property.

Changing the value of this property will change the bounding box of the content; you can use the Clutter::Actor:content-box property to get the position and size of the content within the actor's allocation.

This property is meaningful only for Clutter::Content implementations that have a preferred size, and if the preferred size is smaller than the actor's allocation.

The Clutter::Actor:content-gravity property is animatable.

Returns:

#content_gravity=(content_gravity) ⇒ Clutter::ContentGravity

The alignment that should be honoured by the Clutter::Content set with the Clutter::Actor:content property.

Changing the value of this property will change the bounding box of the content; you can use the Clutter::Actor:content-box property to get the position and size of the content within the actor's allocation.

This property is meaningful only for Clutter::Content implementations that have a preferred size, and if the preferred size is smaller than the actor's allocation.

The Clutter::Actor:content-gravity property is animatable.

Parameters:

Returns:

#content_repeatClutter::ContentRepeat

The repeat policy for the actor's Clutter::Actor:content.

Returns:

#content_repeat=(content_repeat) ⇒ Clutter::ContentRepeat

The repeat policy for the actor's Clutter::Actor:content.

Parameters:

Returns:

#continue_paintnil

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.

Returns:

  • (nil)

#create_pango_contextPango::Context

Creates a Pango::Context for the given actor. The #PangoContext is already configured using the appropriate font map, resolution and font options.

See also clutter_actor_get_pango_context().

Returns:

  • (Pango::Context)

    the newly created Pango::Context. Use g_object_unref() on the returned value to deallocate its resources

#create_pango_layout(text) ⇒ Pango::Layout

Creates a new Pango::Layout from the same #PangoContext used by the Clutter::Actor. The #PangoLayout is already configured with the font map, resolution and font options, and the given text.

If you want to keep around a Pango::Layout created by this function you will have to connect to the Clutter::Backend::font-changed and Clutter::Backend::resolution-changed signals, and call pango_layout_context_changed() in response to them.

Parameters:

  • text (String)

    the text to set on the Pango::Layout, or nil

Returns:

  • (Pango::Layout)

    the newly created Pango::Layout. Use g_object_unref() when done

#default_paint_volumeClutter::PaintVolume

Retrieves the default paint volume for self.

This function provides the same Clutter::PaintVolume that would be computed by the default implementation inside Clutter::Actor of the Clutter::ActorClass.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.

Returns:

  • (Clutter::PaintVolume)

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

#depthClutter::gfloat

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::ContainerIface.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.

Returns:

  • (Clutter::gfloat)

    depth

#depth=(depth) ⇒ Clutter::gfloat

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::ContainerIface.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.

Parameters:

  • depth (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    depth

  • (Clutter::gfloat)

    depth

#destroynil

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 by clutter_stage_get_default().

Returns:

  • (nil)

#destroy_all_childrennil

Destroys all children of self.

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

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

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

Returns:

  • (nil)

#detach_animationnil

Detaches the Clutter::Animation used by actor, if clutter_actor_animate() has been called on actor.

Once the animation has been detached, it loses a reference. If it was the only reference then the Clutter::Animation becomes invalid.

The Clutter::Animation::completed signal will not be emitted.

Returns:

  • (nil)

#easing_delayInteger

Retrieves the delay that should be applied when tweening animatable properties.

Returns:

  • (Integer)

    a delay, in milliseconds

#easing_delay=(msecs) ⇒ nil

Sets the delay that should be applied before tweening animatable properties.

Parameters:

  • msecs (Integer)

    the delay before the start of the tweening, in milliseconds

Returns:

  • (nil)

#easing_durationInteger

Retrieves the duration of the tweening for animatable properties of self for the current easing state.

Returns:

  • (Integer)

    the duration of the tweening, in milliseconds

#easing_duration=(msecs) ⇒ nil

Sets the duration of the tweening for animatable properties of self for the current easing state.

Parameters:

  • msecs (Integer)

    the duration of the easing, or nil

Returns:

  • (nil)

#easing_modeClutter::AnimationMode

Retrieves the easing mode for the tweening of animatable properties of self for the current easing state.

Returns:

#easing_mode=(mode) ⇒ nil

Sets the easing mode for the tweening of animatable properties of self.

Parameters:

Returns:

  • (nil)

#effect=(effect) ⇒ Clutter::Effect

Adds Clutter::Effect to the list of effects be applied on a #ClutterActor

Parameters:

Returns:

#effectsGLib::List<Clutter::Effect>

Retrieves the Clutter::Effects applied on self, if any

Returns:

  • (GLib::List<Clutter::Effect>)

    a list of Clutter::Effects, or nil. 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

#event(event, capture) ⇒ Boolean

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

Parameters:

  • event (Clutter::Event)

    a Clutter::Event

  • capture (Boolean)

    true if event in in capture phase, false otherwise.

Returns:

  • (Boolean)

    the return value from the signal emission: true if the actor handled the event, or false if the event was not handled

#first_childClutter::Actor

The actor's first child.

Returns:

#first_child=(first_child) ⇒ Clutter::Actor

The actor's first child.

Parameters:

Returns:

#fixed_position_setBoolean

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

Returns:

  • (Boolean)

    true if the fixed position is set on the actor

#fixed_position_set=(fixed_position_set) ⇒ Boolean

This flag controls whether the Clutter::Actor:fixed-x and Clutter::Actor:fixed-y properties are used

Parameters:

  • fixed_position_set (Boolean)

Returns:

  • (Boolean)

    fixed-position-set

  • (Boolean)

    fixed-position-set

#fixed_position_set?Boolean

This flag controls whether the Clutter::Actor:fixed-x and Clutter::Actor:fixed-y properties are used

Returns:

  • (Boolean)

    fixed-position-set

#fixed_xClutter::gfloat

The fixed X position of the actor in pixels.

Writing this property sets Clutter::Actor:fixed-position-set property as well, as a side effect

Returns:

  • (Clutter::gfloat)

    fixed-x

#fixed_x=(fixed_x) ⇒ Clutter::gfloat

The fixed X position of the actor in pixels.

Writing this property sets Clutter::Actor:fixed-position-set property as well, as a side effect

Parameters:

  • fixed_x (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    fixed-x

  • (Clutter::gfloat)

    fixed-x

#fixed_yClutter::gfloat

The fixed Y position of the actor in pixels.

Writing this property sets the Clutter::Actor:fixed-position-set property as well, as a side effect

Returns:

  • (Clutter::gfloat)

    fixed-y

#fixed_y=(fixed_y) ⇒ Clutter::gfloat

The fixed Y position of the actor in pixels.

Writing this property sets the Clutter::Actor:fixed-position-set property as well, as a side effect

Parameters:

  • fixed_y (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    fixed-y

  • (Clutter::gfloat)

    fixed-y

#flagsClutter::ActorFlags

Retrieves the flags set on self

Returns:

#flags=(flags) ⇒ nil

Sets flags on self

This function will emit notifications for the changed properties

Parameters:

Returns:

  • (nil)

#geometry=(geometry) ⇒ nil

Sets the actor's fixed position and forces its minimum and natural size, in pixels. This means the untransformed actor will have the given geometry. This is the same as calling clutter_actor_set_position() and clutter_actor_set_size().

Parameters:

  • geometry (Clutter::Geometry)

    A Clutter::Geometry

Returns:

  • (nil)

#get_abs_allocation_vertices(verts) ⇒ nil

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)

Parameters:

  • verts (Array<Clutter::Vertex>)

    Pointer to a location of an array of 4 Clutter::Vertex where to store the result.

Returns:

  • (nil)

#get_action(name) ⇒ Clutter::Action

Retrieves the Clutter::Action with the given name in the list of actions applied to self

Parameters:

  • name (String)

    the name of the action to retrieve

Returns:

  • (Clutter::Action)

    a Clutter::Action for the given name, or nil. The returned Clutter::Action is owned by the actor and it should not be unreferenced directly

#get_allocation_box(box) ⇒ nil

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.

Parameters:

  • box (Clutter::ActorBox)

    the function fills this in with the actor's allocation

Returns:

  • (nil)

#get_allocation_geometry(geom) ⇒ nil

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.

Parameters:

  • geom (Clutter::Geometry)

    allocation geometry in pixels

Returns:

  • (nil)

#get_allocation_vertices(ancestor, verts) ⇒ nil

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

Parameters:

  • ancestor (Clutter::Actor)

    A Clutter::Actor to calculate the vertices against, or nil to use the Clutter::Stage

  • verts (Array<Clutter::Vertex>)

    return location for an array of 4 Clutter::Vertex in which to store the result

Returns:

  • (nil)

#get_anchor_point(anchor_x, anchor_y) ⇒ nil

Gets the current anchor point of the actor in pixels.

Parameters:

  • anchor_x (Clutter::gfloat)

    return location for the X coordinate of the anchor point

  • anchor_y (Clutter::gfloat)

    return location for the Y coordinate of the anchor point

Returns:

  • (nil)

#get_background_color(color) ⇒ nil

Retrieves the color set using clutter_actor_set_background_color().

Parameters:

Returns:

  • (nil)

#get_child_at_index(index_) ⇒ Clutter::Actor

Retrieves the actor at the given index_ inside the list of children of self.

Parameters:

  • index_ (Integer)

    the position in the list of children

Returns:

#get_child_transform(transform) ⇒ nil

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.

Parameters:

  • transform (Clutter::Matrix)

    a Clutter::Matrix

Returns:

  • (nil)

#get_clip(xoff, yoff, width, height) ⇒ nil

Gets the clip area for self, if any is set.

Parameters:

  • xoff (Clutter::gfloat)

    return location for the X offset of the clip rectangle, or nil

  • yoff (Clutter::gfloat)

    return location for the Y offset of the clip rectangle, or nil

  • width (Clutter::gfloat)

    return location for the width of the clip rectangle, or nil

  • height (Clutter::gfloat)

    return location for the height of the clip rectangle, or nil

Returns:

  • (nil)

#get_constraint(name) ⇒ Clutter::Constraint

Retrieves the Clutter::Constraint with the given name in the list of constraints applied to self

Parameters:

  • name (String)

    the name of the constraint to retrieve

Returns:

  • (Clutter::Constraint)

    a Clutter::Constraint for the given name, or nil. The returned Clutter::Constraint is owned by the actor and it should not be unreferenced directly

#get_content_box(box) ⇒ nil

Retrieves the bounding box for the Clutter::Content of self.

The bounding box is relative to the actor's allocation.

If no Clutter::Content is set for self, or if self has not been allocated yet, then the result is undefined.

The content box is guaranteed to be, at most, as big as the allocation of the Clutter::Actor.

If the Clutter::Content used by the actor has a preferred size, then it is possible to modify the content box by using the Clutter::Actor:content-gravity property.

Parameters:

  • box (Clutter::ActorBox)

    the return location for the bounding box for the Clutter::Content

Returns:

  • (nil)

#get_content_scaling_filters(min_filter, mag_filter) ⇒ nil

Retrieves the values set using clutter_actor_set_content_scaling_filters().

Parameters:

Returns:

  • (nil)

#get_effect(name) ⇒ Clutter::Effect

Retrieves the Clutter::Effect with the given name in the list of effects applied to self

Parameters:

  • name (String)

    the name of the effect to retrieve

Returns:

  • (Clutter::Effect)

    a Clutter::Effect for the given name, or nil. The returned Clutter::Effect is owned by the actor and it should not be unreferenced directly

#get_geometry(geometry) ⇒ nil

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

Parameters:

  • geometry (Clutter::Geometry)

    A location to store actors Clutter::Geometry

Returns:

  • (nil)

#get_margin(margin) ⇒ nil

Retrieves all the components of the margin of a Clutter::Actor.

Parameters:

  • margin (Clutter::Margin)

    return location for a Clutter::Margin

Returns:

  • (nil)

#get_paint_box(box) ⇒ Boolean

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

Parameters:

  • box (Clutter::ActorBox)

    return location for a Clutter::ActorBox

Returns:

  • (Boolean)

    true if a 2D paint box could be determined, else

#get_pivot_point(pivot_x, pivot_y) ⇒ nil

Retrieves the coordinates of the Clutter::Actor:pivot-point.

Parameters:

  • pivot_x (Clutter::gfloat)

    return location for the normalized X coordinate of the pivot point, or nil

  • pivot_y (Clutter::gfloat)

    return location for the normalized Y coordinate of the pivot point, or nil

Returns:

  • (nil)

#get_position(x, y) ⇒ nil

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.

Parameters:

  • x (Clutter::gfloat)

    return location for the X coordinate, or nil

  • y (Clutter::gfloat)

    return location for the Y coordinate, or nil

Returns:

  • (nil)

#get_preferred_height(for_width, min_height_p, natural_height_p) ⇒ nil

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.

Parameters:

  • for_width (Clutter::gfloat)

    available width to assume in computing desired height, or a negative value to indicate that no width is defined

  • min_height_p (Clutter::gfloat)

    return location for minimum height, or nil

  • natural_height_p (Clutter::gfloat)

    return location for natural height, or nil

Returns:

  • (nil)

#get_preferred_size(min_width_p, min_height_p, natural_width_p, natural_height_p) ⇒ nil

Computes the preferred minimum and natural size of an actor, taking into account the actor's geometry management (either height-for-width or width-for-height).

The width and height used to compute the preferred height and preferred width are the actor's natural ones.

If you need to control the height for the preferred width, or the width for the preferred height, you should use clutter_actor_get_preferred_width() and clutter_actor_get_preferred_height(), and check the actor's preferred geometry management using the Clutter::Actor:request-mode property.

Parameters:

  • min_width_p (Clutter::gfloat)

    return location for the minimum width, or nil

  • min_height_p (Clutter::gfloat)

    return location for the minimum height, or nil

  • natural_width_p (Clutter::gfloat)

    return location for the natural width, or nil

  • natural_height_p (Clutter::gfloat)

    return location for the natural height, or nil

Returns:

  • (nil)

#get_preferred_width(for_height, min_width_p, natural_width_p) ⇒ nil

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.

Parameters:

  • for_height (Clutter::gfloat)

    available height when computing the preferred width, or a negative value to indicate that no height is defined

  • min_width_p (Clutter::gfloat)

    return location for minimum width, or nil

  • natural_width_p (Clutter::gfloat)

    return location for the natural width, or nil

Returns:

  • (nil)

#get_rotation(axis, x, y, z) ⇒ Float

Retrieves the angle and center of rotation on the given axis, set using clutter_actor_set_rotation().

Parameters:

  • axis (Clutter::RotateAxis)

    the axis of rotation

  • x (Clutter::gfloat)

    return value for the X coordinate of the center of rotation

  • y (Clutter::gfloat)

    return value for the Y coordinate of the center of rotation

  • z (Clutter::gfloat)

    return value for the Z coordinate of the center of rotation

Returns:

  • (Float)

    the angle of rotation

#get_rotation_angle(axis) ⇒ Float

Retrieves the angle of rotation set by clutter_actor_set_rotation_angle().

Parameters:

Returns:

  • (Float)

    the angle of rotation, in degrees

#get_scale(scale_x, scale_y) ⇒ nil

Retrieves an actors scale factors.

Parameters:

  • scale_x (Float)

    Location to store horizonal scale factor, or nil.

  • scale_y (Float)

    Location to store vertical scale factor, or nil.

Returns:

  • (nil)

#get_scale_center(center_x, center_y) ⇒ nil

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.

Parameters:

  • center_x (Clutter::gfloat)

    Location to store the X position of the scale center, or nil.

  • center_y (Clutter::gfloat)

    Location to store the Y position of the scale center, or nil.

Returns:

  • (nil)

#get_size(width, height) ⇒ nil

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

If you care whether you get the request vs. the allocation, you should probably call a different function like clutter_actor_get_allocation_box() or clutter_actor_get_preferred_width().

Parameters:

  • width (Clutter::gfloat)

    return location for the width, or nil.

  • height (Clutter::gfloat)

    return location for the height, or nil.

Returns:

  • (nil)

#get_transform(transform) ⇒ nil

Retrieves the current transformation matrix of a Clutter::Actor.

Parameters:

  • transform (Clutter::Matrix)

    a Clutter::Matrix

Returns:

  • (nil)

#get_transformation_matrix(matrix) ⇒ nil

Retrieves the transformations applied to self relative to its parent.

Parameters:

  • matrix (Clutter::Matrix)

    the return location for a Clutter::Matrix

Returns:

  • (nil)

#get_transformed_paint_volume(relative_to_ancestor) ⇒ Clutter::PaintVolume

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

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

Parameters:

  • relative_to_ancestor (Clutter::Actor)

    A Clutter::Actor that is an ancestor of self (or nil for the stage)

Returns:

  • (Clutter::PaintVolume)

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

#get_transformed_position(x, y) ⇒ nil

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

Parameters:

  • x (Clutter::gfloat)

    return location for the X coordinate, or nil

  • y (Clutter::gfloat)

    return location for the Y coordinate, or nil

Returns:

  • (nil)

#get_transformed_size(width, height) ⇒ nil

Gets the absolute size of an actor in pixels, taking into account the scaling factors.

If the actor has a valid allocation, the allocated size will be used. If the actor has not a valid allocation then the preferred size will be transformed and returned.

If you want the transformed allocation, see clutter_actor_get_abs_allocation_vertices() instead.

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

Parameters:

  • width (Clutter::gfloat)

    return location for the width, or nil

  • height (Clutter::gfloat)

    return location for the height, or nil

Returns:

  • (nil)

#get_transition(name) ⇒ Clutter::Transition

Retrieves the Clutter::Transition of a #ClutterActor by using the transition name.

Transitions created for animatable properties use the name of the property itself, for instance the code below:

  clutter_actor_set_easing_duration (actor, 1000);
  clutter_actor_set_rotation (actor, CLUTTER_Y_AXIS, 360.0, x, y, z);

  transition = clutter_actor_get_transition (actor, "rotation-angle-y");
  g_signal_connect (transition, "stopped",
                    G_CALLBACK (on_transition_stopped),
                    actor);

will call the on_transition_stopped callback when the transition is finished.

If you just want to get notifications of the completion of a transition, you should use the Clutter::Actor::transition-stopped signal, using the transition name as the signal detail.

Parameters:

  • name (String)

    the name of the transition

Returns:

  • (Clutter::Transition)

    a Clutter::Transition, or nil is none was found to match the passed name; the returned instance is owned by Clutter and it should not be freed

#get_translation(translate_x, translate_y, translate_z) ⇒ nil

Retrieves the translation set using clutter_actor_set_translation().

Parameters:

  • translate_x (Clutter::gfloat)

    return location for the X component of the translation, or nil

  • translate_y (Clutter::gfloat)

    return location for the Y component of the translation, or nil

  • translate_z (Clutter::gfloat)

    return location for the Z component of the translation, or nil

Returns:

  • (nil)

#gidInteger

Retrieves the unique id for self.

Returns:

  • (Integer)

    Globally unique value for this object instance.

#grab_key_focusnil

Sets the key focus of the Clutter::Stage including self to this Clutter::Actor.

Returns:

  • (nil)

#has_actionsBoolean

Returns whether the actor has any actions applied.

Returns:

  • (Boolean)

    true if the actor has any actions, false otherwise

#has_allocationBoolean

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

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

Returns:

  • (Boolean)

    true if the actor has an up-to-date allocation

#has_clipBoolean

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

Returns:

  • (Boolean)

    true if the actor has a clip area set.

#has_clip=(has_clip) ⇒ Boolean

Whether the actor has the Clutter::Actor:clip property set or not

Parameters:

  • has_clip (Boolean)

Returns:

  • (Boolean)

    has-clip

  • (Boolean)

    has-clip

#has_clip?Boolean

Whether the actor has the Clutter::Actor:clip property set or not

Returns:

  • (Boolean)

    has-clip

#has_constraintsBoolean

Returns whether the actor has any constraints applied.

Returns:

  • (Boolean)

    true if the actor has any constraints, false otherwise

#has_effectsBoolean

Returns whether the actor has any effects applied.

Returns:

  • (Boolean)

    true if the actor has any effects, false otherwise

#has_key_focusBoolean

Checks whether self is the Clutter::Actor that has key focus

Returns:

  • (Boolean)

    true if the actor has key focus, and false otherwise

#has_overlapsBoolean

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::ActorClass.has_overlaps() virtual function. See clutter_actor_set_offscreen_redirect() for more information.

Returns:

  • (Boolean)

    true if the actor may have overlapping primitives, and false otherwise

#has_pointerBoolean

Checks whether an actor contains the pointer of a Clutter::InputDevice

Returns:

  • (Boolean)

    true if the actor contains the pointer, and false otherwise

#has_pointer=(has_pointer) ⇒ Boolean

Whether the actor contains the pointer of a Clutter::InputDevice or not.

Parameters:

  • has_pointer (Boolean)

Returns:

  • (Boolean)

    has-pointer

  • (Boolean)

    has-pointer

#has_pointer?Boolean

Whether the actor contains the pointer of a Clutter::InputDevice or not.

Returns:

  • (Boolean)

    has-pointer

#heightClutter::gfloat

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

The Clutter::Actor:height property is animatable.

Returns:

  • (Clutter::gfloat)

    height

#height=(height) ⇒ Clutter::gfloat

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

The Clutter::Actor:height property is animatable.

Parameters:

  • height (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    height

  • (Clutter::gfloat)

    height

#hidenil

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

Actors are visible by default.

If this function is called on an actor without a parent, the Clutter::Actor:show-on-set-parent property will be set to false as a side-effect.

Returns:

  • (nil)

#hide_allnil

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

Returns:

  • (nil)

#insert_child_above(child, sibling) ⇒ nil

Inserts child into the list of children of self, above another child of self or, if sibling is nil, 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.

Parameters:

Returns:

  • (nil)

#insert_child_at_index(child, index_) ⇒ nil

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.

Parameters:

  • child (Clutter::Actor)

    a Clutter::Actor

  • index_ (Integer)

    the index

Returns:

  • (nil)

#insert_child_below(child, sibling) ⇒ nil

Inserts child into the list of children of self, below another child of self or, if sibling is nil, 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.

Parameters:

Returns:

  • (nil)

#is_in_clone_paintBoolean

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 the Clutter::Actor::paint signal

This function should not be used by applications

Returns:

  • (Boolean)

    true if the Clutter::Actor is currently being painted by a Clutter::Clone, and false otherwise

#is_mappedBoolean

Checks whether a Clutter::Actor has been set as mapped.

See also %CLUTTER_ACTOR_IS_MAPPED and Clutter::Actor:mapped

Returns:

  • (Boolean)

    true if the actor is mapped

#is_realizedBoolean

Checks whether a Clutter::Actor is realized.

See also %CLUTTER_ACTOR_IS_REALIZED and Clutter::Actor:realized.

Returns:

  • (Boolean)

    true if the actor is realized

#is_rotatedBoolean

Checks whether any rotation is applied to the actor.

Returns:

  • (Boolean)

    true if the actor is rotated.

#is_scaledBoolean

Checks whether the actor is scaled in either dimension.

Returns:

  • (Boolean)

    true if the actor is scaled.

#is_visibleBoolean

Checks whether an actor is marked as visible.

See also %CLUTTER_ACTOR_IS_VISIBLE and Clutter::Actor:visible.

Returns:

  • (Boolean)

    true if the actor visible

#last_childClutter::Actor

The actor's last child.

Returns:

#last_child=(last_child) ⇒ Clutter::Actor

The actor's last child.

Parameters:

Returns:

#layout_managerClutter::LayoutManager

A delegate object for controlling the layout of the children of an actor.

Returns:

#layout_manager=(layout_manager) ⇒ Clutter::LayoutManager

A delegate object for controlling the layout of the children of an actor.

Parameters:

Returns:

#lower(above) ⇒ nil

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.

Parameters:

Returns:

  • (nil)

#lower_bottomnil

Lowers self to the bottom.

This function calls clutter_actor_lower() internally.

Returns:

  • (nil)

#magnification_filterClutter::ScalingFilter

Returns magnification-filter.

Returns:

#magnification_filter=(magnification_filter) ⇒ Clutter::ScalingFilter

Parameters:

Returns:

#mapnil

Sets the %CLUTTER_ACTOR_MAPPED flag on the actor and possibly maps and realizes its children if they are visible. Does nothing if the actor is not visible.

Calling this function is strongly disencouraged: the default implementation of Clutter::ActorClass.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.

Returns:

  • (nil)

#mapped=(mapped) ⇒ Boolean

Whether the actor is mapped (will be painted when the stage to which it belongs is mapped)

Parameters:

  • mapped (Boolean)

Returns:

  • (Boolean)

    mapped

  • (Boolean)

    mapped

#mapped?Boolean

Whether the actor is mapped (will be painted when the stage to which it belongs is mapped)

Returns:

  • (Boolean)

    mapped

#margin=(margin) ⇒ nil

Sets all the components of the margin of a Clutter::Actor.

Parameters:

  • margin (Clutter::Margin)

    a Clutter::Margin

Returns:

  • (nil)

#margin_bottomClutter::gfloat

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.

Returns:

  • (Clutter::gfloat)

    margin-bottom

#margin_bottom=(margin_bottom) ⇒ Clutter::gfloat

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.

Parameters:

  • margin_bottom (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    margin-bottom

  • (Clutter::gfloat)

    margin-bottom

#margin_leftClutter::gfloat

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.

Returns:

  • (Clutter::gfloat)

    margin-left

#margin_left=(margin_left) ⇒ Clutter::gfloat

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.

Parameters:

  • margin_left (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    margin-left

  • (Clutter::gfloat)

    margin-left

#margin_rightClutter::gfloat

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.

Returns:

  • (Clutter::gfloat)

    margin-right

#margin_right=(margin_right) ⇒ Clutter::gfloat

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.

Parameters:

  • margin_right (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    margin-right

  • (Clutter::gfloat)

    margin-right

#margin_topClutter::gfloat

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.

Returns:

  • (Clutter::gfloat)

    margin-top

#margin_top=(margin_top) ⇒ Clutter::gfloat

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.

Parameters:

  • margin_top (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    margin-top

  • (Clutter::gfloat)

    margin-top

#min_heightClutter::gfloat

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.

Returns:

  • (Clutter::gfloat)

    min-height

#min_height=(min_height) ⇒ Clutter::gfloat

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.

Parameters:

  • min_height (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    min-height

  • (Clutter::gfloat)

    min-height

#min_height_set=(min_height_set) ⇒ Boolean

This flag controls whether the Clutter::Actor:min-height property is used

Parameters:

  • min_height_set (Boolean)

Returns:

  • (Boolean)

    min-height-set

  • (Boolean)

    min-height-set

#min_height_set?Boolean

This flag controls whether the Clutter::Actor:min-height property is used

Returns:

  • (Boolean)

    min-height-set

#min_widthClutter::gfloat

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.

Returns:

  • (Clutter::gfloat)

    min-width

#min_width=(min_width) ⇒ Clutter::gfloat

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.

Parameters:

  • min_width (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    min-width

  • (Clutter::gfloat)

    min-width

#min_width_set=(min_width_set) ⇒ Boolean

This flag controls whether the Clutter::Actor:min-width property is used

Parameters:

  • min_width_set (Boolean)

Returns:

  • (Boolean)

    min-width-set

  • (Boolean)

    min-width-set

#min_width_set?Boolean

This flag controls whether the Clutter::Actor:min-width property is used

Returns:

  • (Boolean)

    min-width-set

#minification_filterClutter::ScalingFilter

Returns minification-filter.

Returns:

#minification_filter=(minification_filter) ⇒ Clutter::ScalingFilter

Parameters:

Returns:

#move_anchor_point(anchor_x, anchor_y) ⇒ nil

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.

Parameters:

  • anchor_x (Clutter::gfloat)

    X coordinate of the anchor point

  • anchor_y (Clutter::gfloat)

    Y coordinate of the anchor point

Returns:

  • (nil)

#move_anchor_point_from_gravity(gravity) ⇒ nil

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.

Parameters:

Returns:

  • (nil)

#move_by(dx, dy) ⇒ nil

Moves an actor by the specified distance relative to its current position in pixels.

This function modifies the fixed position of an actor and thus removes it from any layout management. Another way to move an actor is with an anchor point, see clutter_actor_set_anchor_point(), or with an additional translation, using clutter_actor_set_translation().

Parameters:

  • dx (Clutter::gfloat)

    Distance to move Actor on X axis.

  • dy (Clutter::gfloat)

    Distance to move Actor on Y axis.

Returns:

  • (nil)

#n_childrenInteger

Retrieves the number of children of self.

Returns:

  • (Integer)

    the number of children of an actor

#nameString

The name of the actor

Returns:

  • (String)

    name

#name=(name) ⇒ String

The name of the actor

Parameters:

  • name (String)

Returns:

  • (String)

    name

  • (String)

    name

#natural_heightClutter::gfloat

A forced natural height request for the actor, in pixels

Writing this property sets the Clutter::Actor:natural-height-set property as well, as a side effect. This property overrides the usual height request of the actor

Returns:

  • (Clutter::gfloat)

    natural-height

#natural_height=(natural_height) ⇒ Clutter::gfloat

A forced natural height request for the actor, in pixels

Writing this property sets the Clutter::Actor:natural-height-set property as well, as a side effect. This property overrides the usual height request of the actor

Parameters:

  • natural_height (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    natural-height

  • (Clutter::gfloat)

    natural-height

#natural_height_set=(natural_height_set) ⇒ Boolean

This flag controls whether the Clutter::Actor:natural-height property is used

Parameters:

  • natural_height_set (Boolean)

Returns:

  • (Boolean)

    natural-height-set

  • (Boolean)

    natural-height-set

#natural_height_set?Boolean

This flag controls whether the Clutter::Actor:natural-height property is used

Returns:

  • (Boolean)

    natural-height-set

#natural_widthClutter::gfloat

A forced natural width request for the actor, in pixels

Writing this property sets the Clutter::Actor:natural-width-set property as well, as a side effect. This property overrides the usual width request of the actor

Returns:

  • (Clutter::gfloat)

    natural-width

#natural_width=(natural_width) ⇒ Clutter::gfloat

A forced natural width request for the actor, in pixels

Writing this property sets the Clutter::Actor:natural-width-set property as well, as a side effect. This property overrides the usual width request of the actor

Parameters:

  • natural_width (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    natural-width

  • (Clutter::gfloat)

    natural-width

#natural_width_set=(natural_width_set) ⇒ Boolean

This flag controls whether the Clutter::Actor:natural-width property is used

Parameters:

  • natural_width_set (Boolean)

Returns:

  • (Boolean)

    natural-width-set

  • (Boolean)

    natural-width-set

#natural_width_set?Boolean

This flag controls whether the Clutter::Actor:natural-width property is used

Returns:

  • (Boolean)

    natural-width-set

#needs_expand(orientation) ⇒ Boolean

Checks whether an actor, or any of its children, is set to expand horizontally or vertically.

This function should only be called by layout managers that can assign extra space to their children.

If you want to know whether the actor was explicitly set to expand, use clutter_actor_get_x_expand() or clutter_actor_get_y_expand().

Parameters:

Returns:

  • (Boolean)

    true if the actor should expand

#next_siblingClutter::Actor

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.

Returns:

#offscreen_redirectClutter::OffscreenRedirect

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.

Returns:

#offscreen_redirect=(offscreen_redirect) ⇒ Clutter::OffscreenRedirect

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.

Parameters:

Returns:

#opacityInteger

Opacity of an actor, between 0 (fully transparent) and 255 (fully opaque)

The Clutter::Actor:opacity property is animatable.

Returns:

  • (Integer)

    opacity

#opacity=(opacity) ⇒ Integer

Opacity of an actor, between 0 (fully transparent) and 255 (fully opaque)

The Clutter::Actor:opacity property is animatable.

Parameters:

  • opacity (Integer)

Returns:

  • (Integer)

    opacity

  • (Integer)

    opacity

#paintnil

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 the Clutter::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.

Returns:

  • (nil)

#paint_opacityInteger

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.

Returns:

  • (Integer)

    The actor opacity value.

#paint_visibilityBoolean

Retrieves the 'paint' visibility of an actor recursively checking for non visible parents.

This is by definition the same as %CLUTTER_ACTOR_IS_MAPPED.

Returns:

  • (Boolean)

    true if the actor is visibile and will be painted.

#paint_volumeClutter::PaintVolume

Retrieves the paint volume of the passed Clutter::Actor, or nil 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::ActorClass.get_paint_volume() virtual function of the Clutter::Actor class. Sub-classes of #ClutterActor should not usually care about overriding the default implementation, unless they are, for instance: painting outside their allocation, or actors with a depth factor (not in terms of Clutter::Actor:depth but real 3D depth).

Note: 2D actors overriding Clutter::ActorClass.get_paint_volume() should ensure that their volume has a depth of 0. (This will be true as long as you don't call clutter_paint_volume_set_depth().)

Returns:

  • (Clutter::PaintVolume)

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

#pango_contextPango::Context

Retrieves the Pango::Context for self. The actor's #PangoContext is already configured using the appropriate font map, resolution and font options.

Unlike clutter_actor_create_pango_context(), this context is owend by the Clutter::Actor and it will be updated each time the options stored by the Clutter::Backend change.

You can use the returned Pango::Context to create a #PangoLayout and render text using cogl_pango_render_layout() to reuse the glyphs cache also used by Clutter.

Returns:

  • (Pango::Context)

    the Pango::Context for a #ClutterActor. The returned Pango::Context is owned by the actor and should not be unreferenced by the application code

#parentClutter::Actor

Retrieves the parent of self.

Returns:

  • (Clutter::Actor)

    The Clutter::Actor parent, or nil if no parent is set

#parent=(parent) ⇒ nil

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::Actors implementing the Clutter::Container interface.

Parameters:

Returns:

  • (nil)

#pivot_pointClutter::Point

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.

Returns:

#pivot_point=(pivot_point) ⇒ Clutter::Point

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.

Parameters:

Returns:

#pivot_point_zClutter::gfloat

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.

Returns:

  • (Clutter::gfloat)

    pivot-point-z

#pivot_point_z=(pivot_point_z) ⇒ Clutter::gfloat

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.

Parameters:

  • pivot_point_z (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    pivot-point-z

  • (Clutter::gfloat)

    pivot-point-z

#pop_internalnil

Disables the effects of clutter_actor_push_internal().

Returns:

  • (nil)

#positionClutter::Point

The position of the origin of the actor.

This property is a shorthand for setting and getting the Clutter::Actor:x and #ClutterActor:y properties at the same time.

The Clutter::Actor:position property is animatable.

Returns:

#position=(position) ⇒ Clutter::Point

The position of the origin of the actor.

This property is a shorthand for setting and getting the Clutter::Actor:x and #ClutterActor:y properties at the same time.

The Clutter::Actor:position property is animatable.

Parameters:

Returns:

#previous_siblingClutter::Actor

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.

Returns:

#push_internalnil

Should be used by actors implementing the Clutter::Container and with internal children added through clutter_actor_set_parent(), for instance:

  static void
  my_actor_init (MyActor *self)
  {
    self->priv = my_actor_get_instance_private (self);

    clutter_actor_push_internal (CLUTTER_ACTOR (self));

    // calling clutter_actor_set_parent() now will result in
    // the internal flag being set on a child of MyActor

    // internal child - a background texture
    self->priv->background_tex = clutter_texture_new ();
    clutter_actor_set_parent (self->priv->background_tex,
                              CLUTTER_ACTOR (self));

    // internal child - a label
    self->priv->label = clutter_text_new ();
    clutter_actor_set_parent (self->priv->label,
                              CLUTTER_ACTOR (self));

    clutter_actor_pop_internal (CLUTTER_ACTOR (self));

    // calling clutter_actor_set_parent() now will not result in
    // the internal flag being set on a child of MyActor
  }

This function will be used by Clutter to toggle an "internal child" flag whenever clutter_actor_set_parent() is called; internal children are handled differently by Clutter, specifically when destroying their parent.

Call clutter_actor_pop_internal() when you finished adding internal children.

Nested calls to clutter_actor_push_internal() are allowed, but each one must by followed by a clutter_actor_pop_internal() call.

Returns:

  • (nil)

#queue_redrawnil

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.

Returns:

  • (nil)

#queue_redraw_with_clip(clip) ⇒ nil

Queues a redraw on self limited to a specific, actor-relative rectangular area.

If clip is nil this function is equivalent to clutter_actor_queue_redraw().

Parameters:

  • clip (cairo::RectangleInt)

    a rectangular clip region, or nil

Returns:

  • (nil)

#queue_relayoutnil

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.

Returns:

  • (nil)

#raise(below) ⇒ nil

Puts self above below.

Both actors must have the same parent, and the parent must implement the Clutter::Container interface

This function calls clutter_container_raise_child() internally.

Parameters:

Returns:

  • (nil)

#raise_topnil

Raises self to the top.

This function calls clutter_actor_raise() internally.

Returns:

  • (nil)

#reactiveBoolean

Checks whether actor is marked as reactive.

Returns:

  • (Boolean)

    true if the actor is reactive

#reactive=(reactive) ⇒ Boolean

Whether the actor is reactive to events or not

Only reactive actors will emit event-related signals

Parameters:

  • reactive (Boolean)

Returns:

  • (Boolean)

    reactive

  • (Boolean)

    reactive

#reactive?Boolean

Whether the actor is reactive to events or not

Only reactive actors will emit event-related signals

Returns:

  • (Boolean)

    reactive

#realizenil

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.

Returns:

  • (nil)

#realized=(realized) ⇒ Boolean

Whether the actor has been realized

Parameters:

  • realized (Boolean)

Returns:

  • (Boolean)

    realized

  • (Boolean)

    realized

#realized?Boolean

Whether the actor has been realized

Returns:

  • (Boolean)

    realized

#remove_action(action) ⇒ nil

Removes action from the list of actions applied to self

The reference held by self on the Clutter::Action will be released

Parameters:

Returns:

  • (nil)

#remove_action_by_name(name) ⇒ nil

Removes the Clutter::Action with the given name from the list of actions applied to self

Parameters:

  • name (String)

    the name of the action to remove

Returns:

  • (nil)

#remove_all_childrennil

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

Returns:

  • (nil)

#remove_all_transitionsnil

Removes all transitions associated to self.

Returns:

  • (nil)

#remove_child(child) ⇒ nil

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.

Parameters:

Returns:

  • (nil)

#remove_clipnil

Removes clip area from self.

Returns:

  • (nil)

#remove_constraint(constraint) ⇒ nil

Removes constraint from the list of constraints applied to self

The reference held by self on the Clutter::Constraint will be released

Parameters:

Returns:

  • (nil)

#remove_constraint_by_name(name) ⇒ nil

Removes the Clutter::Constraint with the given name from the list of constraints applied to self

Parameters:

  • name (String)

    the name of the constraint to remove

Returns:

  • (nil)

#remove_effect(effect) ⇒ nil

Removes effect from the list of effects applied to self

The reference held by self on the Clutter::Effect will be released

Parameters:

Returns:

  • (nil)

#remove_effect_by_name(name) ⇒ nil

Removes the Clutter::Effect with the given name from the list of effects applied to self

Parameters:

  • name (String)

    the name of the effect to remove

Returns:

  • (nil)

#remove_transition(name) ⇒ nil

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.

Parameters:

  • name (String)

    the name of the transition to remove

Returns:

  • (nil)

#reparent(new_parent) ⇒ nil

Resets the parent actor of self.

This function is logically equivalent to calling clutter_actor_unparent() and clutter_actor_set_parent(), but more efficiently implemented, as it ensures the child is not finalized when unparented, and emits the Clutter::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.

Parameters:

Returns:

  • (nil)

#replace_child(old_child, new_child) ⇒ nil

Replaces old_child with new_child in the list of children of self.

Parameters:

Returns:

  • (nil)

#request_modeClutter::RequestMode

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.

Returns:

#request_mode=(request_mode) ⇒ Clutter::RequestMode

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.

Parameters:

Returns:

#restore_easing_statenil

Restores the easing state as it was prior to a call to clutter_actor_save_easing_state().

Returns:

  • (nil)

#rotation_angle_xFloat

The rotation angle on the X axis.

The Clutter::Actor:rotation-angle-x property is animatable.

Returns:

  • (Float)

    rotation-angle-x

#rotation_angle_x=(rotation_angle_x) ⇒ Float

The rotation angle on the X axis.

The Clutter::Actor:rotation-angle-x property is animatable.

Parameters:

  • rotation_angle_x (Float)

Returns:

  • (Float)

    rotation-angle-x

  • (Float)

    rotation-angle-x

#rotation_angle_yFloat

The rotation angle on the Y axis

The Clutter::Actor:rotation-angle-y property is animatable.

Returns:

  • (Float)

    rotation-angle-y

#rotation_angle_y=(rotation_angle_y) ⇒ Float

The rotation angle on the Y axis

The Clutter::Actor:rotation-angle-y property is animatable.

Parameters:

  • rotation_angle_y (Float)

Returns:

  • (Float)

    rotation-angle-y

  • (Float)

    rotation-angle-y

#rotation_angle_zFloat

The rotation angle on the Z axis

The Clutter::Actor:rotation-angle-z property is animatable.

Returns:

  • (Float)

    rotation-angle-z

#rotation_angle_z=(rotation_angle_z) ⇒ Float

The rotation angle on the Z axis

The Clutter::Actor:rotation-angle-z property is animatable.

Parameters:

  • rotation_angle_z (Float)

Returns:

  • (Float)

    rotation-angle-z

  • (Float)

    rotation-angle-z

#rotation_center_xClutter::Vertex

The rotation center on the X axis.

Returns:

  • (Clutter::Vertex)

    rotation-center-x

#rotation_center_x=(rotation_center_x) ⇒ Clutter::Vertex

The rotation center on the X axis.

Parameters:

  • rotation_center_x (Clutter::Vertex)

Returns:

  • (Clutter::Vertex)

    rotation-center-x

  • (Clutter::Vertex)

    rotation-center-x

#rotation_center_yClutter::Vertex

The rotation center on the Y axis.

Returns:

  • (Clutter::Vertex)

    rotation-center-y

#rotation_center_y=(rotation_center_y) ⇒ Clutter::Vertex

The rotation center on the Y axis.

Parameters:

  • rotation_center_y (Clutter::Vertex)

Returns:

  • (Clutter::Vertex)

    rotation-center-y

  • (Clutter::Vertex)

    rotation-center-y

#rotation_center_zClutter::Vertex

The rotation center on the Z axis.

Returns:

  • (Clutter::Vertex)

    rotation-center-z

#rotation_center_z=(rotation_center_z) ⇒ Clutter::Vertex

The rotation center on the Z axis.

Parameters:

  • rotation_center_z (Clutter::Vertex)

Returns:

  • (Clutter::Vertex)

    rotation-center-z

  • (Clutter::Vertex)

    rotation-center-z

#rotation_center_z_gravityClutter::Gravity

The rotation center on the Z axis expressed as a Clutter::Gravity.

Returns:

#rotation_center_z_gravity=(rotation_center_z_gravity) ⇒ Clutter::Gravity

The rotation center on the Z axis expressed as a Clutter::Gravity.

Parameters:

Returns:

#save_easing_statenil

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.

Returns:

  • (nil)


21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/clutter/actor.rb', line 21

def save_easing_state
  if block_given?
    save_easing_state_without_block
    begin
      yield
    ensure
      restore_easing_state
    end
  else
    save_easing_state_without_block
  end
end

#save_easing_state_without_blocknil

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. TODO: use prepend after Ruby 1.9 support is dropped.

Returns:

  • (nil)


# File 'lib/clutter/actor.rb', line 20

#scale_center_xClutter::gfloat

The horizontal center point for scaling

Returns:

  • (Clutter::gfloat)

    scale-center-x

#scale_center_x=(scale_center_x) ⇒ Clutter::gfloat

The horizontal center point for scaling

Parameters:

  • scale_center_x (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    scale-center-x

  • (Clutter::gfloat)

    scale-center-x

#scale_center_yClutter::gfloat

The vertical center point for scaling

Returns:

  • (Clutter::gfloat)

    scale-center-y

#scale_center_y=(scale_center_y) ⇒ Clutter::gfloat

The vertical center point for scaling

Parameters:

  • scale_center_y (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    scale-center-y

  • (Clutter::gfloat)

    scale-center-y

#scale_gravityClutter::Gravity

The center point for scaling expressed as a Clutter::Gravity

Returns:

#scale_gravity=(scale_gravity) ⇒ Clutter::Gravity

The center point for scaling expressed as a Clutter::Gravity

Parameters:

Returns:

#scale_xFloat

The horizontal scale of the actor.

The Clutter::Actor:scale-x property is animatable.

Returns:

  • (Float)

    scale-x

#scale_x=(scale_x) ⇒ Float

The horizontal scale of the actor.

The Clutter::Actor:scale-x property is animatable.

Parameters:

  • scale_x (Float)

Returns:

  • (Float)

    scale-x

  • (Float)

    scale-x

#scale_yFloat

The vertical scale of the actor.

The Clutter::Actor:scale-y property is animatable.

Returns:

  • (Float)

    scale-y

#scale_y=(scale_y) ⇒ Float

The vertical scale of the actor.

The Clutter::Actor:scale-y property is animatable.

Parameters:

  • scale_y (Float)

Returns:

  • (Float)

    scale-y

  • (Float)

    scale-y

#scale_zFloat

The scale factor of the actor along the Z axis.

The Clutter::Actor:scale-y property is animatable.

Returns:

  • (Float)

    scale-z

#scale_z=(scale_z) ⇒ Float

The scale factor of the actor along the Z axis.

The Clutter::Actor:scale-y property is animatable.

Parameters:

  • scale_z (Float)

Returns:

  • (Float)

    scale-z

  • (Float)

    scale-z

#set_allocation(box, flags) ⇒ nil

Stores the allocation of self as defined by box.

This function can only be called from within the implementation of the Clutter::ActorClass.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 a Clutter::LayoutManager delegate, you should not call this function on the children of self; instead, you should call clutter_actor_allocate(), which will adjust the allocation box for you.

This function should only be used by subclasses of Clutter::Actor that wish to store their allocation but cannot chain up to the parent's implementation; the default implementation of the Clutter::ActorClass.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 call clutter_actor_set_allocation() instead.

If the Clutter::Actor is using a #ClutterLayoutManager delegate object to handle the allocation of its children, this function will call the clutter_layout_manager_allocate() function only if the %CLUTTER_DELEGATE_LAYOUT flag is set on flags, otherwise it is expected that the subclass will call clutter_layout_manager_allocate() by itself. For instance, the following code:

static void
my_actor_allocate (ClutterActor *actor,
                   const ClutterActorBox *allocation,
                   ClutterAllocationFlags flags)
{
  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);
}

Parameters:

Returns:

  • (nil)

#set_anchor_point(anchor_x, anchor_y) ⇒ nil

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.

Parameters:

  • anchor_x (Clutter::gfloat)

    X coordinate of the anchor point

  • anchor_y (Clutter::gfloat)

    Y coordinate of the anchor point

Returns:

  • (nil)

#set_child_above_sibling(child, sibling) ⇒ nil

Sets child to be above sibling in the list of children of self.

If sibling is nil, 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.

Parameters:

Returns:

  • (nil)

#set_child_at_index(child, index_) ⇒ nil

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.

Parameters:

  • child (Clutter::Actor)

    a Clutter::Actor child of self

  • index_ (Integer)

    the new index for child

Returns:

  • (nil)

#set_child_below_sibling(child, sibling) ⇒ nil

Sets child to be below sibling in the list of children of self.

If sibling is nil, 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.

Parameters:

Returns:

  • (nil)

#set_clip(xoff, yoff, width, height) ⇒ nil

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.

Parameters:

  • xoff (Clutter::gfloat)

    X offset of the clip rectangle

  • yoff (Clutter::gfloat)

    Y offset of the clip rectangle

  • width (Clutter::gfloat)

    Width of the clip rectangle

  • height (Clutter::gfloat)

    Height of the clip rectangle

Returns:

  • (nil)

#set_content_scaling_filters(min_filter, mag_filter) ⇒ nil

Sets the minification and magnification filter to be applied when scaling the Clutter::Actor:content of a #ClutterActor.

The Clutter::Actor:minification-filter will be used when reducing the size of the content; the Clutter::Actor:magnification-filter will be used when increasing the size of the content.

Parameters:

Returns:

  • (nil)

#set_pivot_point(pivot_x, pivot_y) ⇒ nil

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.

Parameters:

  • pivot_x (Clutter::gfloat)

    the normalized X coordinate of the pivot point

  • pivot_y (Clutter::gfloat)

    the normalized Y coordinate of the pivot point

Returns:

  • (nil)

#set_position(x, y) ⇒ nil

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.

Parameters:

  • x (Clutter::gfloat)

    New left position of actor in pixels.

  • y (Clutter::gfloat)

    New top position of actor in pixels.

Returns:

  • (nil)

#set_rotation(axis, angle, x, y, z) ⇒ nil

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 clutter_actor_set_anchor_point(). If no anchor point is set, the upper left corner is assumed as the origin.

Parameters:

  • axis (Clutter::RotateAxis)

    the axis of rotation

  • angle (Float)

    the angle of rotation

  • x (Clutter::gfloat)

    X coordinate of the rotation center

  • y (Clutter::gfloat)

    Y coordinate of the rotation center

  • z (Clutter::gfloat)

    Z coordinate of the rotation center

Returns:

  • (nil)

#set_rotation_angle(axis, angle) ⇒ nil

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, #ClutterActor:rotation-angle-y, and Clutter::Actor:rotation-angle-z.

The center of rotation is established by the Clutter::Actor:pivot-point property.

Parameters:

  • axis (Clutter::RotateAxis)

    the axis to set the angle one

  • angle (Float)

    the angle of rotation, in degrees

Returns:

  • (nil)

#set_scale(scale_x, scale_y) ⇒ nil

Scales an actor with the given factors.

The scale transformation is relative the the Clutter::Actor:pivot-point.

The Clutter::Actor:scale-x and #ClutterActor:scale-y properties are animatable.

Parameters:

  • scale_x (Float)

    double factor to scale actor by horizontally.

  • scale_y (Float)

    double factor to scale actor by vertically.

Returns:

  • (nil)

#set_scale_full(scale_x, scale_y, center_x, center_y) ⇒ nil

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 and #ClutterActor:scale-y properties are animatable.

Parameters:

  • scale_x (Float)

    double factor to scale actor by horizontally.

  • scale_y (Float)

    double factor to scale actor by vertically.

  • center_x (Clutter::gfloat)

    X coordinate of the center of the scaling

  • center_y (Clutter::gfloat)

    Y coordinate of the center of the scaling

Returns:

  • (nil)

#set_scale_with_gravity(scale_x, scale_y, gravity) ⇒ nil

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 and #ClutterActor:scale-y properties are animatable.

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.

Returns:

  • (nil)

#set_shader_param(param, value) ⇒ nil

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

Parameters:

  • param (String)

    the name of the parameter

  • value (GObject::Value)

    the value of the parameter

Returns:

  • (nil)

#set_shader_param_float(param, value) ⇒ nil

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

Parameters:

  • param (String)

    the name of the parameter

  • value (Clutter::gfloat)

    the value of the parameter

Returns:

  • (nil)

#set_shader_param_int(param, value) ⇒ nil

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

Parameters:

  • param (String)

    the name of the parameter

  • value (Integer)

    the value of the parameter

Returns:

  • (nil)

#set_size(width, height) ⇒ nil

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.

Parameters:

  • width (Clutter::gfloat)

    New width of actor in pixels, or -1

  • height (Clutter::gfloat)

    New height of actor in pixels, or -1

Returns:

  • (nil)

#set_translation(translate_x, translate_y, translate_z) ⇒ nil

Sets an additional translation transformation on a Clutter::Actor, relative to the Clutter::Actor:pivot-point.

Parameters:

  • translate_x (Clutter::gfloat)

    the translation along the X axis

  • translate_y (Clutter::gfloat)

    the translation along the Y axis

  • translate_z (Clutter::gfloat)

    the translation along the Z axis

Returns:

  • (nil)

#set_z_rotation_from_gravity(angle, gravity) ⇒ nil

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.

Parameters:

  • angle (Float)

    the angle of rotation

  • gravity (Clutter::Gravity)

    the center point of the rotation

Returns:

  • (nil)

#shaderClutter::Shader

Queries the currently set Clutter::Shader on self.

Returns:

  • (Clutter::Shader)

    The currently set Clutter::Shader or nil if no shader is set.

#shader=(shader) ⇒ Boolean

Sets the Clutter::Shader to be used when rendering self.

If shader is nil this function will unset any currently set shader for the actor.

Any Clutter::Effect applied to self will take the precedence over the Clutter::Shader set using this function.

Parameters:

  • shader (Clutter::Shader)

    a Clutter::Shader or nil to unset the shader.

Returns:

  • (Boolean)

    true if the shader was successfully applied or removed

#should_pick_paintBoolean

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.

Returns:

  • (Boolean)

    true if the actor should paint its silhouette, false otherwise

#shownil

Flags an actor to be displayed. An actor that isn't shown will not be rendered on the stage.

Actors are visible by default.

If this function is called on an actor without a parent, the Clutter::Actor:show-on-set-parent will be set to true as a side effect.

Returns:

  • (nil)

#show_allnil

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

Returns:

  • (nil)

#show_on_set_parent=(show_on_set_parent) ⇒ Boolean

If true, the actor is automatically shown when parented.

Calling clutter_actor_hide() on an actor which has not been parented will set this property to false as a side effect.

Parameters:

  • show_on_set_parent (Boolean)

Returns:

  • (Boolean)

    show-on-set-parent

  • (Boolean)

    show-on-set-parent

#show_on_set_parent?Boolean

If true, the actor is automatically shown when parented.

Calling clutter_actor_hide() on an actor which has not been parented will set this property to false as a side effect.

Returns:

  • (Boolean)

    show-on-set-parent

#sizeClutter::Size

The size of the actor.

This property is a shorthand for setting and getting the Clutter::Actor:width and #ClutterActor:height at the same time.

The Clutter::Actor:size property is animatable.

Returns:

  • (Clutter::Size)

    size

#size=(size) ⇒ Clutter::Size

The size of the actor.

This property is a shorthand for setting and getting the Clutter::Actor:width and #ClutterActor:height at the same time.

The Clutter::Actor:size property is animatable.

Parameters:

  • size (Clutter::Size)

Returns:

  • (Clutter::Size)

    size

  • (Clutter::Size)

    size

#stageClutter::Stage

Retrieves the Clutter::Stage where actor is contained.

Returns:

#text_directionClutter::TextDirection

The direction of the text inside a Clutter::Actor.

Returns:

#text_direction=(text_direction) ⇒ Clutter::TextDirection

The direction of the text inside a Clutter::Actor.

Parameters:

Returns:

#transformClutter::Matrix

Overrides the transformations of a Clutter::Actor with a custom matrix.

The matrix specified by the Clutter::Actor:transform property is applied to the actor and its children relative to the actor's Clutter::Actor:allocation and #ClutterActor:pivot-point.

Application code should rarely need to use this function directly.

Setting this property with a Clutter::Matrix will set the Clutter::Actor:transform-set property to true as a side effect; setting this property with nil will set the Clutter::Actor:transform-set property to false.

The Clutter::Actor:transform property is animatable.

Returns:

  • (Clutter::Matrix)

    transform

#transform=(transform) ⇒ Clutter::Matrix

Overrides the transformations of a Clutter::Actor with a custom matrix.

The matrix specified by the Clutter::Actor:transform property is applied to the actor and its children relative to the actor's Clutter::Actor:allocation and #ClutterActor:pivot-point.

Application code should rarely need to use this function directly.

Setting this property with a Clutter::Matrix will set the Clutter::Actor:transform-set property to true as a side effect; setting this property with nil will set the Clutter::Actor:transform-set property to false.

The Clutter::Actor:transform property is animatable.

Parameters:

  • transform (Clutter::Matrix)

Returns:

  • (Clutter::Matrix)

    transform

  • (Clutter::Matrix)

    transform

#transform_set=(transform_set) ⇒ Boolean

Whether the Clutter::Actor:transform property is set.

Parameters:

  • transform_set (Boolean)

Returns:

  • (Boolean)

    transform-set

  • (Boolean)

    transform-set

#transform_set?Boolean

Whether the Clutter::Actor:transform property is set.

Returns:

  • (Boolean)

    transform-set

#transform_stage_point(x, y, x_out, y_out) ⇒ Boolean

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::ActorClass.paint() implementation

Parameters:

  • x (Clutter::gfloat)

    x screen coordinate of the point to unproject

  • y (Clutter::gfloat)

    y screen coordinate of the point to unproject

  • x_out (Clutter::gfloat)

    return location for the unprojected x coordinance

  • y_out (Clutter::gfloat)

    return location for the unprojected y coordinance

Returns:

  • (Boolean)

    true if conversion was successful.

#translation_xClutter::gfloat

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.

Returns:

  • (Clutter::gfloat)

    translation-x

#translation_x=(translation_x) ⇒ Clutter::gfloat

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.

Parameters:

  • translation_x (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    translation-x

  • (Clutter::gfloat)

    translation-x

#translation_yClutter::gfloat

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.

Returns:

  • (Clutter::gfloat)

    translation-y

#translation_y=(translation_y) ⇒ Clutter::gfloat

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.

Parameters:

  • translation_y (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    translation-y

  • (Clutter::gfloat)

    translation-y

#translation_zClutter::gfloat

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.

Returns:

  • (Clutter::gfloat)

    translation-z

#translation_z=(translation_z) ⇒ Clutter::gfloat

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.

Parameters:

  • translation_z (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    translation-z

  • (Clutter::gfloat)

    translation-z

#unmapnil

Unsets the %CLUTTER_ACTOR_MAPPED flag on the actor and possibly unmaps its children if they were mapped.

Calling this function is not encouraged: the default Clutter::Actor implementation of Clutter::ActorClass.unmap() will also unmap any eventual children by default when their parent is unmapped.

When overriding Clutter::ActorClass.unmap(), it is mandatory to chain up to the parent implementation.

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

Returns:

  • (nil)

#unparentnil

Removes the parent of self.

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

This function should only be called by legacy Clutter::Actors implementing the Clutter::Container interface.

Returns:

  • (nil)

#unrealizenil

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

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

This function should not be called by application code.

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

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

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

Returns:

  • (nil)

#unset_flags(flags) ⇒ nil

Unsets flags on self

This function will emit notifications for the changed properties

Parameters:

Returns:

  • (nil)

#visible=(visible) ⇒ Boolean

Whether the actor is set to be visible or not

See also Clutter::Actor:mapped

Parameters:

  • visible (Boolean)

Returns:

  • (Boolean)

    visible

  • (Boolean)

    visible

#visible?Boolean

Whether the actor is set to be visible or not

See also Clutter::Actor:mapped

Returns:

  • (Boolean)

    visible

#widthClutter::gfloat

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.

Returns:

  • (Clutter::gfloat)

    width

#width=(width) ⇒ Clutter::gfloat

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.

Parameters:

  • width (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    width

  • (Clutter::gfloat)

    width

#xClutter::gfloat

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.

Returns:

  • (Clutter::gfloat)

    x

#x=(x) ⇒ Clutter::gfloat

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.

Parameters:

  • x (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    x

  • (Clutter::gfloat)

    x

#x_alignClutter::ActorAlign

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.

Returns:

#x_align=(x_align) ⇒ Clutter::ActorAlign

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.

Parameters:

Returns:

#x_expandBoolean

Retrieves the value set with clutter_actor_set_x_expand().

See also: clutter_actor_needs_expand()

Returns:

  • (Boolean)

    true if the actor has been set to expand

#x_expand=(x_expand) ⇒ Boolean

Whether a layout manager should assign more space to the actor on the X axis.

Parameters:

  • x_expand (Boolean)

Returns:

  • (Boolean)

    x-expand

  • (Boolean)

    x-expand

#x_expand?Boolean

Whether a layout manager should assign more space to the actor on the X axis.

Returns:

  • (Boolean)

    x-expand

#yClutter::gfloat

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.

Returns:

  • (Clutter::gfloat)

    y

#y=(y) ⇒ Clutter::gfloat

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.

Parameters:

  • y (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    y

  • (Clutter::gfloat)

    y

#y_alignClutter::ActorAlign

The alignment of an actor on the Y axis, if the actor has been given extra space for its allocation.

Returns:

#y_align=(y_align) ⇒ Clutter::ActorAlign

The alignment of an actor on the Y axis, if the actor has been given extra space for its allocation.

Parameters:

Returns:

#y_expandBoolean

Retrieves the value set with clutter_actor_set_y_expand().

See also: clutter_actor_needs_expand()

Returns:

  • (Boolean)

    true if the actor has been set to expand

#y_expand=(y_expand) ⇒ Boolean

Whether a layout manager should assign more space to the actor on the Y axis.

Parameters:

  • y_expand (Boolean)

Returns:

  • (Boolean)

    y-expand

  • (Boolean)

    y-expand

#y_expand?Boolean

Whether a layout manager should assign more space to the actor on the Y axis.

Returns:

  • (Boolean)

    y-expand

#z_positionClutter::gfloat

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.

Returns:

  • (Clutter::gfloat)

    z-position

#z_position=(z_position) ⇒ Clutter::gfloat

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.

Parameters:

  • z_position (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    z-position

  • (Clutter::gfloat)

    z-position

#z_rotation_gravityClutter::Gravity

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.

Returns: