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/gtkcssenumvalue.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/gtkcssenumvalue.c')
-rw-r--r-- | gtk/gtkcssenumvalue.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk/gtkcssenumvalue.c b/gtk/gtkcssenumvalue.c index 56fb1e829f..d808ff7de8 100644 --- a/gtk/gtkcssenumvalue.c +++ b/gtk/gtkcssenumvalue.c @@ -35,6 +35,13 @@ gtk_css_value_enum_free (GtkCssValue *value) g_slice_free (GtkCssValue, value); } +static GtkCssValue * +gtk_css_value_enum_compute (GtkCssValue *value, + GtkStyleContext *context) +{ + return _gtk_css_value_ref (value); +} + static gboolean gtk_css_value_enum_equal (const GtkCssValue *enum1, const GtkCssValue *enum2) @@ -61,6 +68,7 @@ gtk_css_value_enum_print (const GtkCssValue *value, static const GtkCssValueClass GTK_CSS_VALUE_BORDER_STYLE = { gtk_css_value_enum_free, + gtk_css_value_enum_compute, gtk_css_value_enum_equal, gtk_css_value_enum_transition, gtk_css_value_enum_print @@ -115,6 +123,7 @@ _gtk_css_border_style_value_get (const GtkCssValue *value) static const GtkCssValueClass GTK_CSS_VALUE_FONT_STYLE = { gtk_css_value_enum_free, + gtk_css_value_enum_compute, gtk_css_value_enum_equal, gtk_css_value_enum_transition, gtk_css_value_enum_print @@ -162,6 +171,7 @@ _gtk_css_font_style_value_get (const GtkCssValue *value) static const GtkCssValueClass GTK_CSS_VALUE_FONT_VARIANT = { gtk_css_value_enum_free, + gtk_css_value_enum_compute, gtk_css_value_enum_equal, gtk_css_value_enum_transition, gtk_css_value_enum_print @@ -208,6 +218,7 @@ _gtk_css_font_variant_value_get (const GtkCssValue *value) static const GtkCssValueClass GTK_CSS_VALUE_FONT_WEIGHT = { gtk_css_value_enum_free, + gtk_css_value_enum_compute, gtk_css_value_enum_equal, gtk_css_value_enum_transition, gtk_css_value_enum_print @@ -275,6 +286,7 @@ _gtk_css_font_weight_value_get (const GtkCssValue *value) static const GtkCssValueClass GTK_CSS_VALUE_AREA = { gtk_css_value_enum_free, + gtk_css_value_enum_compute, gtk_css_value_enum_equal, gtk_css_value_enum_transition, gtk_css_value_enum_print |