GTK is a toolkit for creating graphical user interfaces. It also offers a complete set of widgets. GTK is also suitable for projects ranging from small single tools to complete application suites. On the other hand, GTK is the core of the GNOME development platform. But it can also be used to write applications for other Linux environments, as well as applications aimed at Microsoft Windows and Apple MacOS. Before the end of the year, GTK announces an important release, since it is the official GTK 4. In this post, we will mention the new features that they incorporate.
The new version of GTK is the result of a lot of work by a small team of dedicated developers. Likewise, it is impossible to summarize four years of development in one single position.
GTK 4: What’s new?
Similarly, as mentioned above, it is impossible to summarize four years of work, as mentioned in the official announcement. For this reason, they have made several articles about the new features incorporated in the fourth version of GTK. Such as data transfer, event drivers, design managers, rendering nodes, media playback, scalable lists, shaders, accessibility.
Data transfer in GTK4
Traditional methods for user-initiated data transfer between desktop applications They are the clipboard or Drag and Drop, on the other hand, GTK+ has supported these methods since the beginning of time. Until the arrival of GTK 3, the APIs it had for this type of data transfer was just copies disguised as the corresponding X11 apis. However, for GTK 4, they have been working to leave all that behind, to move to GDK to be closer to the Wayland API. Also, the developers, have worked urgently, on the data transfer to modernize it.
Media in GTK 4
It is increasingly important to show moving images, in GTK 4 make it easier for GTK applications to show animations. Whether it is a programmed animation, web archive, or a live broadcast.
The new version of GTK includes a new application called GdkPaintable inspired by the effort of CSS Houdini. It is very flexible, anything that can draw applaudable can be a GdkPaintable. Also, content can be resizable as svg, or change over time as webm.
Scalable lists in GTK 4
One of the last big pieces missing from GTK 4 is the infrastructure for the new list and grid widgets. On the other hand, the current version of GTK incorporates an assortment of GListModel implementation. Also, several ways to combine or modify existing models up to filtering and sorting.
Accessibility in GTK 4
The great news of the last weeks of GTK 3.99.3 release, is that it has the first non-trivial backend. For new accessibility implementation.
Also, in GTK 4, it has simplified the application side by cutting ATK and at-spi2-atk. Similarly, the widgets now incorporate a GtkAccessible interface that allows them to set a number of roles. Also with states, properties and relationships that take more or less directly the WAI-ARIA specification published by the W3C.
On the other hand, the AT-SPI backend for the GTK accessibility API then takes these ARIA-inspired attributes. To represent the widgets as objects in the accessibility bus, implementing the AT-SPI interfaces relevant to them.
To find out more about what’s new, go to the official announcement.
After a long wait of four years, GTK 4 was launched, where the hard work of the developers is evident. For the range of improvements and implementations, the new version, to end the year with a major release.
Also within the improvements, such as data transfer with the passage of versions. The developers were modernizing, as was mentioned urgently. On the other hand, accessibility was another aspect to improve, with the simplification of the applications by cutting ATK and at-spi2-atk.
In addition, on the developers’ side, they expand the possibilities of creating more powerful graphic interfaces. On the user side, they also benefit from them.
Finally, with the release of GTK 4, it doesn’t mean that GNOME 4 is about to be announced. Although the release is closer now than before.