Blueprint has been introduced — a new language for building user interfaces for GTK

James Westman, a developer of the GNOME Maps application, has introduced a new markup language called Blueprint, designed for building interfaces using the GTK library. The compiler code for converting Blueprint markup into GTK ui-files is written in Python and is distributed under the LGPLv3 license.

The project was created to address the binding of GTK ui-files used for interface description to the XML format, which is cumbersome and inconvenient for writing or editing markup manually. The Blueprint format differs with its clarity of information presentation and, thanks to its readable syntax, allows the creation, editing, and evaluation of interface changes without using specialized visual interface editors.

Blueprint does not require changes to GTK, fully replicates the GTK widget model, and is positioned as an extension that compiles the markup into the standard XML format for GtkBuilder. The functional capabilities of Blueprint correspond entirely to GtkBuilder, differing only in the method of information presentation. To port a project to Blueprint, it is enough to add a call to the blueprint-compiler in the build script without changing the code. using Gtk 4.0; template MyAppWindow : Gtk.ApplicationWindow { title: _(“My App Title”); [titlebar] HeaderBar header_bar {} Label { styles [“heading”] label: _(“Hello, world!”); } }

Blueprint has been introduced - a new language for building user interfaces for GTK

In addition to the compiler for the standard XML format of GTK, a plugin with Blueprint support for the integrated development environment GNOME Builder is also in development. A separate Language Server Protocol (LSP) server for Blueprint is being developed, which can be used for syntax highlighting, error analysis, code suggestions, and auto-completion in LSP-supporting code editors, including Visual Studio Code.

Plans for the development of Blueprint include adding reactive programming elements to the markup, implemented using the Gtk.Expression class provided in GTK4. The proposed method is more familiar to web interface developers using JavaScript and enables automatic synchronization of the interface presentation with the associated data model, eliminating the need for forced updates to the user interface after each data change.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster