Gauche GTK2 hint
Stephen Lewis <[email protected]> Fri, 12 Dec 2025 11:40:04 -0800
| Newsgroups | gmane.lisp.scheme.gauche |
|---|---|
| Message-ID | <[email protected]> |
Shiro,
I built 'gauche-gtk2' from the tarball "Gauche-gtk2-0.6.1.tgz"
I can use 'gdk-pixbuf-loader-new-with-type' which works fine
then 'gdk-pixbuf-loader-write' and 'gdk-pixbuf-loader-close'
but 'gdk-pixbuf-loader-get-pixbuf' is missing so you can't
access the 'pixbuf' you just made :-(
Here is my patch to add hint for 'gdk-pixbuf-loader-get-pixbuf'.
==========================================================================
--- ./src/gdk-lib.hints.orig 2025-12-08 13:36:52.268016378 -0800
+++ ./src/gdk-lib.hints 2025-12-08 13:51:52.243272391 -0800
@@ -1057,6 +1057,13 @@
;; gdk-pixbuf-loader.h
;;
+(define-cproc-fix gdk-pixbuf-loader-get-pixbuf
+ (fix-arguments! '(loader::<gdk-pixbuf-loader>))
+ (fix-body!
+ "{ GdkPixbuf *pixbuf = gdk_pixbuf_loader_get_pixbuf(loader);
+ if (pixbuf) SCM_RETURN(SCM_MAKE_GDK_PIXBUF(pixbuf));
+ else SCM_RETURN(SCM_FALSE);}"))
+
(define-cproc-fix gdk-pixbuf-loader-new-with-type
(fix-arguments! '(image-type::<const-char*>))
(fix-body! "GError *perr = NULL;
==========================================================================
I really like Gauche and thank you for producing and maintaining it
and 'gauche-gtk2' as well. It still works on Fedora Asahi Remix 42
which I am running on a Mac Mini M2 Pro.
Stephen Lewis
--