diff options
author | Benjamin Otte <otte@redhat.com> | 2012-04-01 07:28:35 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2012-04-17 08:59:16 +0200 |
commit | 8ad8a4febfe44788ed09b3308146e9340abdecc6 (patch) | |
tree | 40310481917607c9f44fe8450f65b05bc631e84b /gtk/gtkcssvalue.c | |
parent | 41ce29767cf78fb1e04b30e7d0d0b1a3ceb43894 (diff) | |
download | gtk+-8ad8a4febfe44788ed09b3308146e9340abdecc6.tar.gz |
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.
Diffstat (limited to 'gtk/gtkcssvalue.c')
-rw-r--r-- | gtk/gtkcssvalue.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk/gtkcssvalue.c b/gtk/gtkcssvalue.c index 9fef5769b0..25d3668df5 100644 --- a/gtk/gtkcssvalue.c +++ b/gtk/gtkcssvalue.c @@ -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) |