Commit dcec7a55 authored by Benjamin Otte's avatar Benjamin Otte

cssstyleproperty: Make assign_value a vfunc

parent 81dfc277
...@@ -109,9 +109,14 @@ _gtk_css_style_property_assign (GtkStyleProperty *property, ...@@ -109,9 +109,14 @@ _gtk_css_style_property_assign (GtkStyleProperty *property,
GtkStateFlags state, GtkStateFlags state,
const GValue *value) const GValue *value)
{ {
GtkCssValue *css_value = _gtk_css_value_new_from_gvalue (value); GtkCssStyleProperty *style;
GtkCssValue *css_value;
style = GTK_CSS_STYLE_PROPERTY (property);
css_value = style->assign_value (style, value);
_gtk_style_properties_set_property_by_property (props, _gtk_style_properties_set_property_by_property (props,
GTK_CSS_STYLE_PROPERTY (property), style,
state, state,
css_value); css_value);
_gtk_css_value_unref (css_value); _gtk_css_value_unref (css_value);
......
This diff is collapsed.
...@@ -46,6 +46,8 @@ typedef GtkCssValue * (* GtkCssStylePropertyComputeFunc)(GtkCssStyleProperty ...@@ -46,6 +46,8 @@ typedef GtkCssValue * (* GtkCssStylePropertyComputeFunc)(GtkCssStyleProperty
typedef void (* GtkCssStylePropertyQueryFunc) (GtkCssStyleProperty *property, typedef void (* GtkCssStylePropertyQueryFunc) (GtkCssStyleProperty *property,
const GtkCssValue *cssvalue, const GtkCssValue *cssvalue,
GValue *value); GValue *value);
typedef GtkCssValue * (* GtkCssStylePropertyAssignFunc) (GtkCssStyleProperty *property,
const GValue *value);
typedef gboolean (* GtkCssStylePropertyEqualFunc) (GtkCssStyleProperty *property, typedef gboolean (* GtkCssStylePropertyEqualFunc) (GtkCssStyleProperty *property,
GtkCssValue *value1, GtkCssValue *value1,
GtkCssValue *value2); GtkCssValue *value2);
...@@ -61,6 +63,7 @@ struct _GtkCssStyleProperty ...@@ -61,6 +63,7 @@ struct _GtkCssStyleProperty
GtkCssStylePropertyPrintFunc print_value; GtkCssStylePropertyPrintFunc print_value;
GtkCssStylePropertyComputeFunc compute_value; GtkCssStylePropertyComputeFunc compute_value;
GtkCssStylePropertyQueryFunc query_value; GtkCssStylePropertyQueryFunc query_value;
GtkCssStylePropertyAssignFunc assign_value;
GtkCssStylePropertyEqualFunc equal_func; GtkCssStylePropertyEqualFunc equal_func;
}; };
......
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