Top | ![]() |
![]() |
![]() |
![]() |
GtkWidget * | gtk_clutter_embed_new () |
ClutterActor * | gtk_clutter_embed_get_stage () |
void | gtk_clutter_embed_set_use_layout_size () |
gboolean | gtk_clutter_embed_get_use_layout_size () |
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.
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.
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.
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.
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.
Since 1.4
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.
Since 1.4
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 { };
Base class for GtkClutterEmbed.
The GtkClutterEmbedClass contains only private data.
“use-layout-size”
property “use-layout-size” gboolean
The GtkWidget to be embedded into the GtkClutterActor
Flags: Read / Write / Construct
Default value: FALSE
Since 1.4