GtkClutter.Embed

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container GtkClutter.Embed GtkClutter.Embed Gtk.Container->GtkClutter.Embed Gtk.Widget->Gtk.Container

Subclasses:

None

Methods

Inherited:

Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10)

Structs:

Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)

class

new ()

get_stage ()

get_use_layout_size ()

set_use_layout_size (use_layout_size)

Virtual Methods

Inherited:

Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)

Properties

Inherited:

Gtk.Container (3), Gtk.Widget (39)

Name

Type

Flags

Short Description

use-layout-size

bool

r/w/c

Whether to use the reported size of the LayoutManager on the stage as the widget size.

Style Properties

Inherited:

Gtk.Widget (17)

Signals

Inherited:

Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Fields

Inherited:

Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Name

Type

Access

Description

parent_instance

Gtk.Container

r

Class Details

class GtkClutter.Embed(**kwargs)
Bases:

Gtk.Container

Abstract:

No

Structure:

GtkClutter.EmbedClass

A Gtk.Widget containing the default Clutter stage.

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

classmethod new()
Returns:

the newly created GtkClutter.Embed

Return type:

Gtk.Widget

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

get_stage()
Returns:

the Clutter stage. You should never destroy or unref the returned actor.

Return type:

Clutter.Actor

Retrieves the Clutter.Stage from self. The returned stage can be used to add actors to the Clutter scene.

get_use_layout_size()
Returns:

True if reporting stage size as widget size, False otherwise.

Return type:

bool

Retrieves whether the embedding uses the layout size, see GtkClutter.Embed.set_use_layout_size() for details.

New in version 1.4.

set_use_layout_size(use_layout_size)
Parameters:

use_layout_size (bool) – a boolean

Changes the way self requests size. If use_layout_size is True, the self 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 self 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 self as a viewport into a potentially unlimited clutter space.

New in version 1.4.

Property Details

GtkClutter.Embed.props.use_layout_size
Name:

use-layout-size

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

The Gtk.Widget to be embedded into the GtkClutter.Actor

New in version 1.4.