2006-06-06 Iain Holmes <iain@openedhand.com>

* gtk/gtk-clutter.c (size_request): Take the size of the widget from
        the ClutterStage.
        (gtk_clutter_class_init): Hook up size-request
This commit is contained in:
Iain Holmes 2006-06-06 18:25:55 +00:00
parent f0efad6b79
commit 615d519d7a
2 changed files with 21 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2006-06-06 Iain Holmes <iain@openedhand.com>
* gtk/gtk-clutter.c (size_request): Take the size of the widget from
the ClutterStage.
(gtk_clutter_class_init): Hook up size-request
2006-06-06 Iain Holmes <iain@openedhand.com>
* gtk/: Add a gtk widget for clutter.

View File

@ -59,6 +59,20 @@ dispose (GObject *object)
G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
size_request (GtkWidget *widget,
GtkRequisition *req)
{
GtkClutter *clutter;
GtkClutterPrivate *priv;
clutter = GTK_CLUTTER (widget);
priv = GTK_CLUTTER_GET_PRIVATE (clutter);
req->width = clutter_element_get_width (priv->stage);
req->height = clutter_element_get_height (priv->stage);
}
static void
hierarchy_changed (GtkWidget *widget,
GtkWidget *parent)
@ -86,6 +100,7 @@ gtk_clutter_class_init (GtkClutterClass *klass)
gobject_class->dispose = dispose;
widget_class->size_request = size_request;
widget_class->hierarchy_changed = hierarchy_changed;
g_type_class_add_private (gobject_class, sizeof (GtkClutterPrivate));