gtk+ r20625 - trunk/gtk
- From: timj svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r20625 - trunk/gtk
- Date: Fri, 20 Jun 2008 11:10:15 +0000 (UTC)
Author: timj
Date: Fri Jun 20 11:10:14 2008
New Revision: 20625
URL: http://svn.gnome.org/viewvc/gtk+?rev=20625&view=rev
Log:
Change docs and signature of gtk_widget_get_allocation
Modified:
trunk/gtk/gtkwidget.c
trunk/gtk/gtkwidget.h
Modified: trunk/gtk/gtkwidget.c
==============================================================================
--- trunk/gtk/gtkwidget.c (original)
+++ trunk/gtk/gtkwidget.c Fri Jun 20 11:10:14 2008
@@ -677,8 +677,7 @@
/**
* GtkWidget:window:
*
- * The widget's window or its parent window if it does not have a
- * window (as indicated by the GTK_NO_WINDOW flag).
+ * The widget's window if it is realized, %NULL otherwise.
*
* Since: GSEAL-branch
*/
@@ -686,7 +685,7 @@
PROP_WINDOW,
g_param_spec_object ("window",
P_("Window"),
- P_("The widget's window or its parent window"),
+ P_("The widget's window if it is realized"),
GDK_TYPE_WINDOW,
GTK_PARAM_READABLE));
@@ -9890,30 +9889,27 @@
/**
* gtk_widget_get_allocation:
* @widget: a #GtkWidget
- * @allocation: a #GtkAllocation
*
- * Fills @allocation with the widget's allocation as provided by its parent.
+ * Retrieves the widget's allocation.
+ *
+ * Return value: widget's allocation
*
* Since: GSEAL-branch
*/
-void
-gtk_widget_get_allocation (GtkWidget *widget,
- GtkAllocation *allocation)
+GtkAllocation
+gtk_widget_get_allocation (GtkWidget *widget)
{
- g_return_if_fail (GTK_IS_WIDGET (widget));
- g_return_if_fail (allocation != NULL);
+ GtkAllocation allocation;
+ g_return_val_if_fail (GTK_IS_WIDGET (widget), allocation);
- allocation->x = widget->allocation.x;
- allocation->y = widget->allocation.y;
- allocation->width = widget->allocation.width;
- allocation->height = widget->allocation.height;
+ return widget->allocation;
}
/**
* gtk_widget_get_window:
* @widget: a #GtkWidget
*
- * Returns the widget's window or the parent window.
+ * Returns the widget's window if it is realized, %NULL otherwise
*
* Return value: @widget's window.
*
Modified: trunk/gtk/gtkwidget.h
==============================================================================
--- trunk/gtk/gtkwidget.h (original)
+++ trunk/gtk/gtkwidget.h Fri Jun 20 11:10:14 2008
@@ -572,8 +572,7 @@
void gtk_widget_set_child_visible (GtkWidget *widget,
gboolean is_visible);
gboolean gtk_widget_get_child_visible (GtkWidget *widget);
-void gtk_widget_get_allocation (GtkWidget *widget,
- GtkAllocation*allocation);
+GtkAllocation gtk_widget_get_allocation (GtkWidget *widget);
GdkWindow* gtk_widget_get_window (GtkWidget *widget);
GtkWidget *gtk_widget_get_parent (GtkWidget *widget);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]