cssnodedeclaration: Add gtk_css_node_declaration_to_string

This commit is contained in:
Timm Bäder 2017-10-10 20:59:57 +02:00
parent 7e8f2f6178
commit a22ef67b17
2 changed files with 12 additions and 0 deletions

View File

@ -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);
}

View File

@ -62,6 +62,8 @@ void gtk_css_node_declaration_add_to_widget_path (const G
void gtk_css_node_declaration_print (const GtkCssNodeDeclaration *decl, void gtk_css_node_declaration_print (const GtkCssNodeDeclaration *decl,
GString *string); GString *string);
char * gtk_css_node_declaration_to_string (const GtkCssNodeDeclaration *decl);
G_END_DECLS G_END_DECLS
#endif /* __GTK_CSS_NODE_DECLARATION_PRIVATE_H__ */ #endif /* __GTK_CSS_NODE_DECLARATION_PRIVATE_H__ */