summaryrefslogtreecommitdiff
path: root/gtk/gtkimage.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2023-05-15 21:40:54 -0400
committerMatthias Clasen <mclasen@redhat.com>2023-05-15 23:05:52 -0400
commit4bede73f62fccdf15316664563a1c777237d69a9 (patch)
tree5fbe755276d531ce176c947c01f0593e5f0b04aa /gtk/gtkimage.c
parent0b59290bad3492d81197132407cb3695e86b3891 (diff)
downloadgtk+-4bede73f62fccdf15316664563a1c777237d69a9.tar.gz
Deprecate from-pixbuf apis for widgets
We want to drop GdkPixbuf from our apis. These have easy replacements already, so lets deprecate them.
Diffstat (limited to 'gtk/gtkimage.c')
-rw-r--r--gtk/gtkimage.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c
index 44690975a2..33c2841ef4 100644
--- a/gtk/gtkimage.c
+++ b/gtk/gtkimage.c
@@ -475,6 +475,9 @@ gtk_image_new_from_resource (const char *resource_path)
* want that, you should use [ctor@Gtk.Image.new_from_icon_name].
*
* Returns: a new `GtkImage`
+ *
+ * Deprecated: 4.12: Use [ctor@Gtk.Image.new_from_paintable] and
+ * [ctor@Gdk.Texture.new_for_pixbuf] instead
*/
GtkWidget*
gtk_image_new_from_pixbuf (GdkPixbuf *pixbuf)
@@ -483,7 +486,9 @@ gtk_image_new_from_pixbuf (GdkPixbuf *pixbuf)
image = g_object_new (GTK_TYPE_IMAGE, NULL);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_image_set_from_pixbuf (image, pixbuf);
+G_GNUC_END_IGNORE_DEPRECATIONS
return GTK_WIDGET (image);
}
@@ -711,6 +716,8 @@ gtk_image_set_from_resource (GtkImage *image,
* Note: This is a helper for [method@Gtk.Image.set_from_paintable],
* and you can't get back the exact pixbuf once this is called,
* only a paintable.
+ *
+ * Deprecated: 4.12: Use [method@Gtk.Image.set_from_paintable] instead
*/
void
gtk_image_set_from_pixbuf (GtkImage *image,