[gtk+] add getter function for widget->allocation



commit 4a73b41a3496db5f50c4afd3c6678a9c98070979
Author: Cody Russell <bratsche gnome org>
Date:   Wed Jul 29 22:28:17 2009 -0500

    add getter function for widget->allocation
    
    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 |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 1432819..075e365 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -10677,6 +10677,23 @@ gtk_widget_get_has_tooltip (GtkWidget *widget)
 }
 
 /**
+ * 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
  *



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]