A markup language for GTK user interfaces. Docs: https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/
Find a file
Alexey Yerin f3faf4b993 LSP: Handle shutdown commands
This fixes the issue with terminal-based editor Helix which asks
language servers to shut down when trying to close the editor. Since
blueprint-compiler's server implementation didn't handle this request,
Helix ended up waiting for a response until timing out after a few
seconds and forcefully terminating the language server process.

Besides fixing Helix, this patch should also make user-initiated server
restarts more robust.
2025-01-03 22:49:36 +03:00
blueprintcompiler LSP: Handle shutdown commands 2025-01-03 22:49:36 +03:00
build-aux build: Update Docker container 2024-10-19 19:16:45 -05:00
docs language: Add not-swapped flag for signals 2024-12-23 02:46:52 +00:00
tests lsp: Fix crash on incomplete detailed signal 2024-12-25 10:31:35 -06:00
.coveragerc tests: Exclude lines from coverage 2022-01-16 20:59:11 -06:00
.gitignore Builder list factory 2023-04-08 01:34:47 +00:00
.gitlab-ci.yml xgettext compatibility: Output 'yes' for translatable 2024-07-04 22:29:16 +02:00
blueprint-compiler.pc.in Rename to blueprint-compiler 2021-12-01 15:35:58 -06:00
blueprint-compiler.py Add isort to CI and run on files 2023-07-09 14:26:37 +00:00
CONTRIBUTING.md lsp: Add compile an decompile commands 2023-03-19 22:14:42 +00:00
COPYING Initial commit 2021-10-17 15:26:34 -05:00
justfile Apply isort and black formatting everywhere 2023-12-13 01:36:18 +00:00
MAINTENANCE.md Mention syntax highlighters in MAINTENANCE.md 2023-05-22 20:01:15 -05:00
meson.build lsp: Add reference documentation on hover 2024-10-20 21:10:14 -05:00
meson_options.txt docs: Add examples 2021-10-27 00:31:49 -05:00
NEWS.md Release v0.14.0 2024-08-24 14:26:46 -05:00
README.md Update documentation 2022-07-09 20:07:57 +00:00

Blueprint

A markup language for GTK user interface files.

Motivation

GtkBuilder XML format is quite verbose, and many app developers don't like using WYSIWYG editors for creating UIs. Blueprint files are intended to be a concise, easy-to-read format that makes it easier to create and edit GTK UIs.

Internally, it compiles to GtkBuilder XML as part of an app's build system. It adds no new features, just makes the features that exist more accessible.

Another goal is to have excellent developer tooling--including a language server--so that less knowledge of the format is required. Hopefully this will increase adoption of cool advanced features like GtkExpression.

Example

Here is what the libshumate demo's UI definition looks like ported to this new format:

using Gtk 4.0;
using Shumate 1.0;

template ShumateDemoWindow : Gtk.ApplicationWindow {
  can-focus: yes;
  title: _("Shumate Demo");
  default-width: 800;
  default-height: 600;

  [titlebar]
  Gtk.HeaderBar {
    Gtk.DropDown layers_dropdown {
      notify::selected => on_layers_dropdown_notify_selected() swapped;
    }
  }

  Gtk.Overlay overlay {
    vexpand: true;
    Shumate.Map map {}

    [overlay]
    Shumate.Scale scale {
      halign: start;
      valign: end;
    }

    [overlay]
    Gtk.Box {
      orientation: vertical;
      halign: end;
      valign: end;

      Shumate.Compass compass {
        halign: end;
        map: map;
      }
      Shumate.License license {
        halign: end;
      }
    }
  }
}

Editors

Workbench and GNOME Builder have builtin support for Blueprint.

Vim

GNU Emacs

Visual Studio Code

Donate

You can support my work on GitHub Sponsors! https://github.com/sponsors/jameswestman

Getting in Touch

Matrix room: #blueprint-language:matrix.org

License

Copyright (C) 2021 James Westman james@jwestman.net

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see https://www.gnu.org/licenses/.