[gtk+/gtk-style-context: 138/347] GtkThemingEngine: Add methods to retrieve widget style properties.



commit cd647ac9a15001677f9df1fe952a1ac79fe7b373
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Aug 2 15:33:20 2010 +0200

    GtkThemingEngine: Add methods to retrieve widget style properties.

 gtk/gtkthemingengine.c |   42 ++++++++++++++++++++++++++++++++++++++++++
 gtk/gtkthemingengine.h |    9 +++++++++
 2 files changed, 51 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c
index 5f34ce3..216b1f2 100644
--- a/gtk/gtkthemingengine.c
+++ b/gtk/gtkthemingengine.c
@@ -243,6 +243,48 @@ gtk_theming_engine_get (GtkThemingEngine *engine,
   va_end (args);
 }
 
+void
+gtk_theming_engine_get_style_property (GtkThemingEngine *engine,
+                                       const gchar      *property_name,
+                                       GValue           *value)
+{
+  GtkThemingEnginePrivate *priv;
+
+  g_return_if_fail (GTK_IS_THEMING_ENGINE (engine));
+  g_return_if_fail (property_name != NULL);
+
+  priv = engine->priv;
+  gtk_style_context_get_style_property (priv->context, property_name, value);
+}
+
+void
+gtk_theming_engine_get_style_valist (GtkThemingEngine *engine,
+                                     va_list           args)
+{
+  GtkThemingEnginePrivate *priv;
+
+  g_return_if_fail (GTK_IS_THEMING_ENGINE (engine));
+
+  priv = engine->priv;
+  gtk_style_context_get_style_valist (priv->context, args);
+}
+
+void
+gtk_theming_engine_get_style (GtkThemingEngine *engine,
+                              ...)
+{
+  GtkThemingEnginePrivate *priv;
+  va_list args;
+
+  g_return_if_fail (GTK_IS_THEMING_ENGINE (engine));
+
+  priv = engine->priv;
+
+  va_start (args, engine);
+  gtk_style_context_get_style_valist (priv->context, args);
+  va_end (args);
+}
+
 GtkStateFlags
 gtk_theming_engine_get_state (GtkThemingEngine *engine)
 {
diff --git a/gtk/gtkthemingengine.h b/gtk/gtkthemingengine.h
index 9e337f8..5703b2c 100644
--- a/gtk/gtkthemingengine.h
+++ b/gtk/gtkthemingengine.h
@@ -150,6 +150,15 @@ void gtk_theming_engine_get          (GtkThemingEngine *engine,
                                       GtkStateType      state,
                                       ...) G_GNUC_NULL_TERMINATED;
 
+void gtk_theming_engine_get_style_property (GtkThemingEngine *engine,
+                                            const gchar      *property_name,
+                                            GValue           *value);
+void gtk_theming_engine_get_style_valist   (GtkThemingEngine *engine,
+                                            va_list           args);
+void gtk_theming_engine_get_style          (GtkThemingEngine *engine,
+                                            ...);
+
+
 G_CONST_RETURN GtkWidgetPath * gtk_theming_engine_get_path (GtkThemingEngine *engine);
 
 gboolean gtk_theming_engine_has_class        (GtkThemingEngine *engine,



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