[gtk+] cssnodedeclaration: Add gtk_css_node_declaration_to_string



commit a22ef67b17bfa6e5470fe3115fd74b2de0fc36b3
Author: Timm Bäder <mail baedert org>
Date:   Tue Oct 10 20:59:57 2017 +0200

    cssnodedeclaration: Add gtk_css_node_declaration_to_string

 gtk/gtkcssnodedeclaration.c        |   10 ++++++++++
 gtk/gtkcssnodedeclarationprivate.h |    2 ++
 2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcssnodedeclaration.c b/gtk/gtkcssnodedeclaration.c
index 05baa48..10b5458 100644
--- a/gtk/gtkcssnodedeclaration.c
+++ b/gtk/gtkcssnodedeclaration.c
@@ -478,3 +478,13 @@ gtk_css_node_declaration_print (const GtkCssNodeDeclaration *decl,
         }
     }
 }
+
+char *
+gtk_css_node_declaration_to_string (const GtkCssNodeDeclaration *decl)
+{
+  GString *s = g_string_new (NULL);
+
+  gtk_css_node_declaration_print (decl, s);
+
+  return g_string_free (s, FALSE);
+}
diff --git a/gtk/gtkcssnodedeclarationprivate.h b/gtk/gtkcssnodedeclarationprivate.h
index d927d42..79c000f 100644
--- a/gtk/gtkcssnodedeclarationprivate.h
+++ b/gtk/gtkcssnodedeclarationprivate.h
@@ -62,6 +62,8 @@ void                    gtk_css_node_declaration_add_to_widget_path     (const G
 void                    gtk_css_node_declaration_print                  (const GtkCssNodeDeclaration   *decl,
                                                                          GString                       
*string);
 
+char *                  gtk_css_node_declaration_to_string              (const GtkCssNodeDeclaration   
*decl);
+
 G_END_DECLS
 
 #endif /* __GTK_CSS_NODE_DECLARATION_PRIVATE_H__ */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]