diff options
author | Benjamin Otte <otte@redhat.com> | 2012-04-19 03:58:28 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2012-09-17 20:39:11 +0200 |
commit | e6c951a303aaa67b2b91bc067724fe5d104470a6 (patch) | |
tree | 0b98a9e1eb0c48b4294e2f014c1fba59869d9978 /gtk/gtkstylecascade.c | |
parent | cdbc6f48bbcff68cbdb59fa7e6d32fbc9b6908a2 (diff) | |
download | gtk+-e6c951a303aaa67b2b91bc067724fe5d104470a6.tar.gz |
styleprovider: Add query function for keyframes
Diffstat (limited to 'gtk/gtkstylecascade.c')
-rw-r--r-- | gtk/gtkstylecascade.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gtk/gtkstylecascade.c b/gtk/gtkstylecascade.c index 1b8e9f7195..9ccd2f06de 100644 --- a/gtk/gtkstylecascade.c +++ b/gtk/gtkstylecascade.c @@ -172,6 +172,30 @@ gtk_style_cascade_get_color (GtkStyleProviderPrivate *provider, return NULL; } +GtkCssKeyframes * +gtk_style_cascade_get_keyframes (GtkStyleProviderPrivate *provider, + const char *name) +{ + GtkStyleCascade *cascade = GTK_STYLE_CASCADE (provider); + GtkStyleCascadeIter iter; + GtkCssKeyframes *keyframes; + 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; + + keyframes = _gtk_style_provider_private_get_keyframes (GTK_STYLE_PROVIDER_PRIVATE (item), name); + if (keyframes) + return keyframes; + } + + return NULL; +} + static void gtk_style_cascade_lookup (GtkStyleProviderPrivate *provider, const GtkCssMatcher *matcher, @@ -230,6 +254,7 @@ static void gtk_style_cascade_provider_private_iface_init (GtkStyleProviderPrivateInterface *iface) { iface->get_color = gtk_style_cascade_get_color; + iface->get_keyframes = gtk_style_cascade_get_keyframes; iface->lookup = gtk_style_cascade_lookup; iface->get_change = gtk_style_cascade_get_change; } |