CssProvider


Object Hierarchy:

Gtk.CssProvider Gtk.CssProvider Gtk.CssProvider GLib.Object GLib.Object GLib.Object->Gtk.CssProvider Gtk.StyleProvider Gtk.StyleProvider Gtk.StyleProvider->Gtk.CssProvider

Description:

[ CCode ( type_id = "gtk_css_provider_get_type ()" ) ]
public class CssProvider : Object, StyleProvider

GtkCssProvider is an object implementing the StyleProvider interface.

It is able to parse CSS-like input in order to style widgets.

An application can make GTK+ parse a specific CSS style sheet by calling load_from_file or load_from_resource and adding the provider with add_provider or add_provider_for_screen.

In addition, certain files will be read when GTK+ is initialized. First, the file `$XDG_CONFIG_HOME/gtk-3.0/gtk.css` is loaded if it exists. Then, GTK+ loads the first existing file among `XDG_DATA_HOME/themes/THEME/gtk-VERSION/gtk.css`, `$HOME/.themes/THEME/gtk-VERSION/gtk.css`, `$XDG_DATA_DIRS/themes/THEME/gtk-VERSION/gtk.css` and `DATADIR/share/themes/THEME/gtk-VERSION/gtk.css`, where `THEME` is the name of the current theme (see the gtk_theme_name setting), `DATADIR` is the prefix configured when GTK+ was compiled (unless overridden by the `GTK_DATA_PREFIX` environment variable), and `VERSION` is the GTK+ version number. If no file is found for the current version, GTK+ tries older versions all the way back to 3.0.

In the same way, GTK+ tries to load a gtk-keys.css file for the current key theme, as defined by gtk_key_theme_name.


Namespace: Gtk
Package: gtk+-3.0

Content:

Static methods:

Creation methods:

Methods:

Signals:

Inherited Members:

All known members inherited from interface Gtk.StyleProvider