Gjsify LogoGjsify Logo

The #ClutterTexture structure contains only private data and should be accessed using the provided API

Hierarchy

Index

Constructors

Properties

Methods

Constructors

Properties

actions: Clutter.Action

Adds a #ClutterAction to the actor

allocation: 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 #ClutterGravity

It is highly recommended not to use #ClutterActor:anchor-x, #ClutterActor: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 #ClutterActor:pivot-point property instead, as it will affect only the transformations.

anchor_x: number

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

It is highly recommended not to use #ClutterActor:anchor-x, #ClutterActor: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 #ClutterActor:pivot-point property instead, as it will affect only the transformations.

anchor_y: number

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

It is highly recommended not to use #ClutterActor:anchor-x, #ClutterActor: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 #ClutterActor:pivot-point property instead, as it will affect only the transformations.

background_color: Clutter.Color

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

The #ClutterActor:background-color property is animatable.

background_color_set: boolean

Whether the #ClutterActor:background-color property has been set.

child_transform: Clutter.Matrix

Applies a transformation matrix on each child of an actor.

Setting this property with a #ClutterMatrix will set the #ClutterActor:child-transform-set property to %TRUE as a side effect; setting this property with %NULL will set the #ClutterActor:child-transform-set property to %FALSE.

The #ClutterActor:child-transform property is animatable.

child_transform_set: boolean

Whether the #ClutterActor:child-transform property is set.

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 #ClutterRect.

Setting this property to %NULL will unset the existing clip.

Setting this property will change the #ClutterActor:has-clip property as a side effect.

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

Adds a #ClutterConstraint to the actor

content: Clutter.Content

The #ClutterContent implementation that controls the content of the actor.

content_box: ActorBox

The bounding box for the #ClutterContent used by the actor.

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

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

content_gravity: ContentGravity

The alignment that should be honoured by the #ClutterContent set with the #ClutterActor:content property.

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

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

The #ClutterActor:content-gravity property is animatable.

content_repeat: ContentRepeat

The repeat policy for the actor's #ClutterActor:content.

depth: number

The position of the actor on the Z axis.

The #ClutterActor:depth property is relative to the parent's modelview matrix.

Setting this property will call #ClutterContainerIface.sort_depth_order() which is usually a no-op, and it's most likely not what you want.

The #ClutterActor:depth property is animatable.

disable_slicing: boolean
effect: Clutter.Effect

Adds #ClutterEffect to the list of effects be applied on a #ClutterActor

filename: string

The path of the file containing the image data to be displayed by the texture.

This property is unset when using the clutter_texture_set_from_*_data() family of functions.

filter_quality: TextureQuality
first_child: Clutter.Actor

The actor's first child.

fixed_position_set: boolean

This flag controls whether the #ClutterActor:fixed-x and #ClutterActor:fixed-y properties are used

fixed_x: number

The fixed X position of the actor in pixels.

Writing this property sets #ClutterActor:fixed-position-set property as well, as a side effect

fixed_y: number

The fixed Y position of the actor in pixels.

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

flags: number

#ClutterActorFlags

field
g_type_instance: TypeInstance
has_clip: boolean

Whether the actor has the #ClutterActor:clip property set or not

has_pointer: boolean

Whether the actor contains the pointer of a #ClutterInputDevice or not.

height: number

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 #ClutterActor:height property is animatable.

keep_aspect_ratio: boolean
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.

load_async: boolean

Tries to load a texture from a filename by using a local thread to perform the read operations. The initially created texture has dimensions 0x0 when the true size becomes available the #ClutterTexture::size-change signal is emitted and when the image has completed loading the #ClutterTexture::load-finished signal is emitted.

Threading is only enabled if g_thread_init() has been called prior to clutter_init(), otherwise #ClutterTexture will use the main loop to load the image.

The upload of the texture data on the GL pipeline is not asynchronous, as it must be performed from within the same thread that called clutter_main().

load_data_async: boolean

Like #ClutterTexture:load-async but loads the width and height synchronously causing some blocking.

magnification_filter: Clutter.ScalingFilter
mapped: boolean

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

margin_bottom: number

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 #ClutterActor:margin-bottom property is animatable.

margin_left: number

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 #ClutterActor:margin-left property is animatable.

margin_right: number

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 #ClutterActor:margin-right property is animatable.

margin_top: number

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 #ClutterActor:margin-top property is animatable.

min_height: number

A forced minimum height request for the actor, in pixels

Writing this property sets the #ClutterActor:min-height-set property as well, as a side effect. This property overrides the usual height request of the actor.

min_height_set: boolean

This flag controls whether the #ClutterActor:min-height property is used

min_width: number

A forced minimum width request for the actor, in pixels

Writing this property sets the #ClutterActor:min-width-set property as well, as a side effect.

This property overrides the usual width request of the actor.

min_width_set: boolean

This flag controls whether the #ClutterActor:min-width property is used

minification_filter: Clutter.ScalingFilter
name: string

The name of the actor

natural_height: number

A forced natural height request for the actor, in pixels

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

natural_height_set: boolean

This flag controls whether the #ClutterActor:natural-height property is used

natural_width: number

A forced natural width request for the actor, in pixels

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

natural_width_set: boolean

This flag controls whether the #ClutterActor:natural-width property is used

offscreen_redirect: 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: number

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

The #ClutterActor:opacity property is animatable.

pick_with_alpha: boolean
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 #ClutterActor:pivot-point property is animatable.

pivot_point_z: number

The Z component of the #ClutterActor:pivot-point, expressed as a value along the Z axis.

The #ClutterActor:pivot-point-z property is animatable.

pixel_format: Cogl.PixelFormat
position: Clutter.Point

The position of the origin of the actor.

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

The #ClutterActor:position property is animatable.

reactive: boolean

Whether the actor is reactive to events or not

Only reactive actors will emit event-related signals

realized: boolean

Whether the actor has been realized

repeat_x: boolean
repeat_y: boolean
request_mode: RequestMode

Request mode for the #ClutterActor. 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 #ClutterActor "child".

The clutter_actor_get_preferred_size() function will implement this check for you.

rotation_angle_x: number

The rotation angle on the X axis.

The #ClutterActor:rotation-angle-x property is animatable.

rotation_angle_y: number

The rotation angle on the Y axis

The #ClutterActor:rotation-angle-y property is animatable.

rotation_angle_z: number

The rotation angle on the Z axis

The #ClutterActor:rotation-angle-z property is animatable.

rotation_center_x: Vertex

The rotation center on the X axis.

rotation_center_y: Vertex

The rotation center on the Y axis.

rotation_center_z: Vertex

The rotation center on the Z axis.

rotation_center_z_gravity: Clutter.Gravity

The rotation center on the Z axis expressed as a #ClutterGravity.

scale_center_x: number

The horizontal center point for scaling

scale_center_y: number

The vertical center point for scaling

scale_gravity: Clutter.Gravity

The center point for scaling expressed as a #ClutterGravity

scale_x: number

The horizontal scale of the actor.

The #ClutterActor:scale-x property is animatable.

scale_y: number

The vertical scale of the actor.

The #ClutterActor:scale-y property is animatable.

scale_z: number

The scale factor of the actor along the Z axis.

The #ClutterActor:scale-y property is animatable.

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.

The size of the actor.

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

The #ClutterActor:size property is animatable.

sync_size: boolean
text_direction: Clutter.TextDirection

The direction of the text inside a #ClutterActor.

tile_waste: number
transform: Clutter.Matrix

Overrides the transformations of a #ClutterActor with a custom matrix.

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

Application code should rarely need to use this function directly.

Setting this property with a #ClutterMatrix will set the #ClutterActor:transform-set property to %TRUE as a side effect; setting this property with %NULL will set the #ClutterActor:transform-set property to %FALSE.

The #ClutterActor:transform property is animatable.

transform_set: boolean

Whether the #ClutterActor:transform property is set.

translation_x: number

An additional translation applied along the X axis, relative to the actor's #ClutterActor:pivot-point.

The #ClutterActor:translation-x property is animatable.

translation_y: number

An additional translation applied along the Y axis, relative to the actor's #ClutterActor:pivot-point.

The #ClutterActor:translation-y property is animatable.

translation_z: number

An additional translation applied along the Z axis, relative to the actor's #ClutterActor:pivot-point.

The #ClutterActor:translation-z property is animatable.

visible: boolean

Whether the actor is set to be visible or not

See also #ClutterActor:mapped

width: number

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 #ClutterActor:width property is animatable.

x: number

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 #ClutterActor:x property is animatable.

x_align: ActorAlign

The alignment of an actor on the X axis, if the actor has been given extra space for its allocation. See also the #ClutterActor:x-expand property.

x_expand: boolean

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

y: number

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 #ClutterActor:y property is animatable.

y_align: ActorAlign

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

y_expand: boolean

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

z_position: number

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 #ClutterActor:z-position does not affect the paint or allocation order.

The #ClutterActor:z-position property is animatable.

name: string

Methods

  • Adds action to the list of actions applied to self

    A #ClutterAction can only belong to one actor at a time

    The #ClutterActor will hold a reference on action until either clutter_actor_remove_action() or clutter_actor_clear_actions() is called

    Parameters

    Returns void

  • A convenience function for setting the name of a #ClutterAction while adding it to the list of actions applied to self

    This function is the logical equivalent of:

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

    Parameters

    • name: string

      the name to set on the action

    • action: Clutter.Action

      a #ClutterAction

    Returns void

  • Adds a #ClutterActor to container. This function will emit the "actor-added" signal. The actor should be parented to container. You cannot add a #ClutterActor to more than one #ClutterContainer.

    This function will call #ClutterContainerIface.add(), which is a deprecated virtual function. The default implementation will call clutter_actor_add_child().

    Parameters

    Returns void

  • 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 #ClutterActor:depth of child, and will keep the list of children sorted.

    This function will emit the #ClutterContainer::actor-added signal on self.

    Parameters

    Returns void

  • Adds constraint to the list of #ClutterConstraints applied to self

    The #ClutterActor will hold a reference on the constraint until either clutter_actor_remove_constraint() or clutter_actor_clear_constraints() is called.

    Parameters

    Returns void

  • A convenience function for setting the name of a #ClutterConstraint while adding it to the list of constraints applied to self

    This function is the logical equivalent of:

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

    Parameters

    • name: string

      the name to set on the constraint

    • constraint: Clutter.Constraint

      a #ClutterConstraint

    Returns void

  • Adds effect to the list of #ClutterEffects applied to self

    The #ClutterActor will hold a reference on the effect until either clutter_actor_remove_effect() or clutter_actor_clear_effects() is called.

    Note that as #ClutterEffect is initially unowned, clutter_actor_add_effect() will sink any floating reference on effect.

    Parameters

    Returns void

  • A convenience function for setting the name of a #ClutterEffect while adding it to the list of effects applied to self.

    Note that as #ClutterEffect is initially unowned, clutter_actor_add_effect_with_name() will sink any floating reference on effect.

    This function is the logical equivalent of:

      clutter_actor_meta_set_name (CLUTTER_ACTOR_META (effect), name);
    clutter_actor_add_effect (self, effect);

    Parameters

    • name: string

      the name to set on the effect

    • effect: Clutter.Effect

      a #ClutterEffect

    Returns void

  • Adds a transition to the #ClutterActor's list of animations.

    The name string is a per-actor unique identifier of the transition: only one #ClutterTransition can be associated to the specified name.

    The transition will be started once added.

    This function will take a reference on the transition.

    This function is usually called implicitly when modifying an animatable property.

    Parameters

    • name: string

      the name of the transition to add

    • transition: Clutter.Transition

      the #ClutterTransition to add

    Returns void

  • Assigns the size of a #ClutterActor from the given box.

    This function should only be called on the children of an actor when overriding the #ClutterActorClass.allocate() virtual function.

    This function will adjust the stored allocation to take into account the alignment flags set in the #ClutterActor:x-align and #ClutterActor:y-align properties, as well as the margin values set in the #ClutterActor:margin-top, #ClutterActor:margin-right, #ClutterActor:margin-bottom, and #ClutterActor:margin-left properties.

    This function will respect the easing state of the #ClutterActor and interpolate between the current allocation and the new one if the easing state duration is a positive value.

    Actors can know from their allocation box whether they have moved with respect to their parent actor. The flags parameter describes additional information about the allocation, for instance whether the parent has moved with respect to the stage, for example because a grandparent's origin has moved.

    Parameters

    • box: ActorBox

      new allocation of the actor, in parent-relative coordinates

    • flags: AllocationFlags

      flags that control the allocation

    Returns void

  • allocate_align_fill(box: ActorBox, x_align: number, y_align: number, x_fill: boolean, y_fill: boolean, flags: AllocationFlags): void
  • 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 #ClutterActorBox are not set to 0, the allocation will be offset by their value.

    This function takes into consideration the geometry request specified by the #ClutterActor: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 #ClutterActor:x-align and #ClutterActor:y-align properties, instead, and just call clutter_actor_allocate() inside their #ClutterActorClass.allocate() implementation.

    Parameters

    • box: ActorBox

      a #ClutterActorBox, containing the available width and height

    • x_align: number

      the horizontal alignment, between 0 and 1

    • y_align: number

      the vertical alignment, between 0 and 1

    • x_fill: boolean

      whether the actor should fill horizontally

    • y_fill: boolean

      whether the actor should fill vertically

    • flags: AllocationFlags

      allocation flags to be passed to clutter_actor_allocate()

    Returns void

  • allocate_available_size(x: number, y: number, available_width: number, available_height: number, flags: AllocationFlags): void
  • Allocates self taking into account the #ClutterActor's preferred size, but limiting it to the maximum available width and height provided.

    This function will do the right thing when dealing with the actor's request mode.

    The implementation of this function is equivalent to:

      if (request_mode == CLUTTER_REQUEST_HEIGHT_FOR_WIDTH)
    {
    clutter_actor_get_preferred_width (self, available_height,
    &min_width,
    &natural_width);
    width = CLAMP (natural_width, min_width, available_width);

    clutter_actor_get_preferred_height (self, width,
    &min_height,
    &natural_height);
    height = CLAMP (natural_height, min_height, available_height);
    }
    else if (request_mode == CLUTTER_REQUEST_WIDTH_FOR_HEIGHT)
    {
    clutter_actor_get_preferred_height (self, available_width,
    &min_height,
    &natural_height);
    height = CLAMP (natural_height, min_height, available_height);

    clutter_actor_get_preferred_width (self, height,
    &min_width,
    &natural_width);
    width = CLAMP (natural_width, min_width, available_width);
    }
    else if (request_mode == CLUTTER_REQUEST_CONTENT_SIZE)
    {
    clutter_content_get_preferred_size (content, &natural_width, &natural_height);

    width = CLAMP (natural_width, 0, available_width);
    height = CLAMP (natural_height, 0, available_height);
    }

    box.x1 = x; box.y1 = y;
    box.x2 = box.x1 + available_width;
    box.y2 = box.y1 + available_height;
    clutter_actor_allocate (self, &box, flags);

    This function can be used by fluid layout managers to allocate an actor's preferred size without making it bigger than the area available for the container.

    Parameters

    • x: number

      the actor's X coordinate

    • y: number

      the actor's Y coordinate

    • available_width: number

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

    • available_height: number

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

    • flags: AllocationFlags

      flags controlling the allocation

    Returns void

  • Allocates the natural size of self.

    This function is a utility call for #ClutterActor implementations that allocates the actor's preferred natural size. It can be used by fixed layout managers (like #ClutterGroup or so called 'composite actors') inside the 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 #ClutterActorClass.allocate virtual function.

    Parameters

    Returns void

  • animate_property(animation: Clutter.Animation, property_name: string, initial_value: any, final_value: any, progress: number, value: any): boolean
  • Calls the animate_property() virtual function for animatable.

    The initial_value and final_value #GValues must contain the same type; value must have been initialized to the same type of initial_value and final_value.

    All implementation of the #ClutterAnimatable interface must implement this function.

    Parameters

    • animation: Clutter.Animation

      a #ClutterAnimation

    • property_name: string

      the name of the animated property

    • initial_value: any

      the initial value of the animation interval

    • final_value: any

      the final value of the animation interval

    • progress: number

      the progress factor

    • value: any

      return location for the animation value

    Returns boolean

  • 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 #ClutterAlpha to animate actor.

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

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

    Parameters

    • alpha: Alpha

      a #ClutterAlpha

    • properties: string[]

      a vector containing the property names to set

    • values: any[]

      a vector containing the property values to set

    Returns Clutter.Animation

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

    See clutter_actor_animate() for further details.

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

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

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

    Parameters

    • mode: number

      an animation mode logical id

    • timeline: Clutter.Timeline

      a #ClutterTimeline

    • properties: string[]

      a vector containing the property names to set

    • values: any[]

      a vector containing the property values to set

    Returns Clutter.Animation

  • animatev(mode: number, duration: number, properties: string[], values: any[]): Clutter.Animation
  • Animates the given list of properties of actor between the current value for each property and a new final value. The animation has a definite duration and a speed given by the mode.

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

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

    Parameters

    • mode: number

      an animation mode logical id

    • duration: number

      duration of the animation, in milliseconds

    • properties: string[]

      a vector containing the property names to set

    • values: any[]

      a vector containing the property values to set

    Returns Clutter.Animation

  • Transforms point in coordinates relative to the actor into ancestor-relative coordinates using the relevant transform stack (i.e. scale, rotation, etc).

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

    Parameters

    • ancestor: Clutter.Actor

      A #ClutterActor ancestor, or %NULL to use the default #ClutterStage

    • point: Vertex

      A point as #ClutterVertex

    Returns Vertex

  • Binds a #GListModel to a #ClutterActor.

    If the #ClutterActor was already bound to a #GListModel, the previous binding is destroyed.

    The existing children of #ClutterActor are destroyed when setting a model, and new children are created and added, representing the contents of the model. The #ClutterActor is updated whenever the model changes. If model is %NULL, the #ClutterActor is left empty.

    When a #ClutterActor is bound to a model, adding and removing children directly is undefined behaviour.

    Parameters

    Returns void

  • Creates a binding between source_property on source and target_property on target.

    Whenever the source_property is changed the target_property is updated using the same value. For instance:

      g_object_bind_property (action, "active", widget, "sensitive", 0);
    

    Will result in the "sensitive" property of the widget #GObject instance to be updated with the same value of the "active" property of the action #GObject instance.

    If flags contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: if target_property on target changes then the source_property on source will be updated as well.

    The binding will automatically be removed when either the source or the target instances are finalized. To remove the binding without affecting the source and the target you can just call g_object_unref() on the returned #GBinding instance.

    Removing the binding by calling g_object_unref() on it must only be done if the binding, source and target are only used from a single thread and it is clear that both source and target outlive the binding. Especially it is not safe to rely on this if the binding, source or target can be finalized from different threads. Keep another reference to the binding and use g_binding_unbind() instead to be on the safe side.

    A #GObject can have multiple bindings.

    Parameters

    • source_property: string

      the property on source to bind

    • target: GObject.Object

      the target #GObject

    • target_property: string

      the property on target to bind

    • flags: BindingFlags

      flags to pass to #GBinding

    Returns Binding

  • Creates a binding between source_property on source and target_property on target, allowing you to set the transformation functions to be used by the binding.

    This function is the language bindings friendly version of g_object_bind_property_full(), using #GClosures instead of function pointers.

    Parameters

    • source_property: string

      the property on source to bind

    • target: GObject.Object

      the target #GObject

    • target_property: string

      the property on target to bind

    • flags: BindingFlags

      flags to pass to #GBinding

    • transform_to: TClosure<any, any>

      a #GClosure wrapping the transformation function from the source to the target, or %NULL to use the default

    • transform_from: TClosure<any, any>

      a #GClosure wrapping the transformation function from the target to the source, or %NULL to use the default

    Returns Binding

  • child_get_property(child: Clutter.Actor, property: string, value: any): void
  • Gets a container specific property of a child of container, In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling g_value_unset().

    Note that clutter_container_child_set_property() is really intended for language bindings, clutter_container_child_set() is much more convenient for C programming.

    Parameters

    • child: Clutter.Actor

      a #ClutterActor that is a child of container.

    • property: string

      the name of the property to set.

    • value: any

      the value.

    Returns void

  • child_set_property(child: Clutter.Actor, property: string, value: any): void
  • clear_actions(): void
  • clear_constraints(): void
  • clear_effects(): void
  • Determines if descendant is contained inside self (either as an immediate child, or as a deeper descendant). If self and descendant point to the same actor then it will also return %TRUE.

    Parameters

    • descendant: Clutter.Actor

      A #ClutterActor, possibly contained in self

    Returns boolean

  • continue_paint(): void
  • Run the next stage of the paint sequence. This function should only be called within the implementation of the ‘run’ virtual of a #ClutterEffect. It will cause the run method of the next effect to be applied, or it will paint the actual actor if the current effect is the last effect in the chain.

    Returns void

  • Creates the #ClutterChildMeta wrapping actor inside the container, if the #ClutterContainerIface::child_meta_type class member is not set to %G_TYPE_INVALID.

    This function is only useful when adding a #ClutterActor to a #ClutterContainer implementation outside of the #ClutterContainer::add() virtual function implementation.

    Applications should not call this function.

    Parameters

    Returns void

  • Creates a new #PangoLayout from the same #PangoContext used by the #ClutterActor. The #PangoLayout is already configured with the font map, resolution and font options, and the given text.

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

    Parameters

    • text: string

      the text to set on the #PangoLayout, or %NULL

    Returns Pango.Layout

  • destroy(): void
  • 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 #ClutterStage returned by clutter_stage_get_default().

    Returns void

  • destroy_all_children(): void
  • 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 #ClutterActor::destroy signal is emitted on each child of the actor.

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

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

    Returns void

  • Destroys the #ClutterChildMeta wrapping actor inside the container, if any.

    This function is only useful when removing a #ClutterActor to a #ClutterContainer implementation outside of the #ClutterContainer::add() virtual function implementation.

    Applications should not call this function.

    Parameters

    Returns void

  • detach_animation(): void
  • Detaches the #ClutterAnimation 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 #ClutterAnimation becomes invalid.

    The #ClutterAnimation::completed signal will not be emitted.

    Returns void

  • disconnect(id: number): void
  • emit(sigName: "load-finished", error: GLib.Error, ...args: any[]): void
  • emit(sigName: "pixbuf-change", ...args: any[]): void
  • emit(sigName: "size-change", width: number, height: number, ...args: any[]): void
  • emit(sigName: "notify::disable-slicing", ...args: any[]): void
  • emit(sigName: "notify::filename", ...args: any[]): void
  • emit(sigName: "notify::filter-quality", ...args: any[]): void
  • emit(sigName: "notify::keep-aspect-ratio", ...args: any[]): void
  • emit(sigName: "notify::load-async", ...args: any[]): void
  • emit(sigName: "notify::load-data-async", ...args: any[]): void
  • emit(sigName: "notify::pick-with-alpha", ...args: any[]): void
  • emit(sigName: "notify::pixel-format", ...args: any[]): void
  • emit(sigName: "notify::repeat-x", ...args: any[]): void
  • emit(sigName: "notify::repeat-y", ...args: any[]): void
  • emit(sigName: "notify::sync-size", ...args: any[]): void
  • emit(sigName: "notify::tile-waste", ...args: any[]): void
  • emit(sigName: "notify::actions", ...args: any[]): void
  • emit(sigName: "notify::allocation", ...args: any[]): void
  • emit(sigName: "notify::anchor-gravity", ...args: any[]): void
  • emit(sigName: "notify::anchor-x", ...args: any[]): void
  • emit(sigName: "notify::anchor-y", ...args: any[]): void
  • emit(sigName: "notify::background-color", ...args: any[]): void
  • emit(sigName: "notify::background-color-set", ...args: any[]): void
  • emit(sigName: "notify::child-transform", ...args: any[]): void
  • emit(sigName: "notify::child-transform-set", ...args: any[]): void
  • emit(sigName: "notify::clip", ...args: any[]): void
  • emit(sigName: "notify::clip-rect", ...args: any[]): void
  • emit(sigName: "notify::clip-to-allocation", ...args: any[]): void
  • emit(sigName: "notify::constraints", ...args: any[]): void
  • emit(sigName: "notify::content", ...args: any[]): void
  • emit(sigName: "notify::content-box", ...args: any[]): void
  • emit(sigName: "notify::content-gravity", ...args: any[]): void
  • emit(sigName: "notify::content-repeat", ...args: any[]): void
  • emit(sigName: "notify::depth", ...args: any[]): void
  • emit(sigName: "notify::effect", ...args: any[]): void
  • emit(sigName: "notify::first-child", ...args: any[]): void
  • emit(sigName: "notify::fixed-position-set", ...args: any[]): void
  • emit(sigName: "notify::fixed-x", ...args: any[]): void
  • emit(sigName: "notify::fixed-y", ...args: any[]): void
  • emit(sigName: "notify::has-clip", ...args: any[]): void
  • emit(sigName: "notify::has-pointer", ...args: any[]): void
  • emit(sigName: "notify::height", ...args: any[]): void
  • emit(sigName: "notify::last-child", ...args: any[]): void
  • emit(sigName: "notify::layout-manager", ...args: any[]): void
  • emit(sigName: "notify::magnification-filter", ...args: any[]): void
  • emit(sigName: "notify::mapped", ...args: any[]): void
  • emit(sigName: "notify::margin-bottom", ...args: any[]): void
  • emit(sigName: "notify::margin-left", ...args: any[]): void
  • emit(sigName: "notify::margin-right", ...args: any[]): void
  • emit(sigName: "notify::margin-top", ...args: any[]): void
  • emit(sigName: "notify::min-height", ...args: any[]): void
  • emit(sigName: "notify::min-height-set", ...args: any[]): void
  • emit(sigName: "notify::min-width", ...args: any[]): void
  • emit(sigName: "notify::min-width-set", ...args: any[]): void
  • emit(sigName: "notify::minification-filter", ...args: any[]): void
  • emit(sigName: "notify::name", ...args: any[]): void
  • emit(sigName: "notify::natural-height", ...args: any[]): void
  • emit(sigName: "notify::natural-height-set", ...args: any[]): void
  • emit(sigName: "notify::natural-width", ...args: any[]): void
  • emit(sigName: "notify::natural-width-set", ...args: any[]): void
  • emit(sigName: "notify::offscreen-redirect", ...args: any[]): void
  • emit(sigName: "notify::opacity", ...args: any[]): void
  • emit(sigName: "notify::pivot-point", ...args: any[]): void
  • emit(sigName: "notify::pivot-point-z", ...args: any[]): void
  • emit(sigName: "notify::position", ...args: any[]): void
  • emit(sigName: "notify::reactive", ...args: any[]): void
  • emit(sigName: "notify::realized", ...args: any[]): void
  • emit(sigName: "notify::request-mode", ...args: any[]): void
  • emit(sigName: "notify::rotation-angle-x", ...args: any[]): void
  • emit(sigName: "notify::rotation-angle-y", ...args: any[]): void
  • emit(sigName: "notify::rotation-angle-z", ...args: any[]): void
  • emit(sigName: "notify::rotation-center-x", ...args: any[]): void
  • emit(sigName: "notify::rotation-center-y", ...args: any[]): void
  • emit(sigName: "notify::rotation-center-z", ...args: any[]): void
  • emit(sigName: "notify::rotation-center-z-gravity", ...args: any[]): void
  • emit(sigName: "notify::scale-center-x", ...args: any[]): void
  • emit(sigName: "notify::scale-center-y", ...args: any[]): void
  • emit(sigName: "notify::scale-gravity", ...args: any[]): void
  • emit(sigName: "notify::scale-x", ...args: any[]): void
  • emit(sigName: "notify::scale-y", ...args: any[]): void
  • emit(sigName: "notify::scale-z", ...args: any[]): void
  • emit(sigName: "notify::show-on-set-parent", ...args: any[]): void
  • emit(sigName: "notify::size", ...args: any[]): void
  • emit(sigName: "notify::text-direction", ...args: any[]): void
  • emit(sigName: "notify::transform", ...args: any[]): void
  • emit(sigName: "notify::transform-set", ...args: any[]): void
  • emit(sigName: "notify::translation-x", ...args: any[]): void
  • emit(sigName: "notify::translation-y", ...args: any[]): void
  • emit(sigName: "notify::translation-z", ...args: any[]): void
  • emit(sigName: "notify::visible", ...args: any[]): void
  • emit(sigName: "notify::width", ...args: any[]): void
  • emit(sigName: "notify::x", ...args: any[]): void
  • emit(sigName: "notify::x-align", ...args: any[]): void
  • emit(sigName: "notify::x-expand", ...args: any[]): void
  • emit(sigName: "notify::y", ...args: any[]): void
  • emit(sigName: "notify::y-align", ...args: any[]): void
  • emit(sigName: "notify::y-expand", ...args: any[]): void
  • emit(sigName: "notify::z-position", ...args: any[]): void
  • emit(sigName: string, ...args: any[]): void
  • This function is used to emit an event on the main stage. You should rarely need to use this function, except for synthetising events.

    Parameters

    • event: Clutter.Event

      a #ClutterEvent

    • Optional capture: boolean

      %TRUE if event in in capture phase, %FALSE otherwise.

    Returns boolean

  • find_property(property_name: string): ParamSpec
  • force_floating(): void
  • This function is intended for #GObject implementations to re-enforce a [floating][floating-ref] object reference. Doing this is seldom required: all #GInitiallyUnowneds are created with a floating reference which usually just needs to be sunken by calling g_object_ref_sink().

    Returns void

  • Calls callback for each child of container that was added by the application (with clutter_container_add_actor()). Does not iterate over "internal" children that are part of the container's own implementation, if any.

    This function calls the #ClutterContainerIface.foreach() virtual function, which has been deprecated.

    Parameters

    Returns void

  • Calls callback for each child of container, including "internal" children built in to the container itself that were never added by the application.

    This function calls the #ClutterContainerIface.foreach_with_internals() virtual function, which has been deprecated.

    Parameters

    Returns void

  • freeze_notify(): void
  • Increases the freeze count on object. If the freeze count is non-zero, the emission of "notify" signals on object is stopped. The signals are queued until the freeze count is decreased to zero. Duplicate notifications are squashed so that at most one #GObject::notify signal is emitted for each property modified while the object is frozen.

    This is necessary for accessors that modify multiple properties to prevent premature notification while the object is still being modified.

    Returns void

  • get_abs_allocation_vertices(): Vertex[]
  • Calculates the transformed screen coordinates of the four corners of the actor; the returned vertices relate to the #ClutterActorBox coordinates as follows:

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

    Returns Vertex[]

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

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

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

    Returns Atk.Object

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

    Returns ActorBox

  • Gets the layout box an actor has been assigned. The allocation can only be assumed valid inside a paint() method; anywhere else, it may be out-of-date.

    An allocation does not incorporate the actor's scale or anchor point; those transformations do not affect layout, only rendering.

    The returned rectangle is in pixels.

    Returns Clutter.Geometry

  • Calculates the transformed coordinates of the four corners of the actor in the plane of ancestor. The returned vertices relate to the #ClutterActorBox 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 %NULL the ancestor will be the #ClutterStage. In this case, the coordinates returned will be the coordinates on the stage before the projection is applied. This is different from the behaviour of clutter_actor_get_abs_allocation_vertices().

    Parameters

    • ancestor: Clutter.Actor

      A #ClutterActor to calculate the vertices against, or %NULL to use the #ClutterStage

    Returns Vertex[]

  • get_anchor_point(): [number, number]
  • get_base_size(): [number, number]
  • get_clip(): [number, number, number, number]
  • get_clip_to_allocation(): boolean
  • get_cogl_material(): object
  • get_cogl_texture(): object
  • Retrieves the handle to the underlying COGL texture used for drawing the actor. No extra reference is taken so if you need to keep the handle then you should call cogl_handle_ref() on it.

    The texture handle returned is the first layer of the material handle used by the #ClutterTexture. If you need to access the other layers you should use clutter_texture_get_cogl_material() instead and use the #CoglMaterial API.

    Returns object

  • Retrieves the bounding box for the #ClutterContent of self.

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

    If no #ClutterContent 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 #ClutterActor.

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

    Returns ActorBox

  • get_data(key?: string): object
  • Gets a named field from the objects table of associations (see g_object_set_data()).

    Parameters

    • Optional key: string

      name of the key for that association

    Returns object

  • Retrieves the default paint volume for self.

    This function provides the same #ClutterPaintVolume that would be computed by the default implementation inside #ClutterActor of the #ClutterActorClass.get_paint_volume() virtual function.

    This function should only be used by #ClutterActor subclasses that cannot chain up to the parent implementation when computing their paint volume.

    Returns PaintVolume

  • get_depth(): number
  • get_easing_delay(): number
  • get_easing_duration(): number
  • get_fixed_position_set(): boolean
  • 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.

    Returns Clutter.Geometry

  • get_gid(): number
  • get_height(): number
  • Retrieves the height of a #ClutterActor.

    If the actor has a valid allocation, this function will return the height of the allocated area given to the actor.

    If the actor does not have a valid allocation, this function will return the actor's natural height, that is the preferred height of the actor.

    If you care whether you get the preferred height or the height that has been assigned to the actor, you should probably call a different function like clutter_actor_get_allocation_box() to retrieve the allocated size or clutter_actor_get_preferred_height() to retrieve the preferred height.

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

    Returns number

  • get_id(): string
  • get_initial_state(property_name: string, value: any): void
  • Retrieves the current state of property_name and sets value with it

    Parameters

    • property_name: string

      the name of the animatable property to retrieve

    • value: any

      a #GValue initialized to the type of the property to retrieve

    Returns void

  • get_keep_aspect_ratio(): boolean
  • get_load_async(): boolean
  • get_load_data_async(): boolean
  • get_margin_bottom(): number
  • get_margin_left(): number
  • get_margin_right(): number
  • get_margin_top(): number
  • get_max_tile_waste(): number
  • get_n_children(): number
  • get_name(): string
  • Retrieves the sibling of self that comes after it in the list of children of self's parent.

    The returned pointer is only valid until the scene graph changes; it is not safe to modify the list of children of self while iterating it.

    Returns Clutter.Actor

  • get_opacity(): number
  • Retrieves the opacity value of an actor, as set by clutter_actor_set_opacity().

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

    Returns number

  • Retrieves the paint volume of the passed #ClutterActor, 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.

    Returns [boolean, ActorBox]

  • get_paint_opacity(): number
  • Retrieves the absolute opacity of the actor, as it appears on the stage.

    This function traverses the hierarchy chain and composites the opacity of the actor with that of its parents.

    This function is intended for subclasses to use in the paint virtual function, to paint themselves with the correct opacity.

    Returns number

  • get_paint_visibility(): boolean
  • Retrieves the paint volume of the passed #ClutterActor, or %NULL when a paint volume can't be determined.

    The paint volume is defined as the 3D space occupied by an actor when being painted.

    This function will call the #ClutterActorClass.get_paint_volume() virtual function of the #ClutterActor 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 #ClutterActor:depth but real 3D depth).

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

    Returns PaintVolume

  • Retrieves the #PangoContext 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 #ClutterActor and it will be updated each time the options stored by the #ClutterBackend change.

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

    Returns Pango.Context

  • get_pick_with_alpha(): boolean
  • get_pivot_point(): [number, number]
  • get_pivot_point_z(): number
  • Retrieves the pixel format used by texture. This is equivalent to:

    |[ handle = clutter_texture_get_pixel_format (texture);

    if (handle != COGL_INVALID_HANDLE) format = cogl_texture_get_format (handle);

    
    

    Returns Cogl.PixelFormat

  • get_position(): [number, number]
  • 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.

    Returns [number, number]

  • get_preferred_height(for_width: number): [number, number]
  • Computes the requested minimum and natural heights for an actor, or if they are already computed, returns the cached values.

    An actor may not get its request - depending on the layout manager that's in effect.

    A request should not incorporate the actor's scale or anchor point; those transformations do not affect layout, only rendering.

    Parameters

    • for_width: number

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

    Returns [number, number]

  • get_preferred_size(): [number, number, number, number]
  • 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 #ClutterActor:request-mode property.

    Returns [number, number, number, number]

  • get_preferred_width(for_height: number): [number, number]
  • Computes the requested minimum and natural widths for an actor, optionally depending on the specified height, or if they are already computed, returns the cached values.

    An actor may not get its request - depending on the layout manager that's in effect.

    A request should not incorporate the actor's scale or anchor point; those transformations do not affect layout, only rendering.

    Parameters

    • for_height: number

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

    Returns [number, number]

  • get_property(property_name?: string, value?: any): void
  • Gets a property of an object.

    The value can be:

    • an empty #GValue initialized by %G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
    • a #GValue initialized with the expected type of the property
    • a #GValue initialized with a type to which the expected type of the property can be transformed

    In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling g_value_unset().

    Note that g_object_get_property() is really intended for language bindings, g_object_get() is much more convenient for C programming.

    Parameters

    • Optional property_name: string

      the name of the property to get

    • Optional value: any

      return location for the property value

    Returns void

  • get_qdata(quark: number): object
  • get_reactive(): boolean
  • get_repeat(): [boolean, boolean]
  • get_rotation(axis: RotateAxis): [number, number, number, number]
  • get_scale(): [number, number]
  • get_scale_center(): [number, number]
  • Retrieves the scale center coordinate in pixels relative to the top left corner of the actor. If the scale center was specified using a #ClutterGravity this will calculate the pixel offset using the current size of the actor.

    Returns [number, number]

  • get_scale_z(): number
  • get_size(): [number, number]
  • 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().

    Returns [number, number]

  • get_sync_size(): boolean
  • 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 %NULL is passed for relative_to_ancestor)

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

    Parameters

    • relative_to_ancestor: Clutter.Actor

      A #ClutterActor that is an ancestor of self (or %NULL for the stage)

    Returns PaintVolume

  • get_transformed_position(): [number, number]
  • get_transformed_size(): [number, number]
  • 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.

    Returns [number, number]

  • Retrieves the #ClutterTransition 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 #ClutterActor::transition-stopped signal, using the transition name as the signal detail.

    Parameters

    • name: string

      the name of the transition

    Returns Clutter.Transition

  • get_translation(): [number, number, number]
  • get_width(): number
  • Retrieves the width of a #ClutterActor.

    If the actor has a valid allocation, this function will return the width of the allocated area given to the actor.

    If the actor does not have a valid allocation, this function will return the actor's natural width, that is the preferred width of the actor.

    If you care whether you get the preferred width or the width that has been assigned to the actor, you should probably call a different function like clutter_actor_get_allocation_box() to retrieve the allocated size or clutter_actor_get_preferred_width() to retrieve the preferred width.

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

    Returns number

  • get_x(): number
  • Retrieves the X coordinate of a #ClutterActor.

    This function tries to "do what you mean", by returning the correct value depending on the actor's state.

    If the actor has a valid allocation, this function will return the X coordinate of the origin of the allocation box.

    If the actor has any fixed coordinate set using clutter_actor_set_x(), clutter_actor_set_position() or clutter_actor_set_geometry(), this function will return that coordinate.

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

    Returns number

  • get_x_expand(): boolean
  • get_y(): number
  • Retrieves the Y coordinate of a #ClutterActor.

    This function tries to "do what you mean", by returning the correct value depending on the actor's state.

    If the actor has a valid allocation, this function will return the Y coordinate of the origin of the allocation box.

    If the actor has any fixed coordinate set using clutter_actor_set_y(), clutter_actor_set_position() or clutter_actor_set_geometry(), this function will return that coordinate.

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

    Returns number

  • get_y_expand(): boolean
  • get_z_position(): number
  • getv(names: string[], values: any[]): void
  • Gets n_properties properties for an object. Obtained properties will be set to values. All properties must be valid. Warnings will be emitted and undefined behaviour may result if invalid properties are passed in.

    Parameters

    • names: string[]

      the names of each property to get

    • values: any[]

      the values of each property to get

    Returns void

  • grab_key_focus(): void
  • has_actions(): boolean
  • 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.

    Returns boolean

  • has_constraints(): boolean
  • has_effects(): boolean
  • has_key_focus(): boolean
  • 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 #ClutterActorClass.has_overlaps() virtual function. See clutter_actor_set_offscreen_redirect() for more information.

    Returns boolean

  • hide(): void
  • 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 #ClutterActor:show-on-set-parent property will be set to %FALSE as a side-effect.

    Returns void

  • hide_all(): void
  • Inserts child into the list of children of self, above another child of self or, if sibling is %NULL, above all the children of self.

    This function will acquire a reference on child that will only be released when calling clutter_actor_remove_child().

    This function will not take into consideration the #ClutterActor:depth of child.

    This function will emit the #ClutterContainer::actor-added signal on self.

    Parameters

    Returns void

  • insert_child_at_index(child: Clutter.Actor, index_: number): void
  • 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 #ClutterActor:depth of child.

    This function will emit the #ClutterContainer::actor-added signal on self.

    Parameters

    • child: Clutter.Actor

      a #ClutterActor

    • index_: number

      the index

    Returns void

  • Inserts child into the list of children of self, below another child of self or, if sibling is %NULL, below all the children of self.

    This function will acquire a reference on child that will only be released when calling clutter_actor_remove_child().

    This function will not take into consideration the #ClutterActor:depth of child.

    This function will emit the #ClutterContainer::actor-added signal on self.

    Parameters

    Returns void

  • interpolate_value(property_name: string, interval: Interval, progress: number): [boolean, any]
  • Asks a #ClutterAnimatable implementation to interpolate a a named property between the initial and final values of a #ClutterInterval, using progress as the interpolation value, and store the result inside value.

    This function should be used for every property animation involving #ClutterAnimatables.

    This function replaces clutter_animatable_animate_property().

    Parameters

    • property_name: string

      the name of the property to interpolate

    • interval: Interval

      a #ClutterInterval with the animation range

    • progress: number

      the progress to use to interpolate between the initial and final values of the interval

    Returns [boolean, any]

  • is_floating(): boolean
  • is_in_clone_paint(): boolean
  • Checks whether self is being currently painted by a #ClutterClone

    This function is useful only inside the ::paint virtual function implementations or within handlers for the #ClutterActor::paint signal

    This function should not be used by applications

    Returns boolean

  • is_mapped(): boolean
  • is_realized(): boolean
  • is_rotated(): boolean
  • is_scaled(): boolean
  • is_visible(): boolean
  • Puts self below above.

    Both actors must have the same parent, and the parent must implement the #ClutterContainer interface.

    This function calls clutter_container_lower_child() internally.

    Parameters

    Returns void

  • lower_bottom(): void
  • Lowers actor to sibling level, in the depth ordering.

    This function calls the #ClutterContainerIface.lower() virtual function, which has been deprecated. The default implementation will call clutter_actor_set_child_below_sibling().

    Parameters

    • actor: Clutter.Actor

      the actor to raise

    • sibling: Clutter.Actor

      the sibling to lower to, or %NULL to lower to the bottom

    Returns void

  • map(): void
  • 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 #ClutterActorClass.map() will map all the children of an actor when mapping its parent.

    When overriding map, it is mandatory to chain up to the parent implementation.

    Returns void

  • move_anchor_point(anchor_x: number, anchor_y: number): void
  • Sets an anchor point for the actor, and adjusts the actor postion so that the relative position of the actor toward its parent remains the same.

    Parameters

    • anchor_x: number

      X coordinate of the anchor point

    • anchor_y: number

      Y coordinate of the anchor point

    Returns void

  • Sets an anchor point on the actor based on the given gravity, adjusting the actor postion so that its relative position within its parent remains unchanged.

    Since version 1.0 the anchor point will be stored as a gravity so that if the actor changes size then the anchor point will move. For example, if you set the anchor point to %CLUTTER_GRAVITY_SOUTH_EAST and later double the size of the actor, the anchor point will move to the bottom right.

    Parameters

    Returns void

  • move_by(dx: number, dy: number): void
  • Moves an actor by the specified distance relative to its current position in pixels.

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

    Parameters

    • dx: number

      Distance to move Actor on X axis.

    • dy: number

      Distance to move Actor on Y axis.

    Returns void

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

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

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

    Parameters

    Returns boolean

  • notify(property_name: string): void
  • Emits a "notify" signal for the property property_name on object.

    When possible, eg. when signaling a property change from within the class that registered the property, you should use g_object_notify_by_pspec() instead.

    Note that emission of the notify signal may be blocked with g_object_freeze_notify(). In this case, the signal emissions are queued and will be emitted (in reverse order) when g_object_thaw_notify() is called.

    Parameters

    • property_name: string

      the name of a property installed on the class of object.

    Returns void

  • Emits a "notify" signal for the property specified by pspec on object.

    This function omits the property name lookup, hence it is faster than g_object_notify().

    One way to avoid using g_object_notify() from within the class that registered the properties, and using g_object_notify_by_pspec() instead, is to store the GParamSpec used with g_object_class_install_property() inside a static array, e.g.:

      enum
    {
    PROP_0,
    PROP_FOO,
    PROP_LAST
    };

    static GParamSpec *properties[PROP_LAST];

    static void
    my_object_class_init (MyObjectClass *klass)
    {
    properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
    0, 100,
    50,
    G_PARAM_READWRITE);
    g_object_class_install_property (gobject_class,
    PROP_FOO,
    properties[PROP_FOO]);
    }

    and then notify a change on the "foo" property with:

      g_object_notify_by_pspec (self, properties[PROP_FOO]);
    

    Parameters

    • pspec: ParamSpec

      the #GParamSpec of a property installed on the class of object.

    Returns void

  • paint(): void
  • 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 #ClutterActor::paint signal or the #ClutterActor::pick signal, depending on the context.

    This function does not paint the actor if the actor is set to 0, unless it is performing a pick paint.

    Returns void

  • Parses the passed JSON node. The implementation must set the type of the passed #GValue pointer using g_value_init().

    Parameters

    • script: Clutter.Script

      the #ClutterScript creating the scriptable instance

    • value: any

      the generic value to be set

    • name: string

      the name of the node

    • node: Json.Node

      the JSON node to be parsed

    Returns boolean

  • pop_internal(): void
  • push_internal(): void
  • Should be used by actors implementing the #ClutterContainer and with internal children added through clutter_actor_set_parent(), for instance:

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

    clutter_actor_push_internal (CLUTTER_ACTOR (self));

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

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

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

    clutter_actor_pop_internal (CLUTTER_ACTOR (self));

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

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

    Call clutter_actor_pop_internal() when you finished adding internal children.

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

    Returns void

  • queue_redraw(): void
  • Queues up a redraw of an actor and any children. The redraw occurs once the main loop becomes idle (after the current batch of events has been processed, roughly).

    Applications rarely need to call this, as redraws are handled automatically by modification functions.

    This function will not do anything if self is not visible, or if the actor is inside an invisible part of the scenegraph.

    Also be aware that painting is a NOP for actors with an opacity of 0

    When you are implementing a custom actor you must queue a redraw whenever some private state changes that will affect painting or picking of your actor.

    Returns void

  • queue_relayout(): void
  • Indicates that the actor's size request or other layout-affecting properties may have changed. This function is used inside #ClutterActor subclass implementations, not by applications directly.

    Queueing a new layout automatically queues a redraw as well.

    Returns void

  • Puts self above below.

    Both actors must have the same parent, and the parent must implement the #ClutterContainer interface

    This function calls clutter_container_raise_child() internally.

    Parameters

    Returns void

  • Raises actor to sibling level, in the depth ordering.

    This function calls the #ClutterContainerIface.raise() virtual function, which has been deprecated. The default implementation will call clutter_actor_set_child_above_sibling().

    Parameters

    Returns void

  • raise_top(): void
  • realize(): void
  • Realization informs the actor that it is attached to a stage. It can use this to allocate resources if it wanted to delay allocation until it would be rendered. However it is perfectly acceptable for an actor to create resources before being realized because Clutter only ever has a single rendering context so that actor is free to be moved from one stage to another.

    This function does nothing if the actor is already realized.

    Because a realized actor must have realized parent actors, calling clutter_actor_realize() will also realize all parents of the actor.

    This function does not realize child actors, except in the special case that realizing the stage, when the stage is visible, will suddenly map (and thus realize) the children of the stage.

    Returns void

  • Increases the reference count of object.

    Since GLib 2.56, if GLIB_VERSION_MAX_ALLOWED is 2.56 or greater, the type of object will be propagated to the return type (using the GCC typeof() extension), so any casting the caller needs to do on the return type must be explicit.

    Returns GObject.Object

  • Increase the reference count of object, and possibly remove the [floating][floating-ref] reference, if object has a floating reference.

    In other words, if the object is floating, then this call "assumes ownership" of the floating reference, converting it to a normal reference by clearing the floating flag while leaving the reference count unchanged. If the object is not floating, then this call adds a new normal reference increasing the reference count by one.

    Since GLib 2.56, the type of object will be propagated to the return type under the same conditions as for g_object_ref().

    Returns GObject.Object

  • remove_action_by_name(name: string): void
  • Removes actor from container. The actor should be unparented, so if you want to keep it around you must hold a reference to it yourself, using g_object_ref(). When the actor has been removed, the "actor-removed" signal is emitted by container.

    This function will call #ClutterContainerIface.remove(), which is a deprecated virtual function. The default implementation will call clutter_actor_remove_child().

    Parameters

    Returns void

  • remove_all_children(): void
  • Removes all children of self.

    This function releases the reference added by inserting a child actor in the list of children of self.

    If the reference count of a child drops to zero, the child will be destroyed. If you want to ensure the destruction of all the children of self, use clutter_actor_destroy_all_children().

    Returns void

  • remove_all_transitions(): void
  • 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 #ClutterContainer::actor-removed signal on self.

    Parameters

    Returns void

  • remove_clip(): void
  • remove_constraint_by_name(name: string): void
  • remove_effect_by_name(name: string): void
  • remove_transition(name: string): void
  • Removes the transition stored inside a #ClutterActor 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 #ClutterActor.

    Parameters

    • name: string

      the name of the transition to remove

    Returns void

  • 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 #ClutterActor::parent-set signal only once.

    In reality, calling this function is less useful than it sounds, as some application code may rely on changes in the intermediate state between removal and addition of the actor from its old parent to the new_parent. Thus, it is strongly encouraged to avoid using this function in application code.

    Parameters

    Returns void

  • restore_easing_state(): void
  • run_dispose(): void
  • Releases all references to other objects. This can be used to break reference cycles.

    This function should only be called from object system implementations.

    Returns void

  • save_easing_state(): void
  • Saves the current easing state for animatable properties, and creates a new state with the default values for easing mode and duration.

    New transitions created after calling this function will inherit the duration, easing mode, and delay of the new easing state; this also applies to transitions modified in flight.

    Returns void

  • Stores the allocation of self as defined by box.

    This function can only be called from within the implementation of the #ClutterActorClass.allocate() virtual function.

    The allocation should have been adjusted to take into account constraints, alignment, and margin properties. If you are implementing a #ClutterActor subclass that provides its own layout management policy for its children instead of using a #ClutterLayoutManager 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 #ClutterActor that wish to store their allocation but cannot chain up to the parent's implementation; the default implementation of the #ClutterActorClass.allocate() virtual function will call this function.

    It is important to note that, while chaining up was the recommended behaviour for #ClutterActor subclasses prior to the introduction of this function, it is recommended to call clutter_actor_set_allocation() instead.

    If the #ClutterActor 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)
    {
    ClutterActorBox new_alloc;
    ClutterAllocationFlags new_flags;

    adjust_allocation (allocation, &new_alloc);

    new_flags = flags | CLUTTER_DELEGATE_LAYOUT;

    // this will use the layout manager set on the actor
    clutter_actor_set_allocation (actor, &new_alloc, new_flags);
    }

    is equivalent to this:

    static void
    my_actor_allocate (ClutterActor *actor,
    const ClutterActorBox *allocation,
    ClutterAllocationFlags flags)
    {
    ClutterLayoutManager *layout;
    ClutterActorBox new_alloc;

    adjust_allocation (allocation, &new_alloc);

    clutter_actor_set_allocation (actor, &new_alloc, flags);

    layout = clutter_actor_get_layout_manager (actor);
    clutter_layout_manager_allocate (layout,
    CLUTTER_CONTAINER (actor),
    &new_alloc,
    flags);
    }

    Parameters

    Returns void

  • set_anchor_point(anchor_x: number, anchor_y: number): void
  • Sets an anchor point for self. The anchor point is a point in the coordinate space of an actor to which the actor position within its parent is relative; the default is (0, 0), i.e. the top-left corner of the actor.

    Parameters

    • anchor_x: number

      X coordinate of the anchor point

    • anchor_y: number

      Y coordinate of the anchor point

    Returns void

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

    Since version 1.0 the anchor point will be stored as a gravity so that if the actor changes size then the anchor point will move. For example, if you set the anchor point to %CLUTTER_GRAVITY_SOUTH_EAST and later double the size of the actor, the anchor point will move to the bottom right.

    Parameters

    Returns void

  • set_area_from_rgb_data(data: Uint8Array, has_alpha: boolean, x: number, y: number, width: number, height: number, rowstride: number, bpp: number, flags: Clutter.TextureFlags): boolean
  • Updates a sub-region of the pixel data in a #ClutterTexture.

    Parameters

    • data: Uint8Array

      Image data in RGB type colorspace.

    • has_alpha: boolean

      Set to TRUE if image data has an alpha channel.

    • x: number

      X coordinate of upper left corner of region to update.

    • y: number

      Y coordinate of upper left corner of region to update.

    • width: number

      Width in pixels of region to update.

    • height: number

      Height in pixels of region to update.

    • rowstride: number

      Distance in bytes between row starts on source buffer.

    • bpp: number

      bytes per pixel (Currently only 3 and 4 supported, depending on has_alpha)

    • flags: Clutter.TextureFlags

      #ClutterTextureFlags

    Returns boolean

  • Sets the background color of a #ClutterActor.

    The background color will be used to cover the whole allocation of the actor. The default background color of an actor is transparent.

    To check whether an actor has a background color, you can use the #ClutterActor:background-color-set actor property.

    The #ClutterActor:background-color property is animatable.

    Parameters

    • color: Clutter.Color

      a #ClutterColor, or %NULL to unset a previously set color

    Returns void

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

    If sibling is %NULL, child will be the new last child of self.

    This function is logically equivalent to removing child and using clutter_actor_insert_child_above(), but it will not emit signals or change state on child.

    Parameters

    Returns void

  • set_child_at_index(child: Clutter.Actor, index_: number): void
  • Changes the index of child in the list of children of self.

    This function is logically equivalent to removing child and calling clutter_actor_insert_child_at_index(), but it will not emit signals or change state on child.

    Parameters

    • child: Clutter.Actor

      a #ClutterActor child of self

    • index_: number

      the new index for child

    Returns void

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

    If sibling is %NULL, child will be the new first child of self.

    This function is logically equivalent to removing self and using clutter_actor_insert_child_below(), but it will not emit signals or change state on child.

    Parameters

    Returns void

  • Sets the transformation matrix to be applied to all the children of self prior to their own transformations. The default child transformation is the identity matrix.

    If transform is %NULL, the child transform will be unset.

    The #ClutterActor:child-transform property is animatable.

    Parameters

    Returns void

  • set_clip(xoff: number, yoff: number, width: number, height: number): void
  • Sets clip area for self. The clip area is always computed from the upper left corner of the actor, even if the anchor point is set otherwise.

    Parameters

    • xoff: number

      X offset of the clip rectangle

    • yoff: number

      Y offset of the clip rectangle

    • width: number

      Width of the clip rectangle

    • height: number

      Height of the clip rectangle

    Returns void

  • set_clip_to_allocation(clip_set: boolean): void
  • set_cogl_material(cogl_material: object): void
  • Replaces the underlying Cogl material drawn by this actor with cogl_material. A reference to the material is taken so if the handle is no longer needed it should be deref'd with cogl_handle_unref. Texture data is attached to the material so calling this function also replaces the Cogl texture. #ClutterTexture requires that the material have a texture layer so you should set one on the material before calling this function.

    Parameters

    • cogl_material: object

      A CoglHandle for a material

    Returns void

  • set_cogl_texture(cogl_tex: object): void
  • Replaces the underlying COGL texture drawn by this actor with cogl_tex. A reference to the texture is taken so if the handle is no longer needed it should be deref'd with cogl_handle_unref.

    Parameters

    • cogl_tex: object

      A CoglHandle for a texture

    Returns void

  • Sets the gravity of the #ClutterContent used by self.

    See the description of the #ClutterActor:content-gravity property for more information.

    The #ClutterActor:content-gravity property is animatable.

    Parameters

    Returns void

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

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

    Parameters

    Returns void

  • set_custom_property(script: Clutter.Script, name: string, value: any): void
  • Overrides the common properties setting. The underlying virtual function should be used when implementing custom properties.

    Parameters

    • script: Clutter.Script

      the #ClutterScript creating the scriptable instance

    • name: string

      the name of the property

    • value: any

      the value of the property

    Returns void

  • set_data(key: string, data?: object): void
  • Each object carries around a table of associations from strings to pointers. This function lets you set an association.

    If the object already had an association with that name, the old association will be destroyed.

    Internally, the key is converted to a #GQuark using g_quark_from_string(). This means a copy of key is kept permanently (even after object has been finalized) — so it is recommended to only use a small, bounded set of values for key in your program, to avoid the #GQuark storage growing unbounded.

    Parameters

    • key: string

      name of the key

    • Optional data: object

      data to associate with that key

    Returns void

  • set_depth(depth: number): void
  • Sets the Z coordinate of self to depth.

    The unit used by depth is dependant on the perspective setup. See also clutter_stage_set_perspective().

    Parameters

    • depth: number

      Z co-ord

    Returns void

  • set_easing_delay(msecs: number): void
  • set_easing_duration(msecs: number): void
  • Sets the filter quality when scaling a texture. The quality is an enumeration currently the following values are supported: %CLUTTER_TEXTURE_QUALITY_LOW which is fast but only uses nearest neighbour interpolation. %CLUTTER_TEXTURE_QUALITY_MEDIUM which is computationally a bit more expensive (bilinear interpolation), and %CLUTTER_TEXTURE_QUALITY_HIGH which uses extra texture memory resources to improve scaled down rendering as well (by using mipmaps). The default value is %CLUTTER_TEXTURE_QUALITY_MEDIUM.

    Parameters

    Returns void

  • set_final_state(property_name: string, value: any): void
  • Sets the current state of property_name to value

    Parameters

    • property_name: string

      the name of the animatable property to set

    • value: any

      the value of the animatable property to set

    Returns void

  • set_fixed_position_set(is_set: boolean): void
  • set_from_file(filename: string): boolean
  • Sets the #ClutterTexture image data from an image file. In case of failure, %FALSE is returned and error is set.

    If #ClutterTexture:load-async is set to %TRUE, this function will return as soon as possible, and the actual image loading from disk will be performed asynchronously. #ClutterTexture::size-change will be emitten when the size of the texture is available and #ClutterTexture::load-finished will be emitted when the image has been loaded or if an error occurred.

    Parameters

    • filename: string

      The filename of the image in GLib file name encoding

    Returns boolean

  • set_from_rgb_data(data: Uint8Array, has_alpha: boolean, width: number, height: number, rowstride: number, bpp: number, flags: Clutter.TextureFlags): boolean
  • Sets #ClutterTexture image data.

    Parameters

    • data: Uint8Array

      image data in RGBA type colorspace.

    • has_alpha: boolean

      set to %TRUE if image data has an alpha channel.

    • width: number

      width in pixels of image data.

    • height: number

      height in pixels of image data

    • rowstride: number

      distance in bytes between row starts.

    • bpp: number

      bytes per pixel (currently only 3 and 4 supported, depending on the value of has_alpha)

    • flags: Clutter.TextureFlags

      #ClutterTextureFlags

    Returns boolean

  • set_from_yuv_data(data: Uint8Array, width: number, height: number, flags: Clutter.TextureFlags): boolean
  • Sets a #ClutterTexture from YUV image data. If an error occurred, %FALSE is returned and error is set.

    The YUV support depends on the driver; the format supported by the few drivers exposing this capability are not really useful.

    The proper way to convert image data in any YUV colorspace to any RGB colorspace is to use a fragment shader associated with the #ClutterTexture material.

    Parameters

    • data: Uint8Array

      Image data in YUV type colorspace.

    • width: number

      Width in pixels of image data.

    • height: number

      Height in pixels of image data

    • flags: Clutter.TextureFlags

      #ClutterTextureFlags

    Returns boolean

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

    Parameters

    Returns void

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

    If height is -1 the actor will use its preferred height instead of overriding it, i.e. you can "unset" the height with -1.

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

    Parameters

    • height: number

      Requested new height for the actor, in pixels, or -1

    Returns void

  • set_id(id_: string): void
  • Sets id_ as the unique Clutter script it for this instance of #ClutterScriptableIface.

    This name can be used by user interface designer applications to define a unique name for an object constructable using the UI definition language parsed by #ClutterScript.

    Parameters

    • id_: string

      the #ClutterScript id of the object

    Returns void

  • set_keep_aspect_ratio(keep_aspect: boolean): void
  • Sets whether texture should have a preferred size maintaining the aspect ratio of the underlying image

    Parameters

    • keep_aspect: boolean

      %TRUE to maintain aspect ratio

    Returns void

  • Sets the #ClutterLayoutManager delegate object that will be used to lay out the children of self.

    The #ClutterActor will take a reference on the passed manager which will be released either when the layout manager is removed, or when the actor is destroyed.

    Parameters

    Returns void

  • set_load_async(load_async: boolean): void
  • Sets whether texture should use a worker thread to load the data from disk asynchronously. Setting load_async to %TRUE will make clutter_texture_set_from_file() return immediately.

    See the #ClutterTexture:load-async property documentation, and clutter_texture_set_load_data_async().

    Parameters

    • load_async: boolean

      %TRUE if the texture should asynchronously load data from a filename

    Returns void

  • set_load_data_async(load_async: boolean): void
  • Sets whether texture should use a worker thread to load the data from disk asynchronously. Setting load_async to %TRUE will make clutter_texture_set_from_file() block until the #ClutterTexture has determined the width and height of the image data.

    See the #ClutterTexture:load-async property documentation, and clutter_texture_set_load_async().

    Parameters

    • load_async: boolean

      %TRUE if the texture should asynchronously load data from a filename

    Returns void

  • set_margin(margin: Margin): void
  • set_margin_bottom(margin: number): void
  • set_margin_left(margin: number): void
  • set_margin_right(margin: number): void
  • set_margin_top(margin: number): void
  • set_name(name: string): void
  • Defines the circumstances where the actor should be redirected into an offscreen image. The offscreen image is used to flatten the actor into a single image while painting for two main reasons. Firstly, when the actor is painted a second time without any of its contents changing it can simply repaint the cached image without descending further down the actor hierarchy. Secondly, it will make the opacity look correct even if there are overlapping primitives in the actor.

    Caching the actor could in some cases be a performance win and in some cases be a performance lose so it is important to determine which value is right for an actor before modifying this value. For example, there is never any reason to flatten an actor that is just a single texture (such as a #ClutterTexture) because it is effectively already cached in an image so the offscreen would be redundant. Also if the actor contains primitives that are far apart with a large transparent area in the middle (such as a large CluterGroup with a small actor in the top left and a small actor in the bottom right) then the cached image will contain the entire image of the large area and the paint will waste time blending all of the transparent pixels in the middle.

    The default method of implementing opacity on a container simply forwards on the opacity to all of the children. If the children are overlapping then it will appear as if they are two separate glassy objects and there will be a break in the color where they overlap. By redirecting to an offscreen buffer it will be as if the two opaque objects are combined into one and then made transparent which is usually what is expected.

    The image below demonstrates the difference between redirecting and not. The image shows two Clutter groups, each containing a red and a green rectangle which overlap. The opacity on the group is set to 128 (which is 50%). When the offscreen redirect is not used, the red rectangle can be seen through the blue rectangle as if the two rectangles were separately transparent. When the redirect is used the group as a whole is transparent instead so the red rectangle is not visible where they overlap.

    Sample of using an offscreen redirect for transparency

    The default value for this property is 0, so we effectively will never redirect an actor offscreen by default. This means that there are times that transparent actors may look glassy as described above. The reason this is the default is because there is a performance trade off between quality and performance here. In many cases the default form of glassy opacity looks good enough, but if it's not you will need to set the %CLUTTER_OFFSCREEN_REDIRECT_AUTOMATIC_FOR_OPACITY flag to enable redirection for opacity.

    Custom actors that don't contain any overlapping primitives are recommended to override the has_overlaps() virtual to return %FALSE for maximum efficiency.

    Parameters

    Returns void

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

    The #ClutterActor:opacity property is animatable.

    Parameters

    • opacity: number

      New opacity value for the actor.

    Returns void

  • 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 #ClutterActors implementing the #ClutterContainer interface.

    Parameters

    Returns void

  • set_pick_with_alpha(pick_with_alpha: boolean): void
  • Sets whether texture should have it's shape defined by the alpha channel when picking.

    Be aware that this is a bit more costly than the default picking due to the texture lookup, extra test against the alpha value and the fact that it will also interrupt the batching of geometry done internally.

    Also there is currently no control over the threshold used to determine what value of alpha is considered pickable, and so only fully opaque parts of the texture will react to picking.

    Parameters

    • pick_with_alpha: boolean

      %TRUE if the alpha channel should affect the picking shape

    Returns void

  • set_pivot_point(pivot_x: number, pivot_y: number): void
  • Sets the position of the #ClutterActor:pivot-point around which the scaling and rotation transformations occur.

    The pivot point's coordinates are in normalized space, with the (0, 0) point being the top left corner of the actor, and the (1, 1) point being the bottom right corner.

    Parameters

    • pivot_x: number

      the normalized X coordinate of the pivot point

    • pivot_y: number

      the normalized Y coordinate of the pivot point

    Returns void

  • set_pivot_point_z(pivot_z: number): void
  • Sets the component on the Z axis of the #ClutterActor:pivot-point around which the scaling and rotation transformations occur.

    The pivot_z value is expressed as a distance along the Z axis.

    Parameters

    • pivot_z: number

      the Z coordinate of the actor's pivot point

    Returns void

  • set_position(x: number, y: number): void
  • Sets the actor's fixed position in pixels relative to any parent actor.

    If a layout manager is in use, this position will override the layout manager and force a fixed position.

    Parameters

    • x: number

      New left position of actor in pixels.

    • y: number

      New top position of actor in pixels.

    Returns void

  • set_property(property_name: string, value?: any): void
  • set_reactive(reactive: boolean): void
  • set_repeat(repeat_x: boolean, repeat_y: boolean): void
  • Sets whether the texture should repeat horizontally or vertically when the actor size is bigger than the image size

    Parameters

    • repeat_x: boolean

      %TRUE if the texture should repeat horizontally

    • repeat_y: boolean

      %TRUE if the texture should repeat vertically

    Returns void

  • set_rotation(axis: RotateAxis, angle: number, x: number, y: number, z: number): void
  • Sets the rotation angle of self around the given axis.

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

    • %CLUTTER_X_AXIS requires y and z
    • %CLUTTER_Y_AXIS requires x and z
    • %CLUTTER_Z_AXIS requires x and y

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

    Parameters

    • axis: RotateAxis

      the axis of rotation

    • angle: number

      the angle of rotation

    • x: number

      X coordinate of the rotation center

    • y: number

      Y coordinate of the rotation center

    • z: number

      Z coordinate of the rotation center

    Returns void

  • set_rotation_angle(axis: RotateAxis, angle: number): void
  • Sets the angle of rotation of a #ClutterActor on the given axis.

    This function is a convenience for setting the rotation properties #ClutterActor:rotation-angle-x, #ClutterActor:rotation-angle-y, and #ClutterActor:rotation-angle-z.

    The center of rotation is established by the #ClutterActor:pivot-point property.

    Parameters

    • axis: RotateAxis

      the axis to set the angle one

    • angle: number

      the angle of rotation, in degrees

    Returns void

  • set_scale(scale_x: number, scale_y: number): void
  • Scales an actor with the given factors.

    The scale transformation is relative the the #ClutterActor:pivot-point.

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

    Parameters

    • scale_x: number

      double factor to scale actor by horizontally.

    • scale_y: number

      double factor to scale actor by vertically.

    Returns void

  • set_scale_full(scale_x: number, scale_y: number, center_x: number, center_y: number): void
  • 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 #ClutterActor:scale-x and #ClutterActor:scale-y properties are animatable.

    Parameters

    • scale_x: number

      double factor to scale actor by horizontally.

    • scale_y: number

      double factor to scale actor by vertically.

    • center_x: number

      X coordinate of the center of the scaling

    • center_y: number

      Y coordinate of the center of the scaling

    Returns void

  • set_scale_with_gravity(scale_x: number, scale_y: number, gravity: Clutter.Gravity): void
  • Scales an actor with the given factors around the given center point. The center point is specified as one of the compass directions in #ClutterGravity. 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 #ClutterActor:scale-x and #ClutterActor:scale-y properties are animatable.

    Parameters

    • scale_x: number

      double factor to scale actor by horizontally.

    • scale_y: number

      double factor to scale actor by vertically.

    • gravity: Clutter.Gravity

      the location of the scale center expressed as a compass direction.

    Returns void

  • set_scale_z(scale_z: number): void
  • Scales an actor on the Z axis by the given scale_z factor.

    The scale transformation is relative the the #ClutterActor:pivot-point.

    The #ClutterActor:scale-z property is animatable.

    Parameters

    • scale_z: number

      the scaling factor along the Z axis

    Returns void

  • set_shader(shader: Shader): boolean
  • Sets the #ClutterShader to be used when rendering self.

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

    Any #ClutterEffect applied to self will take the precedence over the #ClutterShader set using this function.

    Parameters

    • shader: Shader

      a #ClutterShader or %NULL to unset the shader.

    Returns boolean

  • set_shader_param(param: string, value: any): void
  • set_shader_param_float(param: string, value: number): void
  • set_shader_param_int(param: string, value: number): void
  • set_size(width: number, height?: number): void
  • Sets the actor's size request in pixels. This overrides any "normal" size request the actor would have. For example a text actor might normally request the size of the text; this function would force a specific size instead.

    If width and/or height are -1 the actor will use its "normal" size request instead of overriding it, i.e. you can "unset" the size with -1.

    This function sets or unsets both the minimum and natural size.

    Parameters

    • width: number

      New width of actor in pixels, or -1

    • Optional height: number

      New height of actor in pixels, or -1

    Returns void

  • set_sync_size(sync_size: boolean): void
  • Sets whether texture should have the same preferred size as the underlying image data.

    Parameters

    • sync_size: boolean

      %TRUE if the texture should have the same size of the underlying image data

    Returns void

  • Sets the #ClutterTextDirection for an actor

    The passed text direction must not be %CLUTTER_TEXT_DIRECTION_DEFAULT

    If self implements #ClutterContainer then this function will recurse inside all the children of self (including the internal ones).

    Composite actors not implementing #ClutterContainer, or actors requiring special handling when the text direction changes, should connect to the #GObject::notify signal for the #ClutterActor:text-direction property

    Parameters

    Returns void

  • Overrides the transformations of a #ClutterActor with a custom matrix, which will be applied relative to the origin of the actor's allocation and to the actor's pivot point.

    The #ClutterActor:transform property is animatable.

    Parameters

    • transform: Clutter.Matrix

      a #ClutterMatrix, or %NULL to unset a custom transformation

    Returns void

  • set_translation(translate_x: number, translate_y: number, translate_z: number): void
  • Sets an additional translation transformation on a #ClutterActor, relative to the #ClutterActor:pivot-point.

    Parameters

    • translate_x: number

      the translation along the X axis

    • translate_y: number

      the translation along the Y axis

    • translate_z: number

      the translation along the Z axis

    Returns void

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

    If width is -1 the actor will use its preferred width request instead of overriding it, i.e. you can "unset" the width with -1.

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

    Parameters

    • width: number

      Requested new width for the actor, in pixels, or -1

    Returns void

  • set_x(x: number): void
  • Sets the actor's X coordinate, relative to its parent, in pixels.

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

    The #ClutterActor:x property is animatable.

    Parameters

    • x: number

      the actor's position on the X axis

    Returns void

  • Sets the horizontal alignment policy of a #ClutterActor, in case the actor received extra horizontal space.

    See also the #ClutterActor:x-align property.

    Parameters

    • x_align: ActorAlign

      the horizontal alignment policy

    Returns void

  • set_x_expand(expand: boolean): void
  • Sets whether a #ClutterActor should expand horizontally; this means that layout manager should allocate extra space for the actor, if possible.

    Setting an actor to expand will also make all its parent expand, so that it's possible to build an actor tree and only set this flag on its leaves and not on every single actor.

    Parameters

    • expand: boolean

      whether the actor should expand horizontally

    Returns void

  • set_y(y: number): void
  • Sets the actor's Y coordinate, relative to its parent, in pixels.#

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

    The #ClutterActor:y property is animatable.

    Parameters

    • y: number

      the actor's position on the Y axis

    Returns void

  • Sets the vertical alignment policy of a #ClutterActor, in case the actor received extra vertical space.

    See also the #ClutterActor:y-align property.

    Parameters

    • y_align: ActorAlign

      the vertical alignment policy

    Returns void

  • set_y_expand(expand: boolean): void
  • Sets whether a #ClutterActor should expand horizontally; this means that layout manager should allocate extra space for the actor, if possible.

    Setting an actor to expand will also make all its parent expand, so that it's possible to build an actor tree and only set this flag on its leaves and not on every single actor.

    Parameters

    • expand: boolean

      whether the actor should expand vertically

    Returns void

  • set_z_position(z_position: number): void
  • set_z_rotation_from_gravity(angle: number, gravity: Clutter.Gravity): void
  • Sets the rotation angle of self around the Z axis using the center point specified as a compass point. For example to rotate such that the center of the actor remains static you can use %CLUTTER_GRAVITY_CENTER. If the actor changes size the center point will move accordingly.

    Parameters

    • angle: number

      the angle of rotation

    • gravity: Clutter.Gravity

      the center point of the rotation

    Returns void

  • should_pick_paint(): boolean
  • Should be called inside the implementation of the #ClutterActor::pick virtual function in order to check whether the actor should paint itself in pick mode or not.

    This function should never be called directly by applications.

    Returns boolean

  • show(): void
  • 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 #ClutterActor:show-on-set-parent will be set to %TRUE as a side effect.

    Returns void

  • show_all(): void
  • sort_depth_order(): void
  • steal_data(key?: string): object
  • Remove a specified datum from the object's data associations, without invoking the association's destroy handler.

    Parameters

    • Optional key: string

      name of the key

    Returns object

  • steal_qdata(quark: number): object
  • This function gets back user data pointers stored via g_object_set_qdata() and removes the data from object without invoking its destroy() function (if any was set). Usually, calling this function is only required to update user data pointers with a destroy notifier, for example:

    void
    object_add_to_user_list (GObject *object,
    const gchar *new_string)
    {
    // the quark, naming the object data
    GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
    // retrieve the old string list
    GList *list = g_object_steal_qdata (object, quark_string_list);

    // prepend new string
    list = g_list_prepend (list, g_strdup (new_string));
    // this changed 'list', so we need to set it again
    g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
    }
    static void
    free_string_list (gpointer data)
    {
    GList *node, *list = data;

    for (node = list; node; node = node->next)
    g_free (node->data);
    g_list_free (list);
    }

    Using g_object_get_qdata() in the above example, instead of g_object_steal_qdata() would have left the destroy function set, and thus the partial string list would have been freed upon g_object_set_qdata_full().

    Parameters

    • quark: number

      A #GQuark, naming the user data pointer

    Returns object

  • thaw_notify(): void
  • Reverts the effect of a previous call to g_object_freeze_notify(). The freeze count is decreased on object and when it reaches zero, queued "notify" signals are emitted.

    Duplicate notifications for each property are squashed so that at most one #GObject::notify signal is emitted for each property, in the reverse order in which they have been queued.

    It is an error to call this function when the freeze count is zero.

    Returns void

  • transform_stage_point(x: number, y: number): [boolean, number, number]
  • 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 #ClutterActorClass.paint() implementation

    Parameters

    • x: number

      x screen coordinate of the point to unproject

    • y: number

      y screen coordinate of the point to unproject

    Returns [boolean, number, number]

  • unmap(): void
  • 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 #ClutterActor implementation of #ClutterActorClass.unmap() will also unmap any eventual children by default when their parent is unmapped.

    When overriding #ClutterActorClass.unmap(), it is mandatory to chain up to the parent implementation.

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

    Returns void

  • unparent(): void
  • 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 #ClutterActors implementing the #ClutterContainer interface.

    Returns void

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

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

    This function should not be called by application code.

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

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

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

    Returns void

  • unref(): void
  • Decreases the reference count of object. When its reference count drops to 0, the object is finalized (i.e. its memory is freed).

    If the pointer to the #GObject may be reused in future (for example, if it is an instance variable of another object), it is recommended to clear the pointer to %NULL rather than retain a dangling pointer to a potentially invalid #GObject instance. Use g_clear_object() for this.

    Returns void

  • Adds a #ClutterActor to container. This function will emit the "actor-added" signal. The actor should be parented to container. You cannot add a #ClutterActor to more than one #ClutterContainer.

    This function will call #ClutterContainerIface.add(), which is a deprecated virtual function. The default implementation will call clutter_actor_add_child().

    virtual

    Parameters

    Returns void

  • Assigns the size of a #ClutterActor from the given box.

    This function should only be called on the children of an actor when overriding the #ClutterActorClass.allocate() virtual function.

    This function will adjust the stored allocation to take into account the alignment flags set in the #ClutterActor:x-align and #ClutterActor:y-align properties, as well as the margin values set in the #ClutterActor:margin-top, #ClutterActor:margin-right, #ClutterActor:margin-bottom, and #ClutterActor:margin-left properties.

    This function will respect the easing state of the #ClutterActor 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.

    virtual

    Parameters

    • box: ActorBox

      new allocation of the actor, in parent-relative coordinates

    • flags: AllocationFlags

      flags that control the allocation

    Returns void

  • vfunc_animate_property(animation: Clutter.Animation, property_name: string, initial_value: any, final_value: any, progress: number, value: any): boolean
  • Calls the animate_property() virtual function for animatable.

    The initial_value and final_value #GValues must contain the same type; value must have been initialized to the same type of initial_value and final_value.

    All implementation of the #ClutterAnimatable interface must implement this function.

    virtual

    Parameters

    • animation: Clutter.Animation

      a #ClutterAnimation

    • property_name: string

      the name of the animated property

    • initial_value: any

      the initial value of the animation interval

    • final_value: any

      the final value of the animation interval

    • progress: number

      the progress factor

    • value: any

      return location for the animation value

    Returns boolean

  • vfunc_constructed(): void
  • Creates the #ClutterChildMeta wrapping actor inside the container, if the #ClutterContainerIface::child_meta_type class member is not set to %G_TYPE_INVALID.

    This function is only useful when adding a #ClutterActor to a #ClutterContainer implementation outside of the #ClutterContainer::add() virtual function implementation.

    Applications should not call this function.

    virtual

    Parameters

    Returns void

  • vfunc_destroy(): void
  • 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 #ClutterStage returned by clutter_stage_get_default().

    virtual

    Returns void

  • Destroys the #ClutterChildMeta wrapping actor inside the container, if any.

    This function is only useful when removing a #ClutterActor to a #ClutterContainer implementation outside of the #ClutterContainer::add() virtual function implementation.

    Applications should not call this function.

    virtual

    Parameters

    Returns void

  • vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: ParamSpec): void
  • vfunc_dispose(): void
  • vfunc_finalize(): void
  • vfunc_find_property(property_name: string): ParamSpec
  • Calls callback for each child of container that was added by the application (with clutter_container_add_actor()). Does not iterate over "internal" children that are part of the container's own implementation, if any.

    This function calls the #ClutterContainerIface.foreach() virtual function, which has been deprecated.

    virtual

    Parameters

    Returns void

  • Calls callback for each child of container, including "internal" children built in to the container itself that were never added by the application.

    This function calls the #ClutterContainerIface.foreach_with_internals() virtual function, which has been deprecated.

    virtual

    Parameters

    Returns void

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

    If no class-specific #AtkObject implementation is available for the actor instance in question, it will inherit an #AtkObject 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.

    virtual

    Returns Atk.Object

  • vfunc_get_id(): string
  • vfunc_get_initial_state(property_name: string, value: any): void
  • Retrieves the current state of property_name and sets value with it

    virtual

    Parameters

    • property_name: string

      the name of the animatable property to retrieve

    • value: any

      a #GValue initialized to the type of the property to retrieve

    Returns void

  • vfunc_get_preferred_height(for_width: number): [number, number]
  • 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.

    virtual

    Parameters

    • for_width: number

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

    Returns [number, number]

  • vfunc_get_preferred_width(for_height: number): [number, number]
  • 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.

    virtual

    Parameters

    • for_height: number

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

    Returns [number, number]

  • vfunc_get_property(property_id: number, value?: any, pspec?: ParamSpec): void
  • vfunc_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 #ClutterActorClass.has_overlaps() virtual function. See clutter_actor_set_offscreen_redirect() for more information.

    virtual

    Returns boolean

  • vfunc_hide(): void
  • 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 #ClutterActor:show-on-set-parent property will be set to %FALSE as a side-effect.

    virtual

    Returns void

  • vfunc_hide_all(): void
  • vfunc_interpolate_value(property_name: string, interval: Interval, progress: number): [boolean, any]
  • Asks a #ClutterAnimatable implementation to interpolate a a named property between the initial and final values of a #ClutterInterval, using progress as the interpolation value, and store the result inside value.

    This function should be used for every property animation involving #ClutterAnimatables.

    This function replaces clutter_animatable_animate_property().

    virtual

    Parameters

    • property_name: string

      the name of the property to interpolate

    • interval: Interval

      a #ClutterInterval with the animation range

    • progress: number

      the progress to use to interpolate between the initial and final values of the interval

    Returns [boolean, any]

  • vfunc_key_focus_in(): void
  • vfunc_key_focus_out(): void
  • Lowers actor to sibling level, in the depth ordering.

    This function calls the #ClutterContainerIface.lower() virtual function, which has been deprecated. The default implementation will call clutter_actor_set_child_below_sibling().

    virtual

    Parameters

    • actor: Clutter.Actor

      the actor to raise

    • sibling: Clutter.Actor

      the sibling to lower to, or %NULL to lower to the bottom

    Returns void

  • vfunc_map(): void
  • 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 #ClutterActorClass.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.

    virtual

    Returns void

  • Emits a "notify" signal for the property property_name on object.

    When possible, eg. when signaling a property change from within the class that registered the property, you should use g_object_notify_by_pspec() instead.

    Note that emission of the notify signal may be blocked with g_object_freeze_notify(). In this case, the signal emissions are queued and will be emitted (in reverse order) when g_object_thaw_notify() is called.

    virtual

    Parameters

    Returns void

  • vfunc_paint(): void
  • 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 #ClutterActor::paint signal or the #ClutterActor::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.

    virtual

    Returns void

  • Parses the passed JSON node. The implementation must set the type of the passed #GValue pointer using g_value_init().

    virtual

    Parameters

    • script: Clutter.Script

      the #ClutterScript creating the scriptable instance

    • value: any

      the generic value to be set

    • name: string

      the name of the node

    • node: Json.Node

      the JSON node to be parsed

    Returns boolean

  • vfunc_pixbuf_change(): void
  • vfunc_queue_relayout(): void
  • Indicates that the actor's size request or other layout-affecting properties may have changed. This function is used inside #ClutterActor subclass implementations, not by applications directly.

    Queueing a new layout automatically queues a redraw as well.

    virtual

    Returns void

  • Raises actor to sibling level, in the depth ordering.

    This function calls the #ClutterContainerIface.raise() virtual function, which has been deprecated. The default implementation will call clutter_actor_set_child_above_sibling().

    virtual

    Parameters

    Returns void

  • vfunc_realize(): void
  • 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.

    virtual

    Returns void

  • Removes actor from container. The actor should be unparented, so if you want to keep it around you must hold a reference to it yourself, using g_object_ref(). When the actor has been removed, the "actor-removed" signal is emitted by container.

    This function will call #ClutterContainerIface.remove(), which is a deprecated virtual function. The default implementation will call clutter_actor_remove_child().

    virtual

    Parameters

    Returns void

  • vfunc_set_custom_property(script: Clutter.Script, name: string, value: any): void
  • Overrides the common properties setting. The underlying virtual function should be used when implementing custom properties.

    virtual

    Parameters

    • script: Clutter.Script

      the #ClutterScript creating the scriptable instance

    • name: string

      the name of the property

    • value: any

      the value of the property

    Returns void

  • vfunc_set_final_state(property_name: string, value: any): void
  • vfunc_set_id(id_: string): void
  • Sets id_ as the unique Clutter script it for this instance of #ClutterScriptableIface.

    This name can be used by user interface designer applications to define a unique name for an object constructable using the UI definition language parsed by #ClutterScript.

    virtual

    Parameters

    • id_: string

      the #ClutterScript id of the object

    Returns void

  • vfunc_set_property(property_id: number, value?: any, pspec?: ParamSpec): void
  • vfunc_show(): void
  • 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 #ClutterActor:show-on-set-parent will be set to %TRUE as a side effect.

    virtual

    Returns void

  • vfunc_show_all(): void
  • vfunc_size_change(width: number, height: number): void
  • vfunc_sort_depth_order(): void
  • vfunc_unmap(): void
  • 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 #ClutterActor implementation of #ClutterActorClass.unmap() will also unmap any eventual children by default when their parent is unmapped.

    When overriding #ClutterActorClass.unmap(), it is mandatory to chain up to the parent implementation.

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

    virtual

    Returns void

  • vfunc_unrealize(): void
  • 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.

    virtual

    Returns void

  • watch_closure(closure: TClosure<any, any>): void
  • This function essentially limits the life time of the closure to the life time of the object. That is, when the object is finalized, the closure is invalidated by calling g_closure_invalidate() on it, in order to prevent invocations of the closure with a finalized (nonexisting) object. Also, g_object_ref() and g_object_unref() are added as marshal guards to the closure, to ensure that an extra reference count is held on object during invocation of the closure. Usually, this function will be called on closures that use this object as closure data.

    Parameters

    • closure: TClosure<any, any>

      #GClosure to watch

    Returns void

  • compat_control(what: number, data: object): number
  • Find the #GParamSpec with the given name for an interface. Generally, the interface vtable passed in as g_iface will be the default vtable from g_type_default_interface_ref(), or, if you know the interface has already been loaded, g_type_default_interface_peek().

    Parameters

    • g_iface: TypeInterface

      any interface vtable for the interface, or the default vtable for the interface

    • property_name: string

      name of a property to look up.

    Returns ParamSpec

  • Add a property to an interface; this is only useful for interfaces that are added to GObject-derived types. Adding a property to an interface forces all objects classes with that interface to have a compatible property. The compatible property could be a newly created #GParamSpec, but normally g_object_class_override_property() will be used so that the object class only needs to provide an implementation and inherits the property description, default value, bounds, and so forth from the interface property.

    This function is meant to be called from the interface's default vtable initialization function (the class_init member of #GTypeInfo.) It must not be called after after class_init has been called for any object types implementing this interface.

    If pspec is a floating reference, it will be consumed.

    Parameters

    • g_iface: TypeInterface

      any interface vtable for the interface, or the default vtable for the interface.

    • pspec: ParamSpec

      the #GParamSpec for the new property

    Returns void

  • Lists the properties of an interface.Generally, the interface vtable passed in as g_iface will be the default vtable from g_type_default_interface_ref(), or, if you know the interface has already been loaded, g_type_default_interface_peek().

    Parameters

    • g_iface: TypeInterface

      any interface vtable for the interface, or the default vtable for the interface

    Returns ParamSpec[]

  • Creates a new #ClutterTexture object with its source a prexisting actor (and associated children). The textures content will contain 'live' redirected output of the actors scene.

    Note this function is intented as a utility call for uniformly applying shaders to groups and other potential visual effects. It requires that the %CLUTTER_FEATURE_OFFSCREEN feature is supported by the current backend and the target system.

    Some tips on usage:

    • The source actor must be visible
    • The source actor must have a parent in order for it to be allocated a size from the layouting mechanism. If the source actor does not have a parent when this function is called then the ClutterTexture will adopt it and allocate it at its preferred size. Using this you can clone an actor that is otherwise not displayed. Because of this feature if you do intend to display the source actor then you must make sure that the actor is parented before calling clutter_texture_new_from_actor() or that you unparent it before adding it to a container.
    • When getting the image for the clone texture, Clutter will attempt to render the source actor exactly as it would appear if it was rendered on screen. The source actor's parent transformations are taken into account. Therefore if your source actor is rotated along the X or Y axes so that it has some depth, the texture will appear differently depending on the on-screen location of the source actor. While painting the source actor, Clutter will set up a temporary asymmetric perspective matrix as the projection matrix so that the source actor will be projected as if a small section of the screen was being viewed. Before version 0.8.2, an orthogonal identity projection was used which meant that the source actor would be clipped if any part of it was not on the zero Z-plane.
    • Avoid reparenting the source with the created texture.
    • A group can be padded with a transparent rectangle as to provide a border to contents for shader output (blurring text for example).
    • The texture will automatically resize to contain a further transformed source. However, this involves overhead and can be avoided by placing the source actor in a bounding group sized large enough to contain any child tranformations.
    • Uploading pixel data to the texture (e.g by using clutter_texture_set_from_file()) will destroy the offscreen texture data and end redirection.
    • cogl_texture_get_data() with the handle returned by clutter_texture_get_cogl_texture() can be used to read the offscreen texture pixels into a pixbuf.

    Parameters

    Returns Clutter.Texture

  • Creates a new ClutterTexture actor to display the image contained a file. If the image failed to load then NULL is returned and error is set.

    Parameters

    • filename: string

      The name of an image file to load.

    Returns Clutter.Texture

  • Creates a new instance of a #GObject subtype and sets its properties.

    Construction parameters (see %G_PARAM_CONSTRUCT, %G_PARAM_CONSTRUCT_ONLY) which are not explicitly specified are set to their default values.

    Parameters

    • object_type: GType<unknown>

      the type id of the #GObject subtype to instantiate

    • parameters: GObject.Parameter[]

      an array of #GParameter

    Returns GObject.Object

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method