Widget.getAllocation

void getAllocation(out gtk.types.Allocation allocation)

Retrieves the widget’s allocation.

Note, when implementing a layout container: a widget’s allocation will be its “adjusted” allocation, that is, the widget’s parent typically calls [gtk.widget.Widget.sizeAllocate] with an allocation, and that allocation is then adjusted (to handle margin and alignment for example) before assignment to the widget. [gtk.widget.Widget.getAllocation] returns the adjusted allocation that was actually assigned to the widget. The adjusted allocation is guaranteed to be completely contained within the [gtk.widget.Widget.sizeAllocate] allocation, however.

So a layout container is guaranteed that its children stay inside the assigned bounds, but not that they have exactly the bounds the container assigned.

Parameters

allocationa pointer to a GtkAllocation to copy to

Deprecated

Use [gtk.widget.Widget.computeBounds],

[gtk.widget.Widget.getWidth] or [gtk.widget.Widget.getHeight] instead.