[gtk+] Fix gtk_widget_get_allocation()
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+] Fix gtk_widget_get_allocation()
- Date: Thu, 30 Jul 2009 10:01:33 +0000 (UTC)
commit 60077615498bc6a213e19f01f8c168c90a8fa5d8
Author: Michael Natterer <mitch gimp org>
Date: Thu Jul 30 11:49:47 2009 +0200
Fix gtk_widget_get_allocation()
- add it to the header
- add the symbol to gtk.symbols
- fix coding style and check for allocation != NULL
gtk/gtk.symbols | 1 +
gtk/gtkwidget.c | 4 +++-
gtk/gtkwidget.h | 3 +++
3 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols
index 8f17063..d120fec 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -4956,6 +4956,7 @@ gtk_widget_error_bell
gtk_widget_event
gtk_widget_freeze_child_notify
gtk_widget_get_accessible
+gtk_widget_get_allocation
gtk_widget_get_ancestor
gtk_widget_get_app_paintable
gtk_widget_get_child_requisition
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 075e365..a81dc2d 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -10686,9 +10686,11 @@ gtk_widget_get_has_tooltip (GtkWidget *widget)
* Since: 2.18
*/
void
-gtk_widget_get_allocation (GtkWidget *widget, GtkAllocation *allocation)
+gtk_widget_get_allocation (GtkWidget *widget,
+ GtkAllocation *allocation)
{
g_return_if_fail (GTK_IS_WIDGET (widget));
+ g_return_if_fail (allocation != NULL);
*allocation = widget->allocation;
}
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 70be8ef..e074baa 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -599,6 +599,9 @@ void gtk_widget_set_child_visible (GtkWidget *widget,
gboolean gtk_widget_get_child_visible (GtkWidget *widget);
GdkWindow* gtk_widget_get_window (GtkWidget *widget);
+void gtk_widget_get_allocation (GtkWidget *widget,
+ GtkAllocation *allocation);
+
gboolean gtk_widget_child_focus (GtkWidget *widget,
GtkDirectionType direction);
gboolean gtk_widget_keynav_failed (GtkWidget *widget,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]