get_allocation
Description:
public void get_allocation (out Allocation allocation)
Warning: get_allocation is deprecated since 4.12.
Retrieves the widget’s allocation.
Use [method@Gtk.Widget.compute_bounds], [method@Gtk.Widget.get_width] or [method@Gtk.Widget.get_height] instead.
Note, when implementing a layout container: a widget’s allocation will be its “adjusted” allocation, that is, the widget’s parent typically calls [method@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. [method@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 [method@Gtk.Widget.size_allocate] 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:
this |
a `GtkWidget` |
allocation |
a pointer to a `GtkAllocation` to copy to |