Release of GTK 4.0 graphical toolkit

After four years of development saw the light release of a multi-platform toolkit for creating a graphical user interface – 4.0 . The GTK 4 branch is developing as part of a new development process that tries to provide application developers with a stable and supported API for several years, which can be used without fear of having to redo applications every six months due to API changes in the next GTK branch.

At the same time, it was announced that support for the GTK 2 branch was discontinued, after a few days for which it is planned to publish the last release. Support for the GTK 3 branch will continue for the foreseeable future.

The most significant changes in GTK 4 can be note:

  • Constraint layout method ( constraint layout a>), in which the position and size of children is determined based on the distance to borders and the size of other elements.
  • A renderer based on the Vulkan graphics API that implements shaders for many resource-intensive CSS elements used in GTK widgets.
  • Integration GSK (GTK Scene Kit) with the ability to draw graphic scenes through OpenGL and Vulkan.
  • Rendering organization revised – instead of output to the buffer, a model based on render nodes, in which the output is arranged in the form of a tree of high-level operations, efficiently processed by the GPU using OpenGL and Vulkan.
  • Tools for flexible handling of input focus changes.
  • A modernized event delivery model that eliminates the need for subwindow when routing input events. The need to implement the new model is associated with more active use of animation effects, which should be rendered without changing the layout of visible elements and, accordingly, without a subwindow.
  • The GDK API has been redesigned with an eye to using the Wayland protocol and related concepts. Moved X11 and Wayland related capabilities to standalone backends .
  • A major API cleanup has been done, including the removal of the GtkMenu, GtkMenuBar, and GtkToolbar classes, instead of GMenu and popover options.
  • GtkTextView and other widgets input stack for undoing changes is built in.
  • Added a new GtkNative class for widgets that have their own display surface and can work separately at the first level, without being bound to their parent widgets.
  • Added new widgets, including GtkPicture, GtkText, GtkPasswordEntry, GtkListView, GtkGridView, GtkColumnView, as well as a widget for displaying Emoji.
/Release. View in full here.