[gtk+/wip/cssvalue: 95/165] cssvalue: Add _gtk_css_value_to_string()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/cssvalue: 95/165] cssvalue: Add _gtk_css_value_to_string()
- Date: Fri, 13 Apr 2012 23:10:46 +0000 (UTC)
commit c5c8f7c1ab74ce34256b0f47690bea24d3263a61
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 9fef576..25d3668 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)
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]