## GtkClutterActor

GtkClutterActor — actor for embedding a Widget in a Clutter stage

## Functions

ClutterActor * | gtk_clutter_actor_new ()
ClutterActor * | gtk_clutter_actor_new_with_contents ()
GtkWidget * | gtk_clutter_actor_get_contents ()
GtkWidget * | gtk_clutter_actor_get_widget ()

## Properties

GtkWidget * | contents | Read / Write / Construct

## Types and Values

struct | GtkClutterActor
struct | GtkClutterActorClass

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── ClutterActor
                ╰── GtkClutterActor

## Implemented Interfaces

GtkClutterActor implements ClutterContainer, ClutterScriptable, ClutterAnimatable and AtkImplementorIface.

## Description

GtkClutterActor is a ClutterContainer that also allows embedding any GtkWidget in a Clutter scenegraph.

GtkClutterActor only allows embedding GtkWidgets when inside the ClutterStage provided by a GtkClutterEmbed: it is not possible to use GtkClutterActor in a ClutterStage handled by Clutter alone.

## Functions

### gtk_clutter_actor_new ()

    ClutterActor *
    gtk_clutter_actor_new (void);

Creates a new GtkClutterActor.

This widget can be used to embed a GtkWidget into a Clutter scene, by retrieving the internal GtkBin container using `gtk_clutter_actor_get_widget()` and adding the GtkWidget to it.

#### Returns

the newly created GtkClutterActor

### gtk_clutter_actor_new_with_contents ()

    ClutterActor *
    gtk_clutter_actor_new_with_contents (GtkWidget *contents);

Creates a new GtkClutterActor widget. This widget can be used to embed a Gtk widget into a clutter scene.

This function is the logical equivalent of:

    1
    2
    3
    4

    ClutterActor *actor = gtk_clutter_actor_new ();
    GtkWidget *bin = gtk_clutter_actor_get_widget (GTK_CLUTTER_ACTOR (actor));

    gtk_container_add (GTK_CONTAINER (bin), contents);

#### Parameters

contents | a GtkWidget to pack into this ClutterActor |

#### Returns

the newly created GtkClutterActor

### gtk_clutter_actor_get_contents ()

    GtkWidget *
    gtk_clutter_actor_get_contents (GtkClutterActor *actor);

Retrieves the child of the GtkBin used to hold the contents of `actor` .

This convenience function is the logical equivalent of:

    1
    2
    3
    4

    GtkWidget *bin;

    bin = gtk_clutter_actor_get_widget (GTK_CLUTTER_ACTOR (actor));
    return gtk_bin_get_child (GTK_BIN (bin));

#### Parameters

actor | a GtkClutterActor |

#### Returns

a GtkWidget, or `NULL` if not content has been set.

[transfer none]

### gtk_clutter_actor_get_widget ()

    GtkWidget *
    gtk_clutter_actor_get_widget (GtkClutterActor *actor);

Retrieves the GtkBin used to hold the “contents” widget

#### Parameters

actor | a GtkClutterActor |

#### Returns

a GtkBin.

[transfer none]

## Types and Values

### struct GtkClutterActor

    struct GtkClutterActor;

A ClutterActor containing a GtkWidget.

### struct GtkClutterActorClass

    struct GtkClutterActorClass {
    };

Base class for GtkClutterActor.

## Property Details

### The `“contents”` property

      “contents”                 GtkWidget *

The GtkWidget to be embedded into the GtkClutterActor

Owner: GtkClutterActor

Flags: Read / Write / Construct