Commit 2fec1124 authored by Benjamin Otte's avatar Benjamin Otte

styleproperty: Remove equal_func vfunc

Equality tests are done with _gtk_css_value_equal(). There is no need to
do it per-property, equal values will still be equal.

This essentially reverts 24f5d54329e028347bd76af42e86ed190c1229a2 and
parent 40283e7c
......@@ -244,21 +244,12 @@ gtk_css_style_property_real_compute_value (GtkCssStyleProperty *property,
return _gtk_css_value_ref (specified);
static gboolean
gtk_css_style_property_real_equal (GtkCssStyleProperty *property,
GtkCssValue *value1,
GtkCssValue *value2)
return _gtk_css_value_equal (value1, value2);
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;
property->equal_func = gtk_css_style_property_real_equal;
......@@ -431,26 +422,3 @@ _gtk_css_style_property_print_value (GtkCssStyleProperty *property,
property->print_value (property, value, string);
* _gtk_css_style_property_is_equal:
* @property: the property
* @value1: the first value to compare
* @value2: the second value to compare
* Compares @value1 and @value2 for equality. Both values must be the
* result of a call _gtk_css_style_property_compute_value().
* Returns: %TRUE if @value1 and @value2 are equal
_gtk_css_style_property_is_equal (GtkCssStyleProperty *property,
GtkCssValue *value1,
GtkCssValue *value2)
g_return_val_if_fail (GTK_IS_CSS_STYLE_PROPERTY (property), FALSE);
g_return_val_if_fail (value1 != NULL, FALSE);
g_return_val_if_fail (value2 != NULL, FALSE);
return property->equal_func (property, value1, value2);
This diff is collapsed.
......@@ -48,9 +48,6 @@ typedef void (* GtkCssStylePropertyQueryFunc) (GtkCssStyleProperty
GValue *value);
typedef GtkCssValue * (* GtkCssStylePropertyAssignFunc) (GtkCssStyleProperty *property,
const GValue *value);
typedef gboolean (* GtkCssStylePropertyEqualFunc) (GtkCssStyleProperty *property,
GtkCssValue *value1,
GtkCssValue *value2);
struct _GtkCssStyleProperty
GtkStyleProperty parent;
......@@ -65,7 +62,6 @@ struct _GtkCssStyleProperty
GtkCssStylePropertyComputeFunc compute_value;
GtkCssStylePropertyQueryFunc query_value;
GtkCssStylePropertyAssignFunc assign_value;
GtkCssStylePropertyEqualFunc equal_func;
struct _GtkCssStylePropertyClass
......@@ -95,9 +91,6 @@ GtkCssValue * _gtk_css_style_property_compute_value (GtkCssStyleProp
void _gtk_css_style_property_print_value (GtkCssStyleProperty *property,
GtkCssValue *value,
GString *string);
gboolean _gtk_css_style_property_is_equal (GtkCssStyleProperty *property,
GtkCssValue *value1,
GtkCssValue *value2);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment