Export some font parsing functions

These will be used for parsing the font: shorthand too.
This commit is contained in:
Matthias Clasen 2016-04-18 11:43:01 -04:00
parent 5993875d38
commit 7b9b661aea
2 changed files with 20 additions and 4 deletions

View File

@ -224,11 +224,17 @@ font_family_parse_one (GtkCssParser *parser)
return _gtk_css_string_value_new_take (name); return _gtk_css_string_value_new_take (name);
} }
GtkCssValue *
gtk_css_font_family_value_parse (GtkCssParser *parser)
{
return _gtk_css_array_value_parse (parser, font_family_parse_one);
}
static GtkCssValue * static GtkCssValue *
font_family_parse (GtkCssStyleProperty *property, font_family_parse (GtkCssStyleProperty *property,
GtkCssParser *parser) GtkCssParser *parser)
{ {
return _gtk_css_array_value_parse (parser, font_family_parse_one); return gtk_css_font_family_value_parse (parser);
} }
static void static void
@ -785,9 +791,8 @@ dpi_parse (GtkCssStyleProperty *property,
return _gtk_css_number_value_parse (parser, GTK_CSS_PARSE_NUMBER); return _gtk_css_number_value_parse (parser, GTK_CSS_PARSE_NUMBER);
} }
static GtkCssValue * GtkCssValue *
font_size_parse (GtkCssStyleProperty *property, gtk_css_font_size_value_parse (GtkCssParser *parser)
GtkCssParser *parser)
{ {
GtkCssValue *value; GtkCssValue *value;
@ -802,6 +807,13 @@ font_size_parse (GtkCssStyleProperty *property,
| GTK_CSS_NUMBER_AS_PIXELS); | GTK_CSS_NUMBER_AS_PIXELS);
} }
static GtkCssValue *
font_size_parse (GtkCssStyleProperty *property,
GtkCssParser *parser)
{
return gtk_css_font_size_value_parse (parser);
}
static GtkCssValue * static GtkCssValue *
outline_parse (GtkCssStyleProperty *property, outline_parse (GtkCssStyleProperty *property,
GtkCssParser *parser) GtkCssParser *parser)

View File

@ -86,6 +86,10 @@ void _gtk_css_style_property_print_value (GtkCssStyleProp
GtkBitmask * _gtk_css_style_property_get_mask_affecting GtkBitmask * _gtk_css_style_property_get_mask_affecting
(GtkCssAffects affects); (GtkCssAffects affects);
/* XXX - find a better place for these */
GtkCssValue * gtk_css_font_family_value_parse (GtkCssParser *parser);
GtkCssValue * gtk_css_font_size_value_parse (GtkCssParser *parser);
G_END_DECLS G_END_DECLS
#endif /* __GTK_CSS_STYLE_PROPERTY_PRIVATE_H__ */ #endif /* __GTK_CSS_STYLE_PROPERTY_PRIVATE_H__ */