This is a translated Vala version from the example at main Gtk4 Documentation
the only problem I couldn't find solusion for is that closing the window don't exit the process.
And I can't connect to destroy
signal. I don't know if it's a bug with Gtk4 or my fault.
Thanks to Chris Williams @chrisawi on irc.gnome.org #vala for the hint solving this issue.
You have to compile and install Gtk4 on your machin. On ArchLinx
you can build the Gtk4 AUR package.
run meson build
, cd build
, ninja
.