diff options
author | Benjamin Otte <otte@redhat.com> | 2012-07-11 06:56:07 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2012-08-28 15:40:56 +0200 |
commit | 9b953829fbf1332d00c2ca8a99c7da5e4bda8c64 (patch) | |
tree | d11d83a1dbe54909d5ee729a77b55bfa4393649d /gtk/gtkcssstringvalue.c | |
parent | 3f00801e9aedd971378a6aad70e945903db7a798 (diff) | |
download | gtk+-9b953829fbf1332d00c2ca8a99c7da5e4bda8c64.tar.gz |
css: Introduce _gtk_css_value_compute()
This commit is essentially a large reorganization. Instead of all value
subtypes having their own compute function, there is the general
_gtk_css_value_compute() function that then calls a vfunc on the
subtype.
Diffstat (limited to 'gtk/gtkcssstringvalue.c')
-rw-r--r-- | gtk/gtkcssstringvalue.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gtk/gtkcssstringvalue.c b/gtk/gtkcssstringvalue.c index ec58ed99a6..b5813cd884 100644 --- a/gtk/gtkcssstringvalue.c +++ b/gtk/gtkcssstringvalue.c @@ -32,6 +32,13 @@ gtk_css_value_string_free (GtkCssValue *value) g_slice_free (GtkCssValue, value); } +static GtkCssValue * +gtk_css_value_string_compute (GtkCssValue *value, + GtkStyleContext *context) +{ + return _gtk_css_value_ref (value); +} + static gboolean gtk_css_value_string_equal (const GtkCssValue *value1, const GtkCssValue *value2) @@ -130,6 +137,7 @@ gtk_css_value_ident_print (const GtkCssValue *value, static const GtkCssValueClass GTK_CSS_VALUE_STRING = { gtk_css_value_string_free, + gtk_css_value_string_compute, gtk_css_value_string_equal, gtk_css_value_string_transition, gtk_css_value_string_print @@ -137,6 +145,7 @@ static const GtkCssValueClass GTK_CSS_VALUE_STRING = { static const GtkCssValueClass GTK_CSS_VALUE_IDENT = { gtk_css_value_string_free, + gtk_css_value_string_compute, gtk_css_value_string_equal, gtk_css_value_string_transition, gtk_css_value_ident_print |