Class: Clutter::Actor
- Inherits:
-
GObject::InitiallyUnowned
- Object
- GObject::InitiallyUnowned
- Clutter::Actor
- Defined in:
- lib/clutter/actor.rb
Overview
Base class for actors.
Instance Method Summary collapse
-
#accessible ⇒ Atk::Object
Returns the accessible object that describes the actor to an assistive technology.
-
#actions ⇒ GLib::List<Clutter::Action>
Retrieves the list of actions applied to self.
-
#actions=(actions) ⇒ Clutter::Action
Adds a Clutter::Action to the actor.
-
#add_action(action) ⇒ nil
Adds action to the list of actions applied to self.
-
#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.
-
#add_child(child) ⇒ nil
Adds child to the children of self.
-
#add_constraint(constraint) ⇒ nil
Adds constraint to the list of Clutter::Constraints applied to self.
-
#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.
-
#add_effect(effect) ⇒ nil
Adds effect to the list of Clutter::Effects applied to self.
-
#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.
-
#add_transition(name, transition) ⇒ nil
Adds a transition to the Clutter::Actor's list of animations.
-
#allocate(box, flags) ⇒ nil
Assigns the size of a Clutter::Actor from the given box.
-
#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.
-
#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.
-
#allocate_preferred_size(flags) ⇒ nil
Allocates the natural size of self.
-
#allocation ⇒ Clutter::ActorBox
The allocation for the actor, in pixels.
-
#allocation=(allocation) ⇒ Clutter::ActorBox
The allocation for the actor, in pixels.
-
#anchor_gravity ⇒ Clutter::Gravity
The anchor point expressed as a Clutter::Gravity.
-
#anchor_gravity=(anchor_gravity) ⇒ Clutter::Gravity
The anchor point expressed as a Clutter::Gravity.
-
#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()).
-
#anchor_point_gravity ⇒ Clutter::Gravity
Retrieves the anchor position expressed as a Clutter::Gravity.
-
#anchor_x ⇒ Clutter::gfloat
The X coordinate of an actor's anchor point, relative to the actor coordinate space, in pixels.
-
#anchor_x=(anchor_x) ⇒ Clutter::gfloat
The X coordinate of an actor's anchor point, relative to the actor coordinate space, in pixels.
-
#anchor_y ⇒ Clutter::gfloat
The Y coordinate of an actor's anchor point, relative to the actor coordinate space, in pixels.
-
#anchor_y=(anchor_y) ⇒ Clutter::gfloat
The Y coordinate of an actor's anchor point, relative to the actor coordinate space, in pixels.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#animation ⇒ Clutter::Animation
Retrieves the Clutter::Animation used by actor, if clutter_actor_animate() has been called on actor.
-
#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).
-
#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).
-
#background_color ⇒ Clutter::Color
Paints a solid fill of the actor's allocation using the specified color.
-
#background_color=(background_color) ⇒ Clutter::Color
Paints a solid fill of the actor's allocation using the specified color.
-
#background_color_set=(background_color_set) ⇒ Boolean
Whether the Clutter::Actor:background-color property has been set.
-
#background_color_set? ⇒ Boolean
Whether the Clutter::Actor:background-color property has been set.
-
#bind_model(model, create_child_func, user_data, notify) ⇒ nil
Binds a GList::Model to a #ClutterActor.
-
#bind_model_with_properties(model, child_type, first_model_property, array) ⇒ nil
Binds a GList::Model to a #ClutterActor.
-
#child_transform ⇒ Clutter::Matrix
Applies a transformation matrix on each child of an actor.
-
#child_transform=(child_transform) ⇒ Clutter::Matrix
Applies a transformation matrix on each child of an actor.
-
#child_transform_set=(child_transform_set) ⇒ Boolean
Whether the Clutter::Actor:child-transform property is set.
-
#child_transform_set? ⇒ Boolean
Whether the Clutter::Actor:child-transform property is set.
-
#children ⇒ GLib::List<Clutter::Actor>
Retrieves the list of children of self.
-
#clear_actions ⇒ nil
Clears the list of actions applied to self.
-
#clear_constraints ⇒ nil
Clears the list of constraints applied to self.
-
#clear_effects ⇒ nil
Clears the list of effects applied to self.
-
#clip ⇒ Clutter::Geometry
The visible region of the actor, in actor-relative coordinates.
-
#clip=(clip) ⇒ Clutter::Geometry
The visible region of the actor, in actor-relative coordinates.
-
#clip_rect ⇒ Clutter::Rect
The visible region of the actor, in actor-relative coordinates, expressed as a Clutter::Rect.
-
#clip_rect=(clip_rect) ⇒ Clutter::Rect
The visible region of the actor, in actor-relative coordinates, expressed as a Clutter::Rect.
-
#clip_to_allocation ⇒ Boolean
Retrieves the value set using clutter_actor_set_clip_to_allocation().
-
#clip_to_allocation=(clip_to_allocation) ⇒ Boolean
Whether the clip region should track the allocated area of the actor.
-
#clip_to_allocation? ⇒ Boolean
Whether the clip region should track the allocated area of the actor.
-
#constraints ⇒ GLib::List<Clutter::Constraint>
Retrieves the list of constraints applied to self.
-
#constraints=(constraints) ⇒ Clutter::Constraint
Adds a Clutter::Constraint to the actor.
-
#contains(descendant) ⇒ Boolean
Determines if descendant is contained inside self (either as an immediate child, or as a deeper descendant).
-
#content ⇒ Clutter::Content
The Clutter::Content implementation that controls the content of the actor.
-
#content=(content) ⇒ Clutter::Content
The Clutter::Content implementation that controls the content of the actor.
-
#content_box ⇒ Clutter::ActorBox
The bounding box for the Clutter::Content used by the actor.
-
#content_box=(content_box) ⇒ Clutter::ActorBox
The bounding box for the Clutter::Content used by the actor.
-
#content_gravity ⇒ Clutter::ContentGravity
The alignment that should be honoured by the Clutter::Content set with the Clutter::Actor:content property.
-
#content_gravity=(content_gravity) ⇒ Clutter::ContentGravity
The alignment that should be honoured by the Clutter::Content set with the Clutter::Actor:content property.
-
#content_repeat ⇒ Clutter::ContentRepeat
The repeat policy for the actor's Clutter::Actor:content.
-
#content_repeat=(content_repeat) ⇒ Clutter::ContentRepeat
The repeat policy for the actor's Clutter::Actor:content.
-
#continue_paint ⇒ nil
Run the next stage of the paint sequence.
-
#create_pango_context ⇒ Pango::Context
Creates a Pango::Context for the given actor.
-
#create_pango_layout(text) ⇒ Pango::Layout
Creates a new Pango::Layout from the same #PangoContext used by the Clutter::Actor.
-
#default_paint_volume ⇒ Clutter::PaintVolume
Retrieves the default paint volume for self.
-
#depth ⇒ Clutter::gfloat
The position of the actor on the Z axis.
-
#depth=(depth) ⇒ Clutter::gfloat
The position of the actor on the Z axis.
-
#destroy ⇒ nil
Destroys an actor.
-
#destroy_all_children ⇒ nil
Destroys all children of self.
-
#detach_animation ⇒ nil
Detaches the Clutter::Animation used by actor, if clutter_actor_animate() has been called on actor.
-
#easing_delay ⇒ Integer
Retrieves the delay that should be applied when tweening animatable properties.
-
#easing_delay=(msecs) ⇒ nil
Sets the delay that should be applied before tweening animatable properties.
-
#easing_duration ⇒ Integer
Retrieves the duration of the tweening for animatable properties of self for the current easing state.
-
#easing_duration=(msecs) ⇒ nil
Sets the duration of the tweening for animatable properties of self for the current easing state.
-
#easing_mode ⇒ Clutter::AnimationMode
Retrieves the easing mode for the tweening of animatable properties of self for the current easing state.
-
#easing_mode=(mode) ⇒ nil
Sets the easing mode for the tweening of animatable properties of self.
-
#effect=(effect) ⇒ Clutter::Effect
Adds Clutter::Effect to the list of effects be applied on a #ClutterActor.
-
#effects ⇒ GLib::List<Clutter::Effect>
Retrieves the Clutter::Effects applied on self, if any.
-
#event(event, capture) ⇒ Boolean
This function is used to emit an event on the main stage.
-
#first_child ⇒ Clutter::Actor
The actor's first child.
-
#first_child=(first_child) ⇒ Clutter::Actor
The actor's first child.
-
#fixed_position_set ⇒ Boolean
Checks whether an actor has a fixed position set (and will thus be unaffected by any layout manager).
-
#fixed_position_set=(fixed_position_set) ⇒ Boolean
This flag controls whether the Clutter::Actor:fixed-x and Clutter::Actor:fixed-y properties are used.
-
#fixed_position_set? ⇒ Boolean
This flag controls whether the Clutter::Actor:fixed-x and Clutter::Actor:fixed-y properties are used.
-
#fixed_x ⇒ Clutter::gfloat
The fixed X position of the actor in pixels.
-
#fixed_x=(fixed_x) ⇒ Clutter::gfloat
The fixed X position of the actor in pixels.
-
#fixed_y ⇒ Clutter::gfloat
The fixed Y position of the actor in pixels.
-
#fixed_y=(fixed_y) ⇒ Clutter::gfloat
The fixed Y position of the actor in pixels.
-
#flags ⇒ Clutter::ActorFlags
Retrieves the flags set on self.
-
#flags=(flags) ⇒ nil
Sets flags on self.
-
#geometry=(geometry) ⇒ nil
Sets the actor's fixed position and forces its minimum and natural size, in pixels.
-
#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:.
-
#get_action(name) ⇒ Clutter::Action
Retrieves the Clutter::Action with the given name in the list of actions applied to self.
-
#get_allocation_box(box) ⇒ nil
Gets the layout box an actor has been assigned.
-
#get_allocation_geometry(geom) ⇒ nil
Gets the layout box an actor has been assigned.
-
#get_allocation_vertices(ancestor, verts) ⇒ nil
Calculates the transformed coordinates of the four corners of the actor in the plane of ancestor.
-
#get_anchor_point(anchor_x, anchor_y) ⇒ nil
Gets the current anchor point of the actor in pixels.
-
#get_background_color(color) ⇒ nil
Retrieves the color set using clutter_actor_set_background_color().
-
#get_child_at_index(index_) ⇒ Clutter::Actor
Retrieves the actor at the given index_ inside the list of children of self.
-
#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.
-
#get_clip(xoff, yoff, width, height) ⇒ nil
Gets the clip area for self, if any is set.
-
#get_constraint(name) ⇒ Clutter::Constraint
Retrieves the Clutter::Constraint with the given name in the list of constraints applied to self.
-
#get_content_box(box) ⇒ nil
Retrieves the bounding box for the Clutter::Content of self.
-
#get_content_scaling_filters(min_filter, mag_filter) ⇒ nil
Retrieves the values set using clutter_actor_set_content_scaling_filters().
-
#get_effect(name) ⇒ Clutter::Effect
Retrieves the Clutter::Effect with the given name in the list of effects applied to self.
-
#get_geometry(geometry) ⇒ nil
Gets the size and position of an actor relative to its parent actor.
-
#get_margin(margin) ⇒ nil
Retrieves all the components of the margin of a Clutter::Actor.
-
#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.
-
#get_pivot_point(pivot_x, pivot_y) ⇒ nil
Retrieves the coordinates of the Clutter::Actor:pivot-point.
-
#get_position(x, y) ⇒ nil
This function tries to "do what you mean" and tell you where the actor is, prior to any transformations.
-
#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.
-
#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).
-
#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.
-
#get_rotation(axis, x, y, z) ⇒ Float
Retrieves the angle and center of rotation on the given axis, set using clutter_actor_set_rotation().
-
#get_rotation_angle(axis) ⇒ Float
Retrieves the angle of rotation set by clutter_actor_set_rotation_angle().
-
#get_scale(scale_x, scale_y) ⇒ nil
Retrieves an actors scale factors.
-
#get_scale_center(center_x, center_y) ⇒ nil
Retrieves the scale center coordinate in pixels relative to the top left corner of the actor.
-
#get_size(width, height) ⇒ nil
This function tries to "do what you mean" and return the size an actor will have.
-
#get_transform(transform) ⇒ nil
Retrieves the current transformation matrix of a Clutter::Actor.
-
#get_transformation_matrix(matrix) ⇒ nil
Retrieves the transformations applied to self relative to its parent.
-
#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.
-
#get_transformed_position(x, y) ⇒ nil
Gets the absolute position of an actor, in pixels relative to the stage.
-
#get_transformed_size(width, height) ⇒ nil
Gets the absolute size of an actor in pixels, taking into account the scaling factors.
-
#get_transition(name) ⇒ Clutter::Transition
Retrieves the Clutter::Transition of a #ClutterActor by using the transition name.
-
#get_translation(translate_x, translate_y, translate_z) ⇒ nil
Retrieves the translation set using clutter_actor_set_translation().
-
#gid ⇒ Integer
Retrieves the unique id for self.
-
#grab_key_focus ⇒ nil
Sets the key focus of the Clutter::Stage including self to this Clutter::Actor.
-
#has_actions ⇒ Boolean
Returns whether the actor has any actions applied.
-
#has_allocation ⇒ Boolean
Checks if the actor has an up-to-date allocation assigned to it.
-
#has_clip ⇒ Boolean
Determines whether the actor has a clip area set or not.
-
#has_clip=(has_clip) ⇒ Boolean
Whether the actor has the Clutter::Actor:clip property set or not.
-
#has_clip? ⇒ Boolean
Whether the actor has the Clutter::Actor:clip property set or not.
-
#has_constraints ⇒ Boolean
Returns whether the actor has any constraints applied.
-
#has_effects ⇒ Boolean
Returns whether the actor has any effects applied.
-
#has_key_focus ⇒ Boolean
Checks whether self is the Clutter::Actor that has key focus.
-
#has_overlaps ⇒ Boolean
Asks the actor's implementation whether it may contain overlapping primitives.
-
#has_pointer ⇒ Boolean
Checks whether an actor contains the pointer of a Clutter::InputDevice.
-
#has_pointer=(has_pointer) ⇒ Boolean
Whether the actor contains the pointer of a Clutter::InputDevice or not.
-
#has_pointer? ⇒ Boolean
Whether the actor contains the pointer of a Clutter::InputDevice or not.
-
#height ⇒ Clutter::gfloat
Height of the actor (in pixels).
-
#height=(height) ⇒ Clutter::gfloat
Height of the actor (in pixels).
-
#hide ⇒ nil
Flags an actor to be hidden.
-
#hide_all ⇒ nil
Calls clutter_actor_hide() on all child actors (if any).
-
#initialize ⇒ Clutter::Actor
constructor
Creates a new Clutter::Actor.
-
#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.
-
#insert_child_at_index(child, index_) ⇒ nil
Inserts child into the list of children of self, using the given index_.
-
#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.
-
#is_in_clone_paint ⇒ Boolean
Checks whether self is being currently painted by a Clutter::Clone.
-
#is_mapped ⇒ Boolean
Checks whether a Clutter::Actor has been set as mapped.
-
#is_realized ⇒ Boolean
Checks whether a Clutter::Actor is realized.
-
#is_rotated ⇒ Boolean
Checks whether any rotation is applied to the actor.
-
#is_scaled ⇒ Boolean
Checks whether the actor is scaled in either dimension.
-
#is_visible ⇒ Boolean
Checks whether an actor is marked as visible.
-
#last_child ⇒ Clutter::Actor
The actor's last child.
-
#last_child=(last_child) ⇒ Clutter::Actor
The actor's last child.
-
#layout_manager ⇒ Clutter::LayoutManager
A delegate object for controlling the layout of the children of an actor.
-
#layout_manager=(layout_manager) ⇒ Clutter::LayoutManager
A delegate object for controlling the layout of the children of an actor.
-
#lower(above) ⇒ nil
Puts self below above.
-
#lower_bottom ⇒ nil
Lowers self to the bottom.
-
#magnification_filter ⇒ Clutter::ScalingFilter
Magnification-filter.
- #magnification_filter=(magnification_filter) ⇒ Clutter::ScalingFilter
-
#map ⇒ nil
Sets the %CLUTTER_ACTOR_MAPPED flag on the actor and possibly maps and realizes its children if they are visible.
-
#mapped=(mapped) ⇒ Boolean
Whether the actor is mapped (will be painted when the stage to which it belongs is mapped).
-
#mapped? ⇒ Boolean
Whether the actor is mapped (will be painted when the stage to which it belongs is mapped).
-
#margin=(margin) ⇒ nil
Sets all the components of the margin of a Clutter::Actor.
-
#margin_bottom ⇒ Clutter::gfloat
The margin (in pixels) from the bottom of the actor.
-
#margin_bottom=(margin_bottom) ⇒ Clutter::gfloat
The margin (in pixels) from the bottom of the actor.
-
#margin_left ⇒ Clutter::gfloat
The margin (in pixels) from the left of the actor.
-
#margin_left=(margin_left) ⇒ Clutter::gfloat
The margin (in pixels) from the left of the actor.
-
#margin_right ⇒ Clutter::gfloat
The margin (in pixels) from the right of the actor.
-
#margin_right=(margin_right) ⇒ Clutter::gfloat
The margin (in pixels) from the right of the actor.
-
#margin_top ⇒ Clutter::gfloat
The margin (in pixels) from the top of the actor.
-
#margin_top=(margin_top) ⇒ Clutter::gfloat
The margin (in pixels) from the top of the actor.
-
#min_height ⇒ Clutter::gfloat
A forced minimum height request for the actor, in pixels.
-
#min_height=(min_height) ⇒ Clutter::gfloat
A forced minimum height request for the actor, in pixels.
-
#min_height_set=(min_height_set) ⇒ Boolean
This flag controls whether the Clutter::Actor:min-height property is used.
-
#min_height_set? ⇒ Boolean
This flag controls whether the Clutter::Actor:min-height property is used.
-
#min_width ⇒ Clutter::gfloat
A forced minimum width request for the actor, in pixels.
-
#min_width=(min_width) ⇒ Clutter::gfloat
A forced minimum width request for the actor, in pixels.
-
#min_width_set=(min_width_set) ⇒ Boolean
This flag controls whether the Clutter::Actor:min-width property is used.
-
#min_width_set? ⇒ Boolean
This flag controls whether the Clutter::Actor:min-width property is used.
-
#minification_filter ⇒ Clutter::ScalingFilter
Minification-filter.
- #minification_filter=(minification_filter) ⇒ Clutter::ScalingFilter
-
#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.
-
#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.
-
#move_by(dx, dy) ⇒ nil
Moves an actor by the specified distance relative to its current position in pixels.
-
#n_children ⇒ Integer
Retrieves the number of children of self.
-
#name ⇒ String
The name of the actor.
-
#name=(name) ⇒ String
The name of the actor.
-
#natural_height ⇒ Clutter::gfloat
A forced natural height request for the actor, in pixels.
-
#natural_height=(natural_height) ⇒ Clutter::gfloat
A forced natural height request for the actor, in pixels.
-
#natural_height_set=(natural_height_set) ⇒ Boolean
This flag controls whether the Clutter::Actor:natural-height property is used.
-
#natural_height_set? ⇒ Boolean
This flag controls whether the Clutter::Actor:natural-height property is used.
-
#natural_width ⇒ Clutter::gfloat
A forced natural width request for the actor, in pixels.
-
#natural_width=(natural_width) ⇒ Clutter::gfloat
A forced natural width request for the actor, in pixels.
-
#natural_width_set=(natural_width_set) ⇒ Boolean
This flag controls whether the Clutter::Actor:natural-width property is used.
-
#natural_width_set? ⇒ Boolean
This flag controls whether the Clutter::Actor:natural-width property is used.
-
#needs_expand(orientation) ⇒ Boolean
Checks whether an actor, or any of its children, is set to expand horizontally or vertically.
-
#next_sibling ⇒ Clutter::Actor
Retrieves the sibling of self that comes after it in the list of children of self's parent.
-
#offscreen_redirect ⇒ Clutter::OffscreenRedirect
Determines the conditions in which the actor will be redirected to an offscreen framebuffer while being painted.
-
#offscreen_redirect=(offscreen_redirect) ⇒ Clutter::OffscreenRedirect
Determines the conditions in which the actor will be redirected to an offscreen framebuffer while being painted.
-
#opacity ⇒ Integer
Opacity of an actor, between 0 (fully transparent) and 255 (fully opaque).
-
#opacity=(opacity) ⇒ Integer
Opacity of an actor, between 0 (fully transparent) and 255 (fully opaque).
-
#paint ⇒ nil
Renders the actor to display.
-
#paint_opacity ⇒ Integer
Retrieves the absolute opacity of the actor, as it appears on the stage.
-
#paint_visibility ⇒ Boolean
Retrieves the 'paint' visibility of an actor recursively checking for non visible parents.
-
#paint_volume ⇒ Clutter::PaintVolume
Retrieves the paint volume of the passed Clutter::Actor, or nil when a paint volume can't be determined.
-
#pango_context ⇒ Pango::Context
Retrieves the Pango::Context for self.
-
#parent ⇒ Clutter::Actor
Retrieves the parent of self.
-
#parent=(parent) ⇒ nil
Sets the parent of self to parent.
-
#pivot_point ⇒ Clutter::Point
The point around which the scaling and rotation transformations occur.
-
#pivot_point=(pivot_point) ⇒ Clutter::Point
The point around which the scaling and rotation transformations occur.
-
#pivot_point_z ⇒ Clutter::gfloat
The Z component of the Clutter::Actor:pivot-point, expressed as a value along the Z axis.
-
#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.
-
#pop_internal ⇒ nil
Disables the effects of clutter_actor_push_internal().
-
#position ⇒ Clutter::Point
The position of the origin of the actor.
-
#position=(position) ⇒ Clutter::Point
The position of the origin of the actor.
-
#previous_sibling ⇒ Clutter::Actor
Retrieves the sibling of self that comes before it in the list of children of self's parent.
-
#push_internal ⇒ nil
Should be used by actors implementing the Clutter::Container and with internal children added through clutter_actor_set_parent(), for instance:.
-
#queue_redraw ⇒ nil
Queues up a redraw of an actor and any children.
-
#queue_redraw_with_clip(clip) ⇒ nil
Queues a redraw on self limited to a specific, actor-relative rectangular area.
-
#queue_relayout ⇒ nil
Indicates that the actor's size request or other layout-affecting properties may have changed.
-
#raise(below) ⇒ nil
Puts self above below.
-
#raise_top ⇒ nil
Raises self to the top.
-
#reactive ⇒ Boolean
Checks whether actor is marked as reactive.
-
#reactive=(reactive) ⇒ Boolean
Whether the actor is reactive to events or not.
-
#reactive? ⇒ Boolean
Whether the actor is reactive to events or not.
-
#realize ⇒ nil
Realization informs the actor that it is attached to a stage.
-
#realized=(realized) ⇒ Boolean
Whether the actor has been realized.
-
#realized? ⇒ Boolean
Whether the actor has been realized.
-
#remove_action(action) ⇒ nil
Removes action from the list of actions applied to self.
-
#remove_action_by_name(name) ⇒ nil
Removes the Clutter::Action with the given name from the list of actions applied to self.
-
#remove_all_children ⇒ nil
Removes all children of self.
-
#remove_all_transitions ⇒ nil
Removes all transitions associated to self.
-
#remove_child(child) ⇒ nil
Removes child from the children of self.
-
#remove_clip ⇒ nil
Removes clip area from self.
-
#remove_constraint(constraint) ⇒ nil
Removes constraint from the list of constraints applied to self.
-
#remove_constraint_by_name(name) ⇒ nil
Removes the Clutter::Constraint with the given name from the list of constraints applied to self.
-
#remove_effect(effect) ⇒ nil
Removes effect from the list of effects applied to self.
-
#remove_effect_by_name(name) ⇒ nil
Removes the Clutter::Effect with the given name from the list of effects applied to self.
-
#remove_transition(name) ⇒ nil
Removes the transition stored inside a Clutter::Actor using name identifier.
-
#reparent(new_parent) ⇒ nil
Resets the parent actor of self.
-
#replace_child(old_child, new_child) ⇒ nil
Replaces old_child with new_child in the list of children of self.
-
#request_mode ⇒ Clutter::RequestMode
Request mode for the Clutter::Actor.
-
#request_mode=(request_mode) ⇒ Clutter::RequestMode
Request mode for the Clutter::Actor.
-
#restore_easing_state ⇒ nil
Restores the easing state as it was prior to a call to clutter_actor_save_easing_state().
-
#rotation_angle_x ⇒ Float
The rotation angle on the X axis.
-
#rotation_angle_x=(rotation_angle_x) ⇒ Float
The rotation angle on the X axis.
-
#rotation_angle_y ⇒ Float
The rotation angle on the Y axis.
-
#rotation_angle_y=(rotation_angle_y) ⇒ Float
The rotation angle on the Y axis.
-
#rotation_angle_z ⇒ Float
The rotation angle on the Z axis.
-
#rotation_angle_z=(rotation_angle_z) ⇒ Float
The rotation angle on the Z axis.
-
#rotation_center_x ⇒ Clutter::Vertex
The rotation center on the X axis.
-
#rotation_center_x=(rotation_center_x) ⇒ Clutter::Vertex
The rotation center on the X axis.
-
#rotation_center_y ⇒ Clutter::Vertex
The rotation center on the Y axis.
-
#rotation_center_y=(rotation_center_y) ⇒ Clutter::Vertex
The rotation center on the Y axis.
-
#rotation_center_z ⇒ Clutter::Vertex
The rotation center on the Z axis.
-
#rotation_center_z=(rotation_center_z) ⇒ Clutter::Vertex
The rotation center on the Z axis.
-
#rotation_center_z_gravity ⇒ Clutter::Gravity
The rotation center on the Z axis expressed as a Clutter::Gravity.
-
#rotation_center_z_gravity=(rotation_center_z_gravity) ⇒ Clutter::Gravity
The rotation center on the Z axis expressed as a Clutter::Gravity.
-
#save_easing_state ⇒ nil
Saves the current easing state for animatable properties, and creates a new state with the default values for easing mode and duration.
-
#save_easing_state_without_block ⇒ nil
Saves the current easing state for animatable properties, and creates a new state with the default values for easing mode and duration.
-
#scale_center_x ⇒ Clutter::gfloat
The horizontal center point for scaling.
-
#scale_center_x=(scale_center_x) ⇒ Clutter::gfloat
The horizontal center point for scaling.
-
#scale_center_y ⇒ Clutter::gfloat
The vertical center point for scaling.
-
#scale_center_y=(scale_center_y) ⇒ Clutter::gfloat
The vertical center point for scaling.
-
#scale_gravity ⇒ Clutter::Gravity
The center point for scaling expressed as a Clutter::Gravity.
-
#scale_gravity=(scale_gravity) ⇒ Clutter::Gravity
The center point for scaling expressed as a Clutter::Gravity.
-
#scale_x ⇒ Float
The horizontal scale of the actor.
-
#scale_x=(scale_x) ⇒ Float
The horizontal scale of the actor.
-
#scale_y ⇒ Float
The vertical scale of the actor.
-
#scale_y=(scale_y) ⇒ Float
The vertical scale of the actor.
-
#scale_z ⇒ Float
The scale factor of the actor along the Z axis.
-
#scale_z=(scale_z) ⇒ Float
The scale factor of the actor along the Z axis.
-
#set_allocation(box, flags) ⇒ nil
Stores the allocation of self as defined by box.
-
#set_anchor_point(anchor_x, anchor_y) ⇒ nil
Sets an anchor point for self.
-
#set_child_above_sibling(child, sibling) ⇒ nil
Sets child to be above sibling in the list of children of self.
-
#set_child_at_index(child, index_) ⇒ nil
Changes the index of child in the list of children of self.
-
#set_child_below_sibling(child, sibling) ⇒ nil
Sets child to be below sibling in the list of children of self.
-
#set_clip(xoff, yoff, width, height) ⇒ nil
Sets clip area for self.
-
#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.
-
#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.
-
#set_position(x, y) ⇒ nil
Sets the actor's fixed position in pixels relative to any parent actor.
-
#set_rotation(axis, angle, x, y, z) ⇒ nil
Sets the rotation angle of self around the given axis.
-
#set_rotation_angle(axis, angle) ⇒ nil
Sets the angle of rotation of a Clutter::Actor on the given axis.
-
#set_scale(scale_x, scale_y) ⇒ nil
Scales an actor with the given factors.
-
#set_scale_full(scale_x, scale_y, center_x, center_y) ⇒ nil
Scales an actor with the given factors around the given center point.
-
#set_scale_with_gravity(scale_x, scale_y, gravity) ⇒ nil
Scales an actor with the given factors around the given center point.
-
#set_shader_param(param, value) ⇒ nil
Sets the value for a named parameter of the shader applied to actor.
-
#set_shader_param_float(param, value) ⇒ nil
Sets the value for a named float parameter of the shader applied to actor.
-
#set_shader_param_int(param, value) ⇒ nil
Sets the value for a named int parameter of the shader applied to actor.
-
#set_size(width, height) ⇒ nil
Sets the actor's size request in pixels.
-
#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.
-
#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.
-
#shader ⇒ Clutter::Shader
Queries the currently set Clutter::Shader on self.
-
#shader=(shader) ⇒ Boolean
Sets the Clutter::Shader to be used when rendering self.
-
#should_pick_paint ⇒ Boolean
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.
-
#show ⇒ nil
Flags an actor to be displayed.
-
#show_all ⇒ nil
Calls clutter_actor_show() on all children of an actor (if any).
-
#show_on_set_parent=(show_on_set_parent) ⇒ Boolean
If true, the actor is automatically shown when parented.
-
#show_on_set_parent? ⇒ Boolean
If true, the actor is automatically shown when parented.
-
#size ⇒ Clutter::Size
The size of the actor.
-
#size=(size) ⇒ Clutter::Size
The size of the actor.
-
#stage ⇒ Clutter::Stage
Retrieves the Clutter::Stage where actor is contained.
-
#text_direction ⇒ Clutter::TextDirection
The direction of the text inside a Clutter::Actor.
-
#text_direction=(text_direction) ⇒ Clutter::TextDirection
The direction of the text inside a Clutter::Actor.
-
#transform ⇒ Clutter::Matrix
Overrides the transformations of a Clutter::Actor with a custom matrix.
-
#transform=(transform) ⇒ Clutter::Matrix
Overrides the transformations of a Clutter::Actor with a custom matrix.
-
#transform_set=(transform_set) ⇒ Boolean
Whether the Clutter::Actor:transform property is set.
-
#transform_set? ⇒ Boolean
Whether the Clutter::Actor:transform property is set.
-
#transform_stage_point(x, y, x_out, y_out) ⇒ Boolean
This function translates screen coordinates (x, y) to coordinates relative to the actor.
-
#translation_x ⇒ Clutter::gfloat
An additional translation applied along the X axis, relative to the actor's Clutter::Actor:pivot-point.
-
#translation_x=(translation_x) ⇒ Clutter::gfloat
An additional translation applied along the X axis, relative to the actor's Clutter::Actor:pivot-point.
-
#translation_y ⇒ Clutter::gfloat
An additional translation applied along the Y axis, relative to the actor's Clutter::Actor:pivot-point.
-
#translation_y=(translation_y) ⇒ Clutter::gfloat
An additional translation applied along the Y axis, relative to the actor's Clutter::Actor:pivot-point.
-
#translation_z ⇒ Clutter::gfloat
An additional translation applied along the Z axis, relative to the actor's Clutter::Actor:pivot-point.
-
#translation_z=(translation_z) ⇒ Clutter::gfloat
An additional translation applied along the Z axis, relative to the actor's Clutter::Actor:pivot-point.
-
#unmap ⇒ nil
Unsets the %CLUTTER_ACTOR_MAPPED flag on the actor and possibly unmaps its children if they were mapped.
-
#unparent ⇒ nil
Removes the parent of self.
-
#unrealize ⇒ nil
Unrealization informs the actor that it may be being destroyed or moved to another stage.
-
#unset_flags(flags) ⇒ nil
Unsets flags on self.
-
#visible=(visible) ⇒ Boolean
Whether the actor is set to be visible or not.
-
#visible? ⇒ Boolean
Whether the actor is set to be visible or not.
-
#width ⇒ Clutter::gfloat
Width of the actor (in pixels).
-
#width=(width) ⇒ Clutter::gfloat
Width of the actor (in pixels).
-
#x ⇒ Clutter::gfloat
X coordinate of the actor in pixels.
-
#x=(x) ⇒ Clutter::gfloat
X coordinate of the actor in pixels.
-
#x_align ⇒ Clutter::ActorAlign
The alignment of an actor on the X axis, if the actor has been given extra space for its allocation.
-
#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.
-
#x_expand ⇒ Boolean
Retrieves the value set with clutter_actor_set_x_expand().
-
#x_expand=(x_expand) ⇒ Boolean
Whether a layout manager should assign more space to the actor on the X axis.
-
#x_expand? ⇒ Boolean
Whether a layout manager should assign more space to the actor on the X axis.
-
#y ⇒ Clutter::gfloat
Y coordinate of the actor in pixels.
-
#y=(y) ⇒ Clutter::gfloat
Y coordinate of the actor in pixels.
-
#y_align ⇒ Clutter::ActorAlign
The alignment of an actor on the Y axis, if the actor has been given extra space for its allocation.
-
#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.
-
#y_expand ⇒ Boolean
Retrieves the value set with clutter_actor_set_y_expand().
-
#y_expand=(y_expand) ⇒ Boolean
Whether a layout manager should assign more space to the actor on the Y axis.
-
#y_expand? ⇒ Boolean
Whether a layout manager should assign more space to the actor on the Y axis.
-
#z_position ⇒ Clutter::gfloat
The actor's position on the Z axis, relative to the parent's transformations.
-
#z_position=(z_position) ⇒ Clutter::gfloat
The actor's position on the Z axis, relative to the parent's transformations.
-
#z_rotation_gravity ⇒ Clutter::Gravity
Retrieves the center for the rotation around the Z axis as a compass direction.
Constructor Details
#initialize ⇒ Clutter::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
#accessible ⇒ Atk::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.
#actions ⇒ GLib::List<Clutter::Action>
Retrieves the list of actions applied to self
#actions=(actions) ⇒ Clutter::Action
Adds a Clutter::Action to the actor
#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
#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);
#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.
#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.
#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);
#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.
#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);
#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.
#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.
#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.
#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.
#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.
#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
#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
#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.
#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.
#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.
#anchor_point_gravity ⇒ Clutter::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.
#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.
#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.
#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.
#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.
#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);
...
#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.
#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.
#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.
#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.
#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.
#animation ⇒ Clutter::Animation
Retrieves the Clutter::Animation used by actor, if clutter_actor_animate() has been called on actor.
#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().
#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)
#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.
#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.
#background_color_set=(background_color_set) ⇒ Boolean
Whether the Clutter::Actor:background-color property has been set.
#background_color_set? ⇒ Boolean
Whether the Clutter::Actor:background-color property has been 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.
#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()
#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.
#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.
#child_transform_set=(child_transform_set) ⇒ Boolean
Whether the Clutter::Actor:child-transform property is set.
#child_transform_set? ⇒ Boolean
Whether the Clutter::Actor:child-transform property is set.
#children ⇒ GLib::List<Clutter::Actor>
Retrieves the list of children of self.
#clear_actions ⇒ nil
Clears the list of actions applied to self
#clear_constraints ⇒ nil
Clears the list of constraints applied to self
#clear_effects ⇒ nil
Clears the list of effects applied to self
#clip ⇒ Clutter::Geometry
The visible region of the actor, in actor-relative coordinates
#clip=(clip) ⇒ Clutter::Geometry
The visible region of the actor, in actor-relative coordinates
#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.
#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.
#clip_to_allocation ⇒ Boolean
Retrieves the value set using clutter_actor_set_clip_to_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().
#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().
#constraints ⇒ GLib::List<Clutter::Constraint>
Retrieves the list of constraints applied to self
#constraints=(constraints) ⇒ Clutter::Constraint
Adds a Clutter::Constraint to the actor
#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.
#content ⇒ Clutter::Content
The Clutter::Content implementation that controls the content of the actor.
#content=(content) ⇒ Clutter::Content
The Clutter::Content implementation that controls the content of the actor.
#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.
#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.
#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.
#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.
#content_repeat ⇒ Clutter::ContentRepeat
The repeat policy for the actor's Clutter::Actor:content.
#content_repeat=(content_repeat) ⇒ Clutter::ContentRepeat
The repeat policy for the actor's Clutter::Actor:content.
#continue_paint ⇒ nil
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.
#create_pango_context ⇒ Pango::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().
#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.
#default_paint_volume ⇒ Clutter::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.
#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.
#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.
#destroy ⇒ nil
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().
#destroy_all_children ⇒ nil
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.
#detach_animation ⇒ nil
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.
#easing_delay ⇒ Integer
Retrieves the delay that should be applied when tweening animatable properties.
#easing_delay=(msecs) ⇒ nil
Sets the delay that should be applied before tweening animatable properties.
#easing_duration ⇒ Integer
Retrieves the duration of the tweening for animatable properties of self for the current easing state.
#easing_duration=(msecs) ⇒ nil
Sets the duration of the tweening for animatable properties of self for the current easing state.
#easing_mode ⇒ Clutter::AnimationMode
Retrieves the easing mode for the tweening of animatable properties of self for the current easing state.
#easing_mode=(mode) ⇒ nil
Sets the easing mode for the tweening of animatable properties of self.
#effect=(effect) ⇒ Clutter::Effect
Adds Clutter::Effect to the list of effects be applied on a #ClutterActor
#effects ⇒ GLib::List<Clutter::Effect>
Retrieves the Clutter::Effects applied on self, if any
#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.
#first_child ⇒ Clutter::Actor
The actor's first child.
#first_child=(first_child) ⇒ Clutter::Actor
The actor's first child.
#fixed_position_set ⇒ Boolean
Checks whether an actor has a fixed position set (and will thus be unaffected by any layout manager).
#fixed_position_set=(fixed_position_set) ⇒ Boolean
This flag controls whether the Clutter::Actor:fixed-x and Clutter::Actor:fixed-y properties are used
#fixed_position_set? ⇒ Boolean
This flag controls whether the Clutter::Actor:fixed-x and Clutter::Actor:fixed-y properties are used
#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
#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
#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
#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
#flags ⇒ Clutter::ActorFlags
Retrieves the flags set on self
#flags=(flags) ⇒ nil
Sets flags on self
This function will emit notifications for the changed properties
#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().
#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)
#get_action(name) ⇒ Clutter::Action
Retrieves the Clutter::Action with the given name in the list of actions applied to self
#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.
#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.
#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().
#get_anchor_point(anchor_x, anchor_y) ⇒ nil
Gets the current anchor point of the actor in pixels.
#get_background_color(color) ⇒ nil
Retrieves the color set using clutter_actor_set_background_color().
#get_child_at_index(index_) ⇒ Clutter::Actor
Retrieves the actor at the given index_ inside the list of children of self.
#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.
#get_clip(xoff, yoff, width, height) ⇒ nil
Gets the clip area for self, if any is set.
#get_constraint(name) ⇒ Clutter::Constraint
Retrieves the Clutter::Constraint with the given name in the list of constraints applied to self
#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.
#get_content_scaling_filters(min_filter, mag_filter) ⇒ nil
Retrieves the values set using clutter_actor_set_content_scaling_filters().
#get_effect(name) ⇒ Clutter::Effect
Retrieves the Clutter::Effect with the given name in the list of effects applied to self
#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.
#get_margin(margin) ⇒ nil
Retrieves all the components of the margin of a Clutter::Actor.
#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.
#get_pivot_point(pivot_x, pivot_y) ⇒ nil
Retrieves the coordinates of the Clutter::Actor:pivot-point.
#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.
#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.
#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.
#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.
#get_rotation(axis, x, y, z) ⇒ Float
Retrieves the angle and center of rotation on the given axis, set using clutter_actor_set_rotation().
#get_rotation_angle(axis) ⇒ Float
Retrieves the angle of rotation set by clutter_actor_set_rotation_angle().
#get_scale(scale_x, scale_y) ⇒ nil
Retrieves an actors scale factors.
#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.
#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().
#get_transform(transform) ⇒ nil
Retrieves the current transformation matrix of a Clutter::Actor.
#get_transformation_matrix(matrix) ⇒ nil
Retrieves the transformations applied to self relative to its parent.
#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().
#get_transformed_position(x, y) ⇒ nil
Gets the absolute position of an actor, in pixels relative to the stage.
#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.
#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.
#get_translation(translate_x, translate_y, translate_z) ⇒ nil
Retrieves the translation set using clutter_actor_set_translation().
#gid ⇒ Integer
Retrieves the unique id for self.
#grab_key_focus ⇒ nil
Sets the key focus of the Clutter::Stage including self to this Clutter::Actor.
#has_actions ⇒ Boolean
Returns whether the actor has any actions applied.
#has_allocation ⇒ Boolean
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.
#has_clip ⇒ Boolean
Determines whether the actor has a clip area set or not.
#has_clip=(has_clip) ⇒ Boolean
Whether the actor has the Clutter::Actor:clip property set or not
#has_clip? ⇒ Boolean
Whether the actor has the Clutter::Actor:clip property set or not
#has_constraints ⇒ Boolean
Returns whether the actor has any constraints applied.
#has_effects ⇒ Boolean
Returns whether the actor has any effects applied.
#has_key_focus ⇒ Boolean
Checks whether self is the Clutter::Actor that has key focus
#has_overlaps ⇒ Boolean
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.
#has_pointer ⇒ Boolean
Checks whether an actor contains the pointer of a Clutter::InputDevice
#has_pointer=(has_pointer) ⇒ Boolean
Whether the actor contains the pointer of a Clutter::InputDevice or not.
#has_pointer? ⇒ Boolean
Whether the actor contains the pointer of a Clutter::InputDevice or not.
#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.
#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.
#hide ⇒ nil
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.
#hide_all ⇒ nil
Calls clutter_actor_hide() on all child actors (if any).
#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.
#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.
#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.
#is_in_clone_paint ⇒ Boolean
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
#is_mapped ⇒ Boolean
Checks whether a Clutter::Actor has been set as mapped.
See also %CLUTTER_ACTOR_IS_MAPPED and Clutter::Actor:mapped
#is_realized ⇒ Boolean
Checks whether a Clutter::Actor is realized.
See also %CLUTTER_ACTOR_IS_REALIZED and Clutter::Actor:realized.
#is_rotated ⇒ Boolean
Checks whether any rotation is applied to the actor.
#is_scaled ⇒ Boolean
Checks whether the actor is scaled in either dimension.
#is_visible ⇒ Boolean
Checks whether an actor is marked as visible.
See also %CLUTTER_ACTOR_IS_VISIBLE and Clutter::Actor:visible.
#last_child ⇒ Clutter::Actor
The actor's last child.
#last_child=(last_child) ⇒ Clutter::Actor
The actor's last child.
#layout_manager ⇒ Clutter::LayoutManager
A delegate object for controlling the layout of the children of an actor.
#layout_manager=(layout_manager) ⇒ Clutter::LayoutManager
A delegate object for controlling the layout of the children of an actor.
#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.
#lower_bottom ⇒ nil
Lowers self to the bottom.
This function calls clutter_actor_lower() internally.
#magnification_filter ⇒ Clutter::ScalingFilter
Returns magnification-filter.
#magnification_filter=(magnification_filter) ⇒ Clutter::ScalingFilter
#map ⇒ nil
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.
#mapped=(mapped) ⇒ Boolean
Whether the actor is mapped (will be painted when the stage to which it belongs is mapped)
#mapped? ⇒ Boolean
Whether the actor is mapped (will be painted when the stage to which it belongs is mapped)
#margin=(margin) ⇒ nil
Sets all the components of the margin of a Clutter::Actor.
#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.
#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.
#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.
#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.
#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.
#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.
#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.
#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.
#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.
#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.
#min_height_set=(min_height_set) ⇒ Boolean
This flag controls whether the Clutter::Actor:min-height property is used
#min_height_set? ⇒ Boolean
This flag controls whether the Clutter::Actor:min-height property is used
#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.
#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.
#min_width_set=(min_width_set) ⇒ Boolean
This flag controls whether the Clutter::Actor:min-width property is used
#min_width_set? ⇒ Boolean
This flag controls whether the Clutter::Actor:min-width property is used
#minification_filter ⇒ Clutter::ScalingFilter
Returns minification-filter.
#minification_filter=(minification_filter) ⇒ Clutter::ScalingFilter
#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.
#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.
#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().
#n_children ⇒ Integer
Retrieves the number of children of self.
#name ⇒ String
The name of the actor
#name=(name) ⇒ String
The name of the actor
#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
#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
#natural_height_set=(natural_height_set) ⇒ Boolean
This flag controls whether the Clutter::Actor:natural-height property is used
#natural_height_set? ⇒ Boolean
This flag controls whether the Clutter::Actor:natural-height property is used
#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
#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
#natural_width_set=(natural_width_set) ⇒ Boolean
This flag controls whether the Clutter::Actor:natural-width property is used
#natural_width_set? ⇒ Boolean
This flag controls whether the Clutter::Actor:natural-width property is used
#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().
#next_sibling ⇒ Clutter::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.
#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.
#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.
#opacity ⇒ Integer
Opacity of an actor, between 0 (fully transparent) and 255 (fully opaque)
The Clutter::Actor:opacity property is animatable.
#opacity=(opacity) ⇒ Integer
Opacity of an actor, between 0 (fully transparent) and 255 (fully opaque)
The Clutter::Actor:opacity property is animatable.
#paint ⇒ nil
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.
#paint_opacity ⇒ Integer
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.
#paint_visibility ⇒ Boolean
Retrieves the 'paint' visibility of an actor recursively checking for non visible parents.
This is by definition the same as %CLUTTER_ACTOR_IS_MAPPED.
#paint_volume ⇒ Clutter::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().)
#pango_context ⇒ Pango::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.
#parent ⇒ Clutter::Actor
Retrieves the parent of self.
#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.
#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.
#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.
#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.
#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.
#pop_internal ⇒ nil
Disables the effects of clutter_actor_push_internal().
#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.
#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.
#previous_sibling ⇒ Clutter::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.
#push_internal ⇒ nil
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.
#queue_redraw ⇒ nil
Queues up a redraw of an actor and any children. The redraw occurs once the main loop becomes idle (after the current batch of events has been processed, roughly).
Applications rarely need to call this, as redraws are handled automatically by modification functions.
This function will not do anything if self is not visible, or if the actor is inside an invisible part of the scenegraph.
Also be aware that painting is a NOP for actors with an opacity of 0
When you are implementing a custom actor you must queue a redraw whenever some private state changes that will affect painting or picking of your actor.
#queue_redraw_with_clip(clip) ⇒ 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().
#queue_relayout ⇒ nil
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.
#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.
#raise_top ⇒ nil
Raises self to the top.
This function calls clutter_actor_raise() internally.
#reactive ⇒ Boolean
Checks whether actor is marked as reactive.
#reactive=(reactive) ⇒ Boolean
Whether the actor is reactive to events or not
Only reactive actors will emit event-related signals
#reactive? ⇒ Boolean
Whether the actor is reactive to events or not
Only reactive actors will emit event-related signals
#realize ⇒ nil
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.
#realized=(realized) ⇒ Boolean
Whether the actor has been realized
#realized? ⇒ Boolean
Whether the actor has been 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
#remove_action_by_name(name) ⇒ nil
Removes the Clutter::Action with the given name from the list of actions applied to self
#remove_all_children ⇒ nil
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().
#remove_all_transitions ⇒ nil
Removes all transitions associated to self.
#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.
#remove_clip ⇒ nil
Removes clip area from self.
#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
#remove_constraint_by_name(name) ⇒ nil
Removes the Clutter::Constraint with the given name from the list of constraints applied to self
#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
#remove_effect_by_name(name) ⇒ nil
Removes the Clutter::Effect with the given name from the list of effects applied to self
#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.
#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.
#replace_child(old_child, new_child) ⇒ nil
Replaces old_child with new_child in the list of children of self.
#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.
#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.
#restore_easing_state ⇒ nil
Restores the easing state as it was prior to a call to clutter_actor_save_easing_state().
#rotation_angle_x ⇒ Float
The rotation angle on the X axis.
The Clutter::Actor:rotation-angle-x property is animatable.
#rotation_angle_x=(rotation_angle_x) ⇒ Float
The rotation angle on the X axis.
The Clutter::Actor:rotation-angle-x property is animatable.
#rotation_angle_y ⇒ Float
The rotation angle on the Y axis
The Clutter::Actor:rotation-angle-y property is animatable.
#rotation_angle_y=(rotation_angle_y) ⇒ Float
The rotation angle on the Y axis
The Clutter::Actor:rotation-angle-y property is animatable.
#rotation_angle_z ⇒ Float
The rotation angle on the Z axis
The Clutter::Actor:rotation-angle-z property is animatable.
#rotation_angle_z=(rotation_angle_z) ⇒ Float
The rotation angle on the Z axis
The Clutter::Actor:rotation-angle-z property is animatable.
#rotation_center_x ⇒ Clutter::Vertex
The rotation center on the X axis.
#rotation_center_x=(rotation_center_x) ⇒ Clutter::Vertex
The rotation center on the X axis.
#rotation_center_y ⇒ Clutter::Vertex
The rotation center on the Y axis.
#rotation_center_y=(rotation_center_y) ⇒ Clutter::Vertex
The rotation center on the Y axis.
#rotation_center_z ⇒ Clutter::Vertex
The rotation center on the Z axis.
#rotation_center_z=(rotation_center_z) ⇒ Clutter::Vertex
The rotation center on the Z axis.
#rotation_center_z_gravity ⇒ Clutter::Gravity
The rotation center on the Z axis expressed as a Clutter::Gravity.
#rotation_center_z_gravity=(rotation_center_z_gravity) ⇒ Clutter::Gravity
The rotation center on the Z axis expressed as a Clutter::Gravity.
#save_easing_state ⇒ nil
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.
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_block ⇒ nil
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.
|
|
# File 'lib/clutter/actor.rb', line 20
|
#scale_center_x ⇒ Clutter::gfloat
The horizontal center point for scaling
#scale_center_x=(scale_center_x) ⇒ Clutter::gfloat
The horizontal center point for scaling
#scale_center_y ⇒ Clutter::gfloat
The vertical center point for scaling
#scale_center_y=(scale_center_y) ⇒ Clutter::gfloat
The vertical center point for scaling
#scale_gravity ⇒ Clutter::Gravity
The center point for scaling expressed as a Clutter::Gravity
#scale_gravity=(scale_gravity) ⇒ Clutter::Gravity
The center point for scaling expressed as a Clutter::Gravity
#scale_x ⇒ Float
The horizontal scale of the actor.
The Clutter::Actor:scale-x property is animatable.
#scale_x=(scale_x) ⇒ Float
The horizontal scale of the actor.
The Clutter::Actor:scale-x property is animatable.
#scale_y ⇒ Float
The vertical scale of the actor.
The Clutter::Actor:scale-y property is animatable.
#scale_y=(scale_y) ⇒ Float
The vertical scale of the actor.
The Clutter::Actor:scale-y property is animatable.
#scale_z ⇒ Float
The scale factor of the actor along the Z axis.
The Clutter::Actor:scale-y property is animatable.
#scale_z=(scale_z) ⇒ Float
The scale factor of the actor along the Z axis.
The Clutter::Actor:scale-y property is animatable.
#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);
}
#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.
#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.
#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.
#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.
#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.
#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.
#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.
#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.
#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.
#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.
#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.
#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.
#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.
#set_shader_param(param, value) ⇒ nil
Sets the value for a named parameter of the shader applied to actor.
#set_shader_param_float(param, value) ⇒ nil
Sets the value for a named float parameter of the shader applied to actor.
#set_shader_param_int(param, value) ⇒ nil
Sets the value for a named int parameter of the shader applied to actor.
#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.
#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.
#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.
#shader ⇒ Clutter::Shader
Queries the currently set Clutter::Shader on self.
#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.
#should_pick_paint ⇒ Boolean
Should be called inside the implementation of the Clutter::Actor::pick virtual function in order to check whether the actor should paint itself in pick mode or not.
This function should never be called directly by applications.
#show ⇒ nil
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.
#show_all ⇒ nil
Calls clutter_actor_show() on all children of an actor (if any).
#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.
#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.
#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.
#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.
#stage ⇒ Clutter::Stage
Retrieves the Clutter::Stage where actor is contained.
#text_direction ⇒ Clutter::TextDirection
The direction of the text inside a Clutter::Actor.
#text_direction=(text_direction) ⇒ Clutter::TextDirection
The direction of the text inside a Clutter::Actor.
#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.
#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.
#transform_set=(transform_set) ⇒ Boolean
Whether the Clutter::Actor:transform property is set.
#transform_set? ⇒ Boolean
Whether the Clutter::Actor:transform property is 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
#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.
#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.
#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.
#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.
#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.
#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.
#unmap ⇒ nil
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.
#unparent ⇒ nil
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.
#unrealize ⇒ nil
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.
#unset_flags(flags) ⇒ nil
Unsets flags on self
This function will emit notifications for the changed properties
#visible=(visible) ⇒ Boolean
Whether the actor is set to be visible or not
See also Clutter::Actor:mapped
#visible? ⇒ Boolean
Whether the actor is set to be visible or not
See also Clutter::Actor:mapped
#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.
#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.
#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.
#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.
#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.
#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.
#x_expand ⇒ Boolean
Retrieves the value set with clutter_actor_set_x_expand().
See also: clutter_actor_needs_expand()
#x_expand=(x_expand) ⇒ Boolean
Whether a layout manager should assign more space to the actor on the X axis.
#x_expand? ⇒ Boolean
Whether a layout manager should assign more space to the actor on the X axis.
#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.
#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.
#y_align ⇒ Clutter::ActorAlign
The alignment of an actor on the Y axis, if the actor has been given extra space for its allocation.
#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.
#y_expand ⇒ Boolean
Retrieves the value set with clutter_actor_set_y_expand().
See also: clutter_actor_needs_expand()
#y_expand=(y_expand) ⇒ Boolean
Whether a layout manager should assign more space to the actor on the Y axis.
#y_expand? ⇒ Boolean
Whether a layout manager should assign more space to the actor on the Y axis.
#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.
#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.
#z_rotation_gravity ⇒ Clutter::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.