X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Fgtkstyleproviderprivate.c;h=1f62b88807fb5d93a8a09fa88f299b3f95583837;hb=feb64f40b0f50735104da0a7fdafbe480763c180;hp=a646201950da5e12ecbe607170c16f750a089a0b;hpb=74f4c6f6bd755967b68bac3e551f6fff2dde6a24;p=~andy%2Fgtk diff --git a/gtk/gtkstyleproviderprivate.c b/gtk/gtkstyleproviderprivate.c index a64620195..1f62b8880 100644 --- a/gtk/gtkstyleproviderprivate.c +++ b/gtk/gtkstyleproviderprivate.c @@ -29,7 +29,7 @@ enum { G_DEFINE_INTERFACE (GtkStyleProviderPrivate, _gtk_style_provider_private, GTK_TYPE_STYLE_PROVIDER) -guint signals[LAST_SIGNAL]; +static guint signals[LAST_SIGNAL]; static void _gtk_style_provider_private_default_init (GtkStyleProviderPrivateInterface *iface) @@ -44,12 +44,16 @@ _gtk_style_provider_private_default_init (GtkStyleProviderPrivateInterface *ifac } -GtkSymbolicColor * +GtkCssValue * _gtk_style_provider_private_get_color (GtkStyleProviderPrivate *provider, const char *name) { GtkStyleProviderPrivateInterface *iface; + /* for compat with gtk_symbolic_color_resolve() */ + if (provider == NULL) + return NULL; + g_return_val_if_fail (GTK_IS_STYLE_PROVIDER_PRIVATE (provider), NULL); iface = GTK_STYLE_PROVIDER_PRIVATE_GET_INTERFACE (provider); @@ -60,6 +64,23 @@ _gtk_style_provider_private_get_color (GtkStyleProviderPrivate *provider, return iface->get_color (provider, name); } +GtkCssKeyframes * +_gtk_style_provider_private_get_keyframes (GtkStyleProviderPrivate *provider, + const char *name) +{ + GtkStyleProviderPrivateInterface *iface; + + g_return_val_if_fail (GTK_IS_STYLE_PROVIDER_PRIVATE (provider), NULL); + g_return_val_if_fail (name != NULL, NULL); + + iface = GTK_STYLE_PROVIDER_PRIVATE_GET_INTERFACE (provider); + + if (!iface->get_keyframes) + return NULL; + + return iface->get_keyframes (provider, name); +} + void _gtk_style_provider_private_lookup (GtkStyleProviderPrivate *provider, const GtkCssMatcher *matcher, @@ -104,3 +125,18 @@ _gtk_style_provider_private_changed (GtkStyleProviderPrivate *provider) g_signal_emit (provider, signals[CHANGED], 0); } +GtkSettings * +_gtk_style_provider_private_get_settings (GtkStyleProviderPrivate *provider) +{ + GtkStyleProviderPrivateInterface *iface; + + g_return_val_if_fail (GTK_IS_STYLE_PROVIDER_PRIVATE (provider), NULL); + + iface = GTK_STYLE_PROVIDER_PRIVATE_GET_INTERFACE (provider); + + if (!iface->get_settings) + return NULL; + + return iface->get_settings (provider); +} +