diff --git a/gtk/gtkcssimage.c b/gtk/gtkcssimage.c index 4b9c781d80..f4cb6c59ee 100644 --- a/gtk/gtkcssimage.c +++ b/gtk/gtkcssimage.c @@ -340,6 +340,17 @@ _gtk_css_image_print (GtkCssImage *image, klass->print (image, string); } +char * +gtk_css_image_to_string (GtkCssImage *image) +{ + GString *str = g_string_new (""); + + _gtk_css_image_print (image, str); + + return g_string_free (str, FALSE); +} + + /* Applies the algorithm outlined in * http://dev.w3.org/csswg/css3-images/#default-sizing */ diff --git a/gtk/gtkcssimageprivate.h b/gtk/gtkcssimageprivate.h index b467112e6e..0366d45557 100644 --- a/gtk/gtkcssimageprivate.h +++ b/gtk/gtkcssimageprivate.h @@ -127,6 +127,7 @@ GtkCssImage * gtk_css_image_get_dynamic_image (GtkCssImage * gint64 monotonic_time); void _gtk_css_image_print (GtkCssImage *image, GString *string); +char * gtk_css_image_to_string (GtkCssImage *image); void _gtk_css_image_get_concrete_size (GtkCssImage *image, double specified_width,