summaryrefslogtreecommitdiff
path: root/gtk/gtkcssstyleproperty.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2012-01-02 17:50:32 +0100
committerBenjamin Otte <otte@redhat.com>2012-01-09 18:37:55 +0100
commit22a65bcd82a3b2d2bfe3cc4423b83599b5609a52 (patch)
tree06d393d1ba8cefaba29d1789562fa47b0fd74f41 /gtk/gtkcssstyleproperty.c
parent232d9226f94a1482149d8ff3f71271f3118f176a (diff)
downloadgtk+-22a65bcd82a3b2d2bfe3cc4423b83599b5609a52.tar.gz
styleproperty: Add a compute vfunc
Diffstat (limited to 'gtk/gtkcssstyleproperty.c')
-rw-r--r--gtk/gtkcssstyleproperty.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/gtk/gtkcssstyleproperty.c b/gtk/gtkcssstyleproperty.c
index 2f542449f9..e3580775ab 100644
--- a/gtk/gtkcssstyleproperty.c
+++ b/gtk/gtkcssstyleproperty.c
@@ -218,10 +218,20 @@ _gtk_css_style_property_class_init (GtkCssStylePropertyClass *klass)
klass->style_properties = g_ptr_array_new ();
}
+static void
+gtk_css_style_property_real_compute_value (GtkCssStyleProperty *property,
+ GValue *computed,
+ GtkStyleContext *context,
+ const GValue *specified)
+{
+ g_value_init (computed, _gtk_style_property_get_value_type (GTK_STYLE_PROPERTY (property)));
+ _gtk_css_style_compute_value (computed, context, specified);
+}
static void
-_gtk_css_style_property_init (GtkCssStyleProperty *style_property)
+_gtk_css_style_property_init (GtkCssStyleProperty *property)
{
+ property->compute_value = gtk_css_style_property_real_compute_value;
}
/**
@@ -338,8 +348,7 @@ _gtk_css_style_property_compute_value (GtkCssStyleProperty *property,
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
g_return_if_fail (G_IS_VALUE (specified));
- g_value_init (computed, _gtk_style_property_get_value_type (GTK_STYLE_PROPERTY (property)));
- _gtk_css_style_compute_value (computed, context, specified);
+ property->compute_value (property, computed, context, specified);
}
/**