AtlatestRenderedmarkdown
Readme

Changelog

Versions are synced with Sigil releases. A missing entry indicates no changes for that version.

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

[0.14.0] - 2026-09-26

Added

  • (window-focused?): #t while the window has the input focus, #f when another window has it (and #f without a window), read from GLFW at the call (GLFW_FOCUSED). A program polls it once a frame to pause when the player switches away. On Wayland it is #f until the compositor's keyboard-enter arrives (often a frame or two after the window opens), so pause on #f only after a first #t. test/test-window.sgl covers the no-window answer; test/test-focus-live.sgl (Xvfb, xdotool) gives the window the focus, moves it to the root window and gives it back, and was seen red with a planted defect.

[0.13.0] - 2026-09-25

Added

  • (window-width) and (window-height): the window's size in screen units, the units window-set-size! takes, read from GLFW at the call (#f without a window). frame-width / window-width is the device pixel ratio, so a program sizing its window to whole multiples of a pixel-art view can ask for the right size on a scaled output (HiDPI Wayland, a Retina Mac). Without them a program could not snap its window to whole scales on a scaled output at all. test/test-window.sgl and test/test-window-live.sgl cover both, the live test seen red with a planted defect.

[0.12.0] - 2026-09-25

Added

  • Cursor capture for mouse look. (set-cursor-captured! on? [escape-releases?]) hides the cursor and holds it on the window (GLFW's disabled cursor mode, plus raw mouse motion where the platform has it); it answers whether the cursor is now captured, and (cursor-captured?) says so later, both read from GLFW's input mode (a platform that cannot capture answers #f). Losing the window focus always releases the capture, and Escape does too unless escape-releases? is #f, so a player is never left with a hidden cursor; the Escape key still reaches the game.
  • (mouse-dx) and (mouse-dy): the mouse's motion since the last frame in framebuffer pixels, summed from the cursor callback and cleared with the other per-frame input. A capture change re-reads the position, so starting or ending a capture adds no jump and drops no motion; the position reported as the pointer enters the window is not counted.
  • test/test-cursor-live.sgl: drives all of it with xdotool on a headless X server (see its header).

[0.11.0] - 2026-09-24

Added

  • The window: its size, fullscreen, the monitor. Wanted by Harkfell (ruling D37, David, 2026-09-24: a Knytt-style small window at whole scales of the view, and fullscreen at the largest whole scale that fits).
    • (window-set-size! width height) asks for a window of that size in screen units (on a scaled Wayland output the framebuffer is that times the scale). While fullscreen it sets the size the window comes back to. A tiling window manager may not grant it: read frame-width and frame-height after.
    • (set-fullscreen! on?) makes the window take the whole of the monitor it covers most of, at that monitor's own video mode (no mode change), keeping its windowed size and position (the position where the platform reports one: Wayland does not, and the compositor places the window when it comes back); #f goes back to them. (fullscreen?) answers which.
    • (monitor-size) answers (width height) of that monitor's video mode. On Wayland, which reports no window position, "the monitor the window covers most of" is the primary monitor, for set-fullscreen! too.
    • Without a window, all four answer #f (test/test-window.sgl); with one, test/test-window-live.sgl drives them on a display (Xvfb).

[0.10.2] - 2026-09-21

Added

  • The mouse wheel. (mouse-wheel) answers the wheel's vertical travel since the last frame and (mouse-wheel-x) the horizontal, in GLFW's units (a notch is 1.0 on most mice; vertical + is away from the user), summed over the frame from GLFW's scroll callback and cleared with the other per-frame input. Without a window both answer 0.0. Wanted by Crash The Stack's tracker (the wheel scrolls the pattern; David, 2026-09-21).

[0.10.1] - 2026-09-20

Added

  • The rest of the keyboard. key-down?, key-pressed? and key-released? now know f1..f25, page-up/page-down, home/end, insert/delete, right-shift/right-ctrl/right-alt, caps-lock, the punctuation row (comma period slash semicolon apostrophe minus equal left-bracket right-bracket backslash grave, or the character itself as a symbol) and the keypad (kp-0..kp-9, kp-enter, kp-add, kp-subtract). The 0.10.0 names are unchanged. Wanted by Crash The Stack's tracker, whose FastTracker key model needs the function keys, paging and the punctuation row natively.
  • (key-code key): the GLFW key code a symbol names, or #f for a name that is no key; needs no window, so a program can check a binding before it is used and the symbol table is testable (test/test-keys.sgl).

[0.10.0] - 2026-09-20

The package is now sigil-desktop, and the window is GLFW instead of sokol_app.

Changed

  • Native Wayland on Linux. GLFW 3.5.1 is vendored as source under vendor/glfw (no local patches, VENDOR.md has the pin and inventory). One binary runs as a Wayland client or under X11, picked at startup; SIGIL_DESKTOP_PLATFORM=wayland|x11 forces it. Under sokol_app the Linux window was always X11 (XWayland on a Wayland desktop).
  • No platform libraries linked. GLFW loads libwayland-client, libxkbcommon, libX11 and friends, libEGL and libGL at run time; the Linux link-flags are empty (were -lX11 -lXi -lXcursor). A game's NEEDED list loses those three.
  • Framebuffer pixels follow the output scale. On a Wayland output at scale 2 a window asked for at 800x600 has a 1600x1200 framebuffer; frame-width/frame-height report it and mouse-x/mouse-y are in the same pixels. Fractional scales work. A program with hard-coded pixel coordinates should lay out from frame-width and frame-height. On X11 nothing changes.
  • The library is (sigil desktop). (sigil app) remains as a re-export for this release only.
  • app-run raises app-run: could not open a window (exit 1) when no display platform or GL context is available; sokol_app aborted.
  • (quit-requested?) answers #t inside the frame the close button was pressed in, not only in cleanup.
  • The frame clock restarts after the init procedure, so a long asset load is not the first frame's delta time.
  • GL 4.3 core is requested on Linux and Windows and 4.1 on macOS, as before; the window has no default icon (sokol_app drew one).

Added

  • include/sigil-desktop.h: sigil_desktop_framebuffer_size, sigil_desktop_gl_get_proc_address, sigil_desktop_platform, the C surface sigil-graphics builds its swapchain and GL loader on.
  • src/c/dl-search.c: a dlopen that finds runtime libraries in Guix and Nix profile directories (SIGIL_LIBRARY_PATH, $GUIX_ENVIRONMENT/lib, nix-shell inputs, $NIX_LD_LIBRARY_PATH, the user and system profiles), with test/dl-search-test.sh.
  • guix/run-wayland.scm, guix/run-x11.scm, guix/build.scm.
  • SIGIL_DESKTOP_VERBOSE=1 for startup, resize and library-resolution diagnostics.

Removed

  • vendor/sokol (sokol_app, sokol_time, sokol_log) and the sapp_* symbols. sigil-graphics 0.11.4 no longer links them.

Requires

  • Sigil 0.20+ as before. Building on Guix needs the X11 and Wayland headers in guix/build.scm (libx11, libxcursor, libxrandr, libxinerama, libxi, libxext, xorgproto, wayland, libxkbcommon).

Upgrade notes

  • Relock at the new URL. The Codeberg repository is sigil/sigil-desktop since 2026-09-20 (renamed in place, the old URL redirects): write (from-git url: "codeberg:sigil/sigil-desktop" version: "^0.10.0") on your own window dependency line. The transitional form the tag notes describe, (from-git url: "codeberg:sigil/sigil-app" name: "sigil-desktop" ...), still works through the redirect; a line with neither the new URL nor name: beside a sigil-graphics 0.11.4 installs the repository twice (sigil-app 0.9 beside sigil-desktop 0.10, two window stacks, a duplicate slog_func at link time), because sigil-build keys a dependency by the name it derives from the URL.
  • Delete the consumer's build/ once (a stale sokol-app.o otherwise stays in the old archive), then rename (sigil app) imports to (sigil desktop) before 0.11.

[0.9.0] - 2026-06-25

Changed

  • Raised the toolchain requirement to Sigil 0.17. The package now declares sigil: "^0.17" and pins sigil-stdlib to ^0.17. Sigil 0.17 makes the package-level sigil: field mandatory and derives the native codegen runtime (sigil-lib) from it, so building under the 0.17 compiler requires this bump. This is a minor release because consumers caret-pinning sigil-app must move to the 0.17 line.

Requires

  • Sigil 0.17+ (sigil-stdlib / sigil-lib 0.17 line).

[0.8.4] - 2026-04-24

Fixed

  • link-flags: now uses (lambda (ctx) (case (target-os ctx) ...)) instead of a host-based (case (host-os) ...) expression. The host-based form evaluated at package-load time on the host, so Linux link flags (-lX11 -lXi -lXcursor) leaked into Windows cross-compile builds; sigil build --config windows-amd64 from a Linux host would fail at the final link against zig's MinGW sysroot. The procedural form re-evaluates at link time with the target triple. Branches themselves are unchanged (linux: -lX11 -lXi -lXcursor; darwin: -framework Cocoa -framework QuartzCore; windows: -lkernel32 -luser32 -lshell32 -lgdi32).

Requires

  • sigil-build 0.14.0+ (for the target-os / target-arch helpers and the procedural-link-flags dispatch in collect-native-link-flags).

[0.7.0] - 2026-03-01

Added

  • Added procedure specifications with inline (: ...) syntax, optional runtime checking via sigil-checks feature, and predicate combinators (any-of, maybe, list-of, none-of).
  • Added procedure specs and docstrings to all exported procedures.
  • Added procedure specs and docstrings to all exported procedures.

[0.5.0] - 2026-02-17

Added

  • Added test harness generation and build support for packages with native dependencies. Improved native package handling, added c-flags field to library struct. Fixed stdlib inclusion in bundles with custom native runtimes, directory structure preservation in compile-c-sources, and absolute sigil-lib include path resolution.
  • Added test coverage.
  • Added test coverage.

Fixed

  • Fixed random seed initialization crash caused by flonum-to-bignum promotion in modulo. Fixed status command crash when displaying projected versions for packages without changes.

Other

  • New packages split from sigil-studio. Font and image modules moved to (sigil graphics *) namespace.