cssimage: Add gtk_css_image_to_string()

In line with all the other _to_string() implementations
This commit is contained in:
Timm Bäder 2020-01-24 11:21:38 +01:00
parent 4287f0def4
commit 1a56a10fc1
2 changed files with 12 additions and 0 deletions

View File

@ -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
*/

View File

@ -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,