Skip to main content

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, GNOME Builder and KDE's Kate have builtin support for Blueprint.

Vim

GNU Emacs

Visual Studio Code

Sublime Text

Zed

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/.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blueprint_compiler-0.22.2.tar.gz (168.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blueprint_compiler-0.22.2-py3-none-any.whl (171.4 kB view details)

Uploaded Python 3

File details

Details for the file blueprint_compiler-0.22.2.tar.gz.

File metadata

  • Download URL: blueprint_compiler-0.22.2.tar.gz
  • Upload date:
  • Size: 168.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for blueprint_compiler-0.22.2.tar.gz
Algorithm Hash digest
SHA256 b3fb2b04fb06dabffad7957a371e48af296dfb60f8be157b1c0447c574950cf1
MD5 55a7c258fc93b63723ab76f856d751a1
BLAKE2b-256 89caea3b3c2ffff009a98ae918b87ccf5e31577cdf299d46fa3767b0fc540c90

See more details on using hashes here.

File details

Details for the file blueprint_compiler-0.22.2-py3-none-any.whl.

File metadata

File hashes

Hashes for blueprint_compiler-0.22.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f6107b34ca21daa209e8e26ce518269e2e332e674da6450ba882ca72d33d2f32
MD5 4016e0658c397bff5e9439e867c9a877
BLAKE2b-256 145c9f61bc2e82d7970dca4c38b727c4541449bd276660953298795fe0eb84a7

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.22.2 This release

2 files

0.20.4.post3

2 files

0.20.4.post2

2 files

0.20.4

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page