Commit 738b453c authored by Benjamin Otte's avatar Benjamin Otte

cssprovider: Export gtk_css_provider_load_named) function

... and document it.
For now, the function is only exported internally.
parent 9c9d82f1
......@@ -2692,10 +2692,22 @@ _gtk_css_provider_get_theme_dir (void)
return path;
}
static void
gtk_css_provider_load_named (GtkCssProvider *provider,
const gchar *name,
const gchar *variant)
/**
* _gtk_css_provider_load_named:
* @provider: a #GtkCssProvider
* @name: A theme name
* @variant: (allow-none): variant to load, for example, "dark", or
* %NULL for the default
*
* Loads a theme from the usual theme paths. The actual process of
* finding the theme might change between releases, but it is
* guaranteed that this function uses the same mechanism to load the
* theme than GTK uses for loading its own theme.
**/
void
_gtk_css_provider_load_named (GtkCssProvider *provider,
const gchar *name,
const gchar *variant)
{
gchar *subpath, *path;
gchar *resource_path;
......@@ -2813,7 +2825,7 @@ gtk_css_provider_get_named (const gchar *name,
if (!provider)
{
provider = gtk_css_provider_new ();
gtk_css_provider_load_named (provider, name, variant);
_gtk_css_provider_load_named (provider, name, variant);
g_hash_table_insert (themes, g_strdup (key), provider);
}
......
......@@ -24,6 +24,10 @@ G_BEGIN_DECLS
gchar *_gtk_css_provider_get_theme_dir (void);
void _gtk_css_provider_load_named (GtkCssProvider *provider,
const gchar *name,
const gchar *variant);
G_END_DECLS
#endif /* __GTK_CSS_PROVIDER_PRIVATE_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment