]> Pileus Git - ~andy/gtk/commitdiff
add getter function for widget->allocation
authorCody Russell <bratsche@gnome.org>
Thu, 30 Jul 2009 03:28:17 +0000 (22:28 -0500)
committerCody Russell <bratsche@gnome.org>
Thu, 30 Jul 2009 03:28:17 +0000 (22:28 -0500)
Add gtk_widget_get_allocation() to retrieve a widget's allocation.
Needed as a step to enable GSEAL building.

This fixes bug #585211

gtk/gtkwidget.c

index 143281974f020983da7e18ba1d6def3867d02091..075e3655897f606f444c35666c0fc86adc759dfb 100644 (file)
@@ -10676,6 +10676,23 @@ gtk_widget_get_has_tooltip (GtkWidget *widget)
   return has_tooltip;
 }
 
+/**
+ * gtk_widget_get_allocation:
+ * @widget: a #GtkWidget
+ * @allocation: a pointer to a #GtkAllocation to copy to
+ *
+ * Retrieves the widget's allocation.
+ *
+ * Since: 2.18
+ */
+void
+gtk_widget_get_allocation (GtkWidget *widget, GtkAllocation *allocation)
+{
+  g_return_if_fail (GTK_IS_WIDGET (widget));
+
+  *allocation = widget->allocation;
+}
+
 /**
  * gtk_widget_get_window:
  * @widget: a #GtkWidget