Glycin bindings for Vala

Hi all,

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:

vapigen --library=glycin-2 --pkg=glycin-2 Gly-2.gir

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.

Any help is appreciated, thanks!

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!)

I managed to miss that it’s already included in the runtime and I just needed to mark the dependency. Many thanks, also for the example :slight_smile:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.