Method
GtkWidgetget_allocation
deprecated: 4.12
Declaration [src]
void
gtk_widget_get_allocation (
GtkWidget* widget,
GtkAllocation* allocation
)
Description [src]
Retrieves the widget’s allocation.
Note, when implementing a layout widget: a widget’s allocation
will be its “adjusted” allocation, that is, the widget’s parent
typically calls gtk_widget_size_allocate()
with an allocation,
and that allocation is then adjusted (to handle margin
and alignment for example) before assignment to the widget.
gtk_widget_get_allocation()
returns the adjusted allocation that
was actually assigned to the widget. The adjusted allocation is
guaranteed to be completely contained within the
gtk_widget_size_allocate()
allocation, however.
So a layout widget is guaranteed that its children stay inside the assigned bounds, but not that they have exactly the bounds the widget assigned.
Deprecated since: 4.12
Use gtk_widget_compute_bounds()
,
gtk_widget_get_width()
or gtk_widget_get_height()
instead.
Parameters
allocation
-
Type:
GtkAllocation
A pointer to a
GtkAllocation
to copy to.The argument will be set by the function. The returned data is owned by the instance.