I’m working on a simple slideshow application in Vala where I need to show image files the user selects. From the docs I understood that the correct process to do this is to use Glycin to load the file, ClycinGtk4 to convert it to GdkTexture which can then be loaded into GtkPicture.
Glycin does not have native Vala bindings at the moment, but the C bindings should be usable as far as I understand. I tried to generate the bindings using vapigen:
but this produced a file containing only a comment:
/* glycin-2.vapi generated by vapigen, do not modify. */
Is something broken or am I missing something? I have to admit that I’m completely lost at the moment, also on how to integrate this into the program in Gnome Builder.
If you are installing glycin from source, make sure to enable the vapi meson option before compiling it. If you are installing it from your distribution’s repositories, they should have already built it with that option enabled, make sure you are installing the -dev or -devel package if available.
For flatpak (and therefore GNOME Builder), it’s already available in the 49 runtime.
(If you need a glycin example with vala, I have one here that uses bytes, input stream and file Making sure you're not a bot!)