diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..7ae57f28 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# shell scripts must keep LF line endings, whatever the checkout: a CRLF install.sh breaks `sh` +*.sh text eol=lf diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 86b317cd..c0087127 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ # Build and test on every platform: the C/C++ project with ctest (C kit, GPU parity, # window smoke, Dear ImGui, the Python bindings' suites), the Rust crates, the D -# binding, and a packaging check of the published Rust crates. macOS runs on Apple +# binding, the Ruby gem, and a packaging check of the published Rust crates. macOS runs on Apple # Silicon (macos-15) and Intel (macos-15-intel; GitHub retired the macos-13 images). # # Wheels are built by wheels.yml. @@ -180,6 +180,94 @@ jobs: - name: Build and run the D test suite run: dub run --config=test --compiler=ldc2 + # bindings/go builds the C kit with cgo's compiler (gcc; MinGW on Windows) through + # `go generate`, then runs the tests of both packages and the examples'. They are + # headless (ui.Tester), so no display server is needed. + go: + name: go test (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest] + defaults: + run: + working-directory: bindings/go + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: stable + - name: X11 headers (Linux) + if: runner.os == 'Linux' + run: sudo apt-get update && sudo apt-get install -y libx11-dev + - name: Build the C kit + run: go generate ./bui + # one command per step: pwsh (Windows' default shell) goes on after a failed + # native command, so a multi-line run would only report the last one + - name: go vet + run: go vet ./... + - name: go test + run: go test ./... + + # bindings/ruby: the gem's extension builds the kit with CMake and Ruby's own compiler + # (RubyInstaller's MSYS2 gcc on Windows). On Linux the window tests run on Xvfb; the + # asan leg builds with AddressSanitizer (Ruby is not instrumented: the runtime is + # preloaded) and the package leg installs the packed gem, which builds from its + # vendored C sources alone. + ruby: + name: ruby (${{ matrix.os }}, ${{ matrix.leg }}) + runs-on: ${{ matrix.os }} + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + include: + - { os: ubuntu-latest, leg: test } + - { os: windows-latest, leg: test } + - { os: macos-15, leg: test } + - { os: ubuntu-latest, leg: asan } + - { os: ubuntu-latest, leg: package } + defaults: + run: + working-directory: bindings/ruby + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.3" + bundler-cache: true + working-directory: bindings/ruby + - name: X11 headers and Xvfb (Linux) + if: runner.os == 'Linux' + run: sudo apt-get update && sudo apt-get install -y libx11-dev xvfb + - name: rake test (with native windows on Xvfb) + if: matrix.leg == 'test' && runner.os == 'Linux' + run: BUI_TEST_WINDOWS=1 xvfb-run -a bundle exec rake test + - name: rake test (headless) + if: matrix.leg == 'test' && runner.os != 'Linux' + run: bundle exec rake test + - name: rake test under AddressSanitizer + if: matrix.leg == 'asan' + run: | + BUI_SANITIZE=address bundle exec rake compile + # Ruby and ASan both want the alternate signal stack; Ruby's own exit leaks are not ours + BUI_TEST_WINDOWS=1 xvfb-run -a env LD_PRELOAD="$(gcc -print-file-name=libasan.so)" \ + ASAN_OPTIONS=use_sigaltstack=0:detect_leaks=0:halt_on_error=1 \ + ruby -Ilib -Itest -e 'Dir["test/test_*.rb"].each { |f| require_relative f }' + - uses: actions/setup-python@v5 + if: matrix.leg == 'package' + with: + python-version: "3.12" + - name: Pack the gem, install it, require it + if: matrix.leg == 'package' + run: | + bundle exec rake gem + gem install --local ./blenderui-*.gem + cd "$RUNNER_TEMP" + ruby -e 'require "bui"; root = BUI::Node.new("column"); root << BUI::Node.new("button").set(text: "OK"); BUI::Context.open(root) { |c| c.render(BUI::Raster.new(64, 32), full: true) }; root.free; puts "blenderui #{BUI::VERSION}, kit #{BUI::KIT_VERSION}"' + # The crates.io package of blenderui-sys builds from its vendored sources alone. package: name: cargo package (blenderui-sys, vendored C sources) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml new file mode 100644 index 00000000..9b826cd4 --- /dev/null +++ b/.github/workflows/cli.yml @@ -0,0 +1,157 @@ +# The `bui` command (tools/bui): tested on the three systems for every change to it, and built for +# six targets and attached to the GitHub Release when a release tag is pushed. The installers +# (website/public/install.sh and install.ps1) and `bui update` download these archives. +# +# bui-.tar.gz (Linux, macOS; holds `bui`) +# bui-.zip (Windows; holds `bui.exe`) +# .sha256 +# +# A release is made by tools/release.py (it tags vX.Y.Z); this runs beside release.yml and adds the +# files to the release that one creates (whichever workflow gets there first creates it). + +name: bui command + +on: + push: + tags: ["v*"] + pull_request: + paths: ["tools/bui/**", "website/public/install.*", ".github/workflows/cli.yml"] + workflow_dispatch: + inputs: + tag: + description: "Release tag to attach the archives to (e.g. v0.5.1)" + required: true + publish: + description: "Really upload (otherwise only build)" + type: boolean + default: false + +permissions: + contents: read + +env: + CARGO_TERM_COLOR: always + +jobs: + test: + name: test (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-15] + defaults: + run: + working-directory: tools/bui + steps: + - uses: actions/checkout@v4 + with: + # a manual run builds the tag it was given, not the branch it was started from + ref: ${{ github.event.inputs.tag || github.ref }} + persist-credentials: false + - uses: dtolnay/rust-toolchain@stable + with: + components: clippy + - uses: Swatinem/rust-cache@v2 + with: + workspaces: tools/bui + - run: cargo clippy --locked --all-targets -- -D warnings + - run: cargo test --locked + + installers: + name: installers (syntax) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + - name: install.sh is POSIX sh and passes shellcheck + run: | + sudo apt-get install -y shellcheck dash + dash -n website/public/install.sh + shellcheck -s sh -S warning website/public/install.sh + - name: install.ps1 is plain ASCII (Windows PowerShell 5.1 decodes a download as it likes) and parses + shell: pwsh + run: | + $bytes = [IO.File]::ReadAllBytes('website/public/install.ps1') + if ($bytes | Where-Object { $_ -gt 127 }) { throw 'install.ps1 has non-ASCII characters' } + $errors = $null + [void][System.Management.Automation.Language.Parser]::ParseFile((Resolve-Path 'website/public/install.ps1'), [ref]$null, [ref]$errors) + if ($errors) { $errors | ForEach-Object { Write-Error $_.Message }; exit 1 } + + build: + name: build (${{ matrix.target }}) + needs: [test, installers] + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - { target: x86_64-unknown-linux-gnu, os: ubuntu-22.04 } + - { target: aarch64-unknown-linux-gnu, os: ubuntu-22.04-arm } + - { target: x86_64-apple-darwin, os: macos-15-intel } + - { target: aarch64-apple-darwin, os: macos-15 } + - { target: x86_64-pc-windows-msvc, os: windows-latest } + - { target: aarch64-pc-windows-msvc, os: windows-11-arm } + steps: + - uses: actions/checkout@v4 + with: + # a manual run builds the tag it was given, not the branch it was started from + ref: ${{ github.event.inputs.tag || github.ref }} + persist-credentials: false + - uses: dtolnay/rust-toolchain@stable + with: + targets: ${{ matrix.target }} + - uses: Swatinem/rust-cache@v2 + with: + workspaces: tools/bui + key: ${{ matrix.target }} + - name: Build + working-directory: tools/bui + run: cargo build --release --locked --target ${{ matrix.target }} + - name: Package (Unix) + if: runner.os != 'Windows' + shell: bash + run: | + set -eu + mkdir -p dist + name="bui-${{ matrix.target }}.tar.gz" + tar -czf "dist/$name" -C "tools/bui/target/${{ matrix.target }}/release" bui + (cd dist && { sha256sum "$name" 2>/dev/null || shasum -a 256 "$name"; } > "$name.sha256") + - name: Package (Windows) + if: runner.os == 'Windows' + shell: pwsh + run: | + New-Item -ItemType Directory dist | Out-Null + $name = "bui-${{ matrix.target }}.zip" + Compress-Archive -Path "tools/bui/target/${{ matrix.target }}/release/bui.exe" -DestinationPath "dist/$name" + $hash = (Get-FileHash "dist/$name" -Algorithm SHA256).Hash.ToLower() + "$hash $name" | Set-Content "dist/$name.sha256" -NoNewline + - uses: actions/upload-artifact@v4 + with: + name: bui-${{ matrix.target }} + path: dist/* + + upload: + name: attach to the GitHub Release + needs: build + if: github.event_name == 'push' || github.event.inputs.publish == 'true' + runs-on: ubuntu-latest + permissions: + contents: write + env: + TAG: ${{ github.event.inputs.tag || github.ref_name }} + GH_TOKEN: ${{ github.token }} + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + - uses: actions/download-artifact@v4 + with: + path: dist + merge-multiple: true + - name: Create the release if release.yml has not yet, then attach the files + run: | + ls -l dist + gh release view "$TAG" >/dev/null 2>&1 || gh release create "$TAG" --title "BUI ${TAG#v}" --generate-notes --verify-tag || gh release view "$TAG" >/dev/null + gh release upload "$TAG" dist/* --clobber diff --git a/.github/workflows/wasm.yml b/.github/workflows/wasm.yml new file mode 100644 index 00000000..0dfa4f55 --- /dev/null +++ b/.github/workflows/wasm.yml @@ -0,0 +1,82 @@ +# A blenderui app in a web page (docs/wasm.md): the kit and blenderui build for wasm32-wasip1 and the +# counter example renders under Node.js. Runs on changes to what the module is built from (the kit's C +# sources, blenderui and the crates it depends on, the workspace manifest they inherit from, the +# WebAssembly parts) and by hand. + +name: wasm + +on: + push: + branches: [main] + paths: ["platform/wasm/**", "bindings/rust/blenderui-web/**", "bindings/rust/blenderui/**", "bindings/rust/blenderui-sys/**", "bindings/rust/blenderui-vlist/**", "bindings/rust/blenderui-table/**", "bindings/rust/blenderui-paint/**", "bindings/rust/blenderui-macros/**", "bindings/rust/blenderui-tailwind/**", "bindings/rust/Cargo.toml", "examples/wasm/**", "kit/**", "gpu/**", "core/**", "types/**", "compat/**", "ui/**", "api/**", "CMakeLists.txt", "features.cmake", "features.json", ".github/workflows/wasm.yml"] + pull_request: + paths: ["platform/wasm/**", "bindings/rust/blenderui-web/**", "bindings/rust/blenderui/**", "bindings/rust/blenderui-sys/**", "bindings/rust/blenderui-vlist/**", "bindings/rust/blenderui-table/**", "bindings/rust/blenderui-paint/**", "bindings/rust/blenderui-macros/**", "bindings/rust/blenderui-tailwind/**", "bindings/rust/Cargo.toml", "examples/wasm/**", "kit/**", "gpu/**", "core/**", "types/**", "compat/**", "ui/**", "api/**", "CMakeLists.txt", "features.cmake", "features.json", ".github/workflows/wasm.yml"] + workflow_dispatch: + +permissions: + contents: read + +jobs: + counter: + name: the counter builds and renders + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + targets: wasm32-wasip1 + - uses: actions/setup-node@v4 + with: + node-version: "22" + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + # wasi-sdk 34's libc++ needs a recent clang (19 fails on its `#pragma clang attribute` headers); the + # runner's own is older, so LLVM 21 comes from apt.llvm.org + - name: LLVM 21 (clang with the wasm32 backend, llvm-ar), CMake and Ninja + run: | + set -o pipefail + wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc >/dev/null + echo "deb https://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-21 main" | sudo tee /etc/apt/sources.list.d/llvm-21.list + sudo apt-get update + sudo apt-get install -y clang-21 llvm-21 lld-21 cmake ninja-build + echo "WASI_CLANG=/usr/lib/llvm-21/bin" >> "$GITHUB_ENV" + /usr/lib/llvm-21/bin/clang --version + - name: The WASI sysroot (cached) + uses: actions/cache@v4 + with: + path: ~/.bui/wasi-sysroot + key: wasi-sysroot-34-v2 + # each step keeps its log and, when it fails, puts the lines that matter in an annotation (readable + # through the check-run API) and uploads the whole log + - name: Fetch the WASI sysroot + run: | + set -o pipefail + python platform/wasm/build.py --fetch-sysroot 2>&1 | tee fetch.log + - name: Build the counter + run: | + set -o pipefail + python platform/wasm/build.py examples/wasm/counter 2>&1 | tee build.log + - name: It renders, takes a click and resizes + run: | + set -o pipefail + node examples/wasm/smoke.mjs examples/wasm/counter/dist/app.wasm 2>&1 | tee smoke.log + - name: What failed + if: failure() + run: | + for f in fetch.log build.log smoke.log; do + [ -f "$f" ] || continue + errs=$(grep -n -i -m 8 -E 'error|fatal|FAILED' "$f" | cut -c1-300 | tr '\n' '|') + tail=$(tail -n 25 "$f" | cut -c1-250 | tr '\n' '|') + echo "::error title=wasm $f::first errors: ${errs} -- last lines: ${tail}" | cut -c1-3900 + done + - uses: actions/upload-artifact@v4 + if: always() + with: + name: wasm-logs + path: "*.log" + if-no-files-found: ignore + - uses: actions/upload-artifact@v4 + with: + name: counter-web + path: examples/wasm/counter/dist/ diff --git a/.gitignore b/.gitignore index bc3de5ea..45e455fe 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +ref/ addons/bui-panels addons/bui-components build*/ diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 91788a6f..345937e4 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -65,7 +65,7 @@ include `ui/`.) | `gpu/` | The draw surface used by the toolkit (`GPU_*`, `imm*`) behind seam headers + a null backend that *records and forwards*: with a sink installed it emits screen-space primitives (`GPU_backend_sink.h`); without one it discards them. Theme colors reach the GPU layer through function-pointer hooks. | **Builds + tested** | | `compat/` | Seam headers carrying upstream API names (`RNA_access.hh`, `BLF_api.hh`, …) with BUI-owned opaque types and stub implementations (`intern/bui_stubs.cc`). | **Builds** | | `ui/` | The toolkit sources from `editors/interface`: interface.cc family, widgets, handlers, regions, view2d, views, textbox. Kept for reference and porting work; **not compiled by default** (`-DBUI_BUILD_UI=ON` builds it as `bui_ui`). `kit/` re-ports what it needs in C. | **Compiles + links** (opt-in) | -| `kit/` | Blender's UI as a retained-mode C runtime: node tree, uiLayout-style layout, `interface_handlers.cc` interaction rules, widget drawing ported from `interface_widgets.cc` (widget-base shader parameters rendered by `gpu/` raster), menus, color picker, views, editors; Tk-style pack/grid/place geometry managers, canvas display list, multi-line text area; UI undo/redo, Tab field traversal, vertical multi-drag, panel animation; Blender's file browser; images (`kit/intern/image`: Blender's imbuf design, one format table over Wuffs, libjpeg-turbo, libwebp and BUI's HDR/PNM/SVG readers in `kit/extern`, decode at the drawn size, a worker pool and a memory-budgeted cache; see [the Images page](https://bui.preetham.top/docs/concepts/images/)); damage-driven rendering; Blender's Dark and Light themes (`kit_theme_presets.c`, generated by `tools/gen_theme.py` from Blender's `Blender_Dark.xml` / `Blender_Light.xml` presets over `userdef_default_theme.c`; `BK_set_theme`); native window hosts for Win32, X11 and Cocoa (`kit_window_win32.c`, `kit_window_x11.c`, `kit_window_cocoa.m`; `kit_window_null.c` elsewhere). The Win32 host is BUI's own; the X11 host follows Blender's GHOST input mapping, and the Cocoa host (experimental: checked by CI and tried by hand on two Apple Silicon Macs) is ported from GHOST's Cocoa backend. `kit/intern/blender/` holds Blender files copied in and edited for the kit (each edit marked `BUI:`): `interface_string_search.cc` (menu search with recent searches), `interface_undo.cc` (text-edit undo), `interface_utils.cc` (float display precision). C API: `kit/include/BUI_kit.h`. | **Builds + tested** | +| `kit/` | Blender's UI as a retained-mode C runtime: node tree, uiLayout-style layout, `interface_handlers.cc` interaction rules, widget drawing ported from `interface_widgets.cc` (widget-base shader parameters rendered by `gpu/` raster), menus, color picker, views, editors; Blender's screen layout (`kit/intern/screen`, ported from `editors/screen`: areas on a graph of shared edges that split, join, dock and resize, regions that resize, hide and flip, saved as JSON); Tk-style pack/grid/place geometry managers, canvas display list, multi-line text area; UI undo/redo, Tab field traversal, vertical multi-drag, panel animation; Blender's file browser; images (`kit/intern/image`: Blender's imbuf design, one format table over Wuffs, libjpeg-turbo, libwebp and BUI's HDR/PNM/SVG readers in `kit/extern`, decode at the drawn size, a worker pool and a memory-budgeted cache; see [the Images page](https://bui.preetham.top/docs/concepts/images/)); damage-driven rendering; Blender's Dark and Light themes (`kit_theme_presets.c`, generated by `tools/gen_theme.py` from Blender's `Blender_Dark.xml` / `Blender_Light.xml` presets over `userdef_default_theme.c`; `BK_set_theme`); native window hosts for Win32, X11 and Cocoa (`kit_window_win32.c`, `kit_window_x11.c`, `kit_window_cocoa.m`; `kit_window_null.c` elsewhere). The Win32 host is BUI's own; the X11 host follows Blender's GHOST input mapping, and the Cocoa host (experimental: checked by CI and tried by hand on two Apple Silicon Macs) is ported from GHOST's Cocoa backend. `kit/intern/blender/` holds Blender files copied in and edited for the kit (each edit marked `BUI:`): `interface_string_search.cc` (menu search with recent searches), `interface_undo.cc` (text-edit undo), `interface_utils.cc` (float display precision). C API: `kit/include/BUI_kit.h`. | **Builds + tested** | | `api/` | `bui_c_api.h` — small stable C ABI: version info + sink/viewport plumbing for hosts and bindings. | **Builds + tested** | | `bindings/python/` | `buipy` CPython extension (no third-party deps; Dear ImGui is compiled into it, `blenderui.imgui`, so a process holds one kit) + `bui` package: `bui.components` (Blender component library), `bui.qtsyntax` / `bui.tksyntax` (Qt / tkinter APIs as thin facades over the kit), `bui.host` (native or Tk windows), `SvgSink` headless renderer, `bui.qt.BuiCanvas` PySide6/PyQt6 widget. | **Builds + tested** | | `bindings/imgui/` | Dear ImGui (vendored, 1.93.1 WIP) on BUI: `imgui_impl_bui` platform + renderer backend hosted in a kit `custom` node (input, cursors, clipboard, DPI, damage-driven frames) drawing through `BUI_raster_mesh` and BUI textures; Blender style and Inter font; the C API (`cimgui.h`) and the generator behind the Python and Rust bindings; the Blender-widgets build (`blender/`, `-DBUI_IMGUI_BLENDER_WIDGETS=ON`). Gate: `-DBUI_BUILD_IMGUI` (ON with C++). | **Builds + tested** | diff --git a/CHANGELOG.md b/CHANGELOG.md index f0146c15..50c2a0c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,29 @@ All notable changes to **blenderui** (BUI). The format follows ## [Unreleased] ### Added +- **WebAssembly frames copy twice as fast.** The kit's pixels become the canvas's RGBA bytes in a loop the compiler vectorizes: a 1280 x 800 redraw drops from about 10 ms to 5 ms under Node.js. `examples/wasm/bench.mjs` times it. +- **WebAssembly: a blenderui app in a web page.** `blenderui-web` (new crate) with `blenderui_web::export!` and `js/bui-web.js` runs a blenderui app compiled to `wasm32-wasip1` in a ``: BUI's C kit is built for WebAssembly (`platform/wasm/wasi.cmake`, clang and wasi-libc, no threads or exceptions; `blenderui-sys` drives it), `Application::start` keeps a headless application alive for a host that has no event loop of its own, `App::frame_if_needed`, `App::window_ids` and `App::set_canvas_size` give it frames, `python platform/wasm/build.py CRATE` builds the module and writes the page (`--fetch-sysroot` downloads the WASI sysroot, `--serve` serves it). The counter (`examples/wasm/counter`) is a 4.2 MB module (1.6 MB gzipped) that renders, counts clicks and takes typing in Microsoft Edge and under Node.js (`examples/wasm/smoke.mjs`). Software raster, one thread, the primary pointer button, wheel and keyboard; see docs/wasm.md for the limits. The page script cancels a press the browser cancels (`pointercancel`, lost capture: `bui_pointer_cancel`, which ends it with no motion and no release, so a dragged slider goes back as on Escape, nothing is clicked and the next press is not a double click), releases one whose primary button went up during a chord, and pins an unstyled canvas's CSS size (not while it has no layout, `display: none`, so `fit` follows its CSS once shown); ratios below 1 (page zoom out) are kept; the no-flag error detection covers `log(a, b)` and `smoothstep`. `App::shutdown` (also on drop) frees an application a host started, `App::set_canvas_size` takes the pixel ratio, and `Application::start` windows animate on the real clock. The page script ignores non-primary buttons and pointers, scrolls the right way, keeps the canvas's CSS size at the logical size and stops (and reports) on a trap. The build script needs clang 21 or newer (the sysroot's libc++ does not compile with clang 19), extracts the sysroot atomically and finds the `.wasm` through cargo. A few portability fixes in the C and Rust sources came with it (`try`/`catch` in Blender's containers compile out without exceptions, the expression evaluator works out its floating-point error flags where the platform has none, FreeType's rasterizer splits a band on a full cell pool without `longjmp`, the image loader decodes inline without worker threads, `blenderui-vlist` builds for 32-bit targets without positional file reads). +- **A title bar you draw.** With `WindowDecorations::Client`, mark the parts of your bar with `window_control_area(WindowControlArea::Drag | Min | Max | Close)` (gpui's API) or CSS `app-region` (`drag`, `no-drag`, and `minimize`, `maximize`, `close`; `-webkit-app-region` too). A drag area moves the window and a double click maximizes it; anything in it that takes clicks stays the app's. On Windows the window keeps the system's resize edges, Aero Snap, shadow and rounded corners, and Windows 11 shows its snap layouts over the maximize button: the kit asks the app's new `hit_test` window callback from `WM_NCHITTEST`, as Windows Terminal does. On X11, Wayland and macOS the window has no frame and a press on a drag area starts the window manager's move (`_NET_WM_MOVERESIZE`, `xdg_toplevel_move`, `performWindowDragWithEvent`), with no resize edges yet; the window manager takes the pointer, so the press clicks nothing (the same for `start_window_move` and `"move"` everywhere). `start_window_move` from a press listener ends the press there, since its release never comes: nothing stays pressed or `:active`, and a scrollbar drag lets go. The `Min`, `Max` and `Close` areas work on any element, form controls such as `button()` included. New on `Window`: `minimize_window`, `zoom_window`, `is_maximized`, `start_window_move`, `remove_window`; closing from the Close area, `remove_window` (in a listener or a `WindowHandle::update`) or `App::close_window` (a close hook closing another window too) runs the `on_window_closed` hooks once, as a close by the user does. In C: `BK_window_wm(win, "override", 2, 0)`, `"move"`, and `BKWindowCallbacks.hit_test`; X11 and Wayland now answer `wm_get("state")` with maximized. Example: `cargo run --example titlebar`. +- **Rust: hover and copy on painted lists.** `VariableList::on_item_hover(|item, list| ..)` reports the item under the pointer (`None` when it leaves the list or is over the scrollbar) and repaints without rendering the view, and `on_copy(|state| ..)` puts the text it returns on the clipboard on Ctrl+C. `Window::repaint()` paints the last frame again with no render or layout, for state a painted element reads. A list now fits its size right after layout in the same frame, instead of rendering a second frame once its box is known. +- **Sound without a picture.** `BK_sound_*` (Rust `blenderui::Sound`) plays an audio file or url (m4a/AAC, MP3, WAV ... whatever the platform's video backend decodes) on the default output with no element: play, pause, seek, volume, `time`, `duration` and the same states as a video (`BK_SOUND_ENDED` once it played to its end). It is a `