What’s New for Developers and System Administrators

GNOME 3.22 includes many new features and improvements for those working with GNOME technologies. Read on for more details!

GTK+ Long Term Support

3.22 marks a significant moment in the history of GTK+. While it does not have a .0 version number, 3.22 is the first in a major new stable release series and is the first major GTK+ version since 3.0. Subsequent releases in the 3.22.x series are guaranteed to be API and ABI stable, with new releases being limited to bug and security fixes. These 3.22.x updates will be provided for at least three years. Major development work will continue in a separate release series, which will be consumable by application authors who want the latest features and are happy to deal with a moderate amount of instability.

GTK+ 3.22 makes all the improvements introduced in the 3.x series, such as CSS styling, GTK+ inspector, animations, new widgets and much more, available in a stable form. This new way of organizing GTK+ releases promises to provide long-term stability for application authors who require it, while not impeding the overall speed of GTK+ development. It is being introduced after significant discussion and consultation with GTK+ users. More details can be found on the GTK+ development blog.

Flatpak

Flatpak, previously known as xdg-app, is the next generation technology for application distribution on Linux. While it is an independent project with its own release schedule, the GNOME project plans to make Flatpak an integral part of its application developer experience.

Since the GNOME 3.20 release, Flatpak has made significant progress and has continued to mature. An important milestone has been reached with the introduction of a new set of APIs, called “portals”. These allow sandboxed applications to access resources from the host system.

GNOME 3.22’s developer technologies come with complete support for portals, through both GLib and GTK+. Supported portals include the file chooser, printing, URI opening, suspend/log out/idle inhibit, screenshots, notifications and network status. This allows fully sandboxed applications to be written for the first time. Portal access is transparent, although GtkFileChooserNative is recommended over the regular GtkFileChooser. More information can be found on Matthias Clasen’s blog post.

More information about Flatpak, including developer documentation and a growing list of Flatpak applications you can try, can be found on flatpak.org.

Builder

GNOME 3.22 is another big release for Builder, with several key pieces of the new IDE falling into place. A new built-in profiler makes it possible to find performance issues in your project, and sees Builder become a multi-function IDE for the first time. The profiler currently supports C and C++, with more language support expected in the future.

Builder’s UI has received some significant polish since 3.20. A new perspective switcher provides a more elegant way to change between modes, and the search bar has been relocated. Most significantly, a new “project bar” provides information about the current project, branch and build profile, and also makes it possible to build and run your project with a single click from anywhere in the IDE.

Other enhancements in Builder 3.22 include:

  • A new find and replace feature, which includes the usual options for case sensitive search, regular expressions, and word matching.

  • Builder’s code editor now makes it really easy to work with colors, thanks to color highlighting and a new color picker sidebar.

  • The pages for creating, cloning and opening projects have been improved, with better layouts and more project creation options.

  • A new quick highlight plugin highlights text that matches the current selection.

  • The C, XML, and HTML indenters have all been expanded to support more syntax styles.

GTK+ Improvements

In addition to Flatpak portals integration, other improvements in GTK+ 3.22 include:

  • CSS blend modes. This is a common CSS feature that allows images to be programmatically transformed. Georges Stavracas, who implemented the feature, has provided more details on his blog.

  • GTK+ 3.22 allows graphics tablets to be used with Wayland. Carlos Garnacho has written about how to add support for this to applications.

  • GtkGLArea can now be used with either full OpenGL or OpenGL for Embedded Systems (known as OpenGL ES or GLES).

  • GdkMonitor is a new more convenient way to get monitor information, and provides richer information than was previously available with GdkScreen.

Additionally, while it is not being introduced in 3.22, major progress has been made on the GTK Scene Graph (GSK) over the past six months. With the new release model described above, the way is clear for this to be integrated into GTK+’s new unstable release series in the near future.

GLib Structured Logging

GLib’s logging API has been reworked to support structured key–value log fields. This makes it easier to add logging and makes it possible to write more powerful logging schemes. It also makes it possible to include more metadata in log messages, such as message IDs.

As a part of this work, GLib’s logging infrastructure has been reorganized around a “writer” function, where an application specifies its logging policy. Log handlers are deprecated in favor of this, which reduces ambiguity about how and where logs should be handled, and eliminates conflicts between log handlers.

GLib will now automatically pass logging data to systemd-journald, if it is running. stdio-based output works as previously, but with the addition of color!