[gtk+/wip/cssvalue: 96/142] cssvalue: Add _gtk_css_value_to_string()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/cssvalue: 96/142] cssvalue: Add _gtk_css_value_to_string()
- Date: Sat, 7 Apr 2012 19:54:26 +0000 (UTC)
commit b363f9c9c3ae59b3b997d014cbe7924c53cf78c6
Author: Benjamin Otte <otte redhat com>
Date: Sun Apr 1 07:28:35 2012 +0200
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.
gtk/gtkcssvalue.c | 12 ++++++++++++
gtk/gtkcssvalueprivate.h | 1 +
2 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcssvalue.c b/gtk/gtkcssvalue.c
index 912375b..f3bca9e 100644
--- a/gtk/gtkcssvalue.c
+++ b/gtk/gtkcssvalue.c
@@ -389,6 +389,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)
diff --git a/gtk/gtkcssvalueprivate.h b/gtk/gtkcssvalueprivate.h
index 6e2e89c..a3143a3 100644
--- a/gtk/gtkcssvalueprivate.h
+++ b/gtk/gtkcssvalueprivate.h
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]