Commit 5a424645 authored by Benjamin Otte's avatar Benjamin Otte
Browse files

css: Rename function to _gtk_style_property_parse_value()

... and take an optional style property as argument. This way, we can
allow custom parse functions for properties. The style property needs to
be optional so that we can use it for widget style properties, too.
parent 35488f58
......@@ -1371,9 +1371,10 @@ gtk_css_provider_get_style_property (GtkStyleProvider *provider,
gtk_css_provider_parser_error,
provider);
found = _gtk_css_value_parse (value,
parser,
NULL);
found = _gtk_style_property_parse_value (NULL,
value,
parser,
NULL);
_gtk_css_parser_free (parser);
......@@ -2122,9 +2123,10 @@ parse_declaration (GtkCssScanner *scanner,
}
else
{
if (_gtk_css_value_parse (val,
scanner->parser,
gtk_css_scanner_get_base_url (scanner)))
if (_gtk_style_property_parse_value (property,
val,
scanner->parser,
gtk_css_scanner_get_base_url (scanner)))
{
if (_gtk_css_parser_begins_with (scanner->parser, ';') ||
_gtk_css_parser_begins_with (scanner->parser, '}') ||
......
......@@ -1375,9 +1375,10 @@ css_string_funcs_init (void)
}
gboolean
_gtk_css_value_parse (GValue *value,
GtkCssParser *parser,
GFile *base)
_gtk_style_property_parse_value (const GtkStyleProperty *property,
GValue *value,
GtkCssParser *parser,
GFile *base)
{
ParseFunc func;
......
......@@ -56,9 +56,10 @@ void _gtk_style_property_pack (const GtkStyleProper
GtkStateFlags state,
GValue *value);
gboolean _gtk_css_value_parse (GValue *value,
GtkCssParser *parser,
GFile *base);
gboolean _gtk_style_property_parse_value (const GtkStyleProperty *property,
GValue *value,
GtkCssParser *parser,
GFile *base);
void _gtk_style_property_print_value (const GtkStyleProperty *property,
const GValue *value,
GString *string);
......
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