What’s new for developers
GNOME 45 is packed with new features and enhancements for those who use the GNOME platform. These include updates to GNOME’s developer tools, improved libraries, and updated language bindings.
GNOME Shell Extensions
GNOME Shell 45 includes technical changes which are incompatible with all existing GNOME shell extensions. All shell extensions therefore need to be updated to work with GNOME 45.
Extension developers are encouraged to update their extensions for GNOME 45 prior to it being included in stable distro releases. Users are also encouraged to contact the developers of their favorite extensions, to make them aware of the change.
GNOME OS and distros which include GNOME development releases (such as Fedora) can be used for extension testing and development. Extension developers can also get live support in the GNOME Extensions Matrix channel.
A more extensive description of this change is available on the GNOME Shell Development Blog.
GNOME 45 comes with major updates to the project’s developer tools.
Builder 45 also includes support for many of the new Sysprof features that are part of GNOME 45 (see below for more details).
Other enhancements in version 45 include:
- Improved support for LSP, to provide a better out of the box experience with different projects. This includes improvements for projects which use Meson, Swift, PHP Intelephense, and SourceKit.
- Updated color schemes to align with modern GNOME UI style.
- The Valgrind plugin has gained the option to set the number of callers to record in stack traces.
- Ctrl+Q will now unload workbenches before exiting to ensure that session state can be saved.
- Improved pattern matching in the symbol tree popover and global search.
Sysprof has been redesigned and rewritten from the ground up for GNOME 45. The new version comes with GTK 4 integration, more advanced features, and a new modern app design. Under the hood, highlights include:
libsysprofhas been rewritten around a new document model for captures. This has allowed many performance improvements as well as simplifying Sysprof’s user interface code.
- A new
SysprofProfilerAPI that is simpler than its predecessor and allows for easier implementation of instruments in a race-free manner.
- More data types in
sysprof-agenthave both been updated to use the new
libsysprofprofiler interface, and support new capture features.
- Improved support for Flatpak, Rust, and C++.
The Sysprof app has also been completely redesigned. A new greeter makes it easy to configure a capture before it is started. Capture results can be viewed in many different ways, including viewing the stack trace over time, a log view, a marks view for viewing annotations, a process view, a flame graph, and much more.
Christian Hergert has written a series of blog post on these changes, which are worth checking out:
Changes in its latest release include:
- Ability to have multiple windows/sessions open at the same time.
- Projects can now be written in Rust.
- A new offline documentation viewer, called “Manuals”, has been added.
- The default syntax for UI has been changed to Blueprint (XML is still available).
- Improved CSS linting via
- 50 new examples in the library.
GNOME’s development libraries also come with new features and enhancements in the latest version.
GNOME 45 is accompanied by libadwaita 1.4. The new version comes with many new capabilities and enhancements.
New adaptive APIs and widget styles
The new libadwaita release brings a new set of APIs for adaptive behavior, along with associated style changes to several common widgets.
The main change for adaptive behavior is the introduction of AdwBreakpoint, which provides a way to specify at which sizes different UI layouts should be used. Breakpoints are more robust and provide a higher quality user experience than libadwaita’s pre-existing adaptive widgets. They also allow different UI layouts at different window sizes. For example, when a window is narrow, header bar controls can be moved to a new toolbar which pops up at the bottom of the view.
As a result of this change, AdwFlap, AdwSqueezer, AdwLeaflet, and AdwViewSwitcherTitle are all deprecated in the new release. In some cases, these can be replaced by breakpoints alone. In other cases, new replacement widgets can be used, in the shape of AdwNavigationView, AdwNavigationSplitView, and AdwOverlaySplitView.
Several style updates are also part of these changes: AdwNavigationSplitView brings a cool new full-height look for sidebars, and AdwToolbarView is a new widget which provides a new style for header bars.
Many core GNOME apps are already using the new adaptive APIs, and can be used for reference. A migration guide is also available.
New list rows and convenience functionality
Another improvement in the new libadwaita version is the introduction of a number of new types of list rows:
- AdwSwitchRow is a row with a title, subtitle, and a switch.
- AdwSpinRow is a row which provides a spinbutton, with an editable number and add/substract buttons.
- The .property style class can be used with
AdwExpanderRow, when the row is just displaying information.
Other enhancements in the new libadwaita release include:
- show_about_window_from_appdata, a new convenience function which allows creating an AdwAboutWindow from AppStream data.
- A new description property in AdwPreferencesPage, for showing text at the top of the page.
A blog post is available with more details about the libadwaita 1.4 release.
GNOME 45 is accompanied by GTK 4.12. Improvements in this version include:
- GtkListView and GtkGridView have a new
scroll_tomethod, for scrolling to a specific position. This allows scrolling without using actions, and gives control over which row or cell should be focused.
- Text rendering now uses the window scaling factor to control sub-pixel positioning of glyphs with newer versions of Cairo.
- Experimental support has been added for fractional scaling on Wayland. You can try it out with
Rendering has been a focus of development effort for GTK 4.12, with the following improvements:
- Enhanced texture handling in the OpenGL renderer:
- Performance has been improved by avoiding re-uploading of textures whenever possible.
- Additional texture formats are now supported.
- GdkGLTextureBuilder is a new builder which gives control over the creation of GL textures.
- The GtkGlArea widget has a new set_allowed_apis method, for choosing whether OpenGL or OpenGL ES can be used. This replaces get_use_es and set_use_es, which have been deprecated.
- Many improvements have also been made to the experimental Vulkan renderer.
GTK 4.12 also comes with improved accessibility:
accessible-descriptionnow fully conform to the WAI-ARIA specification.
- Accessibility information is now correctly exposed when there are hidden private widgets in a widget tree.
- GTK inspector has a new accessibility overlay that displays missing labels and descriptions.
More can be read about these changes on the GTK development blog.
GNOME 45 is accompanied by GLib 2.78. Changes for this release include:
- File copying performance is improved by using the kernel’s
copy_file_range(), when it is available.
- GLib has acquired an internal list of pending GTasks, to allow more effective debugging using
gdb. This can be used calling
GKeyFileparser for desktop entry files has been improved, with comments being handled more reliably. This change may cause existing code relying on undefined behavior to break - please file issues if that is the case. (Reminder: GLib does not guarantee bug-for-bug backward compatibility.)
- Portability fixes on macOS, Android, and Windows.
Libdex is a deferred execution library for GLib-based applications, which uses futures. GNOME 45 comes with version 0.4.0, which has a range of improvements, including:
- Support for performing asynchronious I/O on traditional file-descriptors.
- New GIO abstractions for
- Improved GObject Introspection integration.
Libmks is a new library which provides a “Mouse, Keyboard, and Screen” implementation for QEMU, utilizing the D-Bus display device. It supports importing DMA-BUF into
GdkTexture with damages for more efficient rendering as part of a GTK 4-based application.
Finally, GNOME 45 includes a range of improvements to the support for different programming languages.
GNOME 45 comes with GJS 1.78, which comes with a host of improvements:
- GJS has been updated to SpiderMonkey 115. This includes the following new APIs:
- Arrays and typed arrays have gained
findLastIndex()methods, which act like
findIndex()respectively, but start searching at the end of the array.
- Arrays and typed arrays have gained the
with()method, which returns a copy of the array with one element replaced.
- Arrays and typed arrays have gained
toSpliced()methods, which act like
splice()respectively, but return a copy of the array instead of modifying it in-place.
Array.fromAsync()static method acts like
Array.from()but with async iterables, and returns a Promise that fulfills to the new Array.
- Arrays and typed arrays have gained
GLib.Errorproperly. Consider using
consolemakes it easier to inspect objects by printing its constructor name. Consider using
GObject.registerClassaccepts a string for the
- Automatically calls the garbage collector on low memory pressure.
gjs_context_run_in_realm()is a new API for C programs embedding GJS. It allows using the SpiderMonkey API from the main realm where GJS code runs, and is intended for advanced use cases.
PyGObject provides GNOME’s official Python bindings, and comes with the following changes for GNOME 45:
- GTK2 support has been officially dropped.
- Support has been added for Python 3.12 and dropped for Python 3.7.
- The PyGObject API reference now covers GTK 4 and Libadwaita.