[gtk+/wip/css: 117/125] themingengine: Add _gtk_theming_engine_peek_property()



commit 46cb18be99927df554ff15d0174d1e2d5e6e922c
Author: Benjamin Otte <otte redhat com>
Date:   Tue Jan 3 02:35:56 2012 +0100

    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(+), 0 deletions(-)
---
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c
index e82453a..57e16e5 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 caf189e..3cb20d8 100644
--- a/gtk/gtkthemingengineprivate.h
+++ b/gtk/gtkthemingengineprivate.h
@@ -21,10 +21,14 @@
 #define __GTK_THEMING_ENGINE_PRIVATE_H__
 
 #include <gdk/gdk.h>
+#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__ */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]