A `GtkSourceRegion` permits to store a group of subregions of a [[email protected]]. `GtkSourceRegion` stores the subregions with
pairs of [[email protected]]'s, so the region is still valid after insertions and deletions in the [[email protected]].
The [[email protected]] for the start of a subregion has a left gravity, while the [[email protected]] for the end of a subregion has a
right gravity.
The typical use-case of `GtkSourceRegion` is to scan a [[email protected]] chunk by chunk, not the whole buffer at once to not block
the user interface. The `GtkSourceRegion` represents in that case the remaining region to scan. You can listen to the [
[email protected]:GtkSourceRegion:insert-text] and [[email protected]:GtkSourceRegion:delete-range]
signals to update the `GtkSourceRegion` accordingly.
To iterate through the subregions, you need to use a [struct@RegionIter], for example: ```c GtkSourceRegion *region; GtkSourceRegionIter
region_iter;