Package: gtk

Function gtk:widget-compute-bounds

Lambda List

gtk:widget-compute-bounds (widget target bounds)

Arguments

widget -- a gtk:widget object
target -- a gtk:widget target widget
bounds -- a graphene:rect-t instance for the result

Return Value

The graphene:rect-t instance with the bounds, or nil.

Details

Computes the bounds for widget in the coordinate space of target. The bounds of the widget are the bounding box of the region that it is expected to draw in. See the coordinate system overview to learn more.

If the operation is successful, bounds is returned. If widget has no bounds or the bounds cannot be expressed in the coordinate space of target, for example, if both widgets are in different windows, nil is returned and bounds is set to the zero rectangle.

It is valid for widget and target to be the same widget.
 

See also

2025-2-15