2020 has been a very long year. What better way to end it than with a major release! Today, we released GTK 4.0.
GTK 4.0 is the result of a lot of hard work by a small team of dedicated developers. We will have a separate post to go over the statistics, but the short summary is that since the 3.89.1 release in November 2016, we’ve added over 18000 commits and made more than 20 development releases.
Congratulations and a big thank you to everybody who has participated in this effort, and in particular to Benjamin, Emmanuele, Timm, Carlos, Jonas and Christian!
What’s new
It is impossible to summarize 4 years of development in a single post. We’ve written detailed articles about many of the new things in this release over the past year: Data transfers, Event controllers, Layout managers, Render nodes, Media playback, Scalable lists, Shaders, Accessibility. Here are some of the highlights, in visual form:
Media playback:
Drag-and-Drop:
Layout managers and transforms:
Scalable lists and grids:
Shaders:
What’s old
GTK 4 is now stable, and we consider it ready for consumption. That does not mean GTK 3 is dead – we will continue to support and update it for the foreseeable future (the latest release, 3.24.24, quietly went out a few days ago). It does mean, however, that GTK 2 has reached the end of its life. We will do one final 2.x release in the coming days, and we encourage everybody to port their GTK 2 applications to GTK 3 or 4.
How to get it
The source tarballs are available in the usual place. Binary packages should appear in major distributions soon.
The GNOME 40 release will have a number of applications ported to GTK 4. If you want to try GTK 4.0 today, you can use the nightly flatpak builds of gtk4-demo and gtk4-widget-factory:
$ flatpak install https://nightly.gnome.org/repo/appstream/org.gtk.Demo4.flatpakref $ flatpak run org.gtk.Demo4
If you are itching to port your application to GTK 4, our migration guide is available as part of the documentation.
How to support GTK
GTK could not be developed without the many volunteers who contribute bug reports, patches, translations or ideas. Thanks to all of you. We are also grateful to the GNOME foundation for supporting GTK with development resources, infrastructure, and travel assistance.
Donating to the GNOME foundation is a good way to support future GTK development.
What comes next
We are very thankful for all the early testers that have provided us with bug reports and feedback, which made this release much better. But we fully expect that there will be a quick 4.0.1 release to fix up the oversights and gotchas that only come to light after a .0 release.
Now that we have a 4.0 release, we need to bring along the library ecosystem to enable applications to use it. vte, webkit and gtksourceview are some of the most notable libraries that tend to be used together with GTK. We expect GTK 4 ports of these to be available soon.
If more serious issues show up, we will do a 4.2 release in time for GNOME 40, otherwise we might wait until the summer for that.
What the future will bring beyond GTK 4 remains to be seen. We have some fun things in the pipeline, but we would also like to hear what features application developers would like to see in GTK. Tell us!
A celebration
We will celebrate the 4.0 release with an (online) gathering this coming Friday. Feel free to drop by!