Gtk.StyleContext.add_class

### Method

# Gtk StyleContextadd_class

#### Declaration [src]

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

#### Description [src]

Adds a style class to `context`, so later uses of the style context 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 { ... }

#### Parameters

`class_name` | `const char*`
| Class name to use in styling.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.