From c269b8650fdb9666d3f009775c69094a2a2a2891 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 6 Sep 2024 15:56:06 -0400 Subject: [PATCH] docs: Recommend glycin for image loading Best to send people elsewhere to avoid misunderstandings of our api. --- gdk/gdktexture.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gdk/gdktexture.c b/gdk/gdktexture.c index e4e7baa001..318265efd7 100644 --- a/gdk/gdktexture.c +++ b/gdk/gdktexture.c @@ -33,7 +33,18 @@ * * `GdkTexture` is an immutable object: That means you cannot change * anything about it other than increasing the reference count via - * [method@GObject.Object.ref], and consequently, it is a thread-safe object. + * [method@GObject.Object.ref], and consequently, it is a threadsafe object. + * + * GDK provides a number of threadsafe texture loading functions: + * [ctor@Gdk.Texture.new_from_resource], + * [ctor@Gdk.Texture.new_from_bytes], + * [ctor@Gdk.Texture.new_from_file], + * [ctor@Gdk.Texture.new_from_filename], + * [ctor@Gdk.Texture.new_for_pixbuf]. Note that these are meant for loading + * icons and resources that are shipped with the toolkit or application. It + * is recommended that you use a dedicated image loading framework such as + * [glycin](https://lib.rs/crates/glycin), if you need to load untrusted image + * data. */ #include "config.h"