gdk: keep region APIs introspectable

This commit is contained in:
Daemonratte 2026-05-08 15:25:38 +02:00
commit a42887b04c
3 changed files with 16 additions and 10 deletions

View file

@ -1292,7 +1292,7 @@ gdk_drawable_real_get_composite_drawable (GdkDrawable *drawable,
}
/**
* gdk_drawable_get_clip_region: (skip)
* gdk_drawable_get_clip_region:
* @drawable: a #GdkDrawable
*
* Computes the region of a drawable that potentially can be written
@ -1302,7 +1302,7 @@ gdk_drawable_real_get_composite_drawable (GdkDrawable *drawable,
* but no area outside of this region will be affected by drawing
* primitives.
*
* Returns: a #GdkRegion. This must be freed with gdk_region_destroy()
* Returns: (transfer full): a #GdkRegion. This must be freed with gdk_region_destroy()
* when you are done.
**/
GdkRegion *
@ -1314,7 +1314,7 @@ gdk_drawable_get_clip_region (GdkDrawable *drawable)
}
/**
* gdk_drawable_get_visible_region: (skip)
* gdk_drawable_get_visible_region:
* @drawable: a #GdkDrawable
*
* Computes the region of a drawable that is potentially visible.
@ -1322,7 +1322,7 @@ gdk_drawable_get_clip_region (GdkDrawable *drawable)
* obscured by other windows, but no area outside of this region
* is visible.
*
* Returns: a #GdkRegion. This must be freed with gdk_region_destroy()
* Returns: (transfer full): a #GdkRegion. This must be freed with gdk_region_destroy()
* when you are done.
**/
GdkRegion *

View file

@ -103,7 +103,7 @@ static void miSetExtents (GdkRegion *pReg);
*
* Creates a new empty #GdkRegion.
*
* Returns: a new empty #GdkRegion
* Returns: (transfer full): a new empty #GdkRegion
*/
GdkRegion *
gdk_region_new (void)
@ -148,13 +148,19 @@ _gdk_region_new_from_yxbanded_rects (GdkRectangle *rects,
}
/**
* GdkRegion: (copy-func gdk_region_copy) (free-func gdk_region_destroy)
*
* An opaque region type.
*/
/**
* gdk_region_rectangle:
* @rectangle: a #GdkRectangle
*
* Creates a new region containing the area @rectangle.
*
* Return value: a new region
* Return value: (transfer full): a new region
**/
GdkRegion *
gdk_region_rectangle (const GdkRectangle *rectangle)
@ -185,7 +191,7 @@ gdk_region_rectangle (const GdkRectangle *rectangle)
*
* Copies @region, creating an identical new region.
*
* Return value: a new region identical to @region
* Return value: (transfer full): a new region identical to @region
**/
GdkRegion *
gdk_region_copy (const GdkRegion *region)
@ -1805,7 +1811,7 @@ gdk_region_unsorted_spans_intersect_foreach (GdkRegion *region,
* @spans: an array of #GdkSpans
* @n_spans: the length of @spans
* @sorted: %TRUE if @spans is sorted wrt. the y coordinate
* @function: function to call on each span in the intersection
* @function: (scope call): function to call on each span in the intersection
* @data: data to pass to @function
*
* Calls a function on each span in the intersection of @region and @spans.

View file

@ -5273,13 +5273,13 @@ gtk_widget_intersect (GtkWidget *widget,
}
/**
* gtk_widget_region_intersect: (skip)
* gtk_widget_region_intersect:
* @widget: a #GtkWidget
* @region: a #GdkRegion, 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
* @returns: (transfer full): 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