diff --git a/demos/gtk-demo/cursors.c b/demos/gtk-demo/cursors.c index 4a91ce5b7f7195bda791dbf9ca5cb1f25d0a947e..b077574c5a7f4aed12b3f204056299e50909dae8 100644 --- a/demos/gtk-demo/cursors.c +++ b/demos/gtk-demo/cursors.c @@ -43,7 +43,9 @@ cursor_callback (GdkCursor *cursor, return NULL; } +G_GNUC_BEGIN_IGNORE_DEPRECATIONS texture = gdk_texture_new_for_pixbuf (pixbuf); +G_GNUC_END_IGNORE_DEPRECATIONS g_object_unref (pixbuf); diff --git a/demos/gtk-demo/fontrendering.c b/demos/gtk-demo/fontrendering.c index e8ecd71d2dfea7a362f3ac98ce8e73bcd2ee8b9b..963637dea4e75d0abcfd58bb4b6a29c301ce0eca 100644 --- a/demos/gtk-demo/fontrendering.c +++ b/demos/gtk-demo/fontrendering.c @@ -303,7 +303,9 @@ retry: cairo_surface_destroy (surface); } +G_GNUC_BEGIN_IGNORE_DEPRECATIONS texture = gdk_texture_new_for_pixbuf (pixbuf2); +G_GNUC_END_IGNORE_DEPRECATIONS gtk_picture_set_paintable (GTK_PICTURE (image), GDK_PAINTABLE (texture)); g_object_unref (pixbuf2); g_object_unref (texture); diff --git a/demos/gtk-demo/images.c b/demos/gtk-demo/images.c index 08fcf1dc58d599965c2eb5a739234a00cb2147a4..19397824b7a008d8de12c25f92c902af6b135542 100644 --- a/demos/gtk-demo/images.c +++ b/demos/gtk-demo/images.c @@ -41,7 +41,9 @@ progressive_prepared_callback (GdkPixbufLoader *loader, */ gdk_pixbuf_fill (pixbuf, 0xaaaaaaff); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS texture = gdk_texture_new_for_pixbuf (pixbuf); +G_GNUC_END_IGNORE_DEPRECATIONS gtk_picture_set_paintable (GTK_PICTURE (picture), GDK_PAINTABLE (texture)); g_object_unref (texture); } @@ -57,7 +59,9 @@ progressive_updated_callback (GdkPixbufLoader *loader, GtkWidget *picture = GTK_WIDGET (data); GdkTexture *texture; +G_GNUC_BEGIN_IGNORE_DEPRECATIONS texture = gdk_texture_new_for_pixbuf (gdk_pixbuf_loader_get_pixbuf (loader)); +G_GNUC_END_IGNORE_DEPRECATIONS gtk_picture_set_paintable (GTK_PICTURE (picture), GDK_PAINTABLE (texture)); g_object_unref (texture); } diff --git a/demos/gtk-demo/pixbufpaintable.c b/demos/gtk-demo/pixbufpaintable.c index d7193182d7065d713c7faa169d5c60f72ce7dcd0..74e6c798356d0e12bbe7b7c682b59b2183582b4e 100644 --- a/demos/gtk-demo/pixbufpaintable.c +++ b/demos/gtk-demo/pixbufpaintable.c @@ -30,9 +30,9 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS g_get_current_time (&val); gdk_pixbuf_animation_iter_advance (self->iter, &val); -G_GNUC_END_IGNORE_DEPRECATIONS pixbuf = gdk_pixbuf_animation_iter_get_pixbuf (self->iter); texture = gdk_texture_new_for_pixbuf (pixbuf); +G_GNUC_END_IGNORE_DEPRECATIONS gdk_paintable_snapshot (GDK_PAINTABLE (texture), snapshot, width, height); diff --git a/demos/widget-factory/widget-factory.c b/demos/widget-factory/widget-factory.c index 70ba13a87400aed9146c201e5a2d4e3e80c0b43d..48181778777e4f602d176bba413de86188d35303 100644 --- a/demos/widget-factory/widget-factory.c +++ b/demos/widget-factory/widget-factory.c @@ -1236,7 +1236,9 @@ background_loaded_cb (GObject *source, return; } +G_GNUC_BEGIN_IGNORE_DEPRECATIONS texture = gdk_texture_new_for_pixbuf (pixbuf); +G_GNUC_END_IGNORE_DEPRECATIONS add_background (bd->flowbox, bd->filename, texture, FALSE); g_object_unref (texture); @@ -1286,7 +1288,9 @@ populate_flowbox (GtkWidget *flowbox) { filename = g_strconcat ("/org/gtk/WidgetFactory4/", resources[i], NULL); pixbuf = gdk_pixbuf_new_from_resource_at_scale (filename, 110, 110, TRUE, NULL); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS texture = gdk_texture_new_for_pixbuf (pixbuf); +G_GNUC_END_IGNORE_DEPRECATIONS add_background (flowbox, filename, texture, TRUE); g_object_unref (texture); g_object_unref (pixbuf); diff --git a/gdk/gdkcairo.c b/gdk/gdkcairo.c index 0f30f263a254ed24efb6fd435e8057c4f8ebf2fb..cebeb196f466203b1a1273ba6e59aea328df1637 100644 --- a/gdk/gdkcairo.c +++ b/gdk/gdkcairo.c @@ -110,7 +110,9 @@ gdk_cairo_surface_paint_pixbuf (cairo_surface_t *surface, cairo_surface_flush (surface); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS texture = gdk_texture_new_for_pixbuf (GDK_PIXBUF (pixbuf)); +G_GNUC_END_IGNORE_DEPRECATIONS gdk_texture_download (texture, cairo_image_surface_get_data (surface), cairo_image_surface_get_stride (surface)); @@ -130,6 +132,8 @@ gdk_cairo_surface_paint_pixbuf (cairo_surface_t *surface, * * The pattern has an extend mode of %CAIRO_EXTEND_NONE and is aligned * so that the origin of @pixbuf is @pixbuf_x, @pixbuf_y. + * + * Deprecated: 4.20: Use cairo_set_source_surface() and gdk_texture_download() */ void gdk_cairo_set_source_pixbuf (cairo_t *cr, diff --git a/gdk/gdkcairo.h b/gdk/gdkcairo.h index eafc4c29dc1759f304e184fdb52b471d7f7f1841..6dc9586adae948319774c80eee008e382b0c7435 100644 --- a/gdk/gdkcairo.h +++ b/gdk/gdkcairo.h @@ -30,7 +30,7 @@ G_BEGIN_DECLS GDK_AVAILABLE_IN_ALL void gdk_cairo_set_source_rgba (cairo_t *cr, const GdkRGBA *rgba); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_4_20 void gdk_cairo_set_source_pixbuf (cairo_t *cr, const GdkPixbuf *pixbuf, double pixbuf_x, diff --git a/gdk/gdkcontentdeserializer.c b/gdk/gdkcontentdeserializer.c index e367c938c4d2d2cf6d58d11a8557dd4360f507bb..40b6060a53881d47d0ded357d0f9647e493209a5 100644 --- a/gdk/gdkcontentdeserializer.c +++ b/gdk/gdkcontentdeserializer.c @@ -640,7 +640,9 @@ pixbuf_deserializer_finish (GObject *source, else if (G_VALUE_HOLDS (value, GDK_TYPE_TEXTURE)) { GdkTexture *texture; +G_GNUC_BEGIN_IGNORE_DEPRECATIONS texture = gdk_texture_new_for_pixbuf (pixbuf); +G_GNUC_END_IGNORE_DEPRECATIONS g_object_unref (pixbuf); g_value_take_object (value, texture); } diff --git a/gdk/gdktexture.c b/gdk/gdktexture.c index 48ef5372219b951cfebf556c0338cf4b238ce38a..fd194adc03246c07d2617e7dc495becbfce28237 100644 --- a/gdk/gdktexture.c +++ b/gdk/gdktexture.c @@ -526,10 +526,13 @@ gdk_texture_new_for_surface (cairo_surface_t *surface) * Creates a new texture object representing the `GdkPixbuf`. * * This function is threadsafe, so that you can e.g. use GTask - * and [method@Gio.Task.run_in_thread] to avoid blocking the main thread - * while loading a big image. + * and [method@Gio.Task.run_in_thread] to avoid blocking the main + * thread while loading a big image. * * Returns: a new `GdkTexture` + * + * Deprecated: 4.20: Use e.g. libglycin, which can load many image + * formats into GdkTexture */ GdkTexture * gdk_texture_new_for_pixbuf (GdkPixbuf *pixbuf) @@ -687,7 +690,9 @@ gdk_texture_new_from_bytes_pixbuf (GBytes *bytes, if (pixbuf == NULL) return NULL; +G_GNUC_BEGIN_IGNORE_DEPRECATIONS texture = gdk_texture_new_for_pixbuf (pixbuf); +G_GNUC_END_IGNORE_DEPRECATIONS g_object_unref (pixbuf); return texture; @@ -1142,9 +1147,9 @@ gdk_texture_get_render_data (GdkTexture *self, * * This is a utility function intended for debugging and testing. * If you want more control over formats, proper error handling or - * want to store to a [iface@Gio.File] or other location, you might want to - * use [method@Gdk.Texture.save_to_png_bytes] or look into the - * gdk-pixbuf library. + * want to store to a [iface@Gio.File] or other location, you might + * want to use [method@Gdk.Texture.save_to_png_bytes] or look into + * the libglycin library. * * Returns: %TRUE if saving succeeded, %FALSE on failure. */ @@ -1181,7 +1186,7 @@ gdk_texture_save_to_png (GdkTexture *texture, * * If you need more control over the generated image, such as * attaching metadata, you should look into an image handling - * library such as the gdk-pixbuf library. + * library such as the libglycin library. * * If you are dealing with high dynamic range float data, you * might also want to consider [method@Gdk.Texture.save_to_tiff_bytes] diff --git a/gdk/gdktexture.h b/gdk/gdktexture.h index a93211914889ef687762380fe1e924e2cc7d6d5a..31ce7ec3fdbef508933ad814f9fb909bfedd2c88 100644 --- a/gdk/gdktexture.h +++ b/gdk/gdktexture.h @@ -62,7 +62,7 @@ typedef enum GDK_AVAILABLE_IN_ALL GType gdk_texture_get_type (void) G_GNUC_CONST; -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_4_20 GdkTexture * gdk_texture_new_for_pixbuf (GdkPixbuf *pixbuf); GDK_AVAILABLE_IN_ALL GdkTexture * gdk_texture_new_from_resource (const char *resource_path); diff --git a/gtk/gdktextureutils.c b/gtk/gdktextureutils.c index 026ee9e2783b7c62e5b44f7780e0a6bbd1e2b492..dc40205cf5417a036f32837d5456c39961e17c90 100644 --- a/gtk/gdktextureutils.c +++ b/gtk/gdktextureutils.c @@ -636,7 +636,9 @@ gdk_texture_new_from_stream_with_fg (GInputStream *stream, if (pixbuf) { *only_fg = pixbuf_is_only_fg (pixbuf); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS texture = gdk_texture_new_for_pixbuf (pixbuf); +G_GNUC_END_IGNORE_DEPRECATIONS g_object_unref (pixbuf); } @@ -659,7 +661,9 @@ gdk_texture_new_from_stream_at_scale (GInputStream *stream, if (pixbuf) { *only_fg = pixbuf_is_only_fg (pixbuf); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS texture = gdk_texture_new_for_pixbuf (pixbuf); +G_GNUC_END_IGNORE_DEPRECATIONS g_object_unref (pixbuf); } @@ -681,7 +685,9 @@ gdk_texture_new_from_resource_at_scale (const char *path, if (pixbuf) { *only_fg = pixbuf_is_only_fg (pixbuf); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS texture = gdk_texture_new_for_pixbuf (pixbuf); +G_GNUC_END_IGNORE_DEPRECATIONS g_object_unref (pixbuf); } @@ -706,7 +712,9 @@ gdk_texture_new_from_filename_symbolic (const char *filename, if (pixbuf) { *only_fg = pixbuf_is_only_fg (pixbuf); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS texture = gdk_texture_new_for_pixbuf (pixbuf); +G_GNUC_END_IGNORE_DEPRECATIONS g_object_unref (pixbuf); } @@ -734,7 +742,9 @@ gdk_texture_new_from_resource_symbolic (const char *path, if (pixbuf) { *only_fg = pixbuf_is_only_fg (pixbuf); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS texture = gdk_texture_new_for_pixbuf (pixbuf); +G_GNUC_END_IGNORE_DEPRECATIONS g_object_unref (pixbuf); } @@ -757,7 +767,9 @@ gtk_load_symbolic_texture_from_file (GFile *file) if (pixbuf == NULL) return NULL; +G_GNUC_BEGIN_IGNORE_DEPRECATIONS texture = gdk_texture_new_for_pixbuf (pixbuf); +G_GNUC_END_IGNORE_DEPRECATIONS g_object_unref (pixbuf); return texture; @@ -778,7 +790,9 @@ gdk_texture_new_from_file_symbolic (GFile *file, if (pixbuf) { *only_fg = pixbuf_is_only_fg (pixbuf); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS texture = gdk_texture_new_for_pixbuf (pixbuf); +G_GNUC_END_IGNORE_DEPRECATIONS g_object_unref (pixbuf); } @@ -849,7 +863,9 @@ gdk_paintable_new_from_bytes_scaled (GBytes *bytes, if (!success) return NULL; +G_GNUC_BEGIN_IGNORE_DEPRECATIONS texture = gdk_texture_new_for_pixbuf (gdk_pixbuf_loader_get_pixbuf (loader)); +G_GNUC_END_IGNORE_DEPRECATIONS g_object_unref (loader); if (loader_data.scale != 1.0) diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index 2b54c6f74033e69410fc749c7072b526bca5930b..d920ea6612d0d8bfb596aea5dd558c6568bb2338 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -4080,7 +4080,9 @@ gtk_icon_theme_lookup_by_gicon (GtkIconTheme *self, else if (GDK_IS_PIXBUF (gicon)) { paintable = icon_paintable_new (NULL, size, scale); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS paintable->texture = gdk_texture_new_for_pixbuf (GDK_PIXBUF (gicon)); +G_GNUC_END_IGNORE_DEPRECATIONS } else if (G_IS_FILE_ICON (gicon)) { diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c index 4306d2e339757deccd75ec0d97afcc28476fec11..8ad18e420bd9fcafd17eaa711c399231bb6703c2 100644 --- a/gtk/gtkimage.c +++ b/gtk/gtkimage.c @@ -731,10 +731,12 @@ gtk_image_set_from_pixbuf (GtkImage *image, g_return_if_fail (GTK_IS_IMAGE (image)); g_return_if_fail (pixbuf == NULL || GDK_IS_PIXBUF (pixbuf)); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS if (pixbuf) texture = gdk_texture_new_for_pixbuf (pixbuf); else texture = NULL; +G_GNUC_END_IGNORE_DEPRECATIONS gtk_image_set_from_paintable (image, GDK_PAINTABLE (texture)); diff --git a/gtk/gtkmountoperation-x11.c b/gtk/gtkmountoperation-x11.c index 22cea2acfb60f42675e9cd84ec93ab5ade8b77d9..41db0f56302317023d1f4cbaf04258ea70aa404f 100644 --- a/gtk/gtkmountoperation-x11.c +++ b/gtk/gtkmountoperation-x11.c @@ -462,7 +462,9 @@ scaled_from_pixdata (guchar *pixdata, dest = src; } +G_GNUC_BEGIN_IGNORE_DEPRECATIONS ret = gdk_texture_new_for_pixbuf (dest); +G_GNUC_END_IGNORE_DEPRECATIONS g_object_unref (dest); diff --git a/gtk/gtkpicture.c b/gtk/gtkpicture.c index 350e72006378ed426b48ba90477485e8e5fc62bf..32e24be9f44ce1cac4e28486b52da7b36baa7b3d 100644 --- a/gtk/gtkpicture.c +++ b/gtk/gtkpicture.c @@ -556,10 +556,12 @@ gtk_picture_new_for_pixbuf (GdkPixbuf *pixbuf) g_return_val_if_fail (pixbuf == NULL || GDK_IS_PIXBUF (pixbuf), NULL); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS if (pixbuf) paintable = GDK_PAINTABLE (gdk_texture_new_for_pixbuf (pixbuf)); else paintable = NULL; +G_GNUC_END_IGNORE_DEPRECATIONS result = gtk_picture_new_for_paintable (paintable); @@ -813,10 +815,12 @@ gtk_picture_set_pixbuf (GtkPicture *self, g_return_if_fail (GTK_IS_PICTURE (self)); g_return_if_fail (pixbuf == NULL || GDK_IS_PIXBUF (pixbuf)); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS if (pixbuf) texture = gdk_texture_new_for_pixbuf (pixbuf); else texture = NULL; +G_GNUC_END_IGNORE_DEPRECATIONS gtk_picture_set_paintable (self, GDK_PAINTABLE (texture)); diff --git a/tests/callbackcursor.c b/tests/callbackcursor.c index 63c651fde20175b9aad05652eb9e9851bb8f4fe0..d682c2f0b4095f90f60327c75a4a1fe8a8f0ed71 100644 --- a/tests/callbackcursor.c +++ b/tests/callbackcursor.c @@ -48,7 +48,9 @@ cursor_callback (GdkCursor *cursor, return NULL; } +G_GNUC_BEGIN_IGNORE_DEPRECATIONS texture = gdk_texture_new_for_pixbuf (pixbuf); +G_GNUC_END_IGNORE_DEPRECATIONS g_object_unref (pixbuf); diff --git a/testsuite/gdk/cairo.c b/testsuite/gdk/cairo.c index 9f8f172411d76832082aea645b2602e63eb804cc..b8c1491c7ed52599189abc40faa7fd427592b493 100644 --- a/testsuite/gdk/cairo.c +++ b/testsuite/gdk/cairo.c @@ -20,7 +20,9 @@ test_set_source_big_pixbuf (void) cr = cairo_create (surface); pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, WAY_TOO_BIG, 1); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gdk_cairo_set_source_pixbuf (cr, pixbuf, 0, 0); +G_GNUC_END_IGNORE_DEPRECATIONS g_assert_cmpint (cairo_status (cr), !=, CAIRO_STATUS_SUCCESS); g_object_unref (pixbuf); diff --git a/testsuite/gdk/cursor.c b/testsuite/gdk/cursor.c index e9c42671e9d3e2d40f8bf8701ca083e88fe76896..15e83c7a634a42f1a05b9bd9da7b7e36a893134e 100644 --- a/testsuite/gdk/cursor.c +++ b/testsuite/gdk/cursor.c @@ -20,12 +20,13 @@ test_cursor_named (void) static void test_cursor_texture (void) { - GdkPixbuf *pixbuf; + GBytes *bytes; GdkTexture *texture; GdkCursor *cursor; - pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, 32, 32); - texture = gdk_texture_new_for_pixbuf (pixbuf); + bytes = g_bytes_new_take (g_malloc (32 * 32 * 4), 32 * 32 * 4); + texture = gdk_memory_texture_new (32, 32, GDK_MEMORY_DEFAULT, bytes, 32 * 4); + cursor = gdk_cursor_new_from_texture (texture, 1, 2, NULL); g_assert_null (gdk_cursor_get_name (cursor)); @@ -36,7 +37,7 @@ test_cursor_texture (void) g_object_unref (cursor); g_object_unref (texture); - g_object_unref (pixbuf); + g_bytes_unref (bytes); } static void diff --git a/testsuite/gdk/memorytexture.c b/testsuite/gdk/memorytexture.c index 14b206c9943bfb9cd1897c0880733d53ba3d708f..e0d63c6687f557e879348c9605892517ab415ae5 100644 --- a/testsuite/gdk/memorytexture.c +++ b/testsuite/gdk/memorytexture.c @@ -270,7 +270,9 @@ create_texture (GdkMemoryFormat format, pixbuf = gdk_pixbuf_new_from_stream (stream, NULL, NULL); g_object_unref (stream); g_assert_nonnull (pixbuf); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS texture = gdk_texture_new_for_pixbuf (pixbuf); +G_GNUC_END_IGNORE_DEPRECATIONS g_assert_nonnull (texture); g_object_unref (pixbuf); g_bytes_unref (bytes); @@ -301,7 +303,9 @@ create_texture (GdkMemoryFormat format, pixbuf = gdk_pixbuf_new_from_stream (stream, NULL, NULL); g_object_unref (stream); g_assert_nonnull (pixbuf); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS texture = gdk_texture_new_for_pixbuf (pixbuf); +G_GNUC_END_IGNORE_DEPRECATIONS g_assert_nonnull (texture); g_object_unref (pixbuf); g_bytes_unref (bytes); diff --git a/testsuite/gdk/texture.c b/testsuite/gdk/texture.c index 488b151130badf13da3430108928fdde78c846c7..b80876ea00fd61134ef9174d81cc349c523f3573 100644 --- a/testsuite/gdk/texture.c +++ b/testsuite/gdk/texture.c @@ -113,7 +113,9 @@ test_texture_from_pixbuf (void) width = gdk_pixbuf_get_width (pixbuf); height = gdk_pixbuf_get_height (pixbuf); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS texture = gdk_texture_new_for_pixbuf (pixbuf); +G_GNUC_END_IGNORE_DEPRECATIONS g_assert_nonnull (texture); g_assert_cmpint (gdk_texture_get_width (texture), ==, width); @@ -125,7 +127,9 @@ test_texture_from_pixbuf (void) surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); cr = cairo_create (surface); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gdk_cairo_set_source_pixbuf (cr, pixbuf, 0, 0); +G_GNUC_END_IGNORE_DEPRECATIONS cairo_paint (cr); cairo_destroy (cr); @@ -283,7 +287,9 @@ test_texture_icon (void) g_assert_no_error (error); g_assert_nonnull (pixbuf); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS texture2 = gdk_texture_new_for_pixbuf (pixbuf); +G_GNUC_END_IGNORE_DEPRECATIONS compare_textures (texture, texture2); @@ -313,7 +319,9 @@ icon_loaded (GObject *source, g_assert_no_error (error); g_assert_nonnull (pixbuf); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS texture2 = gdk_texture_new_for_pixbuf (pixbuf); +G_GNUC_END_IGNORE_DEPRECATIONS compare_textures (texture, texture2); diff --git a/testsuite/gtk/no-gtk-init.c b/testsuite/gtk/no-gtk-init.c index 06f1b6772a465ae2b828877906dc7c63cf2e56e1..48f9a82c07411efb6cba0981872c7448b565379d 100644 --- a/testsuite/gtk/no-gtk-init.c +++ b/testsuite/gtk/no-gtk-init.c @@ -33,7 +33,9 @@ test_gdk_cairo_set_source_pixbuf (void) surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 10, 10); cr = cairo_create (surface); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gdk_cairo_set_source_pixbuf (cr, pixbuf, 0, 0); +G_GNUC_END_IGNORE_DEPRECATIONS cairo_paint (cr); cairo_destroy (cr);