diff --git a/gtk/gtkcsscomputedvalues.c b/gtk/gtkcsscomputedvalues.c index 6f99667f94..caa2251d1b 100644 --- a/gtk/gtkcsscomputedvalues.c +++ b/gtk/gtkcsscomputedvalues.c @@ -155,10 +155,7 @@ _gtk_css_computed_values_compute_value (GtkCssComputedValues *values, if (specified) { - g_ptr_array_index (values->values, id) = - _gtk_css_style_property_compute_value (prop, - context, - specified); + g_ptr_array_index (values->values, id) = _gtk_css_value_compute (specified, id, context); } else { diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c index 137f3aeca0..d4a3196a56 100644 --- a/gtk/gtkcssprovider.c +++ b/gtk/gtkcssprovider.c @@ -2839,7 +2839,7 @@ gtk_css_ruleset_print (const GtkCssRuleset *ruleset, g_string_append (str, " "); g_string_append (str, _gtk_style_property_get_name (GTK_STYLE_PROPERTY (prop->property))); g_string_append (str, ": "); - _gtk_css_style_property_print_value (prop->property, prop->value, str); + _gtk_css_value_print (prop->value, str); g_string_append (str, ";\n"); } diff --git a/gtk/gtkcssstyleproperty.c b/gtk/gtkcssstyleproperty.c index 8607af52a0..98e137d01d 100644 --- a/gtk/gtkcssstyleproperty.c +++ b/gtk/gtkcssstyleproperty.c @@ -226,28 +226,10 @@ gtk_css_style_property_real_parse_value (GtkCssStyleProperty *property, return NULL; } -static void -gtk_css_style_property_real_print_value (GtkCssStyleProperty *property, - const GtkCssValue *value, - GString *string) -{ - _gtk_css_value_print (value, string); -} - -static GtkCssValue * -gtk_css_style_property_real_compute_value (GtkCssStyleProperty *property, - GtkStyleContext *context, - GtkCssValue *specified) -{ - return _gtk_css_value_compute (specified, _gtk_css_style_property_get_id (property), context); -} - static void _gtk_css_style_property_init (GtkCssStyleProperty *property) { property->parse_value = gtk_css_style_property_real_parse_value; - property->print_value = gtk_css_style_property_real_print_value; - property->compute_value = gtk_css_style_property_real_compute_value; } /** @@ -371,52 +353,3 @@ _gtk_css_style_property_get_initial_value (GtkCssStyleProperty *property) return property->initial_value; } - -/** - * _gtk_css_style_property_compute_value: - * @property: the property - * @computed: (out): an uninitialized value to be filled with the result - * @context: the context to use for resolving - * @specified: the value to compute from - * - * Converts the @specified value into the @computed value using the - * information in @context. This step is explained in detail in - * + * the CSS documentation. + * + * Returns: the comptued value + **/ GtkCssValue * _gtk_css_value_compute (GtkCssValue *value, guint property_id, @@ -124,6 +138,15 @@ _gtk_css_value_to_string (const GtkCssValue *value) return g_string_free (string, FALSE); } +/** + * _gtk_css_value_print: + * @value: the value to print + * @string: the string to print to + * + * Prints @value to the given @string in CSS format. The @value must be a + * valid specified value as parsed using the parse functions or as assigned + * via _gtk_style_property_assign(). + **/ void _gtk_css_value_print (const GtkCssValue *value, GString *string)