Puckla
25 December 2024 06:28
1
Hello odin-community,
I want to share with you the GTK bindings that I was working on in the last month. You can find them on github: GitHub - PucklaJ/odin-gtk: Odin Bindings to GTK4
They have been generated using runic which is a bindings generator that I wrote. You can also find it on github: GitHub - Samudevv/runic: Bindings Generator and Intermediate Format for languages using the C-ABI
These bindings provide the following libraries:
Library
Path
License
glib
glib
LGPL 2.1
gobject
glib/gobject
LGPL 2.1
gmodule
glib/gmodule
LGPL 2.1
gio
glib/gio
LGPL 2.1
girepository
glib/girepository
LGPL 2.1
gdk-pixbuf
gdk-pixbuf
LGPL 2.1
pango
pango
LGPL 2
pangocairo
pango/pangocairo
LGPL 2
cairo
cairo
LGPL 2.1
graphene
graphene
MIT
gtk
gtk
LGPL 2.1
gtk4-layer-shell
gtk/layer-shell
MIT
Feel free to use these bindings however you want. But I need to mention that they currently only support Linux x86_64 and arm64. I am currently not able to work on Windows support, but I ident to do this in the future.
5 Likes
I follow the instructions, I get this:
just setup && just wrapper
cd shared/glib && meson setup --default-library static -Dman-pages=disabled -Ddtrace=disabled -Dsystemtap=disabled -Dsysprof=disabled -Dtests=false -Dglib_debug=disabled -Dintrospection=disabled _build
ERROR: Neither source directory '_build' nor build directory None contain a build file meson.build.
error: Recipe `glib-setup` failed on line 30 with exit code 1
But it seems to work that way.
Puckla
26 December 2024 02:01
5
The instructions might be a little bit unclear. But you don’t have to build the wrapper anymore. Static libraries are provided. But thanks for pointing out this issue. I will fix it.
1 Like
Puckla
26 December 2024 02:03
6
It seems that you forgot to checkout the submodules:
git submodule init
git submodule update
But as I said you don’t need to do this anymore, if you just want to build the wrapper.
1 Like
great. Now someone please convince elemantary/gnome guys to rewrite their stuff in odin
2 Likes
Puckla
30 December 2024 05:18
8
1 Like
Hi!
I just recently started learning Odin so this is still a bit out of my scope atm, but I really appreciate the bindings. Big fan of Adwaita and I cannot wait to write an app in Odin.
Thanks!!
1 Like
Puckla
7 January 2025 07:57
10
No problem. If you have any issues or questions concerning the bindings just leave a reply here or open an issue on the repo.