Gtk.Widget.prototype.region_intersect

function region_intersect(region:cairo.Region):cairo.Region {
    // Gjs wrapper for gtk_widget_region_intersect()
}

Computes the intersection of a widget's area and region, returning the intersection. The result may be empty, use cairo_region_is_empty() to check.

region

a #cairo_region_t, in the same coordinate system as widget->allocation. That is, relative to widget->window for %NO_WINDOW widgets; relative to the parent window of widget->window for widgets with their own window.

Returns

A newly allocated region holding the intersection of widget and region. The coordinates of the return value are relative to widget->window for %NO_WINDOW widgets, and relative to the parent window of widget->window for widgets with their own window.