Method

GtkStyleContextadd_class

since: 3.0

Declaration [src]

void
gtk_style_context_add_class (
  GtkStyleContext* context,
  const gchar* class_name
)

Description [src]

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

In the CSS file format, a GtkEntry defining a “search” class, would be matched by:

entry.search { ... }

While any widget defining a “search” class would be matched by:

.search { ... }

Available since: 3.0

Parameters

class_name

Type: const gchar*

Class name to use in styling.

The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.