## GtkStyleProvider GtkStyleProvider — Interface to provide style information to GtkStyleContext |

## Signals

void | gtk-private-changed | Run Last

## Types and Values

| GtkStyleProvider
#define | GTK_STYLE_PROVIDER_PRIORITY_FALLBACK
#define | GTK_STYLE_PROVIDER_PRIORITY_THEME
#define | GTK_STYLE_PROVIDER_PRIORITY_SETTINGS
#define | GTK_STYLE_PROVIDER_PRIORITY_APPLICATION
#define | GTK_STYLE_PROVIDER_PRIORITY_USER

## Object Hierarchy

        GInterface
        ╰── GtkStyleProvider

## Prerequisites

GtkStyleProvider requires GObject.

## Known Implementations

GtkStyleProvider is implemented by GtkCssProvider and GtkSettings.

## Includes

    #include <gtk/gtk.h>

## Description

GtkStyleProvider is an interface used to provide style information to a GtkStyleContext. See `gtk_style_context_add_provider()` and `gtk_style_context_add_provider_for_display()`.

## Functions

## Types and Values

### GtkStyleProvider

    typedef struct _GtkStyleProvider GtkStyleProvider;

### GTK_STYLE_PROVIDER_PRIORITY_FALLBACK

    #define GTK_STYLE_PROVIDER_PRIORITY_FALLBACK      1

The priority used for default style information that is used in the absence of themes.

Note that this is not very useful for providing default styling for custom style classes - themes are likely to override styling provided at this priority with catch-all `* {...}` rules.

### GTK_STYLE_PROVIDER_PRIORITY_THEME

    #define GTK_STYLE_PROVIDER_PRIORITY_THEME     200

The priority used for style information provided by themes.

### GTK_STYLE_PROVIDER_PRIORITY_SETTINGS

    #define GTK_STYLE_PROVIDER_PRIORITY_SETTINGS    400

The priority used for style information provided via GtkSettings.

This priority is higher than GTK_STYLE_PROVIDER_PRIORITY_THEME to let settings override themes.

### GTK_STYLE_PROVIDER_PRIORITY_APPLICATION

    #define GTK_STYLE_PROVIDER_PRIORITY_APPLICATION 600

A priority that can be used when adding a GtkStyleProvider for application-specific style information.

### GTK_STYLE_PROVIDER_PRIORITY_USER

    #define GTK_STYLE_PROVIDER_PRIORITY_USER        800

The priority used for the style information from `$XDG_CONFIG_HOME/gtk-4.0/gtk.css`.

You should not use priorities higher than this, to give the user the last word.

## Signal Details

### The `“gtk-private-changed”` signal

    void
    user_function (GtkStyleProvider *styleprovider,
                   gpointer          user_data)

Flags: Run Last

## See Also

GtkStyleContext, GtkCssProvider