css: Add GtkCssNumber

This commit is contained in:
Benjamin Otte
2012-01-13 23:48:42 +01:00
parent bd8fefb20e
commit 893807bee0
5 changed files with 265 additions and 1 deletions

View File

@ -1058,6 +1058,13 @@ border_image_repeat_value_print (const GValue *value,
}
}
static void
css_number_print (const GValue *value,
GString *string)
{
_gtk_css_number_print (g_value_get_boxed (value), string);
}
static gboolean
enum_value_parse (GtkCssParser *parser,
GFile *base,
@ -1233,6 +1240,10 @@ gtk_css_style_funcs_init (void)
shadow_value_parse,
shadow_value_print,
shadow_value_compute);
register_conversion_function (GTK_TYPE_CSS_NUMBER,
NULL,
css_number_print,
NULL);
register_conversion_function (G_TYPE_ENUM,
enum_value_parse,
enum_value_print,