[gtk+] Export some font parsing functions
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Export some font parsing functions
- Date: Mon, 18 Apr 2016 15:47:33 +0000 (UTC)
commit 7b9b661aead6c491397b57c63acdc45d93c08a58
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Apr 18 11:43:01 2016 -0400
Export some font parsing functions
These will be used for parsing the font: shorthand too.
gtk/gtkcssstylepropertyimpl.c | 20 ++++++++++++++++----
gtk/gtkcssstylepropertyprivate.h | 4 ++++
2 files changed, 20 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkcssstylepropertyimpl.c b/gtk/gtkcssstylepropertyimpl.c
index 1bee0fd..138c50f 100644
--- a/gtk/gtkcssstylepropertyimpl.c
+++ b/gtk/gtkcssstylepropertyimpl.c
@@ -224,11 +224,17 @@ font_family_parse_one (GtkCssParser *parser)
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 *
font_family_parse (GtkCssStyleProperty *property,
GtkCssParser *parser)
{
- return _gtk_css_array_value_parse (parser, font_family_parse_one);
+ return gtk_css_font_family_value_parse (parser);
}
static void
@@ -785,9 +791,8 @@ dpi_parse (GtkCssStyleProperty *property,
return _gtk_css_number_value_parse (parser, GTK_CSS_PARSE_NUMBER);
}
-static GtkCssValue *
-font_size_parse (GtkCssStyleProperty *property,
- GtkCssParser *parser)
+GtkCssValue *
+gtk_css_font_size_value_parse (GtkCssParser *parser)
{
GtkCssValue *value;
@@ -803,6 +808,13 @@ font_size_parse (GtkCssStyleProperty *property,
}
static GtkCssValue *
+font_size_parse (GtkCssStyleProperty *property,
+ GtkCssParser *parser)
+{
+ return gtk_css_font_size_value_parse (parser);
+}
+
+static GtkCssValue *
outline_parse (GtkCssStyleProperty *property,
GtkCssParser *parser)
{
diff --git a/gtk/gtkcssstylepropertyprivate.h b/gtk/gtkcssstylepropertyprivate.h
index 2dbe6ed..b62d478 100644
--- a/gtk/gtkcssstylepropertyprivate.h
+++ b/gtk/gtkcssstylepropertyprivate.h
@@ -86,6 +86,10 @@ void _gtk_css_style_property_print_value (GtkCssStyleProp
GtkBitmask * _gtk_css_style_property_get_mask_affecting
(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
#endif /* __GTK_CSS_STYLE_PROPERTY_PRIVATE_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]