return gtk_style_cascade_iter_next (cascade, iter);
}
-static GtkStyleProperties *
-gtk_style_cascade_get_style (GtkStyleProvider *provider,
- GtkWidgetPath *path)
-{
- /* This function is not used anymore by GTK and nobody
- * else is ever supposed to call it */
- g_warn_if_reached ();
- return NULL;
-}
-
static gboolean
gtk_style_cascade_get_style_property (GtkStyleProvider *provider,
GtkWidgetPath *path,
return FALSE;
}
-static GtkIconFactory *
-gtk_style_cascade_get_icon_factory (GtkStyleProvider *provider,
- GtkWidgetPath *path)
-{
- /* If anyone ever implements get_icon_factory(), I'll
- * look at this function. Until then I'll just: */
- return NULL;
-}
-
static void
gtk_style_cascade_provider_iface_init (GtkStyleProviderIface *iface)
{
- iface->get_style = gtk_style_cascade_get_style;
iface->get_style_property = gtk_style_cascade_get_style_property;
- iface->get_icon_factory = gtk_style_cascade_get_icon_factory;
}
-static GtkSymbolicColor *
+static GtkSettings *
+gtk_style_cascade_get_settings (GtkStyleProviderPrivate *provider)
+{
+ GtkStyleCascade *cascade = GTK_STYLE_CASCADE (provider);
+ GtkStyleCascadeIter iter;
+ GtkSettings *settings;
+ GtkStyleProvider *item;
+
+ for (item = gtk_style_cascade_iter_init (cascade, &iter);
+ item;
+ item = gtk_style_cascade_iter_next (cascade, &iter))
+ {
+ if (!GTK_IS_STYLE_PROVIDER_PRIVATE (item))
+ continue;
+
+ settings = _gtk_style_provider_private_get_settings (GTK_STYLE_PROVIDER_PRIVATE (item));
+ if (settings)
+ return settings;
+ }
+
+ return NULL;
+}
+
+static GtkCssValue *
gtk_style_cascade_get_color (GtkStyleProviderPrivate *provider,
const char *name)
{
GtkStyleCascade *cascade = GTK_STYLE_CASCADE (provider);
GtkStyleCascadeIter iter;
- GtkSymbolicColor *symbolic;
+ GtkCssValue *color;
GtkStyleProvider *item;
for (item = gtk_style_cascade_iter_init (cascade, &iter);
{
if (GTK_IS_STYLE_PROVIDER_PRIVATE (item))
{
- symbolic = _gtk_style_provider_private_get_color (GTK_STYLE_PROVIDER_PRIVATE (item), name);
- if (symbolic)
- return symbolic;
+ color = _gtk_style_provider_private_get_color (GTK_STYLE_PROVIDER_PRIVATE (item), name);
+ if (color)
+ return color;
}
else
{
gtk_style_cascade_provider_private_iface_init (GtkStyleProviderPrivateInterface *iface)
{
iface->get_color = gtk_style_cascade_get_color;
+ iface->get_settings = gtk_style_cascade_get_settings;
iface->get_keyframes = gtk_style_cascade_get_keyframes;
iface->lookup = gtk_style_cascade_lookup;
iface->get_change = gtk_style_cascade_get_change;