## GtkClutterActor

GtkClutterActor — actor for embedding a Widget in a Clutter stage

## Synopsis

                        GtkClutterActor;
                        GtkClutterActorClass;
    ClutterActor *      gtk_clutter_actor_new               (void);
    ClutterActor *      gtk_clutter_actor_new_with_contents (GtkWidget *contents);
    GtkWidget *         gtk_clutter_actor_get_contents      (GtkClutterActor *actor);
    GtkWidget *         gtk_clutter_actor_get_widget        (GtkClutterActor *actor);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----ClutterActor
                   +----GtkClutterActor

## Implemented Interfaces

GtkClutterActor implements ClutterScriptable, ClutterAnimatable, AtkImplementorIface and ClutterContainer.

## Properties

      "contents"                 GtkWidget*            : Read / Write / Construct

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

## Details

### GtkClutterActor

    typedef struct _GtkClutterActor GtkClutterActor;

A ClutterActor containing a GtkWidget.

### GtkClutterActorClass

    typedef struct {
    } GtkClutterActorClass;

Base class for GtkClutterActor.

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

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

`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

`actor` : | a GtkClutterActor
Returns : | a GtkBin. [transfer none]

## Property Details

### The `"contents"` property

      "contents"                 GtkWidget*            : Read / Write / Construct

The GtkWidget to be embedded into the GtkClutterActor