GtkClutterEmbed

## GtkClutterEmbed GtkClutterEmbed — Widget for embedding a Clutter scene |

## Synopsis

    struct              GtkClutterEmbed;
    struct              GtkClutterEmbedClass;
    GtkWidget *         gtk_clutter_embed_new               (void);
    ClutterActor *      gtk_clutter_embed_get_stage         (GtkClutterEmbed *embed);

    void                gtk_clutter_embed_set_use_layout_size
                                                            (GtkClutterEmbed *embed,
                                                             gboolean use_layout_size);
    gboolean            gtk_clutter_embed_get_use_layout_size
                                                            (GtkClutterEmbed *embed);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkWidget
                   +----GtkContainer
                         +----GtkClutterEmbed

## Implemented Interfaces

GtkClutterEmbed implements AtkImplementorIface and GtkBuildable.

## Properties

      "use-layout-size"          gboolean              : Read / Write / Construct

## Description

GtkClutterEmbed is a GTK+ widget embedding a ClutterStage inside a GTK+ application.

By using a GtkClutterEmbed widget is possible to build, show and interact with a scene built using Clutter inside a GTK+ application.

### Warning

Though GtkClutterEmbed is a GtkContainer subclass, it is not a real GTK+ container; GtkClutterEmbed is required to implement GtkContainer in order to embed a GtkWidget through the GtkClutterActor class. Calling `gtk_container_add()` on a GtkClutterEmbed will trigger an assertion. It is strongly advised not to override the GtkContainer implementation when subclassing GtkClutterEmbed.

## Details

### struct GtkClutterEmbed

    struct GtkClutterEmbed;

A GtkWidget containing the default Clutter stage.

The GtkClutterEmbed structure contains only private data and should be accessed using the provided API.

### struct GtkClutterEmbedClass

    struct GtkClutterEmbedClass {
    };

Base class for GtkClutterEmbed.

The GtkClutterEmbedClass contains only private data.

### gtk_clutter_embed_new ()

    GtkWidget *         gtk_clutter_embed_new               (void);

Creates a new GtkClutterEmbed widget. This widget can be used to build a scene using Clutter API into a GTK+ application.

Returns : | the newly created GtkClutterEmbed

### gtk_clutter_embed_get_stage ()

    ClutterActor *      gtk_clutter_embed_get_stage         (GtkClutterEmbed *embed);

Retrieves the ClutterStage from `embed`. The returned stage can be used to add actors to the Clutter scene.

`embed` : | a GtkClutterEmbed
Returns : | the Clutter stage. You should never destroy or unref the returned actor. [transfer none]

### gtk_clutter_embed_set_use_layout_size ()

    void                gtk_clutter_embed_set_use_layout_size
                                                            (GtkClutterEmbed *embed,
                                                             gboolean use_layout_size);

Changes the way `embed` requests size. If `use_layout_size` is `TRUE`, the `embed` widget will request the size that the LayoutManager reports as the preferred size. This means that a Gtk+ window will automatically get the natural and minimum toplevel window sizes. This is useful when the contents of the clutter stage is similar to a traditional UI.

If `use_layout_size` is `FALSE` (which is the default) then `embed` will not request any size and its up to the embedder to make sure there is some size (by setting a custom size on the widget or a default size on the toplevel. This makes more sense when using the `embed` as a viewport into a potentially unlimited clutter space.

`embed` : | a GtkClutterEmbed
`use_layout_size` : | a boolean

Since 1.4

### gtk_clutter_embed_get_use_layout_size ()

    gboolean            gtk_clutter_embed_get_use_layout_size
                                                            (GtkClutterEmbed *embed);

Retrieves whether the embedding uses the layout size, see `gtk_clutter_embed_set_use_layout_size()` for details.

`embed` : | a GtkClutterEmbed
Returns : | `TRUE` if reporting stage size as widget size, `FALSE` otherwise.

Since 1.4

## Property Details

### The `"use-layout-size"` property

      "use-layout-size"          gboolean              : Read / Write / Construct

The GtkWidget to be embedded into the GtkClutterActor

Default value: FALSE

Since 1.4

## See Also

ClutterStage