summaryrefslogtreecommitdiff
path: root/gtk/gtkcssshadowvalue.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2012-07-16 14:48:43 +0200
committerBenjamin Otte <otte@redhat.com>2012-08-28 15:42:23 +0200
commit0e2f35ed882ab11d010866d32f2f65232145b8d0 (patch)
treef8e1af229adca8cdcce0b08808c3f6571615dd22 /gtk/gtkcssshadowvalue.c
parent9e7e65ca6e01246cf9eea156f0153014b58e4d36 (diff)
downloadgtk+-0e2f35ed882ab11d010866d32f2f65232145b8d0.tar.gz
css: Introduce dependencies for value computations
When values are computed, they might depend on various other values and we need to track this so we can update the values when those other values change. This is the first step in making that happen. This patch does not do any dependency tracking at all, instead it uses GTK_CSS_DEPENDS_ON_EVERYTHING as a sort of FIXME.
Diffstat (limited to 'gtk/gtkcssshadowvalue.c')
-rw-r--r--gtk/gtkcssshadowvalue.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/gtk/gtkcssshadowvalue.c b/gtk/gtkcssshadowvalue.c
index 3351d6f8dd..9b2d897aea 100644
--- a/gtk/gtkcssshadowvalue.c
+++ b/gtk/gtkcssshadowvalue.c
@@ -60,16 +60,19 @@ gtk_css_value_shadow_free (GtkCssValue *shadow)
}
static GtkCssValue *
-gtk_css_value_shadow_compute (GtkCssValue *shadow,
- guint property_id,
- GtkStyleContext *context)
+gtk_css_value_shadow_compute (GtkCssValue *shadow,
+ guint property_id,
+ GtkStyleContext *context,
+ GtkCssDependencies *dependencies)
{
- return gtk_css_shadow_value_new (_gtk_css_value_compute (shadow->hoffset, property_id, context),
- _gtk_css_value_compute (shadow->voffset, property_id, context),
- _gtk_css_value_compute (shadow->radius, property_id, context),
- _gtk_css_value_compute (shadow->spread, property_id, context),
+ *dependencies = GTK_CSS_DEPENDS_ON_EVERYTHING;
+
+ return gtk_css_shadow_value_new (_gtk_css_value_compute (shadow->hoffset, property_id, context, NULL),
+ _gtk_css_value_compute (shadow->voffset, property_id, context, NULL),
+ _gtk_css_value_compute (shadow->radius, property_id, context, NULL),
+ _gtk_css_value_compute (shadow->spread, property_id, context, NULL),
shadow->inset,
- _gtk_css_value_compute (shadow->color, property_id, context));
+ _gtk_css_value_compute (shadow->color, property_id, context, NULL));
}
static gboolean