Package: gtk

Function gtk:style-context-add-region

Lambda List

gtk:style-context-add-region (context regionname flags)

Arguments

context -- a gtk:style-context object
regionname -- a string with a region name to use in styling
flags -- a value of the gtk:region-flags flags that apply to the region

Details

Adds a region to the style context, so posterior calls to the gtk:style-context-property function or any of the gtk:render-* functions will make use of this new region for styling.

Examples

In the CSS file format, a GtkTreeView defining a "row" region, would be matched by:
 GtkTreeView row { ... }    
Pseudo-classes are used for matching flags, so the two following rules would apply to even and odd rows, respectively.
 GtkTreeView row:nth-child(even) { ... }
 GtkTreeView row:nth-child(odd) { ... }    

Notes

Region names must only contain lowercase letters and '-', starting always with a lowercase letter.

Warning

The gtk:style-context-add-region function has been deprecated since version 3.14 and should not be used in newly written code.
 

See also

#2023-3-27