Commit 8ad8a4fe authored by Benjamin Otte's avatar Benjamin Otte

cssvalue: Add _gtk_css_value_to_string()

This is a tiny wrapper around _gtk_css_value_print().
It's intended for usage in gdb and printf debugging.
parent 41ce2976
......@@ -418,6 +418,18 @@ _gtk_css_value_transition (GtkCssValue *start,
return start->class->transition (start, end, progress);
}
char *
_gtk_css_value_to_string (const GtkCssValue *value)
{
GString *string;
g_return_val_if_fail (value != NULL, NULL);
string = g_string_new (NULL);
_gtk_css_value_print (value, string);
return g_string_free (string, FALSE);
}
void
_gtk_css_value_print (const GtkCssValue *value,
GString *string)
......
......@@ -71,6 +71,7 @@ GtkCssValue *_gtk_css_value_transition (GtkCssValue
GtkCssValue *end,
double progress);
char * _gtk_css_value_to_string (const GtkCssValue *value);
void _gtk_css_value_print (const GtkCssValue *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