[gtk+/gtk-style-context] GtkThemingEngine: Add progress arg to gtk_theming_engine_is_state_set()



commit 66d3040565c3d9b53d2f77fac40373c320e3a3ff
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Aug 19 22:45:22 2010 +0200

    GtkThemingEngine: Add progress arg to gtk_theming_engine_is_state_set()

 gtk/gtkthemingengine.c |   15 ++++++++-------
 gtk/gtkthemingengine.h |    3 ++-
 2 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c
index b29c73d..8797ff8 100644
--- a/gtk/gtkthemingengine.c
+++ b/gtk/gtkthemingengine.c
@@ -314,14 +314,15 @@ gtk_theming_engine_get_state (GtkThemingEngine *engine)
 
 gboolean
 gtk_theming_engine_is_state_set (GtkThemingEngine *engine,
-                                 GtkStateType      state)
+                                 GtkStateType      state,
+                                 gdouble          *progress)
 {
   GtkThemingEnginePrivate *priv;
 
   g_return_val_if_fail (GTK_IS_THEMING_ENGINE (engine), 0);
 
   priv = engine->priv;
-  return gtk_style_context_is_state_set (priv->context, state, NULL);
+  return gtk_style_context_is_state_set (priv->context, state, progress);
 }
 
 G_CONST_RETURN GtkWidgetPath *
@@ -558,7 +559,7 @@ gtk_theming_engine_render_check (GtkThemingEngine *engine,
   else
     gdk_cairo_set_source_color (cr, text_color);
 
-  if (gtk_theming_engine_is_state_set (engine, GTK_STATE_INCONSISTENT))
+  if (gtk_theming_engine_is_state_set (engine, GTK_STATE_INCONSISTENT, NULL))
     {
       int line_thickness = MAX (1, (3 + interior_size * 2) / 7);
 
@@ -569,7 +570,7 @@ gtk_theming_engine_render_check (GtkThemingEngine *engine,
 		       line_thickness);
       cairo_fill (cr);
     }
-  else if (gtk_theming_engine_is_state_set (engine, GTK_STATE_ACTIVE))
+  else if (gtk_theming_engine_is_state_set (engine, GTK_STATE_ACTIVE, NULL))
     {
       cairo_translate (cr,
 		       x + pad, y + pad);
@@ -670,7 +671,7 @@ gtk_theming_engine_render_option (GtkThemingEngine *engine,
   /* FIXME: thickness */
   thickness = 1;
 
-  if (gtk_theming_engine_is_state_set (engine, GTK_STATE_INCONSISTENT))
+  if (gtk_theming_engine_is_state_set (engine, GTK_STATE_INCONSISTENT, NULL))
     {
       gint line_thickness;
 
@@ -692,7 +693,7 @@ gtk_theming_engine_render_option (GtkThemingEngine *engine,
 		       line_thickness);
       cairo_fill (cr);
     }
-  if (gtk_theming_engine_is_state_set (engine, GTK_STATE_ACTIVE))
+  if (gtk_theming_engine_is_state_set (engine, GTK_STATE_ACTIVE, NULL))
     {
       pad = thickness + MAX (1, 2 * (exterior_size - 2 * thickness) / 9);
       interior_size = MAX (1, exterior_size - 2 * pad);
@@ -1481,7 +1482,7 @@ gtk_theming_engine_render_layout (GtkThemingEngine *engine,
 
   screen = gtk_theming_engine_get_screen (engine);
 
-  if (gtk_theming_engine_is_state_set (engine, GTK_STATE_INSENSITIVE))
+  if (gtk_theming_engine_is_state_set (engine, GTK_STATE_INSENSITIVE, NULL))
     {
       PangoLayout *insensitive_layout;
 
diff --git a/gtk/gtkthemingengine.h b/gtk/gtkthemingengine.h
index 326fc63..e315e0a 100644
--- a/gtk/gtkthemingengine.h
+++ b/gtk/gtkthemingengine.h
@@ -175,7 +175,8 @@ gboolean gtk_theming_engine_has_region (GtkThemingEngine *engine,
 
 GtkStateFlags gtk_theming_engine_get_state     (GtkThemingEngine *engine);
 gboolean      gtk_theming_engine_is_state_set  (GtkThemingEngine *engine,
-                                                GtkStateType      state);
+                                                GtkStateType      state,
+                                                gdouble          *progress);
 
 GtkTextDirection gtk_theming_engine_get_direction (GtkThemingEngine *engine);
 



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