mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
cssprovider: Export gtk_css_provider_load_named) function
... and document it. For now, the function is only exported internally.
This commit is contained in:
parent
9c9d82f1a9
commit
738b453c66
@ -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__ */
|
||||
|
Loading…
Reference in New Issue
Block a user