From 53b4fd69db25d7fa8abd6741363196b6a53fb631 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 3 Jan 2012 02:35:56 +0100 Subject: [PATCH] themingengine: Add _gtk_theming_engine_peek_property() This is useful for getting at computed values and allows accessing images before the code autoconverts them to a cairo pattern. --- gtk/gtkthemingengine.c | 10 ++++++++++ gtk/gtkthemingengineprivate.h | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c index e82453a4bd..57e16e50bc 100644 --- a/gtk/gtkthemingengine.c +++ b/gtk/gtkthemingengine.c @@ -338,6 +338,16 @@ _gtk_theming_engine_set_context (GtkThemingEngine *engine, priv->context = context; } +const GValue * +_gtk_theming_engine_peek_property (GtkThemingEngine *engine, + const char *property_name) +{ + g_return_val_if_fail (GTK_IS_THEMING_ENGINE (engine), NULL); + g_return_val_if_fail (property_name != NULL, NULL); + + return _gtk_style_context_peek_property (engine->priv->context, property_name); +} + /** * gtk_theming_engine_get_property: * @engine: a #GtkThemingEngine diff --git a/gtk/gtkthemingengineprivate.h b/gtk/gtkthemingengineprivate.h index caf189ec6b..3cb20d82c3 100644 --- a/gtk/gtkthemingengineprivate.h +++ b/gtk/gtkthemingengineprivate.h @@ -21,10 +21,14 @@ #define __GTK_THEMING_ENGINE_PRIVATE_H__ #include +#include "gtk/gtkthemingengine.h" void _gtk_theming_engine_paint_spinner (cairo_t *cr, gdouble radius, gdouble progress, GdkRGBA *color); +const GValue *_gtk_theming_engine_peek_property (GtkThemingEngine *engine, + const char *property_name); + #endif /* __GTK_THEMING_ENGINE_PRIVATE_H__ */