Method

GtkStyleContextadd_region

Declaration [src]

void
gtk_style_context_add_region (
  GtkStyleContext* context,
  const gchar* region_name,
  GtkRegionFlags flags
)

Description [src]

Adds a region to context, so posterior calls to gtk_style_context_get() or any of the gtk_render_*() functions will make use of this new region for styling.

In the CSS file format, a GtkTreeView defining a β€œrow” region, would be matched by:

treeview row { ... }

Pseudo-classes are used for matching flags, so the two following rules:

treeview row:nth-child(even) { ... }
treeview row:nth-child(odd) { ... }

would apply to even and odd rows, respectively.

Region names must only contain lowercase letters and β€œ-”, starting always with a lowercase letter.

Available since:3.0

Parameters

region_name const gchar*
 

Region name to use in styling.

 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.
flags GtkRegionFlags
 

Flags that apply to the region.