From af774d76feefac16bb7603364c515376a89745dd Mon Sep 17 00:00:00 2001 From: V Date: Wed, 25 Nov 2026 17:12:57 +0000 Subject: [PATCH] Rename the project to Chandra moon-plasma / moonplasma / MoonPlasma / Moon Plasma become chandra / Chandra everywhere: the WIT package (chandra:desktop, chandra:host, chandra:wm), the MoonBit module (chandra/desktop) and generated bindings, the Rust host, identifiers (ChandraCompositor), the session script (chandra-session) and desktop entry (chandra.desktop), config and data paths ($XDG_CONFIG_HOME/chandra, share/chandra/modules), env vars (CHANDRA_*), UI strings, docs and tests. The test fixture components are rebuilt against the renamed WIT. Saved panel.edn and state.edn are still read from the old $XDG_CONFIG_HOME/moon-plasma until the first save writes the new copy. The remote repository keeps its experiments/moon-plasma name for now. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DPL5hi3L9oVBoRd373Qr4n --- README.md | 8 +- async-core/pkg.generated.mbti | 2 +- .../desktop/plasmoid/README.md | 0 .../desktop/plasmoid/ffi.mbt | 0 .../chandra/desktop/plasmoid/moon.pkg | 8 ++ .../desktop/plasmoid/pkg.generated.mbti | 4 +- .../desktop/plasmoid/stub.mbt | 2 +- .../desktop/plasmoid/top.mbt | 0 .../moonplasma/desktop/plasmoid/moon.pkg | 8 -- components/clock-binary/gen/moon.pkg | 16 +-- .../clock-binary/gen/pkg.generated.mbti | 2 +- .../desktop/plasmoid/README.md | 0 .../desktop/plasmoid/ffi.mbt | 0 .../chandra/desktop/plasmoid/moon.pkg | 8 ++ .../desktop/plasmoid/pkg.generated.mbti | 4 +- .../desktop/plasmoid/stub.mbt | 2 +- .../desktop/plasmoid/top.mbt | 0 .../moonplasma/desktop/plasmoid/moon.pkg | 8 -- components/clock-digital/gen/moon.pkg | 16 +-- .../clock-digital/gen/pkg.generated.mbti | 2 +- components/compositor/gen/moon.pkg | 2 +- .../compositor/gen/world/compositor/moon.pkg | 2 +- .../wm/decoration/ffi.mbt | 0 .../interface/chandra/wm/decoration/moon.pkg | 8 ++ .../wm/decoration/pkg.generated.mbti | 6 +- .../wm/decoration/stub.mbt | 2 +- .../wm/decoration/top.mbt | 0 .../moonplasma/wm/decoration/moon.pkg | 8 -- components/decoration-breeze/gen/moon.pkg | 6 +- .../decoration-breeze/gen/pkg.generated.mbti | 2 +- .../desktop/plasmoid/README.md | 0 .../desktop/plasmoid/ffi.mbt | 0 .../chandra/desktop/plasmoid/moon.pkg | 9 ++ .../desktop/plasmoid/pkg.generated.mbti | 4 +- .../desktop/plasmoid/stub.mbt | 4 +- .../desktop/plasmoid/top.mbt | 0 .../moonplasma/desktop/plasmoid/moon.pkg | 9 -- components/dock/gen/moon.pkg | 16 +-- components/dock/gen/pkg.generated.mbti | 2 +- components/gfx-gui/gen/moon.pkg | 2 +- components/gfx-gui/gen/pkg.generated.mbti | 2 +- .../gfx-gui/gen/world/gui-loader/moon.pkg | 8 +- .../gen/world/gui-loader/pkg.generated.mbti | 2 +- .../gfx-gui/gen/world/gui-loader/stub.mbt | 10 +- .../desktop/plasmoid/README.md | 0 .../desktop/plasmoid/ffi.mbt | 0 .../chandra/desktop/plasmoid/moon.pkg | 8 ++ .../desktop/plasmoid/stub.mbt | 4 +- .../desktop/plasmoid/top.mbt | 0 .../moonplasma/desktop/plasmoid/moon.pkg | 8 -- components/inspector/gen/moon.pkg | 16 +-- .../desktop/plasmoid/README.md | 0 .../desktop/plasmoid/ffi.mbt | 0 .../chandra/desktop/plasmoid/moon.pkg | 9 ++ .../desktop/plasmoid/pkg.generated.mbti | 4 +- .../desktop/plasmoid/stub.mbt | 4 +- .../desktop/plasmoid/top.mbt | 0 .../moonplasma/desktop/plasmoid/moon.pkg | 9 -- components/launcher/gen/moon.pkg | 16 +-- components/launcher/gen/pkg.generated.mbti | 2 +- .../desktop/plasmoid/README.md | 0 .../desktop/plasmoid/ffi.mbt | 0 .../chandra/desktop/plasmoid/moon.pkg | 8 ++ .../desktop/plasmoid/stub.mbt | 4 +- .../desktop/plasmoid/top.mbt | 0 .../moonplasma/desktop/plasmoid/moon.pkg | 8 -- components/layout/gen/moon.pkg | 16 +-- .../desktop/plasmoid/README.md | 0 .../desktop/plasmoid/ffi.mbt | 0 .../chandra/desktop/plasmoid/moon.pkg | 8 ++ .../desktop/plasmoid/stub.mbt | 4 +- .../desktop/plasmoid/top.mbt | 0 .../moonplasma/desktop/plasmoid/moon.pkg | 8 -- components/logout/gen/moon.pkg | 16 +-- .../desktop/plasmoid/README.md | 0 .../desktop/plasmoid/ffi.mbt | 0 .../chandra/desktop/plasmoid/moon.pkg | 8 ++ .../desktop/plasmoid/stub.mbt | 4 +- .../desktop/plasmoid/top.mbt | 0 .../moonplasma/desktop/plasmoid/moon.pkg | 8 -- components/module-manager/gen/moon.pkg | 16 +-- .../desktop/desktop-surface/README.md | 0 .../desktop/desktop-surface/ffi.mbt | 0 .../chandra/desktop/desktop-surface/moon.pkg | 7 ++ .../desktop-surface/pkg.generated.mbti | 4 +- .../desktop/desktop-surface/stub.mbt | 2 +- .../desktop/desktop-surface/top.mbt | 0 .../desktop/panel-layout/README.md | 0 .../desktop/panel-layout/ffi.mbt | 0 .../chandra/desktop/panel-layout/moon.pkg | 9 ++ .../desktop/panel-layout/pkg.generated.mbti | 4 +- .../desktop/panel-layout/stub.mbt | 2 +- .../desktop/panel-layout/top.mbt | 0 .../desktop/desktop-surface/moon.pkg | 7 -- .../moonplasma/desktop/panel-layout/moon.pkg | 9 -- components/shell/gen/moon.pkg | 18 +-- components/shell/gen/pkg.generated.mbti | 2 +- .../desktop/plasmoid/README.md | 0 .../desktop/plasmoid/ffi.mbt | 0 .../chandra/desktop/plasmoid/moon.pkg | 8 ++ .../desktop/plasmoid/stub.mbt | 4 +- .../desktop/plasmoid/top.mbt | 0 .../moonplasma/desktop/plasmoid/moon.pkg | 8 -- components/tasks/gen/moon.pkg | 16 +-- .../desktop/plasmoid/README.md | 0 .../desktop/plasmoid/ffi.mbt | 0 .../chandra/desktop/plasmoid/moon.pkg | 8 ++ .../desktop/plasmoid/stub.mbt | 4 +- .../desktop/plasmoid/top.mbt | 0 .../moonplasma/desktop/plasmoid/moon.pkg | 8 -- components/wallpaper/gen/moon.pkg | 16 +-- .../{moonplasma => chandra}/wm/policy/ffi.mbt | 0 .../gen/interface/chandra/wm/policy/moon.pkg | 7 ++ .../wm/policy/pkg.generated.mbti | 4 +- .../wm/policy/stub.mbt | 2 +- .../{moonplasma => chandra}/wm/policy/top.mbt | 0 .../interface/moonplasma/wm/policy/moon.pkg | 7 -- components/wm-hybrid/gen/moon.pkg | 28 ++--- components/wm-hybrid/gen/pkg.generated.mbti | 2 +- compositor/app/app.mbt | 6 +- compositor/app/moon.pkg | 16 +-- compositor/app/pkg.generated.mbti | 2 +- compositor/bin/main.mbt | 6 +- compositor/bin/moon.pkg | 14 +-- compositor/font/font.mbt | 2 +- compositor/font/font_wasm.mbt | 2 +- compositor/font/moon.pkg | 4 +- compositor/gfx/moon.pkg | 4 +- compositor/gfx/pkg.generated.mbti | 6 +- compositor/host/compositor.mbt | 92 +++++++------- compositor/host/e2e_test.mbt | 12 +- compositor/host/input_test.mbt | 90 +++++++++----- compositor/host/inspector_test.mbt | 2 +- compositor/host/moon.pkg | 20 +-- compositor/host/resize_test.mbt | 2 +- compositor/host/showdesktop.mbt | 10 +- compositor/host/switcher.mbt | 10 +- compositor/kms/kms_native.mbt | 2 +- compositor/kms/kms_wasm.mbt | 2 +- compositor/kms/moon.pkg | 6 +- compositor/nested/moon.pkg | 6 +- compositor/nested/nested.mbt | 2 +- compositor/raster/moon.pkg | 8 +- compositor/raster/raster_wasm.mbt | 2 +- compositor/renderer/moon.pkg | 2 +- compositor/renderer/pkg.generated.mbti | 4 +- compositor/renderer/renderer_test.mbt | 4 +- compositor/scene/pkg.generated.mbti | 2 +- compositor/shell/humanise.mbt | 4 +- compositor/shell/moon.pkg | 26 ++-- compositor/shell/shell.mbt | 2 +- compositor/shell/state.mbt | 6 +- compositor/shell/widgets.mbt | 38 ++++-- compositor/sys/moon.pkg | 6 +- compositor/sys/sys_wasm.mbt | 2 +- compositor/wasm/moon.pkg | 6 +- .../testdata/clock-digital.component.wasm | Bin 23950 -> 23785 bytes .../wasm/testdata/clock-digital.core.wasm | Bin 17860 -> 17821 bytes compositor/wasm/testdata/pulse.component.wasm | Bin 32135 -> 31072 bytes compositor/wasm/wasm_host.mbt | 2 +- compositor/wasm/wasm_native.mbt | 4 +- compositor/wasm/wasm_stub.c | 20 +-- compositor/wasm/wasm_test.mbt | 4 +- compositor/wayland/moon.pkg | 4 +- compositor/wayland/server.mbt | 4 +- config/apps.json | 20 +-- docs/ARCHITECTURE.md | 16 +-- docs/TOOLCHAIN.md | 14 +-- docs/compositor-design.md | 48 ++++---- host-wasm/Cargo.lock | 22 ++-- host-wasm/Cargo.toml | 4 +- host-wasm/README.md | 26 ++-- host-wasm/src/kms.rs | 2 +- host-wasm/src/main.rs | 74 +++++------ host-wasm/src/plasmoid.rs | 18 +-- host-wasm/src/raster.rs | 4 +- host/package-lock.json | 4 +- host/package.json | 4 +- host/serve.mjs | 2 +- host/src/desktop.mjs | 4 +- host/test/desktop.test.mjs | 8 +- host/web/index.html | 2 +- host/web/main.mjs | 4 +- .../desktop/app-catalog/ffi.mbt | 2 +- .../chandra/desktop/app-catalog/moon.pkg | 5 + .../desktop/app-catalog/pkg.generated.mbti | 4 +- .../desktop/app-catalog/top.mbt | 0 .../desktop/app-launch/ffi.mbt | 2 +- .../desktop/app-launch/moon.pkg | 0 .../desktop/app-launch/pkg.generated.mbti | 2 +- .../desktop/app-launch/top.mbt | 0 .../desktop/clock/README.md | 0 .../desktop/clock/ffi.mbt | 2 +- interface/chandra/desktop/clock/moon.pkg | 5 + .../desktop/clock/pkg.generated.mbti | 4 +- .../desktop/clock/top.mbt | 0 .../desktop/inspector/README.md | 0 interface/chandra/desktop/inspector/ffi.mbt | 8 ++ .../desktop/inspector/moon.pkg | 0 .../desktop/inspector/top.mbt | 0 .../desktop/layout-control/README.md | 0 .../desktop/layout-control}/ffi.mbt | 24 ++-- .../desktop/layout-control/moon.pkg | 0 .../desktop/layout-control/top.mbt | 0 .../desktop/modules/README.md | 0 .../desktop/modules/ffi.mbt | 10 +- .../desktop/modules/moon.pkg | 0 .../desktop/modules/top.mbt | 0 .../desktop/session/README.md | 0 interface/chandra/desktop/session/ffi.mbt | 5 + .../desktop/session/moon.pkg | 0 .../desktop/session/top.mbt | 0 .../desktop/theme/README.md | 0 .../desktop/theme/ffi.mbt | 2 +- .../desktop/theme/moon.pkg | 2 +- .../desktop/theme/native_stub.mbt | 0 .../desktop/theme/pkg.generated.mbti | 4 +- .../desktop/theme/top.mbt | 0 .../desktop/types/README.md | 0 .../desktop/types/ffi.mbt | 0 .../desktop/types/moon.pkg | 0 .../desktop/types/pkg.generated.mbti | 2 +- .../desktop/types/top.mbt | 0 .../desktop/wallpaper/README.md | 0 .../desktop/wallpaper}/ffi.mbt | 24 ++-- .../desktop/wallpaper/moon.pkg | 0 .../desktop/wallpaper/top.mbt | 0 .../desktop/windows/README.md | 0 .../desktop/windows/ffi.mbt | 8 +- .../desktop/windows/moon.pkg | 0 .../desktop/windows/top.mbt | 0 .../host/display/ffi.mbt | 16 +-- .../host/display/moon.pkg | 0 .../host/display/native_stub.mbt | 0 .../host/display/pkg.generated.mbti | 2 +- .../host/display/top.mbt | 0 .../host/font/README.md | 0 .../{moonplasma => chandra}/host/font/ffi.mbt | 4 +- .../host/font/moon.pkg | 0 .../host/font/native_stub.mbt | 0 .../{moonplasma => chandra}/host/font/top.mbt | 0 .../host/plasmoids/ffi.mbt | 32 ++--- .../host/plasmoids/moon.pkg | 4 +- .../host/plasmoids/native_stub.mbt | 0 .../host/plasmoids/pkg.generated.mbti | 6 +- .../host/plasmoids/top.mbt | 0 .../host/raster/ffi.mbt | 10 +- .../host/raster/moon.pkg | 0 .../host/raster/native_stub.mbt | 0 .../host/raster/top.mbt | 0 .../host/sys/README.md | 0 interface/chandra/host/sys/ffi.mbt | 116 ++++++++++++++++++ .../{moonplasma => chandra}/host/sys/moon.pkg | 0 .../host/sys/native_stub.mbt | 0 .../host/sys/pkg.generated.mbti | 2 +- .../{moonplasma => chandra}/host/sys/top.mbt | 0 .../{moonplasma => chandra}/wm/policy/ffi.mbt | 14 +-- interface/chandra/wm/policy/moon.pkg | 5 + .../wm/policy/pkg.generated.mbti | 4 +- .../{moonplasma => chandra}/wm/policy/top.mbt | 0 .../moonplasma/desktop/app-catalog/moon.pkg | 5 - interface/moonplasma/desktop/clock/moon.pkg | 5 - .../moonplasma/desktop/inspector/ffi.mbt | 8 -- interface/moonplasma/desktop/session/ffi.mbt | 5 - interface/moonplasma/host/sys/ffi.mbt | 116 ------------------ interface/moonplasma/wm/policy/moon.pkg | 5 - .../frame-buffer/pkg.generated.mbti | 2 +- .../surface/surface-frame-buffer/moon.pkg | 4 +- .../surface-frame-buffer/pkg.generated.mbti | 6 +- interface/wasi-gfx/surface/surface/moon.pkg | 2 +- .../surface/surface/pkg.generated.mbti | 4 +- justfile | 16 +-- lib/clock/clock.mbt | 4 +- lib/clock/moon.pkg | 8 +- lib/clock/pkg.generated.mbti | 6 +- lib/dock/moon.pkg | 6 +- lib/launcher/moon.pkg | 6 +- lib/launcher/pkg.generated.mbti | 6 +- lib/moon/moon.mbt | 4 +- lib/moon/moon.pkg | 6 +- lib/moon/pkg.generated.mbti | 6 +- lib/panel/pkg.generated.mbti | 2 +- lib/shell/moon.pkg | 6 +- lib/shell/pkg.generated.mbti | 6 +- lib/shell/shell.mbt | 2 +- lib/timefmt/pkg.generated.mbti | 2 +- lib/ui/moon.pkg | 2 +- lib/ui/pkg.generated.mbti | 4 +- lib/wm/pkg.generated.mbti | 2 +- moon.mod | 2 +- pixi.toml | 2 +- scripts/build-compositor-wasm.sh | 2 +- scripts/build-modules.sh | 4 +- scripts/build.sh | 4 +- scripts/gen-bindings.sh | 4 +- scripts/gen-native-stubs.py | 2 +- scripts/screenshot.mjs | 6 +- scripts/test.sh | 2 +- .../{moon-plasma-session => chandra-session} | 26 ++-- session/chandra.desktop | 7 ++ session/install.py | 44 +++---- session/moon-plasma.desktop | 7 -- wit/capabilities.wit | 2 +- wit/compositor/surface.wit | 4 +- wit/gfx/worlds.wit | 2 +- wit/host/display.wit | 2 +- wit/host/plasmoids.wit | 6 +- wit/host/raster.wit | 2 +- wit/host/sys.wit | 2 +- wit/plasmoid.wit | 4 +- wit/shell.wit | 2 +- wit/theme.wit | 2 +- wit/types.wit | 2 +- wit/wm/decoration.wit | 4 +- wit/wm/policy.wit | 4 +- wit/wm/worlds.wit | 6 +- wit/worlds.wit | 2 +- world/clock-widget/pkg.generated.mbti | 2 +- world/decoration-provider/pkg.generated.mbti | 2 +- world/gui-loader/pkg.generated.mbti | 2 +- world/launcher-widget/pkg.generated.mbti | 2 +- world/shell/pkg.generated.mbti | 2 +- world/window-manager/pkg.generated.mbti | 2 +- 323 files changed, 1055 insertions(+), 1013 deletions(-) rename components/clock-binary/gen/interface/{moonplasma => chandra}/desktop/plasmoid/README.md (100%) rename components/clock-binary/gen/interface/{moonplasma => chandra}/desktop/plasmoid/ffi.mbt (100%) create mode 100644 components/clock-binary/gen/interface/chandra/desktop/plasmoid/moon.pkg rename components/{dock/gen/interface/moonplasma => clock-binary/gen/interface/chandra}/desktop/plasmoid/pkg.generated.mbti (81%) rename components/clock-binary/gen/interface/{moonplasma => chandra}/desktop/plasmoid/stub.mbt (88%) rename components/clock-binary/gen/interface/{moonplasma => chandra}/desktop/plasmoid/top.mbt (100%) delete mode 100644 components/clock-binary/gen/interface/moonplasma/desktop/plasmoid/moon.pkg rename components/clock-digital/gen/interface/{moonplasma => chandra}/desktop/plasmoid/README.md (100%) rename components/clock-digital/gen/interface/{moonplasma => chandra}/desktop/plasmoid/ffi.mbt (100%) create mode 100644 components/clock-digital/gen/interface/chandra/desktop/plasmoid/moon.pkg rename components/{launcher/gen/interface/moonplasma => clock-digital/gen/interface/chandra}/desktop/plasmoid/pkg.generated.mbti (80%) rename components/clock-digital/gen/interface/{moonplasma => chandra}/desktop/plasmoid/stub.mbt (88%) rename components/clock-digital/gen/interface/{moonplasma => chandra}/desktop/plasmoid/top.mbt (100%) delete mode 100644 components/clock-digital/gen/interface/moonplasma/desktop/plasmoid/moon.pkg rename components/decoration-breeze/gen/interface/{moonplasma => chandra}/wm/decoration/ffi.mbt (100%) create mode 100644 components/decoration-breeze/gen/interface/chandra/wm/decoration/moon.pkg rename components/decoration-breeze/gen/interface/{moonplasma => chandra}/wm/decoration/pkg.generated.mbti (75%) rename components/decoration-breeze/gen/interface/{moonplasma => chandra}/wm/decoration/stub.mbt (97%) rename components/decoration-breeze/gen/interface/{moonplasma => chandra}/wm/decoration/top.mbt (100%) delete mode 100644 components/decoration-breeze/gen/interface/moonplasma/wm/decoration/moon.pkg rename components/dock/gen/interface/{moonplasma => chandra}/desktop/plasmoid/README.md (100%) rename components/dock/gen/interface/{moonplasma => chandra}/desktop/plasmoid/ffi.mbt (100%) create mode 100644 components/dock/gen/interface/chandra/desktop/plasmoid/moon.pkg rename components/{clock-binary/gen/interface/moonplasma => dock/gen/interface/chandra}/desktop/plasmoid/pkg.generated.mbti (80%) rename components/dock/gen/interface/{moonplasma => chandra}/desktop/plasmoid/stub.mbt (90%) rename components/dock/gen/interface/{moonplasma => chandra}/desktop/plasmoid/top.mbt (100%) delete mode 100644 components/dock/gen/interface/moonplasma/desktop/plasmoid/moon.pkg rename components/inspector/gen/interface/{moonplasma => chandra}/desktop/plasmoid/README.md (100%) rename components/inspector/gen/interface/{moonplasma => chandra}/desktop/plasmoid/ffi.mbt (100%) create mode 100644 components/inspector/gen/interface/chandra/desktop/plasmoid/moon.pkg rename components/inspector/gen/interface/{moonplasma => chandra}/desktop/plasmoid/stub.mbt (89%) rename components/inspector/gen/interface/{moonplasma => chandra}/desktop/plasmoid/top.mbt (100%) delete mode 100644 components/inspector/gen/interface/moonplasma/desktop/plasmoid/moon.pkg rename components/launcher/gen/interface/{moonplasma => chandra}/desktop/plasmoid/README.md (100%) rename components/launcher/gen/interface/{moonplasma => chandra}/desktop/plasmoid/ffi.mbt (100%) create mode 100644 components/launcher/gen/interface/chandra/desktop/plasmoid/moon.pkg rename components/{clock-digital/gen/interface/moonplasma => launcher/gen/interface/chandra}/desktop/plasmoid/pkg.generated.mbti (80%) rename components/launcher/gen/interface/{moonplasma => chandra}/desktop/plasmoid/stub.mbt (89%) rename components/launcher/gen/interface/{moonplasma => chandra}/desktop/plasmoid/top.mbt (100%) delete mode 100644 components/launcher/gen/interface/moonplasma/desktop/plasmoid/moon.pkg rename components/layout/gen/interface/{moonplasma => chandra}/desktop/plasmoid/README.md (100%) rename components/layout/gen/interface/{moonplasma => chandra}/desktop/plasmoid/ffi.mbt (100%) create mode 100644 components/layout/gen/interface/chandra/desktop/plasmoid/moon.pkg rename components/layout/gen/interface/{moonplasma => chandra}/desktop/plasmoid/stub.mbt (94%) rename components/layout/gen/interface/{moonplasma => chandra}/desktop/plasmoid/top.mbt (100%) delete mode 100644 components/layout/gen/interface/moonplasma/desktop/plasmoid/moon.pkg rename components/logout/gen/interface/{moonplasma => chandra}/desktop/plasmoid/README.md (100%) rename components/logout/gen/interface/{moonplasma => chandra}/desktop/plasmoid/ffi.mbt (100%) create mode 100644 components/logout/gen/interface/chandra/desktop/plasmoid/moon.pkg rename components/logout/gen/interface/{moonplasma => chandra}/desktop/plasmoid/stub.mbt (96%) rename components/logout/gen/interface/{moonplasma => chandra}/desktop/plasmoid/top.mbt (100%) delete mode 100644 components/logout/gen/interface/moonplasma/desktop/plasmoid/moon.pkg rename components/module-manager/gen/interface/{moonplasma => chandra}/desktop/plasmoid/README.md (100%) rename components/module-manager/gen/interface/{moonplasma => chandra}/desktop/plasmoid/ffi.mbt (100%) create mode 100644 components/module-manager/gen/interface/chandra/desktop/plasmoid/moon.pkg rename components/module-manager/gen/interface/{moonplasma => chandra}/desktop/plasmoid/stub.mbt (97%) rename components/module-manager/gen/interface/{moonplasma => chandra}/desktop/plasmoid/top.mbt (100%) delete mode 100644 components/module-manager/gen/interface/moonplasma/desktop/plasmoid/moon.pkg rename components/shell/gen/interface/{moonplasma => chandra}/desktop/desktop-surface/README.md (100%) rename components/shell/gen/interface/{moonplasma => chandra}/desktop/desktop-surface/ffi.mbt (100%) create mode 100644 components/shell/gen/interface/chandra/desktop/desktop-surface/moon.pkg rename components/shell/gen/interface/{moonplasma => chandra}/desktop/desktop-surface/pkg.generated.mbti (55%) rename components/shell/gen/interface/{moonplasma => chandra}/desktop/desktop-surface/stub.mbt (67%) rename components/shell/gen/interface/{moonplasma => chandra}/desktop/desktop-surface/top.mbt (100%) rename components/shell/gen/interface/{moonplasma => chandra}/desktop/panel-layout/README.md (100%) rename components/shell/gen/interface/{moonplasma => chandra}/desktop/panel-layout/ffi.mbt (100%) create mode 100644 components/shell/gen/interface/chandra/desktop/panel-layout/moon.pkg rename components/shell/gen/interface/{moonplasma => chandra}/desktop/panel-layout/pkg.generated.mbti (82%) rename components/shell/gen/interface/{moonplasma => chandra}/desktop/panel-layout/stub.mbt (95%) rename components/shell/gen/interface/{moonplasma => chandra}/desktop/panel-layout/top.mbt (100%) delete mode 100644 components/shell/gen/interface/moonplasma/desktop/desktop-surface/moon.pkg delete mode 100644 components/shell/gen/interface/moonplasma/desktop/panel-layout/moon.pkg rename components/tasks/gen/interface/{moonplasma => chandra}/desktop/plasmoid/README.md (100%) rename components/tasks/gen/interface/{moonplasma => chandra}/desktop/plasmoid/ffi.mbt (100%) create mode 100644 components/tasks/gen/interface/chandra/desktop/plasmoid/moon.pkg rename components/tasks/gen/interface/{moonplasma => chandra}/desktop/plasmoid/stub.mbt (96%) rename components/tasks/gen/interface/{moonplasma => chandra}/desktop/plasmoid/top.mbt (100%) delete mode 100644 components/tasks/gen/interface/moonplasma/desktop/plasmoid/moon.pkg rename components/wallpaper/gen/interface/{moonplasma => chandra}/desktop/plasmoid/README.md (100%) rename components/wallpaper/gen/interface/{moonplasma => chandra}/desktop/plasmoid/ffi.mbt (100%) create mode 100644 components/wallpaper/gen/interface/chandra/desktop/plasmoid/moon.pkg rename components/wallpaper/gen/interface/{moonplasma => chandra}/desktop/plasmoid/stub.mbt (97%) rename components/wallpaper/gen/interface/{moonplasma => chandra}/desktop/plasmoid/top.mbt (100%) delete mode 100644 components/wallpaper/gen/interface/moonplasma/desktop/plasmoid/moon.pkg rename components/wm-hybrid/gen/interface/{moonplasma => chandra}/wm/policy/ffi.mbt (100%) create mode 100644 components/wm-hybrid/gen/interface/chandra/wm/policy/moon.pkg rename components/wm-hybrid/gen/interface/{moonplasma => chandra}/wm/policy/pkg.generated.mbti (92%) rename components/wm-hybrid/gen/interface/{moonplasma => chandra}/wm/policy/stub.mbt (98%) rename components/wm-hybrid/gen/interface/{moonplasma => chandra}/wm/policy/top.mbt (100%) delete mode 100644 components/wm-hybrid/gen/interface/moonplasma/wm/policy/moon.pkg rename interface/{moonplasma => chandra}/desktop/app-catalog/ffi.mbt (89%) create mode 100644 interface/chandra/desktop/app-catalog/moon.pkg rename interface/{moonplasma => chandra}/desktop/app-catalog/pkg.generated.mbti (57%) rename interface/{moonplasma => chandra}/desktop/app-catalog/top.mbt (100%) rename interface/{moonplasma => chandra}/desktop/app-launch/ffi.mbt (90%) rename interface/{moonplasma => chandra}/desktop/app-launch/moon.pkg (100%) rename interface/{moonplasma => chandra}/desktop/app-launch/pkg.generated.mbti (70%) rename interface/{moonplasma => chandra}/desktop/app-launch/top.mbt (100%) rename interface/{moonplasma => chandra}/desktop/clock/README.md (100%) rename interface/{moonplasma => chandra}/desktop/clock/ffi.mbt (90%) create mode 100644 interface/chandra/desktop/clock/moon.pkg rename interface/{moonplasma => chandra}/desktop/clock/pkg.generated.mbti (56%) rename interface/{moonplasma => chandra}/desktop/clock/top.mbt (100%) rename interface/{moonplasma => chandra}/desktop/inspector/README.md (100%) create mode 100644 interface/chandra/desktop/inspector/ffi.mbt rename interface/{moonplasma => chandra}/desktop/inspector/moon.pkg (100%) rename interface/{moonplasma => chandra}/desktop/inspector/top.mbt (100%) rename interface/{moonplasma => chandra}/desktop/layout-control/README.md (100%) rename interface/{moonplasma/desktop/wallpaper => chandra/desktop/layout-control}/ffi.mbt (72%) rename interface/{moonplasma => chandra}/desktop/layout-control/moon.pkg (100%) rename interface/{moonplasma => chandra}/desktop/layout-control/top.mbt (100%) rename interface/{moonplasma => chandra}/desktop/modules/README.md (100%) rename interface/{moonplasma => chandra}/desktop/modules/ffi.mbt (66%) rename interface/{moonplasma => chandra}/desktop/modules/moon.pkg (100%) rename interface/{moonplasma => chandra}/desktop/modules/top.mbt (100%) rename interface/{moonplasma => chandra}/desktop/session/README.md (100%) create mode 100644 interface/chandra/desktop/session/ffi.mbt rename interface/{moonplasma => chandra}/desktop/session/moon.pkg (100%) rename interface/{moonplasma => chandra}/desktop/session/top.mbt (100%) rename interface/{moonplasma => chandra}/desktop/theme/README.md (100%) rename interface/{moonplasma => chandra}/desktop/theme/ffi.mbt (90%) rename interface/{moonplasma => chandra}/desktop/theme/moon.pkg (80%) rename interface/{moonplasma => chandra}/desktop/theme/native_stub.mbt (100%) rename interface/{moonplasma => chandra}/desktop/theme/pkg.generated.mbti (83%) rename interface/{moonplasma => chandra}/desktop/theme/top.mbt (100%) rename interface/{moonplasma => chandra}/desktop/types/README.md (100%) rename interface/{moonplasma => chandra}/desktop/types/ffi.mbt (100%) rename interface/{moonplasma => chandra}/desktop/types/moon.pkg (100%) rename interface/{moonplasma => chandra}/desktop/types/pkg.generated.mbti (96%) rename interface/{moonplasma => chandra}/desktop/types/top.mbt (100%) rename interface/{moonplasma => chandra}/desktop/wallpaper/README.md (100%) rename interface/{moonplasma/desktop/layout-control => chandra/desktop/wallpaper}/ffi.mbt (71%) rename interface/{moonplasma => chandra}/desktop/wallpaper/moon.pkg (100%) rename interface/{moonplasma => chandra}/desktop/wallpaper/top.mbt (100%) rename interface/{moonplasma => chandra}/desktop/windows/README.md (100%) rename interface/{moonplasma => chandra}/desktop/windows/ffi.mbt (74%) rename interface/{moonplasma => chandra}/desktop/windows/moon.pkg (100%) rename interface/{moonplasma => chandra}/desktop/windows/top.mbt (100%) rename interface/{moonplasma => chandra}/host/display/ffi.mbt (67%) rename interface/{moonplasma => chandra}/host/display/moon.pkg (100%) rename interface/{moonplasma => chandra}/host/display/native_stub.mbt (100%) rename interface/{moonplasma => chandra}/host/display/pkg.generated.mbti (93%) rename interface/{moonplasma => chandra}/host/display/top.mbt (100%) rename interface/{moonplasma => chandra}/host/font/README.md (100%) rename interface/{moonplasma => chandra}/host/font/ffi.mbt (86%) rename interface/{moonplasma => chandra}/host/font/moon.pkg (100%) rename interface/{moonplasma => chandra}/host/font/native_stub.mbt (100%) rename interface/{moonplasma => chandra}/host/font/top.mbt (100%) rename interface/{moonplasma => chandra}/host/plasmoids/ffi.mbt (58%) rename interface/{moonplasma => chandra}/host/plasmoids/moon.pkg (63%) rename interface/{moonplasma => chandra}/host/plasmoids/native_stub.mbt (100%) rename interface/{moonplasma => chandra}/host/plasmoids/pkg.generated.mbti (90%) rename interface/{moonplasma => chandra}/host/plasmoids/top.mbt (100%) rename interface/{moonplasma => chandra}/host/raster/ffi.mbt (78%) rename interface/{moonplasma => chandra}/host/raster/moon.pkg (100%) rename interface/{moonplasma => chandra}/host/raster/native_stub.mbt (100%) rename interface/{moonplasma => chandra}/host/raster/top.mbt (100%) rename interface/{moonplasma => chandra}/host/sys/README.md (100%) create mode 100644 interface/chandra/host/sys/ffi.mbt rename interface/{moonplasma => chandra}/host/sys/moon.pkg (100%) rename interface/{moonplasma => chandra}/host/sys/native_stub.mbt (100%) rename interface/{moonplasma => chandra}/host/sys/pkg.generated.mbti (95%) rename interface/{moonplasma => chandra}/host/sys/top.mbt (100%) rename interface/{moonplasma => chandra}/wm/policy/ffi.mbt (72%) create mode 100644 interface/chandra/wm/policy/moon.pkg rename interface/{moonplasma => chandra}/wm/policy/pkg.generated.mbti (93%) rename interface/{moonplasma => chandra}/wm/policy/top.mbt (100%) delete mode 100644 interface/moonplasma/desktop/app-catalog/moon.pkg delete mode 100644 interface/moonplasma/desktop/clock/moon.pkg delete mode 100644 interface/moonplasma/desktop/inspector/ffi.mbt delete mode 100644 interface/moonplasma/desktop/session/ffi.mbt delete mode 100644 interface/moonplasma/host/sys/ffi.mbt delete mode 100644 interface/moonplasma/wm/policy/moon.pkg rename session/{moon-plasma-session => chandra-session} (78%) create mode 100644 session/chandra.desktop delete mode 100644 session/moon-plasma.desktop diff --git a/README.md b/README.md index 43d2a78..4adc9d2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# moon-plasma +# chandra A modular, KDE-Plasma-inspired desktop environment where **every part is a WebAssembly component** (Component Model, WIT interfaces) written in @@ -12,7 +12,7 @@ are three separate MoonBit components.* ## Vision Plasma's strength is its decomposition (shell, widgets, window manager, runner, -settings modules, notifications, tray). moon-plasma keeps that decomposition and +settings modules, notifications, tray). chandra keeps that decomposition and makes each seam a **typed WIT interface** with **deny-by-default capabilities**: * the **host** only owns engine/lifecycle, devices, the capability broker and the @@ -30,7 +30,7 @@ decision, rendering, input, permissions, versioning, roadmap M0–M8) and Works today: -* WIT package `moonplasma:desktop@0.1.0` (`wit/`): worlds `widget`, `clock-widget`, +* WIT package `chandra:desktop@0.1.0` (`wit/`): worlds `widget`, `clock-widget`, `launcher-widget`, `panel`, `shell`. * Four MoonBit components, each an independently built `.wasm` component of 24–33 KB: `clock-digital`, `clock-binary` (drop-in replacement), `launcher` (kickoff-like with @@ -67,7 +67,7 @@ Swap the clock **without rebuilding anything else**: ```bash node host/src/cli.mjs --config config/desktop.binary-clock.json scripts/build.sh clock-binary # builds just that component -# in the browser console: await moonPlasma.swap('clock', 'clock-binary') +# in the browser console: await chandra.swap('clock', 'clock-binary') ``` Screenshots: see the end of [docs/TOOLCHAIN.md](docs/TOOLCHAIN.md). diff --git a/async-core/pkg.generated.mbti b/async-core/pkg.generated.mbti index 1bbd4e8..8f9f85d 100644 --- a/async-core/pkg.generated.mbti +++ b/async-core/pkg.generated.mbti @@ -1,5 +1,5 @@ // Generated using `moon info`, DON'T EDIT IT -package "moonplasma/desktop/async-core" +package "chandra/desktop/async-core" import { "moonbitlang/core/debug", diff --git a/components/clock-binary/gen/interface/moonplasma/desktop/plasmoid/README.md b/components/clock-binary/gen/interface/chandra/desktop/plasmoid/README.md similarity index 100% rename from components/clock-binary/gen/interface/moonplasma/desktop/plasmoid/README.md rename to components/clock-binary/gen/interface/chandra/desktop/plasmoid/README.md diff --git a/components/clock-binary/gen/interface/moonplasma/desktop/plasmoid/ffi.mbt b/components/clock-binary/gen/interface/chandra/desktop/plasmoid/ffi.mbt similarity index 100% rename from components/clock-binary/gen/interface/moonplasma/desktop/plasmoid/ffi.mbt rename to components/clock-binary/gen/interface/chandra/desktop/plasmoid/ffi.mbt diff --git a/components/clock-binary/gen/interface/chandra/desktop/plasmoid/moon.pkg b/components/clock-binary/gen/interface/chandra/desktop/plasmoid/moon.pkg new file mode 100644 index 0000000..815a2a0 --- /dev/null +++ b/components/clock-binary/gen/interface/chandra/desktop/plasmoid/moon.pkg @@ -0,0 +1,8 @@ +import { + "chandra/desktop/interface/chandra/desktop/types" @types, + "chandra/desktop/interface/chandra/desktop/theme" @theme, + "chandra/desktop/interface/chandra/desktop/clock" @clock, + "chandra/desktop/lib/clock" @logic, +} + +warnings = "-44" diff --git a/components/dock/gen/interface/moonplasma/desktop/plasmoid/pkg.generated.mbti b/components/clock-binary/gen/interface/chandra/desktop/plasmoid/pkg.generated.mbti similarity index 81% rename from components/dock/gen/interface/moonplasma/desktop/plasmoid/pkg.generated.mbti rename to components/clock-binary/gen/interface/chandra/desktop/plasmoid/pkg.generated.mbti index 8cc4375..4e44e9f 100644 --- a/components/dock/gen/interface/moonplasma/desktop/plasmoid/pkg.generated.mbti +++ b/components/clock-binary/gen/interface/chandra/desktop/plasmoid/pkg.generated.mbti @@ -1,8 +1,8 @@ // Generated using `moon info`, DON'T EDIT IT -package "moonplasma/desktop/components/dock/gen/interface/moonplasma/desktop/plasmoid" +package "chandra/desktop/components/clock-binary/gen/interface/chandra/desktop/plasmoid" import { - "moonplasma/desktop/interface/moonplasma/desktop/types", + "chandra/desktop/interface/chandra/desktop/types", } // Values diff --git a/components/clock-binary/gen/interface/moonplasma/desktop/plasmoid/stub.mbt b/components/clock-binary/gen/interface/chandra/desktop/plasmoid/stub.mbt similarity index 88% rename from components/clock-binary/gen/interface/moonplasma/desktop/plasmoid/stub.mbt rename to components/clock-binary/gen/interface/chandra/desktop/plasmoid/stub.mbt index 7284246..16c52da 100644 --- a/components/clock-binary/gen/interface/moonplasma/desktop/plasmoid/stub.mbt +++ b/components/clock-binary/gen/interface/chandra/desktop/plasmoid/stub.mbt @@ -1,4 +1,4 @@ -///| Implementation of `moonplasma:desktop/plasmoid` for the binary clock. +///| Implementation of `chandra:desktop/plasmoid` for the binary clock. /// All logic lives in lib/clock; this file only adapts host capabilities. ///| diff --git a/components/clock-binary/gen/interface/moonplasma/desktop/plasmoid/top.mbt b/components/clock-binary/gen/interface/chandra/desktop/plasmoid/top.mbt similarity index 100% rename from components/clock-binary/gen/interface/moonplasma/desktop/plasmoid/top.mbt rename to components/clock-binary/gen/interface/chandra/desktop/plasmoid/top.mbt diff --git a/components/clock-binary/gen/interface/moonplasma/desktop/plasmoid/moon.pkg b/components/clock-binary/gen/interface/moonplasma/desktop/plasmoid/moon.pkg deleted file mode 100644 index b814460..0000000 --- a/components/clock-binary/gen/interface/moonplasma/desktop/plasmoid/moon.pkg +++ /dev/null @@ -1,8 +0,0 @@ -import { - "moonplasma/desktop/interface/moonplasma/desktop/types" @types, - "moonplasma/desktop/interface/moonplasma/desktop/theme" @theme, - "moonplasma/desktop/interface/moonplasma/desktop/clock" @clock, - "moonplasma/desktop/lib/clock" @logic, -} - -warnings = "-44" diff --git a/components/clock-binary/gen/moon.pkg b/components/clock-binary/gen/moon.pkg index 200d36e..08bde4b 100644 --- a/components/clock-binary/gen/moon.pkg +++ b/components/clock-binary/gen/moon.pkg @@ -1,5 +1,5 @@ import { - "moonplasma/desktop/components/clock-binary/gen/interface/moonplasma/desktop/plasmoid" @plasmoid, + "chandra/desktop/components/clock-binary/gen/interface/chandra/desktop/plasmoid" @plasmoid, } warnings = "-44" @@ -13,13 +13,13 @@ options( "heap-start-address": 16, "exports": [ "mbt_ffi_cabi_realloc:cabi_realloc", - "wasmExportInfo:moonplasma:desktop/plasmoid@0.1.0#info", - "wasmExportInfoPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#info", - "wasmExportOnEvent:moonplasma:desktop/plasmoid@0.1.0#on-event", - "wasmExportPopup:moonplasma:desktop/plasmoid@0.1.0#popup", - "wasmExportPopupPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#popup", - "wasmExportRender:moonplasma:desktop/plasmoid@0.1.0#render", - "wasmExportRenderPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#render" + "wasmExportInfo:chandra:desktop/plasmoid@0.1.0#info", + "wasmExportInfoPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#info", + "wasmExportOnEvent:chandra:desktop/plasmoid@0.1.0#on-event", + "wasmExportPopup:chandra:desktop/plasmoid@0.1.0#popup", + "wasmExportPopupPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#popup", + "wasmExportRender:chandra:desktop/plasmoid@0.1.0#render", + "wasmExportRenderPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#render" ], }, }, diff --git a/components/clock-binary/gen/pkg.generated.mbti b/components/clock-binary/gen/pkg.generated.mbti index a7937bb..cf0c8c5 100644 --- a/components/clock-binary/gen/pkg.generated.mbti +++ b/components/clock-binary/gen/pkg.generated.mbti @@ -1,5 +1,5 @@ // Generated using `moon info`, DON'T EDIT IT -package "moonplasma/desktop/components/clock-binary/gen" +package "chandra/desktop/components/clock-binary/gen" // Values pub fn mbt_ffi_cabi_realloc(Int32, Int32, Int32, Int32) -> Int32 diff --git a/components/clock-digital/gen/interface/moonplasma/desktop/plasmoid/README.md b/components/clock-digital/gen/interface/chandra/desktop/plasmoid/README.md similarity index 100% rename from components/clock-digital/gen/interface/moonplasma/desktop/plasmoid/README.md rename to components/clock-digital/gen/interface/chandra/desktop/plasmoid/README.md diff --git a/components/clock-digital/gen/interface/moonplasma/desktop/plasmoid/ffi.mbt b/components/clock-digital/gen/interface/chandra/desktop/plasmoid/ffi.mbt similarity index 100% rename from components/clock-digital/gen/interface/moonplasma/desktop/plasmoid/ffi.mbt rename to components/clock-digital/gen/interface/chandra/desktop/plasmoid/ffi.mbt diff --git a/components/clock-digital/gen/interface/chandra/desktop/plasmoid/moon.pkg b/components/clock-digital/gen/interface/chandra/desktop/plasmoid/moon.pkg new file mode 100644 index 0000000..815a2a0 --- /dev/null +++ b/components/clock-digital/gen/interface/chandra/desktop/plasmoid/moon.pkg @@ -0,0 +1,8 @@ +import { + "chandra/desktop/interface/chandra/desktop/types" @types, + "chandra/desktop/interface/chandra/desktop/theme" @theme, + "chandra/desktop/interface/chandra/desktop/clock" @clock, + "chandra/desktop/lib/clock" @logic, +} + +warnings = "-44" diff --git a/components/launcher/gen/interface/moonplasma/desktop/plasmoid/pkg.generated.mbti b/components/clock-digital/gen/interface/chandra/desktop/plasmoid/pkg.generated.mbti similarity index 80% rename from components/launcher/gen/interface/moonplasma/desktop/plasmoid/pkg.generated.mbti rename to components/clock-digital/gen/interface/chandra/desktop/plasmoid/pkg.generated.mbti index 37fc34d..50e70b2 100644 --- a/components/launcher/gen/interface/moonplasma/desktop/plasmoid/pkg.generated.mbti +++ b/components/clock-digital/gen/interface/chandra/desktop/plasmoid/pkg.generated.mbti @@ -1,8 +1,8 @@ // Generated using `moon info`, DON'T EDIT IT -package "moonplasma/desktop/components/launcher/gen/interface/moonplasma/desktop/plasmoid" +package "chandra/desktop/components/clock-digital/gen/interface/chandra/desktop/plasmoid" import { - "moonplasma/desktop/interface/moonplasma/desktop/types", + "chandra/desktop/interface/chandra/desktop/types", } // Values diff --git a/components/clock-digital/gen/interface/moonplasma/desktop/plasmoid/stub.mbt b/components/clock-digital/gen/interface/chandra/desktop/plasmoid/stub.mbt similarity index 88% rename from components/clock-digital/gen/interface/moonplasma/desktop/plasmoid/stub.mbt rename to components/clock-digital/gen/interface/chandra/desktop/plasmoid/stub.mbt index f79a0e2..c61ee38 100644 --- a/components/clock-digital/gen/interface/moonplasma/desktop/plasmoid/stub.mbt +++ b/components/clock-digital/gen/interface/chandra/desktop/plasmoid/stub.mbt @@ -1,4 +1,4 @@ -///| Implementation of `moonplasma:desktop/plasmoid` for the digital clock. +///| Implementation of `chandra:desktop/plasmoid` for the digital clock. /// All logic lives in lib/clock; this file only adapts host capabilities. ///| diff --git a/components/clock-digital/gen/interface/moonplasma/desktop/plasmoid/top.mbt b/components/clock-digital/gen/interface/chandra/desktop/plasmoid/top.mbt similarity index 100% rename from components/clock-digital/gen/interface/moonplasma/desktop/plasmoid/top.mbt rename to components/clock-digital/gen/interface/chandra/desktop/plasmoid/top.mbt diff --git a/components/clock-digital/gen/interface/moonplasma/desktop/plasmoid/moon.pkg b/components/clock-digital/gen/interface/moonplasma/desktop/plasmoid/moon.pkg deleted file mode 100644 index b814460..0000000 --- a/components/clock-digital/gen/interface/moonplasma/desktop/plasmoid/moon.pkg +++ /dev/null @@ -1,8 +0,0 @@ -import { - "moonplasma/desktop/interface/moonplasma/desktop/types" @types, - "moonplasma/desktop/interface/moonplasma/desktop/theme" @theme, - "moonplasma/desktop/interface/moonplasma/desktop/clock" @clock, - "moonplasma/desktop/lib/clock" @logic, -} - -warnings = "-44" diff --git a/components/clock-digital/gen/moon.pkg b/components/clock-digital/gen/moon.pkg index 2794909..f4c58ac 100644 --- a/components/clock-digital/gen/moon.pkg +++ b/components/clock-digital/gen/moon.pkg @@ -1,5 +1,5 @@ import { - "moonplasma/desktop/components/clock-digital/gen/interface/moonplasma/desktop/plasmoid" @plasmoid, + "chandra/desktop/components/clock-digital/gen/interface/chandra/desktop/plasmoid" @plasmoid, } warnings = "-44" @@ -13,13 +13,13 @@ options( "heap-start-address": 16, "exports": [ "mbt_ffi_cabi_realloc:cabi_realloc", - "wasmExportInfo:moonplasma:desktop/plasmoid@0.1.0#info", - "wasmExportInfoPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#info", - "wasmExportOnEvent:moonplasma:desktop/plasmoid@0.1.0#on-event", - "wasmExportPopup:moonplasma:desktop/plasmoid@0.1.0#popup", - "wasmExportPopupPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#popup", - "wasmExportRender:moonplasma:desktop/plasmoid@0.1.0#render", - "wasmExportRenderPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#render" + "wasmExportInfo:chandra:desktop/plasmoid@0.1.0#info", + "wasmExportInfoPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#info", + "wasmExportOnEvent:chandra:desktop/plasmoid@0.1.0#on-event", + "wasmExportPopup:chandra:desktop/plasmoid@0.1.0#popup", + "wasmExportPopupPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#popup", + "wasmExportRender:chandra:desktop/plasmoid@0.1.0#render", + "wasmExportRenderPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#render" ], }, }, diff --git a/components/clock-digital/gen/pkg.generated.mbti b/components/clock-digital/gen/pkg.generated.mbti index 7423ff0..dd9556d 100644 --- a/components/clock-digital/gen/pkg.generated.mbti +++ b/components/clock-digital/gen/pkg.generated.mbti @@ -1,5 +1,5 @@ // Generated using `moon info`, DON'T EDIT IT -package "moonplasma/desktop/components/clock-digital/gen" +package "chandra/desktop/components/clock-digital/gen" // Values pub fn mbt_ffi_cabi_realloc(Int32, Int32, Int32, Int32) -> Int32 diff --git a/components/compositor/gen/moon.pkg b/components/compositor/gen/moon.pkg index c4db55e..6fa6d47 100644 --- a/components/compositor/gen/moon.pkg +++ b/components/compositor/gen/moon.pkg @@ -1,5 +1,5 @@ import { - "moonplasma/desktop/components/compositor/gen/world/compositor" @compositor, + "chandra/desktop/components/compositor/gen/world/compositor" @compositor, } warnings = "-44" diff --git a/components/compositor/gen/world/compositor/moon.pkg b/components/compositor/gen/world/compositor/moon.pkg index 9d3ce44..0d2781e 100644 --- a/components/compositor/gen/world/compositor/moon.pkg +++ b/components/compositor/gen/world/compositor/moon.pkg @@ -1,5 +1,5 @@ import { - "moonplasma/desktop/compositor/app" @app, + "chandra/desktop/compositor/app" @app, } warnings = "-44" diff --git a/components/decoration-breeze/gen/interface/moonplasma/wm/decoration/ffi.mbt b/components/decoration-breeze/gen/interface/chandra/wm/decoration/ffi.mbt similarity index 100% rename from components/decoration-breeze/gen/interface/moonplasma/wm/decoration/ffi.mbt rename to components/decoration-breeze/gen/interface/chandra/wm/decoration/ffi.mbt diff --git a/components/decoration-breeze/gen/interface/chandra/wm/decoration/moon.pkg b/components/decoration-breeze/gen/interface/chandra/wm/decoration/moon.pkg new file mode 100644 index 0000000..d28e40f --- /dev/null +++ b/components/decoration-breeze/gen/interface/chandra/wm/decoration/moon.pkg @@ -0,0 +1,8 @@ +import { + "chandra/desktop/interface/chandra/desktop/types" @types, + "chandra/desktop/interface/chandra/desktop/theme" @theme, + "chandra/desktop/interface/chandra/wm/policy" @policy, + "chandra/desktop/lib/ui" @ui, +} + +warnings = "-44" diff --git a/components/decoration-breeze/gen/interface/moonplasma/wm/decoration/pkg.generated.mbti b/components/decoration-breeze/gen/interface/chandra/wm/decoration/pkg.generated.mbti similarity index 75% rename from components/decoration-breeze/gen/interface/moonplasma/wm/decoration/pkg.generated.mbti rename to components/decoration-breeze/gen/interface/chandra/wm/decoration/pkg.generated.mbti index 5323acd..0fb5883 100644 --- a/components/decoration-breeze/gen/interface/moonplasma/wm/decoration/pkg.generated.mbti +++ b/components/decoration-breeze/gen/interface/chandra/wm/decoration/pkg.generated.mbti @@ -1,9 +1,9 @@ // Generated using `moon info`, DON'T EDIT IT -package "moonplasma/desktop/components/decoration-breeze/gen/interface/moonplasma/wm/decoration" +package "chandra/desktop/components/decoration-breeze/gen/interface/chandra/wm/decoration" import { - "moonplasma/desktop/interface/moonplasma/desktop/types", - "moonplasma/desktop/interface/moonplasma/wm/policy", + "chandra/desktop/interface/chandra/desktop/types", + "chandra/desktop/interface/chandra/wm/policy", } // Values diff --git a/components/decoration-breeze/gen/interface/moonplasma/wm/decoration/stub.mbt b/components/decoration-breeze/gen/interface/chandra/wm/decoration/stub.mbt similarity index 97% rename from components/decoration-breeze/gen/interface/moonplasma/wm/decoration/stub.mbt rename to components/decoration-breeze/gen/interface/chandra/wm/decoration/stub.mbt index 6a075e9..30050a0 100644 --- a/components/decoration-breeze/gen/interface/moonplasma/wm/decoration/stub.mbt +++ b/components/decoration-breeze/gen/interface/chandra/wm/decoration/stub.mbt @@ -1,4 +1,4 @@ -///| `moonplasma:wm/decoration` Breeze-inspired server-side decoration component. +///| `chandra:wm/decoration` Breeze-inspired server-side decoration component. ///| pub fn render( diff --git a/components/decoration-breeze/gen/interface/moonplasma/wm/decoration/top.mbt b/components/decoration-breeze/gen/interface/chandra/wm/decoration/top.mbt similarity index 100% rename from components/decoration-breeze/gen/interface/moonplasma/wm/decoration/top.mbt rename to components/decoration-breeze/gen/interface/chandra/wm/decoration/top.mbt diff --git a/components/decoration-breeze/gen/interface/moonplasma/wm/decoration/moon.pkg b/components/decoration-breeze/gen/interface/moonplasma/wm/decoration/moon.pkg deleted file mode 100644 index 3d58d49..0000000 --- a/components/decoration-breeze/gen/interface/moonplasma/wm/decoration/moon.pkg +++ /dev/null @@ -1,8 +0,0 @@ -import { - "moonplasma/desktop/interface/moonplasma/desktop/types" @types, - "moonplasma/desktop/interface/moonplasma/desktop/theme" @theme, - "moonplasma/desktop/interface/moonplasma/wm/policy" @policy, - "moonplasma/desktop/lib/ui" @ui, -} - -warnings = "-44" diff --git a/components/decoration-breeze/gen/moon.pkg b/components/decoration-breeze/gen/moon.pkg index 1f9b863..c96dc0b 100644 --- a/components/decoration-breeze/gen/moon.pkg +++ b/components/decoration-breeze/gen/moon.pkg @@ -1,5 +1,5 @@ import { - "moonplasma/desktop/components/decoration-breeze/gen/interface/moonplasma/wm/decoration" @decoration, + "chandra/desktop/components/decoration-breeze/gen/interface/chandra/wm/decoration" @decoration, } warnings = "-44" @@ -13,8 +13,8 @@ options( "heap-start-address": 16, "exports": [ "mbt_ffi_cabi_realloc:cabi_realloc", - "wasmExportRender:moonplasma:wm/decoration@0.2.0#render", - "wasmExportRenderPostReturn:cabi_post_moonplasma:wm/decoration@0.2.0#render" + "wasmExportRender:chandra:wm/decoration@0.2.0#render", + "wasmExportRenderPostReturn:cabi_post_chandra:wm/decoration@0.2.0#render" ], }, }, diff --git a/components/decoration-breeze/gen/pkg.generated.mbti b/components/decoration-breeze/gen/pkg.generated.mbti index 9e31873..19febb3 100644 --- a/components/decoration-breeze/gen/pkg.generated.mbti +++ b/components/decoration-breeze/gen/pkg.generated.mbti @@ -1,5 +1,5 @@ // Generated using `moon info`, DON'T EDIT IT -package "moonplasma/desktop/components/decoration-breeze/gen" +package "chandra/desktop/components/decoration-breeze/gen" // Values pub fn mbt_ffi_cabi_realloc(Int32, Int32, Int32, Int32) -> Int32 diff --git a/components/dock/gen/interface/moonplasma/desktop/plasmoid/README.md b/components/dock/gen/interface/chandra/desktop/plasmoid/README.md similarity index 100% rename from components/dock/gen/interface/moonplasma/desktop/plasmoid/README.md rename to components/dock/gen/interface/chandra/desktop/plasmoid/README.md diff --git a/components/dock/gen/interface/moonplasma/desktop/plasmoid/ffi.mbt b/components/dock/gen/interface/chandra/desktop/plasmoid/ffi.mbt similarity index 100% rename from components/dock/gen/interface/moonplasma/desktop/plasmoid/ffi.mbt rename to components/dock/gen/interface/chandra/desktop/plasmoid/ffi.mbt diff --git a/components/dock/gen/interface/chandra/desktop/plasmoid/moon.pkg b/components/dock/gen/interface/chandra/desktop/plasmoid/moon.pkg new file mode 100644 index 0000000..cfa821b --- /dev/null +++ b/components/dock/gen/interface/chandra/desktop/plasmoid/moon.pkg @@ -0,0 +1,9 @@ +import { + "chandra/desktop/interface/chandra/desktop/types" @types, + "chandra/desktop/interface/chandra/desktop/theme" @theme, + "chandra/desktop/interface/chandra/desktop/app-catalog" @app_catalog, + "chandra/desktop/interface/chandra/desktop/app-launch" @app_launch, + "chandra/desktop/lib/dock" @logic, +} + +warnings = "-44" diff --git a/components/clock-binary/gen/interface/moonplasma/desktop/plasmoid/pkg.generated.mbti b/components/dock/gen/interface/chandra/desktop/plasmoid/pkg.generated.mbti similarity index 80% rename from components/clock-binary/gen/interface/moonplasma/desktop/plasmoid/pkg.generated.mbti rename to components/dock/gen/interface/chandra/desktop/plasmoid/pkg.generated.mbti index 339f758..1c2227b 100644 --- a/components/clock-binary/gen/interface/moonplasma/desktop/plasmoid/pkg.generated.mbti +++ b/components/dock/gen/interface/chandra/desktop/plasmoid/pkg.generated.mbti @@ -1,8 +1,8 @@ // Generated using `moon info`, DON'T EDIT IT -package "moonplasma/desktop/components/clock-binary/gen/interface/moonplasma/desktop/plasmoid" +package "chandra/desktop/components/dock/gen/interface/chandra/desktop/plasmoid" import { - "moonplasma/desktop/interface/moonplasma/desktop/types", + "chandra/desktop/interface/chandra/desktop/types", } // Values diff --git a/components/dock/gen/interface/moonplasma/desktop/plasmoid/stub.mbt b/components/dock/gen/interface/chandra/desktop/plasmoid/stub.mbt similarity index 90% rename from components/dock/gen/interface/moonplasma/desktop/plasmoid/stub.mbt rename to components/dock/gen/interface/chandra/desktop/plasmoid/stub.mbt index 5485e74..978f928 100644 --- a/components/dock/gen/interface/moonplasma/desktop/plasmoid/stub.mbt +++ b/components/dock/gen/interface/chandra/desktop/plasmoid/stub.mbt @@ -1,4 +1,4 @@ -///| Implementation of `moonplasma:desktop/plasmoid` for the dock: a row of app tiles +///| Implementation of `chandra:desktop/plasmoid` for the dock: a row of app tiles /// that magnify under the pointer and start the app on click. The tile layout and /// hit-testing live in lib/dock; this adapts host capabilities. @@ -11,7 +11,7 @@ let height : Ref[Int] = Ref::new(34) ///| pub fn info() -> PlasmoidInfo { { - id: "org.moonplasma.dock", + id: "org.chandra.dock", name: "Dock", preferred: { w: @logic.preferred_width(@app_catalog.list_apps().length()).reinterpret_as_uint(), h: 34U }, min_width: 60, diff --git a/components/dock/gen/interface/moonplasma/desktop/plasmoid/top.mbt b/components/dock/gen/interface/chandra/desktop/plasmoid/top.mbt similarity index 100% rename from components/dock/gen/interface/moonplasma/desktop/plasmoid/top.mbt rename to components/dock/gen/interface/chandra/desktop/plasmoid/top.mbt diff --git a/components/dock/gen/interface/moonplasma/desktop/plasmoid/moon.pkg b/components/dock/gen/interface/moonplasma/desktop/plasmoid/moon.pkg deleted file mode 100644 index 34a1c09..0000000 --- a/components/dock/gen/interface/moonplasma/desktop/plasmoid/moon.pkg +++ /dev/null @@ -1,9 +0,0 @@ -import { - "moonplasma/desktop/interface/moonplasma/desktop/types" @types, - "moonplasma/desktop/interface/moonplasma/desktop/theme" @theme, - "moonplasma/desktop/interface/moonplasma/desktop/app-catalog" @app_catalog, - "moonplasma/desktop/interface/moonplasma/desktop/app-launch" @app_launch, - "moonplasma/desktop/lib/dock" @logic, -} - -warnings = "-44" diff --git a/components/dock/gen/moon.pkg b/components/dock/gen/moon.pkg index d34e524..7c94468 100644 --- a/components/dock/gen/moon.pkg +++ b/components/dock/gen/moon.pkg @@ -1,5 +1,5 @@ import { - "moonplasma/desktop/components/dock/gen/interface/moonplasma/desktop/plasmoid" @plasmoid, + "chandra/desktop/components/dock/gen/interface/chandra/desktop/plasmoid" @plasmoid, } warnings = "-44" @@ -13,13 +13,13 @@ options( "heap-start-address": 16, "exports": [ "mbt_ffi_cabi_realloc:cabi_realloc", - "wasmExportInfo:moonplasma:desktop/plasmoid@0.1.0#info", - "wasmExportInfoPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#info", - "wasmExportOnEvent:moonplasma:desktop/plasmoid@0.1.0#on-event", - "wasmExportPopup:moonplasma:desktop/plasmoid@0.1.0#popup", - "wasmExportPopupPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#popup", - "wasmExportRender:moonplasma:desktop/plasmoid@0.1.0#render", - "wasmExportRenderPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#render" + "wasmExportInfo:chandra:desktop/plasmoid@0.1.0#info", + "wasmExportInfoPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#info", + "wasmExportOnEvent:chandra:desktop/plasmoid@0.1.0#on-event", + "wasmExportPopup:chandra:desktop/plasmoid@0.1.0#popup", + "wasmExportPopupPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#popup", + "wasmExportRender:chandra:desktop/plasmoid@0.1.0#render", + "wasmExportRenderPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#render" ], }, }, diff --git a/components/dock/gen/pkg.generated.mbti b/components/dock/gen/pkg.generated.mbti index ea3dc37..fa700d7 100644 --- a/components/dock/gen/pkg.generated.mbti +++ b/components/dock/gen/pkg.generated.mbti @@ -1,5 +1,5 @@ // Generated using `moon info`, DON'T EDIT IT -package "moonplasma/desktop/components/dock/gen" +package "chandra/desktop/components/dock/gen" // Values pub fn mbt_ffi_cabi_realloc(Int32, Int32, Int32, Int32) -> Int32 diff --git a/components/gfx-gui/gen/moon.pkg b/components/gfx-gui/gen/moon.pkg index 2f86fc6..3d4a8c2 100644 --- a/components/gfx-gui/gen/moon.pkg +++ b/components/gfx-gui/gen/moon.pkg @@ -1,5 +1,5 @@ import { - "moonplasma/desktop/components/gfx-gui/gen/world/gui-loader" @gui-loader, + "chandra/desktop/components/gfx-gui/gen/world/gui-loader" @gui-loader, } warnings = "-44" diff --git a/components/gfx-gui/gen/pkg.generated.mbti b/components/gfx-gui/gen/pkg.generated.mbti index 6b1ee68..4e6cf83 100644 --- a/components/gfx-gui/gen/pkg.generated.mbti +++ b/components/gfx-gui/gen/pkg.generated.mbti @@ -1,5 +1,5 @@ // Generated using `moon info`, DON'T EDIT IT -package "moonplasma/desktop/components/gfx-gui/gen" +package "chandra/desktop/components/gfx-gui/gen" // Values pub fn mbt_ffi_cabi_realloc(Int32, Int32, Int32, Int32) -> Int32 diff --git a/components/gfx-gui/gen/world/gui-loader/moon.pkg b/components/gfx-gui/gen/world/gui-loader/moon.pkg index 2f834c7..0a3fdfe 100644 --- a/components/gfx-gui/gen/world/gui-loader/moon.pkg +++ b/components/gfx-gui/gen/world/gui-loader/moon.pkg @@ -1,8 +1,8 @@ import { - "moonplasma/desktop/interface/wasi-gfx/surface/surface" @surface, - "moonplasma/desktop/interface/wasi-gfx/surface/surface-frame-buffer" @sfb, - "moonplasma/desktop/compositor/scene" @scene, - "moonplasma/desktop/compositor/renderer" @renderer, + "chandra/desktop/interface/wasi-gfx/surface/surface" @surface, + "chandra/desktop/interface/wasi-gfx/surface/surface-frame-buffer" @sfb, + "chandra/desktop/compositor/scene" @scene, + "chandra/desktop/compositor/renderer" @renderer, } warnings = "-44" diff --git a/components/gfx-gui/gen/world/gui-loader/pkg.generated.mbti b/components/gfx-gui/gen/world/gui-loader/pkg.generated.mbti index e8da194..b548b9e 100644 --- a/components/gfx-gui/gen/world/gui-loader/pkg.generated.mbti +++ b/components/gfx-gui/gen/world/gui-loader/pkg.generated.mbti @@ -1,5 +1,5 @@ // Generated using `moon info`, DON'T EDIT IT -package "moonplasma/desktop/components/gfx-gui/gen/world/gui-loader" +package "chandra/desktop/components/gfx-gui/gen/world/gui-loader" // Values pub fn init_gui(UInt32, UInt32) -> Unit diff --git a/components/gfx-gui/gen/world/gui-loader/stub.mbt b/components/gfx-gui/gen/world/gui-loader/stub.mbt index aa22689..1d9f249 100644 --- a/components/gfx-gui/gen/world/gui-loader/stub.mbt +++ b/components/gfx-gui/gen/world/gui-loader/stub.mbt @@ -1,4 +1,4 @@ -///| Moon-Plasma GUI loader component backed by wasi-gfx (surface + frame-buffer). +///| Chandra GUI loader component backed by wasi-gfx (surface + frame-buffer). priv struct GfxGuiState { mut surface : @surface.Surface? @@ -65,8 +65,8 @@ pub fn render_frame() -> Unit { let win_w = if w > 320 { w / 2 } else { w - 32 } let win_h = if h > 220 { h / 2 } else { h - 64 } let (insets, deco_ops) = @scene.build_breeze_decoration( - "moon-plasma (wasi-gfx)", - "org.moonplasma.gfx", + "chandra (wasi-gfx)", + "org.chandra.gfx", true, false, win_w + 4, @@ -75,8 +75,8 @@ pub fn render_frame() -> Unit { ) sg.windows.push({ id: 1UL, - title: "moon-plasma (wasi-gfx)", - app_id: "org.moonplasma.gfx", + title: "chandra (wasi-gfx)", + app_id: "org.chandra.gfx", focused: true, fullscreen: false, geometry: @scene.Rect::new(24, 24, win_w, win_h), diff --git a/components/inspector/gen/interface/moonplasma/desktop/plasmoid/README.md b/components/inspector/gen/interface/chandra/desktop/plasmoid/README.md similarity index 100% rename from components/inspector/gen/interface/moonplasma/desktop/plasmoid/README.md rename to components/inspector/gen/interface/chandra/desktop/plasmoid/README.md diff --git a/components/inspector/gen/interface/moonplasma/desktop/plasmoid/ffi.mbt b/components/inspector/gen/interface/chandra/desktop/plasmoid/ffi.mbt similarity index 100% rename from components/inspector/gen/interface/moonplasma/desktop/plasmoid/ffi.mbt rename to components/inspector/gen/interface/chandra/desktop/plasmoid/ffi.mbt diff --git a/components/inspector/gen/interface/chandra/desktop/plasmoid/moon.pkg b/components/inspector/gen/interface/chandra/desktop/plasmoid/moon.pkg new file mode 100644 index 0000000..577f1f3 --- /dev/null +++ b/components/inspector/gen/interface/chandra/desktop/plasmoid/moon.pkg @@ -0,0 +1,8 @@ +import { + "chandra/desktop/interface/chandra/desktop/types" @types, + "chandra/desktop/interface/chandra/desktop/theme" @theme, + "chandra/desktop/interface/chandra/desktop/inspector" @inspector, + "chandra/desktop/lib/ui" @ui, +} + +warnings = "-44" diff --git a/components/inspector/gen/interface/moonplasma/desktop/plasmoid/stub.mbt b/components/inspector/gen/interface/chandra/desktop/plasmoid/stub.mbt similarity index 89% rename from components/inspector/gen/interface/moonplasma/desktop/plasmoid/stub.mbt rename to components/inspector/gen/interface/chandra/desktop/plasmoid/stub.mbt index e16406f..db863f1 100644 --- a/components/inspector/gen/interface/moonplasma/desktop/plasmoid/stub.mbt +++ b/components/inspector/gen/interface/chandra/desktop/plasmoid/stub.mbt @@ -1,10 +1,10 @@ -///| Implementation of `moonplasma:desktop/plasmoid` for the Interface Explorer toggle: +///| Implementation of `chandra:desktop/plasmoid` for the Interface Explorer toggle: /// a panel button that switches the shell's inspect mode on and off. ///| pub fn info() -> PlasmoidInfo { { - id: "org.moonplasma.inspector", + id: "org.chandra.inspector", name: "Interface Explorer", preferred: { w: 110, h: 34 }, min_width: 60, diff --git a/components/inspector/gen/interface/moonplasma/desktop/plasmoid/top.mbt b/components/inspector/gen/interface/chandra/desktop/plasmoid/top.mbt similarity index 100% rename from components/inspector/gen/interface/moonplasma/desktop/plasmoid/top.mbt rename to components/inspector/gen/interface/chandra/desktop/plasmoid/top.mbt diff --git a/components/inspector/gen/interface/moonplasma/desktop/plasmoid/moon.pkg b/components/inspector/gen/interface/moonplasma/desktop/plasmoid/moon.pkg deleted file mode 100644 index ed6011f..0000000 --- a/components/inspector/gen/interface/moonplasma/desktop/plasmoid/moon.pkg +++ /dev/null @@ -1,8 +0,0 @@ -import { - "moonplasma/desktop/interface/moonplasma/desktop/types" @types, - "moonplasma/desktop/interface/moonplasma/desktop/theme" @theme, - "moonplasma/desktop/interface/moonplasma/desktop/inspector" @inspector, - "moonplasma/desktop/lib/ui" @ui, -} - -warnings = "-44" diff --git a/components/inspector/gen/moon.pkg b/components/inspector/gen/moon.pkg index 660d639..30c6da9 100644 --- a/components/inspector/gen/moon.pkg +++ b/components/inspector/gen/moon.pkg @@ -1,5 +1,5 @@ import { - "moonplasma/desktop/components/inspector/gen/interface/moonplasma/desktop/plasmoid" @plasmoid, + "chandra/desktop/components/inspector/gen/interface/chandra/desktop/plasmoid" @plasmoid, } warnings = "-44" @@ -13,13 +13,13 @@ options( "heap-start-address": 16, "exports": [ "mbt_ffi_cabi_realloc:cabi_realloc", - "wasmExportInfo:moonplasma:desktop/plasmoid@0.1.0#info", - "wasmExportInfoPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#info", - "wasmExportOnEvent:moonplasma:desktop/plasmoid@0.1.0#on-event", - "wasmExportPopup:moonplasma:desktop/plasmoid@0.1.0#popup", - "wasmExportPopupPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#popup", - "wasmExportRender:moonplasma:desktop/plasmoid@0.1.0#render", - "wasmExportRenderPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#render" + "wasmExportInfo:chandra:desktop/plasmoid@0.1.0#info", + "wasmExportInfoPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#info", + "wasmExportOnEvent:chandra:desktop/plasmoid@0.1.0#on-event", + "wasmExportPopup:chandra:desktop/plasmoid@0.1.0#popup", + "wasmExportPopupPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#popup", + "wasmExportRender:chandra:desktop/plasmoid@0.1.0#render", + "wasmExportRenderPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#render" ], }, }, diff --git a/components/launcher/gen/interface/moonplasma/desktop/plasmoid/README.md b/components/launcher/gen/interface/chandra/desktop/plasmoid/README.md similarity index 100% rename from components/launcher/gen/interface/moonplasma/desktop/plasmoid/README.md rename to components/launcher/gen/interface/chandra/desktop/plasmoid/README.md diff --git a/components/launcher/gen/interface/moonplasma/desktop/plasmoid/ffi.mbt b/components/launcher/gen/interface/chandra/desktop/plasmoid/ffi.mbt similarity index 100% rename from components/launcher/gen/interface/moonplasma/desktop/plasmoid/ffi.mbt rename to components/launcher/gen/interface/chandra/desktop/plasmoid/ffi.mbt diff --git a/components/launcher/gen/interface/chandra/desktop/plasmoid/moon.pkg b/components/launcher/gen/interface/chandra/desktop/plasmoid/moon.pkg new file mode 100644 index 0000000..1e88999 --- /dev/null +++ b/components/launcher/gen/interface/chandra/desktop/plasmoid/moon.pkg @@ -0,0 +1,9 @@ +import { + "chandra/desktop/interface/chandra/desktop/types" @types, + "chandra/desktop/interface/chandra/desktop/theme" @theme, + "chandra/desktop/interface/chandra/desktop/app-catalog" @app_catalog, + "chandra/desktop/interface/chandra/desktop/app-launch" @app_launch, + "chandra/desktop/lib/launcher" @logic, +} + +warnings = "-44" diff --git a/components/clock-digital/gen/interface/moonplasma/desktop/plasmoid/pkg.generated.mbti b/components/launcher/gen/interface/chandra/desktop/plasmoid/pkg.generated.mbti similarity index 80% rename from components/clock-digital/gen/interface/moonplasma/desktop/plasmoid/pkg.generated.mbti rename to components/launcher/gen/interface/chandra/desktop/plasmoid/pkg.generated.mbti index ff73348..ae3bb6b 100644 --- a/components/clock-digital/gen/interface/moonplasma/desktop/plasmoid/pkg.generated.mbti +++ b/components/launcher/gen/interface/chandra/desktop/plasmoid/pkg.generated.mbti @@ -1,8 +1,8 @@ // Generated using `moon info`, DON'T EDIT IT -package "moonplasma/desktop/components/clock-digital/gen/interface/moonplasma/desktop/plasmoid" +package "chandra/desktop/components/launcher/gen/interface/chandra/desktop/plasmoid" import { - "moonplasma/desktop/interface/moonplasma/desktop/types", + "chandra/desktop/interface/chandra/desktop/types", } // Values diff --git a/components/launcher/gen/interface/moonplasma/desktop/plasmoid/stub.mbt b/components/launcher/gen/interface/chandra/desktop/plasmoid/stub.mbt similarity index 89% rename from components/launcher/gen/interface/moonplasma/desktop/plasmoid/stub.mbt rename to components/launcher/gen/interface/chandra/desktop/plasmoid/stub.mbt index 46ae24a..f80598d 100644 --- a/components/launcher/gen/interface/moonplasma/desktop/plasmoid/stub.mbt +++ b/components/launcher/gen/interface/chandra/desktop/plasmoid/stub.mbt @@ -1,4 +1,4 @@ -///| Implementation of `moonplasma:desktop/plasmoid` for the launcher. +///| Implementation of `chandra:desktop/plasmoid` for the launcher. /// The state machine lives in lib/launcher; this adapts host capabilities. ///| @@ -7,7 +7,7 @@ let state : @logic.State = @logic.State::new() ///| pub fn info() -> PlasmoidInfo { { - id: "org.moonplasma.launcher", + id: "org.chandra.launcher", name: "Application Launcher", preferred: { w: 150, h: 34 }, min_width: 60, diff --git a/components/launcher/gen/interface/moonplasma/desktop/plasmoid/top.mbt b/components/launcher/gen/interface/chandra/desktop/plasmoid/top.mbt similarity index 100% rename from components/launcher/gen/interface/moonplasma/desktop/plasmoid/top.mbt rename to components/launcher/gen/interface/chandra/desktop/plasmoid/top.mbt diff --git a/components/launcher/gen/interface/moonplasma/desktop/plasmoid/moon.pkg b/components/launcher/gen/interface/moonplasma/desktop/plasmoid/moon.pkg deleted file mode 100644 index d247e12..0000000 --- a/components/launcher/gen/interface/moonplasma/desktop/plasmoid/moon.pkg +++ /dev/null @@ -1,9 +0,0 @@ -import { - "moonplasma/desktop/interface/moonplasma/desktop/types" @types, - "moonplasma/desktop/interface/moonplasma/desktop/theme" @theme, - "moonplasma/desktop/interface/moonplasma/desktop/app-catalog" @app_catalog, - "moonplasma/desktop/interface/moonplasma/desktop/app-launch" @app_launch, - "moonplasma/desktop/lib/launcher" @logic, -} - -warnings = "-44" diff --git a/components/launcher/gen/moon.pkg b/components/launcher/gen/moon.pkg index 818c872..bc56905 100644 --- a/components/launcher/gen/moon.pkg +++ b/components/launcher/gen/moon.pkg @@ -1,5 +1,5 @@ import { - "moonplasma/desktop/components/launcher/gen/interface/moonplasma/desktop/plasmoid" @plasmoid, + "chandra/desktop/components/launcher/gen/interface/chandra/desktop/plasmoid" @plasmoid, } warnings = "-44" @@ -13,13 +13,13 @@ options( "heap-start-address": 16, "exports": [ "mbt_ffi_cabi_realloc:cabi_realloc", - "wasmExportInfo:moonplasma:desktop/plasmoid@0.1.0#info", - "wasmExportInfoPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#info", - "wasmExportOnEvent:moonplasma:desktop/plasmoid@0.1.0#on-event", - "wasmExportPopup:moonplasma:desktop/plasmoid@0.1.0#popup", - "wasmExportPopupPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#popup", - "wasmExportRender:moonplasma:desktop/plasmoid@0.1.0#render", - "wasmExportRenderPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#render" + "wasmExportInfo:chandra:desktop/plasmoid@0.1.0#info", + "wasmExportInfoPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#info", + "wasmExportOnEvent:chandra:desktop/plasmoid@0.1.0#on-event", + "wasmExportPopup:chandra:desktop/plasmoid@0.1.0#popup", + "wasmExportPopupPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#popup", + "wasmExportRender:chandra:desktop/plasmoid@0.1.0#render", + "wasmExportRenderPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#render" ], }, }, diff --git a/components/launcher/gen/pkg.generated.mbti b/components/launcher/gen/pkg.generated.mbti index 722650d..8a80fe8 100644 --- a/components/launcher/gen/pkg.generated.mbti +++ b/components/launcher/gen/pkg.generated.mbti @@ -1,5 +1,5 @@ // Generated using `moon info`, DON'T EDIT IT -package "moonplasma/desktop/components/launcher/gen" +package "chandra/desktop/components/launcher/gen" // Values pub fn mbt_ffi_cabi_realloc(Int32, Int32, Int32, Int32) -> Int32 diff --git a/components/layout/gen/interface/moonplasma/desktop/plasmoid/README.md b/components/layout/gen/interface/chandra/desktop/plasmoid/README.md similarity index 100% rename from components/layout/gen/interface/moonplasma/desktop/plasmoid/README.md rename to components/layout/gen/interface/chandra/desktop/plasmoid/README.md diff --git a/components/layout/gen/interface/moonplasma/desktop/plasmoid/ffi.mbt b/components/layout/gen/interface/chandra/desktop/plasmoid/ffi.mbt similarity index 100% rename from components/layout/gen/interface/moonplasma/desktop/plasmoid/ffi.mbt rename to components/layout/gen/interface/chandra/desktop/plasmoid/ffi.mbt diff --git a/components/layout/gen/interface/chandra/desktop/plasmoid/moon.pkg b/components/layout/gen/interface/chandra/desktop/plasmoid/moon.pkg new file mode 100644 index 0000000..d7d94f3 --- /dev/null +++ b/components/layout/gen/interface/chandra/desktop/plasmoid/moon.pkg @@ -0,0 +1,8 @@ +import { + "chandra/desktop/interface/chandra/desktop/types" @types, + "chandra/desktop/interface/chandra/desktop/theme" @theme, + "chandra/desktop/interface/chandra/desktop/layout-control" @layout, + "chandra/desktop/lib/ui" @ui, +} + +warnings = "-44" diff --git a/components/layout/gen/interface/moonplasma/desktop/plasmoid/stub.mbt b/components/layout/gen/interface/chandra/desktop/plasmoid/stub.mbt similarity index 94% rename from components/layout/gen/interface/moonplasma/desktop/plasmoid/stub.mbt rename to components/layout/gen/interface/chandra/desktop/plasmoid/stub.mbt index e03abf0..c16d49b 100644 --- a/components/layout/gen/interface/moonplasma/desktop/plasmoid/stub.mbt +++ b/components/layout/gen/interface/chandra/desktop/plasmoid/stub.mbt @@ -1,4 +1,4 @@ -///| Implementation of `moonplasma:desktop/plasmoid` for the layout toggle: +///| Implementation of `chandra:desktop/plasmoid` for the layout toggle: /// a two-segment panel switch, "Tile | Float", that flips the window manager between /// tiling and floating. Monocle (set elsewhere) shows neither segment lit; a click /// then returns to tiling. @@ -12,7 +12,7 @@ let floating : UInt = 2 ///| pub fn info() -> PlasmoidInfo { { - id: "org.moonplasma.layout-toggle", + id: "org.chandra.layout-toggle", name: "Tile / Float", preferred: { w: 120, h: 34 }, min_width: 90, diff --git a/components/layout/gen/interface/moonplasma/desktop/plasmoid/top.mbt b/components/layout/gen/interface/chandra/desktop/plasmoid/top.mbt similarity index 100% rename from components/layout/gen/interface/moonplasma/desktop/plasmoid/top.mbt rename to components/layout/gen/interface/chandra/desktop/plasmoid/top.mbt diff --git a/components/layout/gen/interface/moonplasma/desktop/plasmoid/moon.pkg b/components/layout/gen/interface/moonplasma/desktop/plasmoid/moon.pkg deleted file mode 100644 index 2389f20..0000000 --- a/components/layout/gen/interface/moonplasma/desktop/plasmoid/moon.pkg +++ /dev/null @@ -1,8 +0,0 @@ -import { - "moonplasma/desktop/interface/moonplasma/desktop/types" @types, - "moonplasma/desktop/interface/moonplasma/desktop/theme" @theme, - "moonplasma/desktop/interface/moonplasma/desktop/layout-control" @layout, - "moonplasma/desktop/lib/ui" @ui, -} - -warnings = "-44" diff --git a/components/layout/gen/moon.pkg b/components/layout/gen/moon.pkg index 0e66bf7..39c2bba 100644 --- a/components/layout/gen/moon.pkg +++ b/components/layout/gen/moon.pkg @@ -1,5 +1,5 @@ import { - "moonplasma/desktop/components/layout/gen/interface/moonplasma/desktop/plasmoid" @plasmoid, + "chandra/desktop/components/layout/gen/interface/chandra/desktop/plasmoid" @plasmoid, } warnings = "-44" @@ -13,13 +13,13 @@ options( "heap-start-address": 16, "exports": [ "mbt_ffi_cabi_realloc:cabi_realloc", - "wasmExportInfo:moonplasma:desktop/plasmoid@0.1.0#info", - "wasmExportInfoPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#info", - "wasmExportOnEvent:moonplasma:desktop/plasmoid@0.1.0#on-event", - "wasmExportPopup:moonplasma:desktop/plasmoid@0.1.0#popup", - "wasmExportPopupPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#popup", - "wasmExportRender:moonplasma:desktop/plasmoid@0.1.0#render", - "wasmExportRenderPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#render" + "wasmExportInfo:chandra:desktop/plasmoid@0.1.0#info", + "wasmExportInfoPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#info", + "wasmExportOnEvent:chandra:desktop/plasmoid@0.1.0#on-event", + "wasmExportPopup:chandra:desktop/plasmoid@0.1.0#popup", + "wasmExportPopupPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#popup", + "wasmExportRender:chandra:desktop/plasmoid@0.1.0#render", + "wasmExportRenderPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#render" ], }, }, diff --git a/components/logout/gen/interface/moonplasma/desktop/plasmoid/README.md b/components/logout/gen/interface/chandra/desktop/plasmoid/README.md similarity index 100% rename from components/logout/gen/interface/moonplasma/desktop/plasmoid/README.md rename to components/logout/gen/interface/chandra/desktop/plasmoid/README.md diff --git a/components/logout/gen/interface/moonplasma/desktop/plasmoid/ffi.mbt b/components/logout/gen/interface/chandra/desktop/plasmoid/ffi.mbt similarity index 100% rename from components/logout/gen/interface/moonplasma/desktop/plasmoid/ffi.mbt rename to components/logout/gen/interface/chandra/desktop/plasmoid/ffi.mbt diff --git a/components/logout/gen/interface/chandra/desktop/plasmoid/moon.pkg b/components/logout/gen/interface/chandra/desktop/plasmoid/moon.pkg new file mode 100644 index 0000000..e877fce --- /dev/null +++ b/components/logout/gen/interface/chandra/desktop/plasmoid/moon.pkg @@ -0,0 +1,8 @@ +import { + "chandra/desktop/interface/chandra/desktop/types" @types, + "chandra/desktop/interface/chandra/desktop/theme" @theme, + "chandra/desktop/interface/chandra/desktop/session" @session, + "chandra/desktop/lib/ui" @ui, +} + +warnings = "-44" diff --git a/components/logout/gen/interface/moonplasma/desktop/plasmoid/stub.mbt b/components/logout/gen/interface/chandra/desktop/plasmoid/stub.mbt similarity index 96% rename from components/logout/gen/interface/moonplasma/desktop/plasmoid/stub.mbt rename to components/logout/gen/interface/chandra/desktop/plasmoid/stub.mbt index 1003e42..8c64ff1 100644 --- a/components/logout/gen/interface/moonplasma/desktop/plasmoid/stub.mbt +++ b/components/logout/gen/interface/chandra/desktop/plasmoid/stub.mbt @@ -1,4 +1,4 @@ -///| Implementation of `moonplasma:desktop/plasmoid` for the logout button. A click on the panel +///| Implementation of `chandra:desktop/plasmoid` for the logout button. A click on the panel /// button opens a small popup, "Log out | Cancel", so a stray click can't end the session; Enter /// confirms and Escape (or a click elsewhere) cancels. Confirming calls `session.logout`, which /// makes the host stop the compositor and hand the screen back to the display manager. @@ -44,7 +44,7 @@ fn close() -> Unit { ///| pub fn info() -> PlasmoidInfo { { - id: "org.moonplasma.logout", + id: "org.chandra.logout", name: "Log out", preferred: { w: 84, h: 34 }, min_width: 70, diff --git a/components/logout/gen/interface/moonplasma/desktop/plasmoid/top.mbt b/components/logout/gen/interface/chandra/desktop/plasmoid/top.mbt similarity index 100% rename from components/logout/gen/interface/moonplasma/desktop/plasmoid/top.mbt rename to components/logout/gen/interface/chandra/desktop/plasmoid/top.mbt diff --git a/components/logout/gen/interface/moonplasma/desktop/plasmoid/moon.pkg b/components/logout/gen/interface/moonplasma/desktop/plasmoid/moon.pkg deleted file mode 100644 index 42ff2f4..0000000 --- a/components/logout/gen/interface/moonplasma/desktop/plasmoid/moon.pkg +++ /dev/null @@ -1,8 +0,0 @@ -import { - "moonplasma/desktop/interface/moonplasma/desktop/types" @types, - "moonplasma/desktop/interface/moonplasma/desktop/theme" @theme, - "moonplasma/desktop/interface/moonplasma/desktop/session" @session, - "moonplasma/desktop/lib/ui" @ui, -} - -warnings = "-44" diff --git a/components/logout/gen/moon.pkg b/components/logout/gen/moon.pkg index 3d32b86..5e3cdf8 100644 --- a/components/logout/gen/moon.pkg +++ b/components/logout/gen/moon.pkg @@ -1,5 +1,5 @@ import { - "moonplasma/desktop/components/logout/gen/interface/moonplasma/desktop/plasmoid" @plasmoid, + "chandra/desktop/components/logout/gen/interface/chandra/desktop/plasmoid" @plasmoid, } warnings = "-44" @@ -13,13 +13,13 @@ options( "heap-start-address": 16, "exports": [ "mbt_ffi_cabi_realloc:cabi_realloc", - "wasmExportInfo:moonplasma:desktop/plasmoid@0.1.0#info", - "wasmExportInfoPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#info", - "wasmExportOnEvent:moonplasma:desktop/plasmoid@0.1.0#on-event", - "wasmExportPopup:moonplasma:desktop/plasmoid@0.1.0#popup", - "wasmExportPopupPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#popup", - "wasmExportRender:moonplasma:desktop/plasmoid@0.1.0#render", - "wasmExportRenderPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#render" + "wasmExportInfo:chandra:desktop/plasmoid@0.1.0#info", + "wasmExportInfoPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#info", + "wasmExportOnEvent:chandra:desktop/plasmoid@0.1.0#on-event", + "wasmExportPopup:chandra:desktop/plasmoid@0.1.0#popup", + "wasmExportPopupPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#popup", + "wasmExportRender:chandra:desktop/plasmoid@0.1.0#render", + "wasmExportRenderPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#render" ], }, }, diff --git a/components/module-manager/gen/interface/moonplasma/desktop/plasmoid/README.md b/components/module-manager/gen/interface/chandra/desktop/plasmoid/README.md similarity index 100% rename from components/module-manager/gen/interface/moonplasma/desktop/plasmoid/README.md rename to components/module-manager/gen/interface/chandra/desktop/plasmoid/README.md diff --git a/components/module-manager/gen/interface/moonplasma/desktop/plasmoid/ffi.mbt b/components/module-manager/gen/interface/chandra/desktop/plasmoid/ffi.mbt similarity index 100% rename from components/module-manager/gen/interface/moonplasma/desktop/plasmoid/ffi.mbt rename to components/module-manager/gen/interface/chandra/desktop/plasmoid/ffi.mbt diff --git a/components/module-manager/gen/interface/chandra/desktop/plasmoid/moon.pkg b/components/module-manager/gen/interface/chandra/desktop/plasmoid/moon.pkg new file mode 100644 index 0000000..487aa1d --- /dev/null +++ b/components/module-manager/gen/interface/chandra/desktop/plasmoid/moon.pkg @@ -0,0 +1,8 @@ +import { + "chandra/desktop/interface/chandra/desktop/types" @types, + "chandra/desktop/interface/chandra/desktop/theme" @theme, + "chandra/desktop/interface/chandra/desktop/modules" @modules, + "chandra/desktop/lib/ui" @ui, +} + +warnings = "-44" diff --git a/components/module-manager/gen/interface/moonplasma/desktop/plasmoid/stub.mbt b/components/module-manager/gen/interface/chandra/desktop/plasmoid/stub.mbt similarity index 97% rename from components/module-manager/gen/interface/moonplasma/desktop/plasmoid/stub.mbt rename to components/module-manager/gen/interface/chandra/desktop/plasmoid/stub.mbt index 2ee3298..903ead3 100644 --- a/components/module-manager/gen/interface/moonplasma/desktop/plasmoid/stub.mbt +++ b/components/module-manager/gen/interface/chandra/desktop/plasmoid/stub.mbt @@ -1,4 +1,4 @@ -///| Implementation of `moonplasma:desktop/plasmoid` for the module manager: a panel +///| Implementation of `chandra:desktop/plasmoid` for the module manager: a panel /// button whose popup lists the loaded instances (click to unload), every module found /// on the search path (click to load another instance) and a "Browse..." row. @@ -23,7 +23,7 @@ let popup_w : Int = 300 ///| pub fn info() -> PlasmoidInfo { { - id: "org.moonplasma.module-manager", + id: "org.chandra.module-manager", name: "Module Manager", preferred: { w: 110, h: 34 }, min_width: 60, diff --git a/components/module-manager/gen/interface/moonplasma/desktop/plasmoid/top.mbt b/components/module-manager/gen/interface/chandra/desktop/plasmoid/top.mbt similarity index 100% rename from components/module-manager/gen/interface/moonplasma/desktop/plasmoid/top.mbt rename to components/module-manager/gen/interface/chandra/desktop/plasmoid/top.mbt diff --git a/components/module-manager/gen/interface/moonplasma/desktop/plasmoid/moon.pkg b/components/module-manager/gen/interface/moonplasma/desktop/plasmoid/moon.pkg deleted file mode 100644 index fe14c81..0000000 --- a/components/module-manager/gen/interface/moonplasma/desktop/plasmoid/moon.pkg +++ /dev/null @@ -1,8 +0,0 @@ -import { - "moonplasma/desktop/interface/moonplasma/desktop/types" @types, - "moonplasma/desktop/interface/moonplasma/desktop/theme" @theme, - "moonplasma/desktop/interface/moonplasma/desktop/modules" @modules, - "moonplasma/desktop/lib/ui" @ui, -} - -warnings = "-44" diff --git a/components/module-manager/gen/moon.pkg b/components/module-manager/gen/moon.pkg index 6b0bfeb..d743f9d 100644 --- a/components/module-manager/gen/moon.pkg +++ b/components/module-manager/gen/moon.pkg @@ -1,5 +1,5 @@ import { - "moonplasma/desktop/components/module-manager/gen/interface/moonplasma/desktop/plasmoid" @plasmoid, + "chandra/desktop/components/module-manager/gen/interface/chandra/desktop/plasmoid" @plasmoid, } warnings = "-44" @@ -13,13 +13,13 @@ options( "heap-start-address": 16, "exports": [ "mbt_ffi_cabi_realloc:cabi_realloc", - "wasmExportInfo:moonplasma:desktop/plasmoid@0.1.0#info", - "wasmExportInfoPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#info", - "wasmExportOnEvent:moonplasma:desktop/plasmoid@0.1.0#on-event", - "wasmExportPopup:moonplasma:desktop/plasmoid@0.1.0#popup", - "wasmExportPopupPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#popup", - "wasmExportRender:moonplasma:desktop/plasmoid@0.1.0#render", - "wasmExportRenderPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#render" + "wasmExportInfo:chandra:desktop/plasmoid@0.1.0#info", + "wasmExportInfoPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#info", + "wasmExportOnEvent:chandra:desktop/plasmoid@0.1.0#on-event", + "wasmExportPopup:chandra:desktop/plasmoid@0.1.0#popup", + "wasmExportPopupPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#popup", + "wasmExportRender:chandra:desktop/plasmoid@0.1.0#render", + "wasmExportRenderPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#render" ], }, }, diff --git a/components/shell/gen/interface/moonplasma/desktop/desktop-surface/README.md b/components/shell/gen/interface/chandra/desktop/desktop-surface/README.md similarity index 100% rename from components/shell/gen/interface/moonplasma/desktop/desktop-surface/README.md rename to components/shell/gen/interface/chandra/desktop/desktop-surface/README.md diff --git a/components/shell/gen/interface/moonplasma/desktop/desktop-surface/ffi.mbt b/components/shell/gen/interface/chandra/desktop/desktop-surface/ffi.mbt similarity index 100% rename from components/shell/gen/interface/moonplasma/desktop/desktop-surface/ffi.mbt rename to components/shell/gen/interface/chandra/desktop/desktop-surface/ffi.mbt diff --git a/components/shell/gen/interface/chandra/desktop/desktop-surface/moon.pkg b/components/shell/gen/interface/chandra/desktop/desktop-surface/moon.pkg new file mode 100644 index 0000000..a6c91fa --- /dev/null +++ b/components/shell/gen/interface/chandra/desktop/desktop-surface/moon.pkg @@ -0,0 +1,7 @@ +import { + "chandra/desktop/interface/chandra/desktop/types" @types, + "chandra/desktop/interface/chandra/desktop/theme" @theme, + "chandra/desktop/lib/shell" @logic, +} + +warnings = "-44" diff --git a/components/shell/gen/interface/moonplasma/desktop/desktop-surface/pkg.generated.mbti b/components/shell/gen/interface/chandra/desktop/desktop-surface/pkg.generated.mbti similarity index 55% rename from components/shell/gen/interface/moonplasma/desktop/desktop-surface/pkg.generated.mbti rename to components/shell/gen/interface/chandra/desktop/desktop-surface/pkg.generated.mbti index 47ee755..d6c1292 100644 --- a/components/shell/gen/interface/moonplasma/desktop/desktop-surface/pkg.generated.mbti +++ b/components/shell/gen/interface/chandra/desktop/desktop-surface/pkg.generated.mbti @@ -1,8 +1,8 @@ // Generated using `moon info`, DON'T EDIT IT -package "moonplasma/desktop/components/shell/gen/interface/moonplasma/desktop/desktop-surface" +package "chandra/desktop/components/shell/gen/interface/chandra/desktop/desktop-surface" import { - "moonplasma/desktop/interface/moonplasma/desktop/types", + "chandra/desktop/interface/chandra/desktop/types", } // Values diff --git a/components/shell/gen/interface/moonplasma/desktop/desktop-surface/stub.mbt b/components/shell/gen/interface/chandra/desktop/desktop-surface/stub.mbt similarity index 67% rename from components/shell/gen/interface/moonplasma/desktop/desktop-surface/stub.mbt rename to components/shell/gen/interface/chandra/desktop/desktop-surface/stub.mbt index 15f7f97..7256d3e 100644 --- a/components/shell/gen/interface/moonplasma/desktop/desktop-surface/stub.mbt +++ b/components/shell/gen/interface/chandra/desktop/desktop-surface/stub.mbt @@ -1,4 +1,4 @@ -///| `moonplasma:desktop/desktop-surface` for the reference shell. +///| `chandra:desktop/desktop-surface` for the reference shell. ///| pub fn render_background(screen : @types.Size) -> Array[@types.DrawOp] { diff --git a/components/shell/gen/interface/moonplasma/desktop/desktop-surface/top.mbt b/components/shell/gen/interface/chandra/desktop/desktop-surface/top.mbt similarity index 100% rename from components/shell/gen/interface/moonplasma/desktop/desktop-surface/top.mbt rename to components/shell/gen/interface/chandra/desktop/desktop-surface/top.mbt diff --git a/components/shell/gen/interface/moonplasma/desktop/panel-layout/README.md b/components/shell/gen/interface/chandra/desktop/panel-layout/README.md similarity index 100% rename from components/shell/gen/interface/moonplasma/desktop/panel-layout/README.md rename to components/shell/gen/interface/chandra/desktop/panel-layout/README.md diff --git a/components/shell/gen/interface/moonplasma/desktop/panel-layout/ffi.mbt b/components/shell/gen/interface/chandra/desktop/panel-layout/ffi.mbt similarity index 100% rename from components/shell/gen/interface/moonplasma/desktop/panel-layout/ffi.mbt rename to components/shell/gen/interface/chandra/desktop/panel-layout/ffi.mbt diff --git a/components/shell/gen/interface/chandra/desktop/panel-layout/moon.pkg b/components/shell/gen/interface/chandra/desktop/panel-layout/moon.pkg new file mode 100644 index 0000000..b9f7772 --- /dev/null +++ b/components/shell/gen/interface/chandra/desktop/panel-layout/moon.pkg @@ -0,0 +1,9 @@ +import { + "chandra/desktop/interface/chandra/desktop/types" @types, + "chandra/desktop/interface/chandra/desktop/theme" @theme, + "chandra/desktop/lib/shell" @shell, + "chandra/desktop/lib/panel" @panel, + "chandra/desktop/lib/ui" @ui, +} + +warnings = "-44" diff --git a/components/shell/gen/interface/moonplasma/desktop/panel-layout/pkg.generated.mbti b/components/shell/gen/interface/chandra/desktop/panel-layout/pkg.generated.mbti similarity index 82% rename from components/shell/gen/interface/moonplasma/desktop/panel-layout/pkg.generated.mbti rename to components/shell/gen/interface/chandra/desktop/panel-layout/pkg.generated.mbti index 13cbc45..be59803 100644 --- a/components/shell/gen/interface/moonplasma/desktop/panel-layout/pkg.generated.mbti +++ b/components/shell/gen/interface/chandra/desktop/panel-layout/pkg.generated.mbti @@ -1,8 +1,8 @@ // Generated using `moon info`, DON'T EDIT IT -package "moonplasma/desktop/components/shell/gen/interface/moonplasma/desktop/panel-layout" +package "chandra/desktop/components/shell/gen/interface/chandra/desktop/panel-layout" import { - "moonplasma/desktop/interface/moonplasma/desktop/types", + "chandra/desktop/interface/chandra/desktop/types", } // Values diff --git a/components/shell/gen/interface/moonplasma/desktop/panel-layout/stub.mbt b/components/shell/gen/interface/chandra/desktop/panel-layout/stub.mbt similarity index 95% rename from components/shell/gen/interface/moonplasma/desktop/panel-layout/stub.mbt rename to components/shell/gen/interface/chandra/desktop/panel-layout/stub.mbt index 52c3b06..1f8f564 100644 --- a/components/shell/gen/interface/moonplasma/desktop/panel-layout/stub.mbt +++ b/components/shell/gen/interface/chandra/desktop/panel-layout/stub.mbt @@ -1,4 +1,4 @@ -///| `moonplasma:desktop/panel-layout` for the reference shell. Geometry is in +///| `chandra:desktop/panel-layout` for the reference shell. Geometry is in /// lib/panel (pure, unit-tested); this adapts the WIT records. ///| diff --git a/components/shell/gen/interface/moonplasma/desktop/panel-layout/top.mbt b/components/shell/gen/interface/chandra/desktop/panel-layout/top.mbt similarity index 100% rename from components/shell/gen/interface/moonplasma/desktop/panel-layout/top.mbt rename to components/shell/gen/interface/chandra/desktop/panel-layout/top.mbt diff --git a/components/shell/gen/interface/moonplasma/desktop/desktop-surface/moon.pkg b/components/shell/gen/interface/moonplasma/desktop/desktop-surface/moon.pkg deleted file mode 100644 index 9600f3f..0000000 --- a/components/shell/gen/interface/moonplasma/desktop/desktop-surface/moon.pkg +++ /dev/null @@ -1,7 +0,0 @@ -import { - "moonplasma/desktop/interface/moonplasma/desktop/types" @types, - "moonplasma/desktop/interface/moonplasma/desktop/theme" @theme, - "moonplasma/desktop/lib/shell" @logic, -} - -warnings = "-44" diff --git a/components/shell/gen/interface/moonplasma/desktop/panel-layout/moon.pkg b/components/shell/gen/interface/moonplasma/desktop/panel-layout/moon.pkg deleted file mode 100644 index b9a3b05..0000000 --- a/components/shell/gen/interface/moonplasma/desktop/panel-layout/moon.pkg +++ /dev/null @@ -1,9 +0,0 @@ -import { - "moonplasma/desktop/interface/moonplasma/desktop/types" @types, - "moonplasma/desktop/interface/moonplasma/desktop/theme" @theme, - "moonplasma/desktop/lib/shell" @shell, - "moonplasma/desktop/lib/panel" @panel, - "moonplasma/desktop/lib/ui" @ui, -} - -warnings = "-44" diff --git a/components/shell/gen/moon.pkg b/components/shell/gen/moon.pkg index dce6bcc..b62d027 100644 --- a/components/shell/gen/moon.pkg +++ b/components/shell/gen/moon.pkg @@ -1,6 +1,6 @@ import { - "moonplasma/desktop/components/shell/gen/interface/moonplasma/desktop/desktop-surface" @desktop-surface, - "moonplasma/desktop/components/shell/gen/interface/moonplasma/desktop/panel-layout" @panel-layout, + "chandra/desktop/components/shell/gen/interface/chandra/desktop/desktop-surface" @desktop-surface, + "chandra/desktop/components/shell/gen/interface/chandra/desktop/panel-layout" @panel-layout, } warnings = "-44" @@ -14,13 +14,13 @@ options( "heap-start-address": 16, "exports": [ "mbt_ffi_cabi_realloc:cabi_realloc", - "wasmExportComputeLayout:moonplasma:desktop/panel-layout@0.1.0#compute-layout", - "wasmExportComputeLayoutPostReturn:cabi_post_moonplasma:desktop/panel-layout@0.1.0#compute-layout", - "wasmExportPopupPosition:moonplasma:desktop/panel-layout@0.1.0#popup-position", - "wasmExportRenderBackground:moonplasma:desktop/desktop-surface@0.1.0#render-background", - "wasmExportRenderBackgroundPostReturn:cabi_post_moonplasma:desktop/desktop-surface@0.1.0#render-background", - "wasmExportRenderPanel:moonplasma:desktop/panel-layout@0.1.0#render-panel", - "wasmExportRenderPanelPostReturn:cabi_post_moonplasma:desktop/panel-layout@0.1.0#render-panel" + "wasmExportComputeLayout:chandra:desktop/panel-layout@0.1.0#compute-layout", + "wasmExportComputeLayoutPostReturn:cabi_post_chandra:desktop/panel-layout@0.1.0#compute-layout", + "wasmExportPopupPosition:chandra:desktop/panel-layout@0.1.0#popup-position", + "wasmExportRenderBackground:chandra:desktop/desktop-surface@0.1.0#render-background", + "wasmExportRenderBackgroundPostReturn:cabi_post_chandra:desktop/desktop-surface@0.1.0#render-background", + "wasmExportRenderPanel:chandra:desktop/panel-layout@0.1.0#render-panel", + "wasmExportRenderPanelPostReturn:cabi_post_chandra:desktop/panel-layout@0.1.0#render-panel" ], }, }, diff --git a/components/shell/gen/pkg.generated.mbti b/components/shell/gen/pkg.generated.mbti index 5804a30..4c9d251 100644 --- a/components/shell/gen/pkg.generated.mbti +++ b/components/shell/gen/pkg.generated.mbti @@ -1,5 +1,5 @@ // Generated using `moon info`, DON'T EDIT IT -package "moonplasma/desktop/components/shell/gen" +package "chandra/desktop/components/shell/gen" // Values pub fn mbt_ffi_cabi_realloc(Int32, Int32, Int32, Int32) -> Int32 diff --git a/components/tasks/gen/interface/moonplasma/desktop/plasmoid/README.md b/components/tasks/gen/interface/chandra/desktop/plasmoid/README.md similarity index 100% rename from components/tasks/gen/interface/moonplasma/desktop/plasmoid/README.md rename to components/tasks/gen/interface/chandra/desktop/plasmoid/README.md diff --git a/components/tasks/gen/interface/moonplasma/desktop/plasmoid/ffi.mbt b/components/tasks/gen/interface/chandra/desktop/plasmoid/ffi.mbt similarity index 100% rename from components/tasks/gen/interface/moonplasma/desktop/plasmoid/ffi.mbt rename to components/tasks/gen/interface/chandra/desktop/plasmoid/ffi.mbt diff --git a/components/tasks/gen/interface/chandra/desktop/plasmoid/moon.pkg b/components/tasks/gen/interface/chandra/desktop/plasmoid/moon.pkg new file mode 100644 index 0000000..4e791c1 --- /dev/null +++ b/components/tasks/gen/interface/chandra/desktop/plasmoid/moon.pkg @@ -0,0 +1,8 @@ +import { + "chandra/desktop/interface/chandra/desktop/types" @types, + "chandra/desktop/interface/chandra/desktop/theme" @theme, + "chandra/desktop/interface/chandra/desktop/windows" @windows, + "chandra/desktop/lib/ui" @ui, +} + +warnings = "-44" diff --git a/components/tasks/gen/interface/moonplasma/desktop/plasmoid/stub.mbt b/components/tasks/gen/interface/chandra/desktop/plasmoid/stub.mbt similarity index 96% rename from components/tasks/gen/interface/moonplasma/desktop/plasmoid/stub.mbt rename to components/tasks/gen/interface/chandra/desktop/plasmoid/stub.mbt index b3ef5ef..f3686b0 100644 --- a/components/tasks/gen/interface/moonplasma/desktop/plasmoid/stub.mbt +++ b/components/tasks/gen/interface/chandra/desktop/plasmoid/stub.mbt @@ -1,4 +1,4 @@ -///| Implementation of `moonplasma:desktop/plasmoid` for the task manager: one pill per open +///| Implementation of `chandra:desktop/plasmoid` for the task manager: one pill per open /// window, in the order the windows were opened (so the bar doesn't reshuffle when focus changes). /// The focused window's pill is lit, a minimized window's is dimmed; a click focuses the window and /// restores it if it was minimized. When the bar is too narrow the pills shrink to fit. @@ -78,7 +78,7 @@ fn fit_text(s : String, size : Int, max_w : Int) -> String { ///| pub fn info() -> PlasmoidInfo { { - id: "org.moonplasma.tasks", + id: "org.chandra.tasks", name: "Task Manager", preferred: { w: 300, h: 34 }, min_width: 120, diff --git a/components/tasks/gen/interface/moonplasma/desktop/plasmoid/top.mbt b/components/tasks/gen/interface/chandra/desktop/plasmoid/top.mbt similarity index 100% rename from components/tasks/gen/interface/moonplasma/desktop/plasmoid/top.mbt rename to components/tasks/gen/interface/chandra/desktop/plasmoid/top.mbt diff --git a/components/tasks/gen/interface/moonplasma/desktop/plasmoid/moon.pkg b/components/tasks/gen/interface/moonplasma/desktop/plasmoid/moon.pkg deleted file mode 100644 index 7fa78e1..0000000 --- a/components/tasks/gen/interface/moonplasma/desktop/plasmoid/moon.pkg +++ /dev/null @@ -1,8 +0,0 @@ -import { - "moonplasma/desktop/interface/moonplasma/desktop/types" @types, - "moonplasma/desktop/interface/moonplasma/desktop/theme" @theme, - "moonplasma/desktop/interface/moonplasma/desktop/windows" @windows, - "moonplasma/desktop/lib/ui" @ui, -} - -warnings = "-44" diff --git a/components/tasks/gen/moon.pkg b/components/tasks/gen/moon.pkg index f6b065d..6e9e6eb 100644 --- a/components/tasks/gen/moon.pkg +++ b/components/tasks/gen/moon.pkg @@ -1,5 +1,5 @@ import { - "moonplasma/desktop/components/tasks/gen/interface/moonplasma/desktop/plasmoid" @plasmoid, + "chandra/desktop/components/tasks/gen/interface/chandra/desktop/plasmoid" @plasmoid, } warnings = "-44" @@ -13,13 +13,13 @@ options( "heap-start-address": 16, "exports": [ "mbt_ffi_cabi_realloc:cabi_realloc", - "wasmExportInfo:moonplasma:desktop/plasmoid@0.1.0#info", - "wasmExportInfoPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#info", - "wasmExportOnEvent:moonplasma:desktop/plasmoid@0.1.0#on-event", - "wasmExportPopup:moonplasma:desktop/plasmoid@0.1.0#popup", - "wasmExportPopupPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#popup", - "wasmExportRender:moonplasma:desktop/plasmoid@0.1.0#render", - "wasmExportRenderPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#render" + "wasmExportInfo:chandra:desktop/plasmoid@0.1.0#info", + "wasmExportInfoPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#info", + "wasmExportOnEvent:chandra:desktop/plasmoid@0.1.0#on-event", + "wasmExportPopup:chandra:desktop/plasmoid@0.1.0#popup", + "wasmExportPopupPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#popup", + "wasmExportRender:chandra:desktop/plasmoid@0.1.0#render", + "wasmExportRenderPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#render" ], }, }, diff --git a/components/wallpaper/gen/interface/moonplasma/desktop/plasmoid/README.md b/components/wallpaper/gen/interface/chandra/desktop/plasmoid/README.md similarity index 100% rename from components/wallpaper/gen/interface/moonplasma/desktop/plasmoid/README.md rename to components/wallpaper/gen/interface/chandra/desktop/plasmoid/README.md diff --git a/components/wallpaper/gen/interface/moonplasma/desktop/plasmoid/ffi.mbt b/components/wallpaper/gen/interface/chandra/desktop/plasmoid/ffi.mbt similarity index 100% rename from components/wallpaper/gen/interface/moonplasma/desktop/plasmoid/ffi.mbt rename to components/wallpaper/gen/interface/chandra/desktop/plasmoid/ffi.mbt diff --git a/components/wallpaper/gen/interface/chandra/desktop/plasmoid/moon.pkg b/components/wallpaper/gen/interface/chandra/desktop/plasmoid/moon.pkg new file mode 100644 index 0000000..fe29133 --- /dev/null +++ b/components/wallpaper/gen/interface/chandra/desktop/plasmoid/moon.pkg @@ -0,0 +1,8 @@ +import { + "chandra/desktop/interface/chandra/desktop/types" @types, + "chandra/desktop/interface/chandra/desktop/theme" @theme, + "chandra/desktop/interface/chandra/desktop/wallpaper" @wallpaper, + "chandra/desktop/lib/ui" @ui, +} + +warnings = "-44" diff --git a/components/wallpaper/gen/interface/moonplasma/desktop/plasmoid/stub.mbt b/components/wallpaper/gen/interface/chandra/desktop/plasmoid/stub.mbt similarity index 97% rename from components/wallpaper/gen/interface/moonplasma/desktop/plasmoid/stub.mbt rename to components/wallpaper/gen/interface/chandra/desktop/plasmoid/stub.mbt index 51eb6dd..f38ef31 100644 --- a/components/wallpaper/gen/interface/moonplasma/desktop/plasmoid/stub.mbt +++ b/components/wallpaper/gen/interface/chandra/desktop/plasmoid/stub.mbt @@ -1,4 +1,4 @@ -///| Implementation of `moonplasma:desktop/plasmoid` for the wallpaper chooser. The panel button +///| Implementation of `chandra:desktop/plasmoid` for the wallpaper chooser. The panel button /// opens a popup listing the wallpapers the shell can draw (`wallpaper.wallpapers`), the current /// one ticked. Clicking a row switches the desktop to it at once (the list stays open to compare); Enter /// picks the highlighted row and closes, Escape or a click elsewhere closes. The shell remembers the choice across restarts. @@ -58,7 +58,7 @@ fn choose(i : Int) -> Unit { ///| pub fn info() -> PlasmoidInfo { { - id: "org.moonplasma.wallpaper", + id: "org.chandra.wallpaper", name: "Wallpaper", preferred: { w: 96, h: 34 }, min_width: 70, diff --git a/components/wallpaper/gen/interface/moonplasma/desktop/plasmoid/top.mbt b/components/wallpaper/gen/interface/chandra/desktop/plasmoid/top.mbt similarity index 100% rename from components/wallpaper/gen/interface/moonplasma/desktop/plasmoid/top.mbt rename to components/wallpaper/gen/interface/chandra/desktop/plasmoid/top.mbt diff --git a/components/wallpaper/gen/interface/moonplasma/desktop/plasmoid/moon.pkg b/components/wallpaper/gen/interface/moonplasma/desktop/plasmoid/moon.pkg deleted file mode 100644 index 42a8b82..0000000 --- a/components/wallpaper/gen/interface/moonplasma/desktop/plasmoid/moon.pkg +++ /dev/null @@ -1,8 +0,0 @@ -import { - "moonplasma/desktop/interface/moonplasma/desktop/types" @types, - "moonplasma/desktop/interface/moonplasma/desktop/theme" @theme, - "moonplasma/desktop/interface/moonplasma/desktop/wallpaper" @wallpaper, - "moonplasma/desktop/lib/ui" @ui, -} - -warnings = "-44" diff --git a/components/wallpaper/gen/moon.pkg b/components/wallpaper/gen/moon.pkg index 8855def..1568760 100644 --- a/components/wallpaper/gen/moon.pkg +++ b/components/wallpaper/gen/moon.pkg @@ -1,5 +1,5 @@ import { - "moonplasma/desktop/components/wallpaper/gen/interface/moonplasma/desktop/plasmoid" @plasmoid, + "chandra/desktop/components/wallpaper/gen/interface/chandra/desktop/plasmoid" @plasmoid, } warnings = "-44" @@ -13,13 +13,13 @@ options( "heap-start-address": 16, "exports": [ "mbt_ffi_cabi_realloc:cabi_realloc", - "wasmExportInfo:moonplasma:desktop/plasmoid@0.1.0#info", - "wasmExportInfoPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#info", - "wasmExportOnEvent:moonplasma:desktop/plasmoid@0.1.0#on-event", - "wasmExportPopup:moonplasma:desktop/plasmoid@0.1.0#popup", - "wasmExportPopupPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#popup", - "wasmExportRender:moonplasma:desktop/plasmoid@0.1.0#render", - "wasmExportRenderPostReturn:cabi_post_moonplasma:desktop/plasmoid@0.1.0#render" + "wasmExportInfo:chandra:desktop/plasmoid@0.1.0#info", + "wasmExportInfoPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#info", + "wasmExportOnEvent:chandra:desktop/plasmoid@0.1.0#on-event", + "wasmExportPopup:chandra:desktop/plasmoid@0.1.0#popup", + "wasmExportPopupPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#popup", + "wasmExportRender:chandra:desktop/plasmoid@0.1.0#render", + "wasmExportRenderPostReturn:cabi_post_chandra:desktop/plasmoid@0.1.0#render" ], }, }, diff --git a/components/wm-hybrid/gen/interface/moonplasma/wm/policy/ffi.mbt b/components/wm-hybrid/gen/interface/chandra/wm/policy/ffi.mbt similarity index 100% rename from components/wm-hybrid/gen/interface/moonplasma/wm/policy/ffi.mbt rename to components/wm-hybrid/gen/interface/chandra/wm/policy/ffi.mbt diff --git a/components/wm-hybrid/gen/interface/chandra/wm/policy/moon.pkg b/components/wm-hybrid/gen/interface/chandra/wm/policy/moon.pkg new file mode 100644 index 0000000..19a91c8 --- /dev/null +++ b/components/wm-hybrid/gen/interface/chandra/wm/policy/moon.pkg @@ -0,0 +1,7 @@ +import { + "chandra/desktop/interface/chandra/desktop/types" @types, + "chandra/desktop/interface/chandra/desktop/theme" @theme, + "chandra/desktop/lib/wm" @wm, +} + +warnings = "-44" diff --git a/components/wm-hybrid/gen/interface/moonplasma/wm/policy/pkg.generated.mbti b/components/wm-hybrid/gen/interface/chandra/wm/policy/pkg.generated.mbti similarity index 92% rename from components/wm-hybrid/gen/interface/moonplasma/wm/policy/pkg.generated.mbti rename to components/wm-hybrid/gen/interface/chandra/wm/policy/pkg.generated.mbti index c611880..298b1d1 100644 --- a/components/wm-hybrid/gen/interface/moonplasma/wm/policy/pkg.generated.mbti +++ b/components/wm-hybrid/gen/interface/chandra/wm/policy/pkg.generated.mbti @@ -1,8 +1,8 @@ // Generated using `moon info`, DON'T EDIT IT -package "moonplasma/desktop/components/wm-hybrid/gen/interface/moonplasma/wm/policy" +package "chandra/desktop/components/wm-hybrid/gen/interface/chandra/wm/policy" import { - "moonplasma/desktop/interface/moonplasma/desktop/types", + "chandra/desktop/interface/chandra/desktop/types", } // Values diff --git a/components/wm-hybrid/gen/interface/moonplasma/wm/policy/stub.mbt b/components/wm-hybrid/gen/interface/chandra/wm/policy/stub.mbt similarity index 98% rename from components/wm-hybrid/gen/interface/moonplasma/wm/policy/stub.mbt rename to components/wm-hybrid/gen/interface/chandra/wm/policy/stub.mbt index 677917b..a66f34f 100644 --- a/components/wm-hybrid/gen/interface/moonplasma/wm/policy/stub.mbt +++ b/components/wm-hybrid/gen/interface/chandra/wm/policy/stub.mbt @@ -1,4 +1,4 @@ -///| `moonplasma:wm/policy` hybrid WM component backed by `lib/wm`. +///| `chandra:wm/policy` hybrid WM component backed by `lib/wm`. ///| let state : @wm.WmState = @wm.WmState::new() diff --git a/components/wm-hybrid/gen/interface/moonplasma/wm/policy/top.mbt b/components/wm-hybrid/gen/interface/chandra/wm/policy/top.mbt similarity index 100% rename from components/wm-hybrid/gen/interface/moonplasma/wm/policy/top.mbt rename to components/wm-hybrid/gen/interface/chandra/wm/policy/top.mbt diff --git a/components/wm-hybrid/gen/interface/moonplasma/wm/policy/moon.pkg b/components/wm-hybrid/gen/interface/moonplasma/wm/policy/moon.pkg deleted file mode 100644 index 6632ca8..0000000 --- a/components/wm-hybrid/gen/interface/moonplasma/wm/policy/moon.pkg +++ /dev/null @@ -1,7 +0,0 @@ -import { - "moonplasma/desktop/interface/moonplasma/desktop/types" @types, - "moonplasma/desktop/interface/moonplasma/desktop/theme" @theme, - "moonplasma/desktop/lib/wm" @wm, -} - -warnings = "-44" diff --git a/components/wm-hybrid/gen/moon.pkg b/components/wm-hybrid/gen/moon.pkg index 175d412..5fe31c1 100644 --- a/components/wm-hybrid/gen/moon.pkg +++ b/components/wm-hybrid/gen/moon.pkg @@ -1,5 +1,5 @@ import { - "moonplasma/desktop/components/wm-hybrid/gen/interface/moonplasma/wm/policy" @policy, + "chandra/desktop/components/wm-hybrid/gen/interface/chandra/wm/policy" @policy, } warnings = "-44" @@ -13,19 +13,19 @@ options( "heap-start-address": 16, "exports": [ "mbt_ffi_cabi_realloc:cabi_realloc", - "wasmExportOnPointer:moonplasma:wm/policy@0.2.0#on-pointer", - "wasmExportOnWindowClose:moonplasma:wm/policy@0.2.0#on-window-close", - "wasmExportOnWindowClosePostReturn:cabi_post_moonplasma:wm/policy@0.2.0#on-window-close", - "wasmExportOnWindowOpen:moonplasma:wm/policy@0.2.0#on-window-open", - "wasmExportOnWindowOpenPostReturn:cabi_post_moonplasma:wm/policy@0.2.0#on-window-open", - "wasmExportOnWindowRequest:moonplasma:wm/policy@0.2.0#on-window-request", - "wasmExportOnWindowRequestPostReturn:cabi_post_moonplasma:wm/policy@0.2.0#on-window-request", - "wasmExportSetLayoutMode:moonplasma:wm/policy@0.2.0#set-layout-mode", - "wasmExportSetLayoutModePostReturn:cabi_post_moonplasma:wm/policy@0.2.0#set-layout-mode", - "wasmExportStackingOrder:moonplasma:wm/policy@0.2.0#stacking-order", - "wasmExportStackingOrderPostReturn:cabi_post_moonplasma:wm/policy@0.2.0#stacking-order", - "wasmExportSyncWindows:moonplasma:wm/policy@0.2.0#sync-windows", - "wasmExportSyncWindowsPostReturn:cabi_post_moonplasma:wm/policy@0.2.0#sync-windows" + "wasmExportOnPointer:chandra:wm/policy@0.2.0#on-pointer", + "wasmExportOnWindowClose:chandra:wm/policy@0.2.0#on-window-close", + "wasmExportOnWindowClosePostReturn:cabi_post_chandra:wm/policy@0.2.0#on-window-close", + "wasmExportOnWindowOpen:chandra:wm/policy@0.2.0#on-window-open", + "wasmExportOnWindowOpenPostReturn:cabi_post_chandra:wm/policy@0.2.0#on-window-open", + "wasmExportOnWindowRequest:chandra:wm/policy@0.2.0#on-window-request", + "wasmExportOnWindowRequestPostReturn:cabi_post_chandra:wm/policy@0.2.0#on-window-request", + "wasmExportSetLayoutMode:chandra:wm/policy@0.2.0#set-layout-mode", + "wasmExportSetLayoutModePostReturn:cabi_post_chandra:wm/policy@0.2.0#set-layout-mode", + "wasmExportStackingOrder:chandra:wm/policy@0.2.0#stacking-order", + "wasmExportStackingOrderPostReturn:cabi_post_chandra:wm/policy@0.2.0#stacking-order", + "wasmExportSyncWindows:chandra:wm/policy@0.2.0#sync-windows", + "wasmExportSyncWindowsPostReturn:cabi_post_chandra:wm/policy@0.2.0#sync-windows" ], }, }, diff --git a/components/wm-hybrid/gen/pkg.generated.mbti b/components/wm-hybrid/gen/pkg.generated.mbti index c4f231f..2448940 100644 --- a/components/wm-hybrid/gen/pkg.generated.mbti +++ b/components/wm-hybrid/gen/pkg.generated.mbti @@ -1,5 +1,5 @@ // Generated using `moon info`, DON'T EDIT IT -package "moonplasma/desktop/components/wm-hybrid/gen" +package "chandra/desktop/components/wm-hybrid/gen" // Values pub fn mbt_ffi_cabi_realloc(Int32, Int32, Int32, Int32) -> Int32 diff --git a/compositor/app/app.mbt b/compositor/app/app.mbt index 7b7a224..f64dcbe 100644 --- a/compositor/app/app.mbt +++ b/compositor/app/app.mbt @@ -123,7 +123,7 @@ pub fn run(args : Array[String]) -> Int { let gfx_surface = @gfx.Surface::new({ width: Some(width), height: Some(height) }) - match @host.MoonPlasmaCompositor::new(socket_path, theme, width, height) { + match @host.ChandraCompositor::new(socket_path, theme, width, height) { None => { match kms { Some(k) => k.close() @@ -155,7 +155,7 @@ pub fn run(args : Array[String]) -> Int { "" => "/tmp" d => d } - match @nested.NestedWindow::open(display, rt, "moon-plasma", "moon-plasma", width, height) { + match @nested.NestedWindow::open(display, rt, "chandra", "chandra", width, height) { Some(n) => Some(n) None => { @sys.log("failed to open a window on the host Wayland display") @@ -170,7 +170,7 @@ pub fn run(args : Array[String]) -> Int { Some(k) => comp.server.set_keymap(k.keymap) None => () } - @sys.log("moon-plasma compositor listening on " + socket_path) + @sys.log("chandra compositor listening on " + socket_path) let mut frames = 0 // A changed frame waits here until the display can take it (no page flip in flight). let mut need_present = true diff --git a/compositor/app/moon.pkg b/compositor/app/moon.pkg index 46c9881..b921eb4 100644 --- a/compositor/app/moon.pkg +++ b/compositor/app/moon.pkg @@ -1,13 +1,13 @@ import { "moonbitlang/core/builtin", - "moonplasma/desktop/compositor/sys" @sys, - "moonplasma/desktop/compositor/scene" @scene, - "moonplasma/desktop/compositor/renderer" @renderer, - "moonplasma/desktop/compositor/gfx" @gfx, - "moonplasma/desktop/compositor/host" @host, - "moonplasma/desktop/compositor/nested" @nested, - "moonplasma/desktop/compositor/kms" @kms, - "moonplasma/desktop/compositor/raster" @raster, + "chandra/desktop/compositor/sys" @sys, + "chandra/desktop/compositor/scene" @scene, + "chandra/desktop/compositor/renderer" @renderer, + "chandra/desktop/compositor/gfx" @gfx, + "chandra/desktop/compositor/host" @host, + "chandra/desktop/compositor/nested" @nested, + "chandra/desktop/compositor/kms" @kms, + "chandra/desktop/compositor/raster" @raster, } supported_targets = "+native+wasm" diff --git a/compositor/app/pkg.generated.mbti b/compositor/app/pkg.generated.mbti index a67c0c1..6d39a93 100644 --- a/compositor/app/pkg.generated.mbti +++ b/compositor/app/pkg.generated.mbti @@ -1,5 +1,5 @@ // Generated using `moon info`, DON'T EDIT IT -package "moonplasma/desktop/compositor/app" +package "chandra/desktop/compositor/app" // Values pub fn run(Array[String]) -> Int32 diff --git a/compositor/bin/main.mbt b/compositor/bin/main.mbt index 871dbbc..b9eede3 100644 --- a/compositor/bin/main.mbt +++ b/compositor/bin/main.mbt @@ -73,7 +73,7 @@ fn main { }) let gfx_ctx = @gfx.SurfaceFrameBufferContext::new(gfx_surface) - match @host.MoonPlasmaCompositor::new(socket_path, theme, width, height) { + match @host.ChandraCompositor::new(socket_path, theme, width, height) { Some(comp) => { comp.shell.persist = true // remember which modules are loaded in the panel comp.restore_state() // and the layout mode and recent apps from the last session @@ -101,7 +101,7 @@ fn main { Some(d) => d None => "/tmp" } - match @nested.NestedWindow::open(display, rt, "moon-plasma", "moon-plasma", width, height) { + match @nested.NestedWindow::open(display, rt, "chandra", "chandra", width, height) { Some(n) => Some(n) None => { println("failed to open a window on the host Wayland display") @@ -116,7 +116,7 @@ fn main { Some(k) => comp.server.set_keymap(k.keymap) None => () } - println("moon-plasma compositor listening on " + socket_path + " (wasi-gfx surface active)") + println("chandra compositor listening on " + socket_path + " (wasi-gfx surface active)") while true { comp.step() if comp.quit_requested { diff --git a/compositor/bin/moon.pkg b/compositor/bin/moon.pkg index 5381c90..b61266f 100644 --- a/compositor/bin/moon.pkg +++ b/compositor/bin/moon.pkg @@ -1,13 +1,13 @@ import { "moonbitlang/core/builtin", "moonbitlang/core/env", - "moonplasma/desktop/compositor/sys" @sys, - "moonplasma/desktop/compositor/scene" @scene, - "moonplasma/desktop/compositor/renderer" @renderer, - "moonplasma/desktop/compositor/gfx" @gfx, - "moonplasma/desktop/compositor/host" @host, - "moonplasma/desktop/compositor/nested" @nested, - "moonplasma/desktop/compositor/kms" @kms, + "chandra/desktop/compositor/sys" @sys, + "chandra/desktop/compositor/scene" @scene, + "chandra/desktop/compositor/renderer" @renderer, + "chandra/desktop/compositor/gfx" @gfx, + "chandra/desktop/compositor/host" @host, + "chandra/desktop/compositor/nested" @nested, + "chandra/desktop/compositor/kms" @kms, } supported_targets = "-all+native" diff --git a/compositor/font/font.mbt b/compositor/font/font.mbt index e15d214..af0e483 100644 --- a/compositor/font/font.mbt +++ b/compositor/font/font.mbt @@ -1,7 +1,7 @@ ///| Real text rendering: Allo Variable (UI text, falling back to Adwaita Sans) and Adwaita Mono /// (code), rasterised and plugged into the renderer's glyph hook. The pure-MoonBit renderer keeps its /// bitmap font when no hook is set. Two backends supply the glyphs: font_native.mbt (stb_truetype -/// through a C shim) and font_wasm.mbt (the host's `moonplasma:host/font` import). +/// through a C shim) and font_wasm.mbt (the host's `chandra:host/font` import). ///| A rasterised glyph as a backend returns it: 8-bit coverage `w` x `h` whose top-left is at /// (`xoff`, `yoff`) from the pen on the baseline, and the pen `advance`. diff --git a/compositor/font/font_wasm.mbt b/compositor/font/font_wasm.mbt index 59fd0c7..44c7df2 100644 --- a/compositor/font/font_wasm.mbt +++ b/compositor/font/font_wasm.mbt @@ -1,5 +1,5 @@ ///| Wasm font backend: the component has no C rasteriser, so glyphs come from the host's -/// `moonplasma:host/font` import (the host draws them from the TTF files it loads). +/// `chandra:host/font` import (the host draws them from the TTF files it loads). ///| Load a TTF file into `slot`. fn b_load(slot : Int, path : String) -> Bool { diff --git a/compositor/font/moon.pkg b/compositor/font/moon.pkg index 76c7df0..71b1253 100644 --- a/compositor/font/moon.pkg +++ b/compositor/font/moon.pkg @@ -1,7 +1,7 @@ import { "moonbitlang/core/builtin", - "moonplasma/desktop/compositor/renderer" @renderer, - "moonplasma/desktop/interface/moonplasma/host/font" @hostfont, + "chandra/desktop/compositor/renderer" @renderer, + "chandra/desktop/interface/chandra/host/font" @hostfont, } supported_targets = "+native+wasm" diff --git a/compositor/gfx/moon.pkg b/compositor/gfx/moon.pkg index 2edecb1..32eb01b 100644 --- a/compositor/gfx/moon.pkg +++ b/compositor/gfx/moon.pkg @@ -1,5 +1,5 @@ import { "moonbitlang/core/builtin", - "moonplasma/desktop/compositor/scene" @scene, - "moonplasma/desktop/compositor/renderer" @renderer, + "chandra/desktop/compositor/scene" @scene, + "chandra/desktop/compositor/renderer" @renderer, } diff --git a/compositor/gfx/pkg.generated.mbti b/compositor/gfx/pkg.generated.mbti index 202961a..d488f20 100644 --- a/compositor/gfx/pkg.generated.mbti +++ b/compositor/gfx/pkg.generated.mbti @@ -1,9 +1,9 @@ // Generated using `moon info`, DON'T EDIT IT -package "moonplasma/desktop/compositor/gfx" +package "chandra/desktop/compositor/gfx" import { - "moonplasma/desktop/compositor/renderer", - "moonplasma/desktop/compositor/scene", + "chandra/desktop/compositor/renderer", + "chandra/desktop/compositor/scene", } // Values diff --git a/compositor/host/compositor.mbt b/compositor/host/compositor.mbt index 581c692..57f0a27 100644 --- a/compositor/host/compositor.mbt +++ b/compositor/host/compositor.mbt @@ -27,7 +27,7 @@ pub(all) struct HostPopup { } ///| -pub(all) struct MoonPlasmaCompositor { +pub(all) struct ChandraCompositor { /// Open popups, oldest first (the last is topmost). popups : Array[HostPopup] server : @wayland.WaylandServer @@ -74,12 +74,12 @@ pub(all) struct MoonPlasmaCompositor { } ///| -pub fn MoonPlasmaCompositor::new( +pub fn ChandraCompositor::new( socket_path : String, theme : @scene.ThemeTokens, output_w : Int, output_h : Int, -) -> MoonPlasmaCompositor? { +) -> ChandraCompositor? { ignore(@font.install()) // Adwaita Mono; keeps the bitmap font if it's missing let server = match @wayland.WaylandServer::listen(socket_path, output_w, output_h) { Some(s) => s @@ -141,7 +141,7 @@ fn work_area_for(w : Int, h : Int, theme : @scene.ThemeTokens) -> @wm.Rect { ///| The output changed size (the nested window was resized, maximized or made fullscreen): /// lay the desktop out for the new size, so nothing is drawn past the edge and cropped away. -pub fn MoonPlasmaCompositor::resize(self : MoonPlasmaCompositor, w : Int, h : Int) -> Unit { +pub fn ChandraCompositor::resize(self : ChandraCompositor, w : Int, h : Int) -> Unit { if w <= 0 || h <= 0 || (w == self.output_w && h == self.output_h) { return } @@ -158,7 +158,7 @@ pub fn MoonPlasmaCompositor::resize(self : MoonPlasmaCompositor, w : Int, h : In } ///| -pub fn MoonPlasmaCompositor::close(self : MoonPlasmaCompositor) -> Unit { +pub fn ChandraCompositor::close(self : ChandraCompositor) -> Unit { for _, win in self.windows { release_snapshot(win.surface) } @@ -184,8 +184,8 @@ pub(all) struct FrameSig { } ///| -fn MoonPlasmaCompositor::apply_actions( - self : MoonPlasmaCompositor, +fn ChandraCompositor::apply_actions( + self : ChandraCompositor, actions : Array[@wm.WmAction], ) -> Unit { for act in actions { @@ -236,7 +236,7 @@ fn MoonPlasmaCompositor::apply_actions( } ///| Send the size changes coalesced during a divider drag. -fn MoonPlasmaCompositor::flush_configures(self : MoonPlasmaCompositor) -> Unit { +fn ChandraCompositor::flush_configures(self : ChandraCompositor) -> Unit { for wid, win in self.windows { if win.cfg_dirty { win.cfg_dirty = false @@ -253,7 +253,7 @@ fn MoonPlasmaCompositor::flush_configures(self : MoonPlasmaCompositor) -> Unit { } ///| -pub fn MoonPlasmaCompositor::step(self : MoonPlasmaCompositor) -> Unit { +pub fn ChandraCompositor::step(self : ChandraCompositor) -> Unit { self.flush_configures() let events = self.server.poll_events() for ev in events { @@ -398,8 +398,8 @@ pub fn MoonPlasmaCompositor::step(self : MoonPlasmaCompositor) -> Unit { } ///| -pub fn MoonPlasmaCompositor::set_layout_mode( - self : MoonPlasmaCompositor, +pub fn ChandraCompositor::set_layout_mode( + self : ChandraCompositor, mode : @wm.LayoutMode, ) -> Unit { self.layout_mode = mode @@ -416,7 +416,7 @@ pub fn MoonPlasmaCompositor::set_layout_mode( ///| Restore what the last session left (layout mode, recent apps) from state.edn. Call once, /// after turning `shell.persist` on; a no-op without persistence. -pub fn MoonPlasmaCompositor::restore_state(self : MoonPlasmaCompositor) -> Unit { +pub fn ChandraCompositor::restore_state(self : ChandraCompositor) -> Unit { let st = self.shell.load_state() self.shell.apply_state(st) match st.layout { @@ -428,8 +428,8 @@ pub fn MoonPlasmaCompositor::restore_state(self : MoonPlasmaCompositor) -> Unit } ///| -fn MoonPlasmaCompositor::build_scene( - self : MoonPlasmaCompositor, +fn ChandraCompositor::build_scene( + self : ChandraCompositor, ) -> (@scene.SceneGraph, Bool) { self.flush_configures() let scene = @scene.SceneGraph::new(self.output_w, self.output_h) @@ -545,8 +545,8 @@ fn MoonPlasmaCompositor::build_scene( ///| Compose the desktop for the host rasteriser (the wasm compositor): the scene to draw, or None /// when nothing changed since the last one, so an idle desktop costs nothing to draw or present. -pub fn MoonPlasmaCompositor::compose_scene( - self : MoonPlasmaCompositor, +pub fn ChandraCompositor::compose_scene( + self : ChandraCompositor, ) -> @scene.SceneGraph? { let (scene, changed) = self.build_scene() self.frame_changed = changed @@ -555,8 +555,8 @@ pub fn MoonPlasmaCompositor::compose_scene( ///| Compose the desktop and draw it with the software renderer (the native build and the tests). /// An unchanged desktop hands back the previous pixels instead of rasterising them again. -pub fn MoonPlasmaCompositor::compose_frame( - self : MoonPlasmaCompositor, +pub fn ChandraCompositor::compose_frame( + self : ChandraCompositor, ) -> @renderer.Pixmap { let (scene, changed) = self.build_scene() match self.last_frame { @@ -578,8 +578,8 @@ pub fn MoonPlasmaCompositor::compose_frame( ///| /// Compose the current desktop GUI frame and present it onto a wasi-gfx /// `SurfaceFrameBufferContext`. -pub fn MoonPlasmaCompositor::present_to_gfx( - self : MoonPlasmaCompositor, +pub fn ChandraCompositor::present_to_gfx( + self : ChandraCompositor, ctx : @gfx.SurfaceFrameBufferContext, ) -> @renderer.Pixmap { let pixmap = self.compose_frame() @@ -591,8 +591,8 @@ pub fn MoonPlasmaCompositor::present_to_gfx( ///| /// Process pending wasi-gfx surface input events (pointer clicks for focus). -pub fn MoonPlasmaCompositor::handle_gfx_events( - self : MoonPlasmaCompositor, +pub fn ChandraCompositor::handle_gfx_events( + self : ChandraCompositor, surface : @gfx.Surface, ) -> Unit { let downs = surface.drain_pointer_down() @@ -624,7 +624,7 @@ pub fn MoonPlasmaCompositor::handle_gfx_events( ///| Content origin of a window or popup. -fn MoonPlasmaCompositor::origin_of(self : MoonPlasmaCompositor, wid : UInt64) -> (Int, Int) { +fn ChandraCompositor::origin_of(self : ChandraCompositor, wid : UInt64) -> (Int, Int) { match self.windows.get(wid) { Some(win) => (win.geometry.x, win.geometry.y) None => { @@ -640,7 +640,7 @@ fn MoonPlasmaCompositor::origin_of(self : MoonPlasmaCompositor, wid : UInt64) -> } ///| Absolute rectangle of a popup, nudged to stay on screen. -fn MoonPlasmaCompositor::popup_rect(self : MoonPlasmaCompositor, p : HostPopup) -> @scene.Rect { +fn ChandraCompositor::popup_rect(self : ChandraCompositor, p : HostPopup) -> @scene.Rect { let (w, h) = match p.surface { Some(s) => (s.width, s.height) None => (p.w, p.h) @@ -654,7 +654,7 @@ fn MoonPlasmaCompositor::popup_rect(self : MoonPlasmaCompositor, p : HostPopup) } ///| -fn MoonPlasmaCompositor::origin_of_parent(self : MoonPlasmaCompositor, p : HostPopup) -> (Int, Int) { +fn ChandraCompositor::origin_of_parent(self : ChandraCompositor, p : HostPopup) -> (Int, Int) { if p.parent == p.id { (0, 0) } else { @@ -663,7 +663,7 @@ fn MoonPlasmaCompositor::origin_of_parent(self : MoonPlasmaCompositor, p : HostP } ///| Top-most popup under (x, y). -fn MoonPlasmaCompositor::popup_at(self : MoonPlasmaCompositor, x : Int, y : Int) -> HostPopup? { +fn ChandraCompositor::popup_at(self : ChandraCompositor, x : Int, y : Int) -> HostPopup? { let mut i = self.popups.length() - 1 while i >= 0 { let p = self.popups[i] @@ -677,7 +677,7 @@ fn MoonPlasmaCompositor::popup_at(self : MoonPlasmaCompositor, x : Int, y : Int) } ///| The toplevel a popup chain hangs off (for returning keyboard focus). -fn MoonPlasmaCompositor::popup_root(self : MoonPlasmaCompositor, wid : UInt64) -> UInt64? { +fn ChandraCompositor::popup_root(self : ChandraCompositor, wid : UInt64) -> UInt64? { let mut cur = wid let mut n = 0 while n < 16 { @@ -700,7 +700,7 @@ fn MoonPlasmaCompositor::popup_root(self : MoonPlasmaCompositor, wid : UInt64) - } ///| Forget a popup (and any popups hanging off it); give keyboard focus back to its window. -fn MoonPlasmaCompositor::close_popup(self : MoonPlasmaCompositor, wid : UInt64) -> Unit { +fn ChandraCompositor::close_popup(self : ChandraCompositor, wid : UInt64) -> Unit { let mut found = false for p in self.popups { if p.id == wid { @@ -735,7 +735,7 @@ fn MoonPlasmaCompositor::close_popup(self : MoonPlasmaCompositor, wid : UInt64) } ///| Send pointer enter/motion for a popup under the pointer. -fn MoonPlasmaCompositor::pointer_into_popup(self : MoonPlasmaCompositor, p : HostPopup, time_ms : UInt, motion : Bool) -> Unit { +fn ChandraCompositor::pointer_into_popup(self : ChandraCompositor, p : HostPopup, time_ms : UInt, motion : Bool) -> Unit { let r = self.popup_rect(p) let lx = self.ptr_x - r.x.to_double() let ly = self.ptr_y - r.y.to_double() @@ -750,7 +750,7 @@ fn MoonPlasmaCompositor::pointer_into_popup(self : MoonPlasmaCompositor, p : Hos } ///| Move keyboard focus (wl_keyboard leave/enter + current modifiers). -fn MoonPlasmaCompositor::set_kbd_focus(self : MoonPlasmaCompositor, wid : UInt64?) -> Unit { +fn ChandraCompositor::set_kbd_focus(self : ChandraCompositor, wid : UInt64?) -> Unit { if self.kbd_win == wid { return } @@ -769,7 +769,7 @@ fn MoonPlasmaCompositor::set_kbd_focus(self : MoonPlasmaCompositor, wid : UInt64 } ///| Top-most window under (x, y): (id, in client area). The titlebar counts as the window but not the client. -fn MoonPlasmaCompositor::window_at(self : MoonPlasmaCompositor, x : Int, y : Int) -> (UInt64, Bool)? { +fn ChandraCompositor::window_at(self : ChandraCompositor, x : Int, y : Int) -> (UInt64, Bool)? { let order = self.wm.stacking_order() let mut i = order.length() - 1 while i >= 0 { @@ -793,8 +793,8 @@ fn MoonPlasmaCompositor::window_at(self : MoonPlasmaCompositor, x : Int, y : Int ///| Resize zone under (x, y) on a floating window: its corners (12px) and left/right/bottom /// edges. The first window whose outer box contains the point decides; tiled windows resize /// through the dividers instead. -fn MoonPlasmaCompositor::resize_at( - self : MoonPlasmaCompositor, +fn ChandraCompositor::resize_at( + self : ChandraCompositor, x : Int, y : Int, ) -> (UInt64, @wm.DragMode)? { @@ -852,8 +852,8 @@ fn MoonPlasmaCompositor::resize_at( ///| Title-bar button under (x, y) for window `wid`: 1 minimize, 2 maximize, 3 close, 0 none. /// Mirrors the layout in `build_breeze_decoration` (18px buttons, 8px apart, 10px from the right edge). -fn MoonPlasmaCompositor::title_button_at( - self : MoonPlasmaCompositor, +fn ChandraCompositor::title_button_at( + self : ChandraCompositor, wid : UInt64, x : Int, y : Int, @@ -887,8 +887,8 @@ fn MoonPlasmaCompositor::title_button_at( } ///| Activate the title-bar button `btn` of window `wid`. -fn MoonPlasmaCompositor::press_title_button( - self : MoonPlasmaCompositor, +fn ChandraCompositor::press_title_button( + self : ChandraCompositor, wid : UInt64, btn : Int, ) -> Unit { @@ -920,14 +920,14 @@ fn MoonPlasmaCompositor::press_title_button( ///| Focus a window and bring it to the front through the window manager, so its stacking /// order (not just the drawing) changes. -fn MoonPlasmaCompositor::activate_window(self : MoonPlasmaCompositor, wid : UInt64) -> Unit { +fn ChandraCompositor::activate_window(self : ChandraCompositor, wid : UInt64) -> Unit { self.apply_actions( self.wm.handle_request(wid, @wm.WindowRequest::Activate, self.work_area), ) } ///| Restore a minimized window (or focus a visible one) from its task-bar pill. -fn MoonPlasmaCompositor::activate_task(self : MoonPlasmaCompositor, wid : UInt64) -> Unit { +fn ChandraCompositor::activate_task(self : ChandraCompositor, wid : UInt64) -> Unit { let minimized = match self.wm.windows.get(wid) { Some(r) => r.minimized None => return @@ -943,7 +943,7 @@ fn MoonPlasmaCompositor::activate_task(self : MoonPlasmaCompositor, wid : UInt64 } ///| Carry out what panel modules asked for: focus a window, switch layout. -fn MoonPlasmaCompositor::run_shell_actions(self : MoonPlasmaCompositor) -> Unit { +fn ChandraCompositor::run_shell_actions(self : ChandraCompositor) -> Unit { for a in self.shell.take_actions() { match a { @shell.ShellAction::FocusWindow(wid) => self.activate_task(wid) @@ -960,8 +960,8 @@ fn MoonPlasmaCompositor::run_shell_actions(self : MoonPlasmaCompositor) -> Unit } ///| Tiling divider under (x, y), with a few pixels of slack either side. -fn MoonPlasmaCompositor::handle_at( - self : MoonPlasmaCompositor, +fn ChandraCompositor::handle_at( + self : ChandraCompositor, x : Int, y : Int, ) -> @wm.SplitHandle? { @@ -982,7 +982,7 @@ fn MoonPlasmaCompositor::handle_at( } ///| -fn MoonPlasmaCompositor::leave_pointer(self : MoonPlasmaCompositor) -> Unit { +fn ChandraCompositor::leave_pointer(self : ChandraCompositor) -> Unit { match self.ptr_win { Some(w) => { self.server.pointer_leave(w) @@ -1025,8 +1025,8 @@ fn key_name(code : UInt, shift : Bool) -> String { ///| Route host input: shell (launcher) first, then the window under the pointer /// / the keyboard-focused window. -pub fn MoonPlasmaCompositor::handle_input( - self : MoonPlasmaCompositor, +pub fn ChandraCompositor::handle_input( + self : ChandraCompositor, ev : @nested.InputEvent, time_ms : UInt, ) -> Unit { @@ -1307,7 +1307,7 @@ pub fn MoonPlasmaCompositor::handle_input( ///| Cursor shape (wp_cursor_shape_v1 value) for the current pointer position: shell UI /// decides over the launcher; a client window decides inside its client area; otherwise default. -pub fn MoonPlasmaCompositor::desired_cursor(self : MoonPlasmaCompositor) -> UInt { +pub fn ChandraCompositor::desired_cursor(self : ChandraCompositor) -> UInt { let shell_shape = self.shell.cursor_at(self.ptr_x.to_int(), self.ptr_y.to_int()) if shell_shape != 0U { return shell_shape diff --git a/compositor/host/e2e_test.mbt b/compositor/host/e2e_test.mbt index b83160a..1087167 100644 --- a/compositor/host/e2e_test.mbt +++ b/compositor/host/e2e_test.mbt @@ -139,7 +139,7 @@ fn bind_global( ///| fn open_and_configure_client( - comp : @host.MoonPlasmaCompositor, + comp : @host.ChandraCompositor, socket_path : String, title : String, app_id : String, @@ -217,7 +217,7 @@ fn open_and_configure_client( ///| fn commit_shm_frame( - comp : @host.MoonPlasmaCompositor, + comp : @host.ChandraCompositor, c : TestWaylandClient, shm_id : UInt, surf_id : UInt, @@ -317,11 +317,11 @@ test "e2e pure-moonbit wayland compositor with lib/wm, ssd decorations, and shm @sys.getpid().to_string() + ".sock" let theme = @scene.ThemeTokens::moon_night() - let comp = @host.MoonPlasmaCompositor::new(socket_path, theme, 1280, 720).unwrap() + let comp = @host.ChandraCompositor::new(socket_path, theme, 1280, 720).unwrap() // Client 1: MoonTerm let (c1, shm1, surf1, xdg1, _tl1, _deco1) = open_and_configure_client( - comp, socket_path, "MoonTerm", "org.moonplasma.term", + comp, socket_path, "MoonTerm", "org.chandra.term", ) assert_eq(c1.deco_mode, Some(2U)) // ServerSide assert_true(c1.configured_w > 1200 && c1.configured_h > 600) @@ -347,7 +347,7 @@ test "e2e pure-moonbit wayland compositor with lib/wm, ssd decorations, and shm // Client 2: Files -> verify BSP tiling splits the screen! let (c2, shm2, surf2, xdg2, _tl2, _deco2) = open_and_configure_client( - comp, socket_path, "Files", "org.moonplasma.files", + comp, socket_path, "Files", "org.chandra.files", ) assert_true(c2.configured_w > 0 && c2.configured_w < 700) commit_shm_frame(comp, c2, shm2, surf2, xdg2, 2UL) @@ -369,7 +369,7 @@ test "a buffer stays valid after its wl_shm_pool is destroyed" { @sys.getpid().to_string() + ".sock" let theme = @scene.ThemeTokens::moon_night() - let comp = @host.MoonPlasmaCompositor::new(socket_path, theme, 1280, 720).unwrap() + let comp = @host.ChandraCompositor::new(socket_path, theme, 1280, 720).unwrap() let (c, shm, surf, xdg, _tl, _deco) = open_and_configure_client( comp, socket_path, "Kwi", "org.kde.kwi", ) diff --git a/compositor/host/input_test.mbt b/compositor/host/input_test.mbt index 50aab9f..286d0f3 100644 --- a/compositor/host/input_test.mbt +++ b/compositor/host/input_test.mbt @@ -3,19 +3,19 @@ /// Needs the modules: run scripts/build-modules.sh (just test does). ///| Rectangle of the panel module `id` (file stem), as last drawn. -fn rect_of(comp : @host.MoonPlasmaCompositor, id : String) -> @scene.Rect { +fn rect_of(comp : @host.ChandraCompositor, id : String) -> @scene.Rect { comp.shell.slot_rect(comp.shell.slot_of(id)) } ///| Centre of the panel module `id`. -fn center_of(comp : @host.MoonPlasmaCompositor, id : String) -> (Double, Double) raise { +fn center_of(comp : @host.ChandraCompositor, id : String) -> (Double, Double) raise { let r = rect_of(comp, id) assert_true(r.w > 0) ((r.x + r.w / 2).to_double(), (r.y + r.h / 2).to_double()) } ///| Move to (x, y), press and release `btn`, then draw a frame. -fn click_at(comp : @host.MoonPlasmaCompositor, x : Int, y : Int, t : UInt, btn? : UInt = 272U) -> Unit { +fn click_at(comp : @host.ChandraCompositor, x : Int, y : Int, t : UInt, btn? : UInt = 272U) -> Unit { comp.handle_input(@nested.InputEvent::PointerMove(x.to_double(), y.to_double()), t) comp.handle_input(@nested.InputEvent::PointerButton(btn, true), t + 1U) comp.handle_input(@nested.InputEvent::PointerButton(btn, false), t + 2U) @@ -23,16 +23,16 @@ fn click_at(comp : @host.MoonPlasmaCompositor, x : Int, y : Int, t : UInt, btn? } ///| Click the centre of panel module `id`. -fn click_module(comp : @host.MoonPlasmaCompositor, id : String, t : UInt) -> Unit raise { +fn click_module(comp : @host.ChandraCompositor, id : String, t : UInt) -> Unit raise { let (x, y) = center_of(comp, id) click_at(comp, x.to_int(), y.to_int(), t) } ///| A fresh compositor with the default panel and a first frame drawn. -fn new_comp(tag : String) -> @host.MoonPlasmaCompositor { +fn new_comp(tag : String) -> @host.ChandraCompositor { let socket_path = "/tmp/wayland-moon-" + tag + "-" + @sys.getpid().to_string() + ".sock" let theme = @scene.ThemeTokens::moon_night() - let comp = @host.MoonPlasmaCompositor::new(socket_path, theme, 1280, 720).unwrap() + let comp = @host.ChandraCompositor::new(socket_path, theme, 1280, 720).unwrap() ignore(comp.compose_frame()) comp } @@ -80,7 +80,7 @@ test "host input reaches the focused client and the launcher popup opens" { @sys.getpid().to_string() + ".sock" let theme = @scene.ThemeTokens::moon_night() - let comp = @host.MoonPlasmaCompositor::new(socket_path, theme, 1280, 720).unwrap() + let comp = @host.ChandraCompositor::new(socket_path, theme, 1280, 720).unwrap() let (c, shm, surf, xdg, _tl, _deco) = open_and_configure_client( comp, socket_path, "T", "t", ) @@ -169,7 +169,7 @@ test "dragging the divider between two tiled windows resizes them" { @sys.getpid().to_string() + ".sock" let theme = @scene.ThemeTokens::moon_night() - let comp = @host.MoonPlasmaCompositor::new(socket_path, theme, 1280, 720).unwrap() + let comp = @host.ChandraCompositor::new(socket_path, theme, 1280, 720).unwrap() let _a = open_and_configure_client(comp, socket_path, "A", "a") let _b = open_and_configure_client(comp, socket_path, "B", "b") let left = comp.windows.get(1UL).unwrap().geometry @@ -196,7 +196,7 @@ test "the layout module opens a popup to pick Tiling, Monocle or Floating" { @sys.getpid().to_string() + ".sock" let theme = @scene.ThemeTokens::moon_night() - let comp = @host.MoonPlasmaCompositor::new(socket_path, theme, 1280, 720).unwrap() + let comp = @host.ChandraCompositor::new(socket_path, theme, 1280, 720).unwrap() let _a = open_and_configure_client(comp, socket_path, "A", "a") let _b = open_and_configure_client(comp, socket_path, "B", "b") ignore(comp.compose_frame()) @@ -237,7 +237,7 @@ test "title-bar buttons minimize, maximize and close windows" { @sys.getpid().to_string() + ".sock" let theme = @scene.ThemeTokens::moon_night() - let comp = @host.MoonPlasmaCompositor::new(socket_path, theme, 1280, 720).unwrap() + let comp = @host.ChandraCompositor::new(socket_path, theme, 1280, 720).unwrap() let (c, _shm, _surf, _xdg, tl, _deco) = open_and_configure_client(comp, socket_path, "A", "a") let _b = open_and_configure_client(comp, socket_path, "B", "b") ignore(comp.compose_frame()) @@ -282,7 +282,7 @@ test "the task list module focuses the window whose pill is clicked" { @sys.getpid().to_string() + ".sock" let theme = @scene.ThemeTokens::moon_night() - let comp = @host.MoonPlasmaCompositor::new(socket_path, theme, 1280, 720).unwrap() + let comp = @host.ChandraCompositor::new(socket_path, theme, 1280, 720).unwrap() let _a = open_and_configure_client(comp, socket_path, "A", "a") let _b = open_and_configure_client(comp, socket_path, "B", "b") ignore(comp.compose_frame()) @@ -376,7 +376,7 @@ test "tapping Super toggles the launcher; Super+key does not" { ///| test "the panel is saved to panel.edn and restored" { // Never touch the user's real config: only run when a scratch dir is provided. - if @sys.getenv("MOON_PLASMA_TEST_CONFIG") == "1" { + if @sys.getenv("CHANDRA_TEST_CONFIG") == "1" { let theme = @scene.ThemeTokens::moon_night() let a = @shell.DesktopShell::new("x") a.persist = true @@ -510,7 +510,7 @@ test "Desktop Pulse reads live machine and window state through its granted inte @sys.getpid().to_string() + ".sock" let theme = @scene.ThemeTokens::moon_night() - let comp = @host.MoonPlasmaCompositor::new(socket_path, theme, 1280, 720).unwrap() + let comp = @host.ChandraCompositor::new(socket_path, theme, 1280, 720).unwrap() let _a = open_and_configure_client(comp, socket_path, "A", "a") let _b = open_and_configure_client(comp, socket_path, "B", "b") ignore(comp.compose_frame()) @@ -548,7 +548,7 @@ test "Desktop Pulse reads live machine and window state through its granted inte test "the desktop card can be dragged across the wallpaper" { let socket_path = "/tmp/wayland-moon-desk-" + @sys.getpid().to_string() + ".sock" let theme = @scene.ThemeTokens::moon_night() - let comp = @host.MoonPlasmaCompositor::new(socket_path, theme, 1280, 720).unwrap() + let comp = @host.ChandraCompositor::new(socket_path, theme, 1280, 720).unwrap() ignore(comp.compose_frame()) // Default: top-right, 24px in. Grab it by its body. let gx = 1280 - 260 - 24 + 40 @@ -570,7 +570,7 @@ test "the desktop card can be dragged across the wallpaper" { test "an xdg_popup (right-click menu) is placed, drawn, clickable and dismissed from outside" { let socket_path = "/tmp/wayland-moon-popup-" + @sys.getpid().to_string() + ".sock" let theme = @scene.ThemeTokens::moon_night() - let comp = @host.MoonPlasmaCompositor::new(socket_path, theme, 1280, 720).unwrap() + let comp = @host.ChandraCompositor::new(socket_path, theme, 1280, 720).unwrap() let (c, shm, surf, xdg, _tl, _deco) = open_and_configure_client(comp, socket_path, "T", "t") commit_shm_frame(comp, c, shm, surf, xdg, 1UL) let win = comp.windows.get(1UL).unwrap().geometry @@ -726,7 +726,7 @@ fn data_device_for(c : TestWaylandClient) -> (UInt, UInt) { test "copy in one client, paste in another" { let socket_path = "/tmp/wayland-moon-clip-" + @sys.getpid().to_string() + ".sock" let theme = @scene.ThemeTokens::moon_night() - let comp = @host.MoonPlasmaCompositor::new(socket_path, theme, 1280, 720).unwrap() + let comp = @host.ChandraCompositor::new(socket_path, theme, 1280, 720).unwrap() let (a, _, _, _, _, _) = open_and_configure_client(comp, socket_path, "A", "a") let (b, _, _, _, _, _) = open_and_configure_client(comp, socket_path, "B", "b") let (mgr_a, dev_a) = data_device_for(a) @@ -782,7 +782,7 @@ test "dragging a title bar moves the window and floats it" { @sys.getpid().to_string() + ".sock" let theme = @scene.ThemeTokens::moon_night() - let comp = @host.MoonPlasmaCompositor::new(socket_path, theme, 1280, 720).unwrap() + let comp = @host.ChandraCompositor::new(socket_path, theme, 1280, 720).unwrap() let _a = open_and_configure_client(comp, socket_path, "A", "a") let _b = open_and_configure_client(comp, socket_path, "B", "b") let g0 = comp.windows.get(2UL).unwrap().geometry @@ -806,7 +806,7 @@ test "dragging a floating window's corner resizes it" { @sys.getpid().to_string() + ".sock" let theme = @scene.ThemeTokens::moon_night() - let comp = @host.MoonPlasmaCompositor::new(socket_path, theme, 1280, 720).unwrap() + let comp = @host.ChandraCompositor::new(socket_path, theme, 1280, 720).unwrap() let _a = open_and_configure_client(comp, socket_path, "A", "a") let _b = open_and_configure_client(comp, socket_path, "B", "b") // Float window 2 by dragging its title bar a little. @@ -861,7 +861,7 @@ fn read_state_edn() -> String { "" => @sys.getenv("HOME") + "/.config" c => c } - let raw = @sys.read_file_bytes(dir + "/moon-plasma/state.edn") + let raw = @sys.read_file_bytes(dir + "/chandra/state.edn") let sb = StringBuilder::new() for i = 0; i < raw.length(); i = i + 1 { sb.write_char(Int::unsafe_to_char(raw[i].to_int())) // the file is ASCII @@ -875,14 +875,14 @@ fn write_state_edn(text : String) -> Unit { "" => @sys.getenv("HOME") + "/.config" c => c } - ignore(@sys.mkdir_p(dir + "/moon-plasma")) - ignore(@sys.write_file_bytes(dir + "/moon-plasma/state.edn", @sys.str_to_utf8_bytes(text))) + ignore(@sys.mkdir_p(dir + "/chandra")) + ignore(@sys.write_file_bytes(dir + "/chandra/state.edn", @sys.str_to_utf8_bytes(text))) } ///| test "the layout mode and recent apps are saved to state.edn and restored; other keys survive" { // Never touch the user's real config: only run when the test runner gave us a scratch dir. - if @sys.getenv("MOON_PLASMA_TEST_CONFIG") == "1" { + if @sys.getenv("CHANDRA_TEST_CONFIG") == "1" { write_state_edn(";; hand-written\n{:note \"keep me\" :layout :tiling}\n") let a = new_comp("state-a") a.shell.persist = true @@ -915,7 +915,7 @@ test "the layout mode and recent apps are saved to state.edn and restored; other ///| test "the desktop card position is saved when dropped and restored" { - if @sys.getenv("MOON_PLASMA_TEST_CONFIG") == "1" { + if @sys.getenv("CHANDRA_TEST_CONFIG") == "1" { write_state_edn("{:note \"keep\"}\n") let a = new_comp("card-a") a.shell.persist = true @@ -939,7 +939,7 @@ test "the desktop card position is saved when dropped and restored" { test "clicking a floating window brings it in front of the others" { let socket_path = "/tmp/wayland-moon-z-" + @sys.getpid().to_string() + ".sock" let theme = @scene.ThemeTokens::moon_night() - let comp = @host.MoonPlasmaCompositor::new(socket_path, theme, 1280, 720).unwrap() + let comp = @host.ChandraCompositor::new(socket_path, theme, 1280, 720).unwrap() ignore(open_and_configure_client(comp, socket_path, "A", "a")) ignore(open_and_configure_client(comp, socket_path, "B", "b")) comp.set_layout_mode(@wm.LayoutMode::Floating) @@ -958,11 +958,11 @@ test "clicking a floating window brings it in front of the others" { ///| test "a window dragged somewhere reopens there, saved per app in state.edn" { - if @sys.getenv("MOON_PLASMA_TEST_CONFIG") == "1" { + if @sys.getenv("CHANDRA_TEST_CONFIG") == "1" { write_state_edn("{:note \"keep\"}\n") let sock1 = "/tmp/wayland-moon-wp1-" + @sys.getpid().to_string() + ".sock" let theme = @scene.ThemeTokens::moon_night() - let a = @host.MoonPlasmaCompositor::new(sock1, theme, 1280, 720).unwrap() + let a = @host.ChandraCompositor::new(sock1, theme, 1280, 720).unwrap() a.shell.persist = true a.set_layout_mode(@wm.LayoutMode::Floating) ignore(open_and_configure_client(a, sock1, "T", "org.test.app")) @@ -980,7 +980,7 @@ test "a window dragged somewhere reopens there, saved per app in state.edn" { assert_true(text.contains(":note \"keep\"")) // A new session: the same app opens where it was left. let sock2 = "/tmp/wayland-moon-wp2-" + @sys.getpid().to_string() + ".sock" - let b = @host.MoonPlasmaCompositor::new(sock2, theme, 1280, 720).unwrap() + let b = @host.ChandraCompositor::new(sock2, theme, 1280, 720).unwrap() b.shell.persist = true b.restore_state() ignore(open_and_configure_client(b, sock2, "T", "org.test.app")) @@ -995,7 +995,7 @@ test "a window dragged somewhere reopens there, saved per app in state.edn" { test "alt-tab switches to the previous window, tab again goes further back, escape cancels" { let socket_path = "/tmp/wayland-moon-alt-" + @sys.getpid().to_string() + ".sock" let theme = @scene.ThemeTokens::moon_night() - let comp = @host.MoonPlasmaCompositor::new(socket_path, theme, 1280, 720).unwrap() + let comp = @host.ChandraCompositor::new(socket_path, theme, 1280, 720).unwrap() ignore(open_and_configure_client(comp, socket_path, "A", "a")) ignore(open_and_configure_client(comp, socket_path, "B", "b")) ignore(open_and_configure_client(comp, socket_path, "C", "c")) @@ -1047,7 +1047,7 @@ test "alt-tab switches to the previous window, tab again goes further back, esca test "compose_scene hands the host a scene only when something changed" { let socket_path = "/tmp/wayland-moon-scene-" + @sys.getpid().to_string() + ".sock" let theme = @scene.ThemeTokens::moon_night() - let comp = @host.MoonPlasmaCompositor::new(socket_path, theme, 1280, 720).unwrap() + let comp = @host.ChandraCompositor::new(socket_path, theme, 1280, 720).unwrap() // The first scene is always drawn; the wallpaper and the desktop card are split out of it. match comp.compose_scene() { Some(sg) => { @@ -1079,7 +1079,7 @@ test "compose_scene hands the host a scene only when something changed" { test "super+d minimizes every window to show the desktop, and again brings them back" { let socket_path = "/tmp/wayland-moon-supd-" + @sys.getpid().to_string() + ".sock" let theme = @scene.ThemeTokens::moon_night() - let comp = @host.MoonPlasmaCompositor::new(socket_path, theme, 1280, 720).unwrap() + let comp = @host.ChandraCompositor::new(socket_path, theme, 1280, 720).unwrap() ignore(open_and_configure_client(comp, socket_path, "A", "a")) ignore(open_and_configure_client(comp, socket_path, "B", "b")) ignore(comp.compose_frame()) @@ -1123,7 +1123,7 @@ test "super+d minimizes every window to show the desktop, and again brings them } ///| Click (x, y) without drawing, then return the next scene's wallpaper op count (0: no new scene). -fn click_wallpaper_ops(comp : @host.MoonPlasmaCompositor, x : Int, y : Int, t : UInt) -> Int { +fn click_wallpaper_ops(comp : @host.ChandraCompositor, x : Int, y : Int, t : UInt) -> Int { comp.handle_input(@nested.InputEvent::PointerMove(x.to_double(), y.to_double()), t) comp.handle_input(@nested.InputEvent::PointerButton(272U, true), t + 1U) comp.handle_input(@nested.InputEvent::PointerButton(272U, false), t + 2U) @@ -1162,7 +1162,7 @@ test "the wallpaper module lists the wallpapers and switches the desktop to the ///| test "the chosen wallpaper is saved to state.edn and restored" { - if @sys.getenv("MOON_PLASMA_TEST_CONFIG") == "1" { + if @sys.getenv("CHANDRA_TEST_CONFIG") == "1" { write_state_edn("{:note \"keep\"}\n") let a = new_comp("wall-a") a.shell.persist = true @@ -1184,3 +1184,29 @@ test "the chosen wallpaper is saved to state.edn and restored" { assert_eq(c.shell.wallpaper_sel, 0) } } + +///| +test "state saved by a build from before the rename to Chandra is still read" { + if @sys.getenv("CHANDRA_TEST_CONFIG") == "1" { + let dir = match @sys.getenv("XDG_CONFIG_HOME") { + "" => @sys.getenv("HOME") + "/.config" + c => c + } + @sys.unlink(dir + "/chandra/state.edn") + ignore(@sys.mkdir_p(dir + "/moon-plasma")) + ignore( + @sys.write_file_bytes( + dir + "/moon-plasma/state.edn", + @sys.str_to_utf8_bytes("{:layout :monocle}\n"), + ), + ) + let c = new_comp("state-legacy") + c.shell.persist = true + c.restore_state() + assert_eq(c.layout_mode, @wm.LayoutMode::Monocle) + // The next save goes to the new place. + c.shell.save_state() + assert_true(read_state_edn().contains(":layout :monocle")) + @sys.unlink(dir + "/moon-plasma/state.edn") + } +} diff --git a/compositor/host/inspector_test.mbt b/compositor/host/inspector_test.mbt index e9b13a7..2038670 100644 --- a/compositor/host/inspector_test.mbt +++ b/compositor/host/inspector_test.mbt @@ -6,7 +6,7 @@ test "inspector shows the WIT interface of the hovered component" { @sys.getpid().to_string() + ".sock" let theme = @scene.ThemeTokens::moon_night() - let comp = @host.MoonPlasmaCompositor::new(socket_path, theme, 1280, 720).unwrap() + let comp = @host.ChandraCompositor::new(socket_path, theme, 1280, 720).unwrap() let (c, shm, surf, xdg, _tl, _deco) = open_and_configure_client( comp, socket_path, "T", "t", ) diff --git a/compositor/host/moon.pkg b/compositor/host/moon.pkg index 5957918..5839b73 100644 --- a/compositor/host/moon.pkg +++ b/compositor/host/moon.pkg @@ -1,15 +1,15 @@ import { "moonbitlang/core/builtin", - "moonplasma/desktop/lib/wm" @wm, - "moonplasma/desktop/compositor/sys" @sys, - "moonplasma/desktop/compositor/scene" @scene, - "moonplasma/desktop/compositor/shell" @shell, - "moonplasma/desktop/compositor/wasm" @wasm, - "moonplasma/desktop/compositor/nested" @nested, - "moonplasma/desktop/compositor/font" @font, - "moonplasma/desktop/compositor/renderer" @renderer, - "moonplasma/desktop/compositor/wayland" @wayland, - "moonplasma/desktop/compositor/gfx" @gfx, + "chandra/desktop/lib/wm" @wm, + "chandra/desktop/compositor/sys" @sys, + "chandra/desktop/compositor/scene" @scene, + "chandra/desktop/compositor/shell" @shell, + "chandra/desktop/compositor/wasm" @wasm, + "chandra/desktop/compositor/nested" @nested, + "chandra/desktop/compositor/font" @font, + "chandra/desktop/compositor/renderer" @renderer, + "chandra/desktop/compositor/wayland" @wayland, + "chandra/desktop/compositor/gfx" @gfx, } supported_targets = "+native+wasm" diff --git a/compositor/host/resize_test.mbt b/compositor/host/resize_test.mbt index 0fe33df..62bd387 100644 --- a/compositor/host/resize_test.mbt +++ b/compositor/host/resize_test.mbt @@ -3,7 +3,7 @@ ///| test "resize redraws the desktop at the new output size" { let socket_path = "/tmp/wayland-moon-resize-" + @sys.getpid().to_string() + ".sock" - let comp = @host.MoonPlasmaCompositor::new(socket_path, @scene.ThemeTokens::moon_night(), 1280, 720).unwrap() + let comp = @host.ChandraCompositor::new(socket_path, @scene.ThemeTokens::moon_night(), 1280, 720).unwrap() let before = comp.compose_frame() assert_eq((before.width, before.height), (1280, 720)) comp.resize(900, 560) diff --git a/compositor/host/showdesktop.mbt b/compositor/host/showdesktop.mbt index c646544..f658066 100644 --- a/compositor/host/showdesktop.mbt +++ b/compositor/host/showdesktop.mbt @@ -17,8 +17,8 @@ let key_rsuper : UInt32 = 126 ///| /// Handle a key for Super+D. Returns true when the key is consumed (not for clients). -fn MoonPlasmaCompositor::show_desktop_key( - self : MoonPlasmaCompositor, +fn ChandraCompositor::show_desktop_key( + self : ChandraCompositor, code : UInt32, pressed : Bool, ) -> Bool { @@ -45,8 +45,8 @@ fn MoonPlasmaCompositor::show_desktop_key( ///| /// Minimize all visible windows of the active workspace, or restore the ones Super+D hid. -pub fn MoonPlasmaCompositor::toggle_show_desktop( - self : MoonPlasmaCompositor, +pub fn ChandraCompositor::toggle_show_desktop( + self : ChandraCompositor, ) -> Unit { let visible = self.wm.stacking_order() if visible.length() == 0 { @@ -92,6 +92,6 @@ pub fn MoonPlasmaCompositor::toggle_show_desktop( ///| /// True while Super+D has windows hidden that another Super+D would bring back. -pub fn MoonPlasmaCompositor::desktop_shown(self : MoonPlasmaCompositor) -> Bool { +pub fn ChandraCompositor::desktop_shown(self : ChandraCompositor) -> Bool { self.desktop_hidden.length() > 0 && self.wm.stacking_order().length() == 0 } diff --git a/compositor/host/switcher.mbt b/compositor/host/switcher.mbt index dfb6c80..f0bf32d 100644 --- a/compositor/host/switcher.mbt +++ b/compositor/host/switcher.mbt @@ -31,7 +31,7 @@ let key_left : UInt = 105 let key_right : UInt = 106 ///| Windows of the active workspace, most recently used first (minimized ones included). -fn MoonPlasmaCompositor::switcher_candidates(self : MoonPlasmaCompositor) -> Array[UInt64] { +fn ChandraCompositor::switcher_candidates(self : ChandraCompositor) -> Array[UInt64] { let out : Array[UInt64] = [] for ws in self.wm.workspaces { if ws.id == self.wm.active_workspace { @@ -52,12 +52,12 @@ fn MoonPlasmaCompositor::switcher_candidates(self : MoonPlasmaCompositor) -> Arr } ///| True while the switcher is on screen. -pub fn MoonPlasmaCompositor::switcher_open(self : MoonPlasmaCompositor) -> Bool { +pub fn ChandraCompositor::switcher_open(self : ChandraCompositor) -> Bool { self.switcher_on } ///| Close the switcher; with `commit`, switch to the selected window. -fn MoonPlasmaCompositor::switcher_close(self : MoonPlasmaCompositor, commit : Bool) -> Unit { +fn ChandraCompositor::switcher_close(self : ChandraCompositor, commit : Bool) -> Unit { if !self.switcher_on { return } @@ -70,7 +70,7 @@ fn MoonPlasmaCompositor::switcher_close(self : MoonPlasmaCompositor, commit : Bo } ///| Handle a key for the switcher. Returns true when the key is consumed (not for clients). -fn MoonPlasmaCompositor::switcher_key(self : MoonPlasmaCompositor, code : UInt, pressed : Bool, time_ms : UInt) -> Bool { +fn ChandraCompositor::switcher_key(self : ChandraCompositor, code : UInt, pressed : Bool, time_ms : UInt) -> Bool { if code == key_lalt || code == key_ralt { self.alt_down = pressed if !pressed && self.switcher_on { @@ -124,7 +124,7 @@ fn MoonPlasmaCompositor::switcher_key(self : MoonPlasmaCompositor, code : UInt, } ///| The switcher's draw ops: a centred list, the selected row lit. Empty when closed. -fn MoonPlasmaCompositor::switcher_ops(self : MoonPlasmaCompositor) -> Array[@scene.DrawOp] { +fn ChandraCompositor::switcher_ops(self : ChandraCompositor) -> Array[@scene.DrawOp] { let ops : Array[@scene.DrawOp] = [] if !self.switcher_on { return ops diff --git a/compositor/kms/kms_native.mbt b/compositor/kms/kms_native.mbt index 9bad828..ebfd42c 100644 --- a/compositor/kms/kms_native.mbt +++ b/compositor/kms/kms_native.mbt @@ -1,4 +1,4 @@ -///| Native display backend for running moon-plasma as a login session: DRM/KMS +///| Native display backend for running chandra as a login session: DRM/KMS /// output (dumb buffers, page flips, hardware cursor), libinput keyboard and /// pointer, xkbcommon keymap, libseat for device access and VT switching. /// All state lives in the C shim (kms_stub.c); this wrapper exposes it with the diff --git a/compositor/kms/kms_wasm.mbt b/compositor/kms/kms_wasm.mbt index cb7dc29..f8ad23b 100644 --- a/compositor/kms/kms_wasm.mbt +++ b/compositor/kms/kms_wasm.mbt @@ -1,5 +1,5 @@ ///| Wasm display backend: the same API as kms_native.mbt, but the host owns the display and the -/// seat (`moonplasma:host/display`). The component sends frames out and reads events in. +/// seat (`chandra:host/display`). The component sends frames out and reads events in. ///| pub(all) struct Kms { diff --git a/compositor/kms/moon.pkg b/compositor/kms/moon.pkg index 115ca1c..4f16770 100644 --- a/compositor/kms/moon.pkg +++ b/compositor/kms/moon.pkg @@ -1,8 +1,8 @@ import { "moonbitlang/core/builtin", - "moonplasma/desktop/compositor/renderer" @renderer, - "moonplasma/desktop/compositor/nested" @nested, - "moonplasma/desktop/interface/moonplasma/host/display" @hostdisplay, + "chandra/desktop/compositor/renderer" @renderer, + "chandra/desktop/compositor/nested" @nested, + "chandra/desktop/interface/chandra/host/display" @hostdisplay, } supported_targets = "+native+wasm" diff --git a/compositor/nested/moon.pkg b/compositor/nested/moon.pkg index 2f92545..5809465 100644 --- a/compositor/nested/moon.pkg +++ b/compositor/nested/moon.pkg @@ -1,8 +1,8 @@ import { "moonbitlang/core/builtin", - "moonplasma/desktop/compositor/sys" @sys, - "moonplasma/desktop/compositor/renderer" @renderer, - "moonplasma/desktop/compositor/wayland" @wayland, + "chandra/desktop/compositor/sys" @sys, + "chandra/desktop/compositor/renderer" @renderer, + "chandra/desktop/compositor/wayland" @wayland, } supported_targets = "+native+wasm" diff --git a/compositor/nested/nested.mbt b/compositor/nested/nested.mbt index c391e9f..80c0344 100644 --- a/compositor/nested/nested.mbt +++ b/compositor/nested/nested.mbt @@ -505,7 +505,7 @@ pub fn NestedWindow::present(self : NestedWindow, pixmap : @renderer.Pixmap) -> out[o + 2] = pixmap.data[o] out[o + 3] = b'\xff' } - let memfd = @sys.memfd_create("moon-plasma-frame", len) + let memfd = @sys.memfd_create("chandra-frame", len) if memfd < 0 { return } diff --git a/compositor/raster/moon.pkg b/compositor/raster/moon.pkg index 8402bb9..f0857db 100644 --- a/compositor/raster/moon.pkg +++ b/compositor/raster/moon.pkg @@ -1,13 +1,13 @@ import { "moonbitlang/core/builtin", - "moonplasma/desktop/compositor/scene" @scene, - "moonplasma/desktop/compositor/renderer" @renderer, - "moonplasma/desktop/interface/moonplasma/host/raster" @hostraster, + "chandra/desktop/compositor/scene" @scene, + "chandra/desktop/compositor/renderer" @renderer, + "chandra/desktop/interface/chandra/host/raster" @hostraster, } supported_targets = "+native+wasm" -// The wasm compositor hands its scene to the host to draw (`moonplasma:host/raster`); the native +// The wasm compositor hands its scene to the host to draw (`chandra:host/raster`); the native // build has the software renderer instead, so this package only stubs the calls there. options( targets: { diff --git a/compositor/raster/raster_wasm.mbt b/compositor/raster/raster_wasm.mbt index 440d34e..89a919f 100644 --- a/compositor/raster/raster_wasm.mbt +++ b/compositor/raster/raster_wasm.mbt @@ -1,4 +1,4 @@ -///| Send a scene to the host to draw (`moonplasma:host/raster`). +///| Send a scene to the host to draw (`chandra:host/raster`). /// /// The scene is the same one the software renderer takes (`@scene.SceneGraph`); here it is turned /// into the interface's records and handed over. The host owns the framebuffer and does the pixel diff --git a/compositor/renderer/moon.pkg b/compositor/renderer/moon.pkg index 39228ae..5d91d24 100644 --- a/compositor/renderer/moon.pkg +++ b/compositor/renderer/moon.pkg @@ -1,4 +1,4 @@ import { "moonbitlang/core/builtin", - "moonplasma/desktop/compositor/scene" @scene, + "chandra/desktop/compositor/scene" @scene, } diff --git a/compositor/renderer/pkg.generated.mbti b/compositor/renderer/pkg.generated.mbti index 5fbbd70..827ef08 100644 --- a/compositor/renderer/pkg.generated.mbti +++ b/compositor/renderer/pkg.generated.mbti @@ -1,8 +1,8 @@ // Generated using `moon info`, DON'T EDIT IT -package "moonplasma/desktop/compositor/renderer" +package "chandra/desktop/compositor/renderer" import { - "moonplasma/desktop/compositor/scene", + "chandra/desktop/compositor/scene", } // Values diff --git a/compositor/renderer/renderer_test.mbt b/compositor/renderer/renderer_test.mbt index a3555be..e97059a 100644 --- a/compositor/renderer/renderer_test.mbt +++ b/compositor/renderer/renderer_test.mbt @@ -14,7 +14,7 @@ test "software renderer alpha blending, rounded rect, shm blit, and png encoding let (insets, deco_ops) = @scene.build_breeze_decoration( "MoonTerm", - "org.moonplasma.term", + "org.chandra.term", true, false, 200, @@ -32,7 +32,7 @@ test "software renderer alpha blending, rounded rect, shm blit, and png encoding scene.windows.push({ id: 1UL, title: "MoonTerm", - app_id: "org.moonplasma.term", + app_id: "org.chandra.term", focused: true, fullscreen: false, geometry: @scene.Rect::new(20, 40, 100, 60), diff --git a/compositor/scene/pkg.generated.mbti b/compositor/scene/pkg.generated.mbti index 7a5cf4a..d312351 100644 --- a/compositor/scene/pkg.generated.mbti +++ b/compositor/scene/pkg.generated.mbti @@ -1,5 +1,5 @@ // Generated using `moon info`, DON'T EDIT IT -package "moonplasma/desktop/compositor/scene" +package "chandra/desktop/compositor/scene" import { "moonbitlang/core/debug", diff --git a/compositor/shell/humanise.mbt b/compositor/shell/humanise.mbt index bcaa9b9..2b50bb2 100644 --- a/compositor/shell/humanise.mbt +++ b/compositor/shell/humanise.mbt @@ -317,7 +317,7 @@ fn humanise_interface(name : String, block : Array[String]) -> Array[String] { out } -///| "moonplasma:desktop/theme@0.1.0;" -> "theme" (raw WIT identifier, dashes kept) +///| "chandra:desktop/theme@0.1.0;" -> "theme" (raw WIT identifier, dashes kept) fn ref_name(s : String) -> String { let mut r = trim(s) if r.has_suffix(";") { @@ -334,7 +334,7 @@ fn ref_name(s : String) -> String { r } -///| "moonplasma:desktop/app-catalog@0.1.0" -> "app catalog" +///| "chandra:desktop/app-catalog@0.1.0" -> "app catalog" fn short_ref(s : String) -> String { dashes(ref_name(s)) } diff --git a/compositor/shell/moon.pkg b/compositor/shell/moon.pkg index 5f5b97d..ac584e8 100644 --- a/compositor/shell/moon.pkg +++ b/compositor/shell/moon.pkg @@ -1,20 +1,20 @@ import { "moonbitlang/core/builtin", "moonbitlang/core/encoding/utf8" @utf8, - "moonplasma/desktop/interface/moonplasma/desktop/types" @types, - "moonplasma/desktop/interface/moonplasma/desktop/theme" @theme, - "moonplasma/desktop/lib/ui" @ui, - "moonplasma/desktop/lib/shell" @libshell, - "moonplasma/desktop/lib/panel" @panel, - "moonplasma/desktop/lib/clock" @clock, - "moonplasma/desktop/lib/moon" @moon, - "moonplasma/desktop/lib/timefmt" @timefmt, - "moonplasma/desktop/lib/launcher" @launcher, - "moonplasma/desktop/compositor/scene" @scene, + "chandra/desktop/interface/chandra/desktop/types" @types, + "chandra/desktop/interface/chandra/desktop/theme" @theme, + "chandra/desktop/lib/ui" @ui, + "chandra/desktop/lib/shell" @libshell, + "chandra/desktop/lib/panel" @panel, + "chandra/desktop/lib/clock" @clock, + "chandra/desktop/lib/moon" @moon, + "chandra/desktop/lib/timefmt" @timefmt, + "chandra/desktop/lib/launcher" @launcher, + "chandra/desktop/compositor/scene" @scene, "jqlssg/moonedn" @edn, - "moonplasma/desktop/compositor/sys" @sys, - "moonplasma/desktop/compositor/renderer" @renderer, - "moonplasma/desktop/compositor/wasm" @wasm, + "chandra/desktop/compositor/sys" @sys, + "chandra/desktop/compositor/renderer" @renderer, + "chandra/desktop/compositor/wasm" @wasm, } supported_targets = "+native+wasm" diff --git a/compositor/shell/shell.mbt b/compositor/shell/shell.mbt index 7a49062..1728207 100644 --- a/compositor/shell/shell.mbt +++ b/compositor/shell/shell.mbt @@ -349,7 +349,7 @@ let max_recents : Int = 8 fn recents_path() -> String { let c = @sys.getenv("XDG_CACHE_HOME") (if c.length() > 0 { c } else { @sys.getenv("HOME") + "/.cache" }) + - "/moon-plasma-recent" + "/chandra-recent" } ///| diff --git a/compositor/shell/state.mbt b/compositor/shell/state.mbt index 2af7ab8..6715494 100644 --- a/compositor/shell/state.mbt +++ b/compositor/shell/state.mbt @@ -1,5 +1,5 @@ ///| Saved state: what the desktop remembers between sessions, as EDN in -/// $XDG_CONFIG_HOME/moon-plasma/state.edn (next to panel.edn, which holds the module list): +/// $XDG_CONFIG_HOME/chandra/state.edn (next to panel.edn, which holds the module list): /// /// {:layout :tiling ; the Tile | Float switcher: :tiling, :monocle or :floating /// :recent ["foot" "dolphin"] ; the launcher's recently started apps, newest first @@ -40,7 +40,7 @@ let wallpaper_keys : Array[String] = ["plasma-glow", "aurora", "starfield", "dus ///| fn read_state_file() -> Array[(@edn.Value, @edn.Value)] { - let text = @utf8.decode_lossy(@sys.read_file_bytes(state_path())) + let text = @utf8.decode_lossy(read_config_file("state.edn")) if text.length() == 0 { return [] } @@ -241,7 +241,7 @@ pub fn DesktopShell::save_state(self : DesktopShell) -> Unit { Some(b) => { let dir = panel_config_dir() if @sys.mkdir_p(dir) { - let text = ";; Moon Plasma state: restored at the next start\n" + b + "\n" + let text = ";; Chandra state: restored at the next start\n" + b + "\n" ignore(@sys.write_file_bytes(state_path(), @utf8.encode(text))) } } diff --git a/compositor/shell/widgets.mbt b/compositor/shell/widgets.mbt index eaa5e9a..9565832 100644 --- a/compositor/shell/widgets.mbt +++ b/compositor/shell/widgets.mbt @@ -2,7 +2,7 @@ /// while the compositor runs, the capabilities (host data + requests) they use, the /// right-click menu, and the saved panel layout. /// -/// A module is a wasm plasmoid component (`moonplasma:desktop/plasmoid`). Its imports +/// A module is a wasm plasmoid component (`chandra:desktop/plasmoid`). Its imports /// are the capabilities it was granted: `theme` and `clock` always, `app-catalog` / /// `app-launch` for the application menu, `windows` for the task list, `layout-control` /// for the layout switcher, `inspector` for the Interface Explorer button and `modules` @@ -20,7 +20,7 @@ let manager_module : String = "module-manager" ///| Directories searched for `*.wasm` modules, highest priority first. fn module_dirs() -> Array[String] { let dirs : Array[String] = [] - let env = @sys.getenv("MOON_PLASMA_MODULES") + let env = @sys.getenv("CHANDRA_MODULES") if env.length() > 0 { for d in env.split(":") { if d.length() > 0 { @@ -32,10 +32,10 @@ fn module_dirs() -> Array[String] { let x = @sys.getenv("XDG_DATA_HOME") if x.length() > 0 { x } else { @sys.getenv("HOME") + "/.local/share" } } - dirs.push(data_home + "/moon-plasma/modules") - dirs.push("/usr/local/share/moon-plasma/modules") - dirs.push("/usr/share/moon-plasma/modules") - dirs.push("modules") // the login session runs from /usr/local/share/moon-plasma + dirs.push(data_home + "/chandra/modules") + dirs.push("/usr/local/share/chandra/modules") + dirs.push("/usr/share/chandra/modules") + dirs.push("modules") // the login session runs from /usr/local/share/chandra // In a source checkout (and from a package directory when running its tests). dirs.push("build/components") dirs.push("../build/components") @@ -693,11 +693,27 @@ fn clamp_menu(v : Int, lo : Int, hi : Int) -> Int { // ---------------------------------------------------------------- saved panel -///| Panel config lives in $XDG_CONFIG_HOME/moon-plasma/panel.edn (default ~/.config). +///| Panel config lives in $XDG_CONFIG_HOME/chandra/panel.edn (default ~/.config). fn panel_config_dir() -> String { + config_base() + "/chandra" +} + +///| +fn config_base() -> String { let c = @sys.getenv("XDG_CONFIG_HOME") - (if c.length() > 0 { c } else { @sys.getenv("HOME") + "/.config" }) + - "/moon-plasma" + if c.length() > 0 { c } else { @sys.getenv("HOME") + "/.config" } +} + +///| Read a saved config file. Before the rename to Chandra it lived under +/// $XDG_CONFIG_HOME/moon-plasma; fall back to that when there is no new copy yet +/// (the next save writes it to the new place). +fn read_config_file(name : String) -> Bytes { + let b = @sys.read_file_bytes(panel_config_dir() + "/" + name) + if b.length() > 0 { + b + } else { + @sys.read_file_bytes(config_base() + "/moon-plasma/" + name) + } } ///| Write the loaded modules, in panel order, as EDN: @@ -708,7 +724,7 @@ pub fn DesktopShell::save_panel_config(self : DesktopShell) -> Unit { return } let sb = StringBuilder::new() - sb.write_string(";; Moon Plasma panel: the wasm modules loaded into it, in order\n") + sb.write_string(";; Chandra panel: the wasm modules loaded into it, in order\n") sb.write_string("{:panel [") let mut first = true for w in self.widgets { @@ -730,7 +746,7 @@ fn DesktopShell::load_panel_config(self : DesktopShell) -> Array[String]? { if !self.persist { return None } - let text = @utf8.decode_lossy(@sys.read_file_bytes(panel_config_dir() + "/panel.edn")) + let text = @utf8.decode_lossy(read_config_file("panel.edn")) let lines : Array[String] = [] for l in text.split("\n") { if !l.trim(chars=" \t\r").to_string().has_prefix(";") { diff --git a/compositor/sys/moon.pkg b/compositor/sys/moon.pkg index 563f5d3..09303d1 100644 --- a/compositor/sys/moon.pkg +++ b/compositor/sys/moon.pkg @@ -1,14 +1,14 @@ import { "moonbitlang/core/builtin", "moonbitlang/core/env" @env, - "moonplasma/desktop/interface/moonplasma/host/sys" @hostsys, - "moonplasma/desktop/interface/moonplasma/host/raster" @hostraster, + "chandra/desktop/interface/chandra/host/sys" @hostsys, + "chandra/desktop/interface/chandra/host/raster" @hostraster, } supported_targets = "+native+wasm" // Native: POSIX through a C shim. Wasm (the compositor as a component): the same API over the -// moonplasma:host/sys imports, implemented by the native host. +// chandra:host/sys imports, implemented by the native host. options( targets: { "sys_native.mbt": ["native"], diff --git a/compositor/sys/sys_wasm.mbt b/compositor/sys/sys_wasm.mbt index 807dfd0..744e3d5 100644 --- a/compositor/sys/sys_wasm.mbt +++ b/compositor/sys/sys_wasm.mbt @@ -1,5 +1,5 @@ ///| The compositor as a wasm component: the same API as sys_native.mbt, with every operation -/// forwarded to the host through the `moonplasma:host/sys` imports. The component holds only +/// forwarded to the host through the `chandra:host/sys` imports. The component holds only /// integer handles (fds) and bytes; the host owns the real descriptors. ///| Encode a String into UTF-8 Bytes. diff --git a/compositor/wasm/moon.pkg b/compositor/wasm/moon.pkg index 8239ec9..fff9f29 100644 --- a/compositor/wasm/moon.pkg +++ b/compositor/wasm/moon.pkg @@ -1,8 +1,8 @@ import { "moonbitlang/core/builtin", - "moonplasma/desktop/interface/moonplasma/desktop/types" @types, - "moonplasma/desktop/interface/moonplasma/desktop/theme" @theme, - "moonplasma/desktop/interface/moonplasma/host/plasmoids" @hostpl, + "chandra/desktop/interface/chandra/desktop/types" @types, + "chandra/desktop/interface/chandra/desktop/theme" @theme, + "chandra/desktop/interface/chandra/host/plasmoids" @hostpl, } supported_targets = "+native+wasm" diff --git a/compositor/wasm/testdata/clock-digital.component.wasm b/compositor/wasm/testdata/clock-digital.component.wasm index 8965b32cae399ff671f1a4c5823da15b77348f9d..7c701da8ec4e5aa6741a9eaa89e566260775d330 100644 GIT binary patch delta 2023 zcmb`IUrbwN6u{5<<`7%{6zJSC-7XORgAc~&U`T4)jb^mBDV>Z5 zw{FRzPut*g!Nf!tli`!X(if+Rf#`#YCK40>JQyYM!5CwLGf^`i=D8g$g_IZLO}_rV zd(OG%yZ8L-^^fqEdsqgcxws7wjLQ=C99nEv5f;lli?I_ZEUr9GKbxZ{@LKfK?+A{d zkX=SAniYha@JuKXN%1u{T70`Y;mXztReMZSu^O{{LQI-QS^hDyvk3`p9tsjwbn#zB z8?Tk_y4NihnY znD0Ew**m_g628xy1IzdpUk?l-a#QCw2-&U9S1l%aSiG!&q{=*b@>rlX#n0tw;@^ z%64m`sAjJ7ZME+5O%j75s2QS2+_vg&1a*sOC2kV!#C4*RxJIld-XH2mkDdQaZ3 zZl~{ewOYSBd#O)mm9-=eLkNo9 z5lHcW1`hMaLBISgoO(e5cq9A#U>}wr7Zag)6gmSt#rWRPj5qK^N1!Vb?1;2?+va0w ze^`qrwL~P-_~kBr3l|?bsC4YHJU%xQi{lvv&9OuzmWqbS%cJI| zE_L~-OR;UgM(@@K!xkPGxzc7r#9S|f!AMa+zz+5dLo}a@ru}K{d^9nqN2k!~C?Kn2$gmw4ca7ECCMl;V6u0Ko zm|Rh^zxfi`Pv`7+M~AnfRJ+%6_qf|Om9yP9SzP*g2hJA0G~Q(M=U#g6z;e*sygz

#e=dbOGUA) z(kG&!WH7C|%D5ZHdWT#xkg{oC{2bPYd@-@si7F;vd?^%f&>KDAt!oEy$T{%#qyf zk(^3e)JthmS}IKjQD`4*ON)<|1+jmiXkS9x2iphHmcA4V3Z;eq0Shhd?1{-<&U+|y zVfXj#%zX3hH#6VtgOBk1C+LIZOxgbxf^9BDmmOwS4kFRj1esHa~Px4YFQX?Ab0z136C zKBX3(?Ho-WO&!S^Gr1$B+MZ|`?f$)T9o&G}6V;mMb68*GjLiw19r&@?>D(jXo90XI zO2K%;Q|}b_^K_+p3;sagS9js>R2_)mRWlwq6~J%I&st|uygNrb!u|L&&4oKLPiA<% z$j_PIg|{OHsAkh7)|zvhURLlL$+3%giQbOwMxY;Kw>dSRZa%A4;Gld)10{|$-1F+1 zukv}>@6|*cxj}VqRiu%yZ0j%!g_>v@-88H)&Ec7M2sd+~a+*;qtz`>m*e@>qCh9)x3{x^acqN z!3GBa2)?b$;^VvUPVT-Ysz`*$+vh=<&iA%ZI^m(edmr7MiQv-MlFcSGuf!A4n#`A= zUwb#u*NJGQCAF`j&|sp)+|?HnHI1yAffT$5Ivjxs9%Ud$x&97%zyA;Hr?&t>DItg^xHs(YZ7*jC;*qu@a{gWdPdG9(>io_EfpZ0+B4A- zZR_sR$H%&kZr|)ZnaV{*jda$?=$V`|+8*oL)*i(_$u)Rlt2Knvk9<^D6nMkGa zsDM~1GnSgxM{|*-H5Nv+0JfFNDgAss{WUlj^CP1DID^B<;X=Spu}>gM8RMiCKieti z2C$|Imm5NI$Cy4dnKQB-qf^G{B;6f)U36`u@!>GNH@v63qciQFMfY7`ge@C!G;cC07`j#>qu?hi62JrmXl&uw>LT8)S zlT#dQsZ7S@G8tEulK9p*$^|z&qS)Fr$4(18DX0sMCbgm@oHg$9u~byGB#bn4a1S1* z3kRFs%az5Iw%S&BD+}$x!O*H}s3^t1w_2M6YCmLuWq+#FVb2Za53O<+WorOq=m6V^ zDAcTwQ<-r?a!l))F@0KAvPSlJR&g1bh<<|4D*l5~6*T8&mk%EQXlv_SW67MJOQm&D otP34(@D@q<%V^~AE50oGD6aet|eKYIMGOIh%Lc8pSS`SW>* zhj%Rw<<1(g0xi1~Yn-(^Q}7jUXD_UuyiZ^^tz=mxCr(LzC%=6a^PUd&79V;#nTa1f zVYX_ylq+6#$C|2}VEnm>JamM8#=cOLJ;KYO5PxY}4?+hRlkii+Fq5pl#%m7t1Yd{m zvN_B|jxvUiBO45?>n&5VOX?RVRdDDMdb@7~-kYYVl&f5a7>FuYSqwns4v^({_^dli z(*iyF*`!%v=NFe~OP-2<%l1rqITp)ww45^YPSx0Wk zF=!+|lFh16&Hi45(?u|-`CY|w2D&2uD91T1h#Q)!lmP&zupe90G@q-Kz{z+3E8=ck z)PjtoCtk}0{2H&t{&+Ku0h z?CovFk>2ky9TN5#d#^wtQaC8=%WW2mML%gk0nR}L(l7`q$Uz1QIG?P?wPaX235nCx lf6w}rJj6U*VlFkBh4!|8Ki-MMgK}F_w5=l(i)LCo{{Yjg*mVE^ delta 838 zcmZwFJxo(^5CHJI*AH4+X~jZXETw#vMx`xkYoOshN|k_dA~A8R1)hTacuh;9m>|W( z(7+&YgOF%KoQQ+byabWSuYtkI0dZk4Br-7=O>ojHiiqJQm*4&W_rJU4J(|LIQ#hSA z_X@6*qNFp)crGink5Oxx}!N@%JZ{{zON>*WwFk(#p-5mul6j$yBl_81*SR zrDR70IPrG~%?J*9h^3|816So)IXxg}p}pzAHPs0E3bCa>-ZvD>D7oR-|J4#(;P9fW z@->`3yyQ6cXW3iu{5$UwuBaPAj|Qhzul}gOv>6;F!d9LxTh8KVnzRJ*8@;kL<1=;J zGHSyQYO-Mjg~#LcrLhaQ$>(XoJYDs8g#5T#@U$Y@=uJ}sD^;KOt`3*zdGiCDqaI&3 z0?qo?5Y-|7gvp2(wPSA3MUZ~9-NW}Z7Ixqo&4*>-6R1DK=diO-76NeVB0EPypk=pM z1G~d zAaE4FqIrWaBTEs0KAk<6&2uvkx3l9`@}zhi@E?Bzv0lG~`^Ml3edeepQ=TIr4y zKn=xsl3uc@UnQqd;o^D@hTt~H5Q9O^(lAW5oqp=={El7J9d%VZ`HccuxDGx@ai;K_ z3?w1WohcfPHqt`WZ%9DL6&=8W`Z0PQ%iFc-cuIy)aQ`1VabeIDI2j7c*9L-pt!I7# DnAGf- diff --git a/compositor/wasm/testdata/pulse.component.wasm b/compositor/wasm/testdata/pulse.component.wasm index 45fe9a884617580a26c425d6d596004a3204f1bb..a0750391be6143a66bdd30553e0efbfcc03394f7 100644 GIT binary patch delta 6298 zcma)Bd2C$Ad4IF}_TcW4`*@Sf>zg4d@eo&{q(ri0i+rR=iXuhbA|;BF$R$Pc@g|p| zct|TJZX2hvY9(uX0=jMBu|;Pmjktne4y{c(RtFr#b(8CWe` z?`Qp<5HX{~#n!*)t!HU-`S4o4&u6la9>{#(+o7*BbAwS4@ z#))`haA^GU?94*)@|IYxadPKpaC@>?o(KkVPB%P(R31EAou(Un^}P|zH$O5sIXROs z`huSCv5XvM*evY-6ZVijV1LZM%f7=x_rJaVufc!M>M;##AdF!s95KisMjrB7{ow#6 z)~Q(7ubvm(>6wk`C3kvmV|pbV)RNZa@JU%$RL#!IlSSNrAqL6wa-}H7?#Qnc{ZHYz z2#{%w;1d^qGi5WMZG^+`%WoC`4jYv5SaopF2O#_-OJ0msMiVg~8N$Q8#B63IY{58geq*67u>hY=`pD(Q_7>-5!VG4+FjbVt0 zwS$6M`GZoW>Jv4-T&6Tt>aiVTLXPY4wjSRr<7J5$q>3E=E~7||5ftw+exDI$_n9>; z|Ff(D@>Y3XO7ocxpQS8iZ5{)kqgk4>hLwh(!xvo2VvS+)BrQQlO;Jp7UCAub zHCl2hmcy4_%BqrCp=DZeDR~ZGQ7*%CB>Dmd?4>5lf#-xuE>egxyUJ^YIM;(Rw3U_jkJ4n8N^=7 zMS1)$sWL9+!V=r(?sTIsOMP~z|- zErA{ zI&Gm&(MdW5iHJunRGwOke7#UUR}Jc%Q@$z-L7apeHOit=fhMn_N~%KmcSXTAy`)&F z8byjwKI*TI*HR7DLMp<-SVuor|A%5e53J0NIO1c5wlN$F6AQl}`zj~UF#fcX%)#)7 zQTg-A-R!C?uX?KqMH;Z-$hR3~Crj6K{nMc2Jo)hy1r_) z^=tIlg)t$g^>|m0f2hZQsNQTMei2ee!dQiXZX#LRR1=Bov1gl7HK)gW7!&dXJ$|gm zU+a;!t5SGodqoOi`@-ZGXeWlq)CxUnS#>m5DO15?Di*icHv<`WDHAFThsMcqL&TPw zR1{N8E14;pq$!tzMW1mgb4q5GW@r|a6bxa1%qvn*EUNvOL~oj>1=opu)sHl7S=HzD zjgF)pEO5|;H0_2e%{9JCE41p$6*~N;OM8~7vb@E3if&TMrJ@CWfhlrC-l@sPO1xR4 zd!`P$i*)-rrUK}uF6w@iy&ji>S~mG{>Y?M0f`=lEGV zLuXwF&}RBvTE7bG0@_we^(`G2`piX_cv;1Di4V|48gOaoGgn+%LWMQN2k8n8x-_ig zu%bmMnznmJXqZO8pxTUIpbZ%!Tc;UqW+Tm<(0%03YBRTQrngEVhS;Vet)?ofR*?cS z#Zkx}l~h-fsd=$M>L>>Ve6&tg)My={-k#UvJ9TtiTR@vQq=dH`O+=(Mnt+Wq(dsg^ zE3P)QiAP-~V53WPXe#fNwe@AJQy!_W?d?=?cBaL7ggWSmiW6PJFLIUpc{)zrC3I#B zNi`2%M1@rJD5=E?GSK!a6b>E##8@n4jmo7R@gQVz=7G)kc5H7` z6D1MC8AyMJ{V*A7J@Bf;*5nZiQ^chq(@~eEUjy0PqA1=i!?L2G09n}AK&4oD77n?m zqk}NK@%3qZ?Ul)f9gU7KtpX9US-Y7cQ}}8PgM8|IWL=BlfTYe!;ME7EVdhU+WAaB0 zE!IrTTID8AYo#6v1}!-p^UK9kSkFyqTJ)*{Y>xIkY#Pnx&^<@E{Bx+%T9q!Q1R_GHSD9 zb^!KTmAxXjIBf=t^VABF7KpTH5l@YgCr;VXZmcQ37m1T?Y6X!W?R}>L^LV#iMBS63 z%l@e`#gE!=G3unFc1lImLDu7L`;^gAahIW*@3JsnxhQmW{RQf<;wbqzZ-@Q%4VS|c z{Dl2oMkj2K?S;Y~*Ja(V)B;lv1dc)Am=e&s^Y|GAX{R#m_x*N=&a~XZpJk`4S$-Of zr#CcbOyJlB|M!X!<+vDj*Dzs!-H#JeEk1EEWPizzuS2jg;PMXIp(%024$X+mF8?JO zpiAJn1m_39ci!c@Xs5u_@A6!r^K=0`7r=8KJiTrZeJU5{s25K5Z8=H3;5Z9M&nid5 z$Gf#X$9rS ztT|f73avo=8pN+@@jSJW(X#jrJ7Q&td(6J|=g;0Uttj1NbYq`ks%QS^!E}%DwMvuL ztlQXKu$qFi;->9&_*c>6a&6{_FR}<)L5>vZy^ z*iACf@s`{k=S8(Y@9|}z9eDAHrtF~ABn)d=zWvPJtQPJ^+wdPTo6#p*pkv>m`}2+y?xMo>Lh4z+=&P>LR~emGM)B-ZM)B-bM)5qSjK0cv9u$;1;w%)L(F%?N zD09SV0H-w21)$s!Cjp$WKTV-px`9+U_{q~QdNj*1ZS)n_=qrqlDWiCHE2DUJDWiBE zRYqT7JRb_k5uH$QL@PK1fIFfCK)VK-00;-irFL;x1K3q|r6XDekQR;D+UPf2qu*d; zE2DTe%NJT`Z@YL}bM1y)wIdEf?0^RL0NCb;rvU8Nz+M2`9kCDf{m(7U5ZtBVZGdYX zu@ii84QvNc=ZFRXJ2X%OpxzPn5FBV#f>j!h0d8JTAx6~lho5gAs8eCu#m-i;V}+qE+szr5)C=X(?%Mn?as1Bu_jKENshwS~>)Frn3yS6^R?n=kj8{41a z_1T7D%oy{=s1Y|3#+Wf^OdG?P4`M!REEf-wRf{K>D3_Q=@SMazho(}PnZhR>WD z9G_+%%Ijla&bZH9FeaOpWBKgM%xml%pB^5cA4wz|Hg4-4UgK8X;~*|F^BZt&=lKi; zm!9&y@gL+n9>z>u?F}1V!|3@X}&V~r2Ej8%m$`tkKLZipHAKOyct=apZ>%bGn%rt;?SvxZ!WPtStKXc zqU)!UC7w_fGs-uX9=O+M8uEu@yKC--9}{OEnT8Sl|L03amLi``q?<0EY+s66Pe?sw z`#+Q6&D;k*L)lOk3~r|7mrLbOPD?QKo7wQ^gnw%;f|0Zo^ zSp?GRE|`8_9`tTiU7`H%<$U=sD|Ylnk2lAtNG@;Y1@VL#ZOsQ(iyF%xO$QGQk1R|i zXJ&UMmuE*7ns>z;Kw1U;AD3N}IsgCw delta 7356 zcmcgxdvI09dH?p@b05;Zl8)ZeMS|T0353wqBS6f<;6uiB5@#}*X)0~C;+5wCK^RNxrV890Pu#Ley4K^5T`ule8 zmAE$KkN!~xo!$L?-+ue;x4Xan&bdS9#J!ir1AizPCumG>U*D4c#oYtFVfWoN5AMCA zq)Ct*0oN_BUGp7rhf^|E(C86(XnFOTS0gpzbMR@m&KcSm7DfM~Ip!3_dV6~Nmj1}0@gqL1iq}{4 z_w_I9r&p-?T6lEoRhoD$P#><17uCE*opZZ?u<(2ReFKBvD-btWGdrm31`6TIWwBb? zMIG0dk50Wo6ACPHhfdl(tnNl!k@9c)Hf=WS^3$++f}mG#&`QRd=cWebRC1dhZY(869)8 zzKBAY{Lk?F_5bJ`qVV1NrlLa>1(dv89#*EuW{yxgDoHykB84wJG*P;Ns*#ZiM7o|I zb*fg@$Xf3xh27~<4vN1|KjR#suw~R}Zhh4j^G7Le{j)8eK>?NRwm5Bz@&+}Hhe-H! zf!ZNt@dQf9V)(jCsGULr*(oqgIu%RGxK8rmDQ^O4sR=kxMZpguBkS6?*!KPCy_(PqjEZShlE{C2dRmCLg#W9L0HtH{W# z-XQ6*V2|-?H%S1y^MhhmZ|3Ctj8l6_0@$0EV^;f(+|_TBdW$4lZ{>xU(gBiLSWoCf z#^oVW2T1}v$S!l($^&)S7)a=MpyKMIq>hjTb|kM-5vX@_D(^!jp^uSzk0h}7@+y^q zI-XNG36+%ofYb?+z)sM2b0Z;sr;JWYdR``fCe&$?fKMAssR)OuoTE`;!sL#GsZ~}m z-iC*oBwOVq-ZUr2)KBN-hsf2h6Z+sWT~%UYn0%+jzvR`bF4-x&ayumz=*hB@yU&p3 z6#a#iSsRV|K+WP#3B8`9t=E~5tR*#D&XTip&ZGnNB3Z3XMr)&q%1fj+kc4DIJ}RRE zwK=D_%_wd)vDrfEWs;D*oL6iJI@R`^=4;SQ=vT?Z_IiaR;8*f$jX0}TOYNdCp&A_& z&8p?=yU-^kchNOr-ANL*MuiAt)IuceTt2v@tDycan52~uPJy6(MO)O04 z@v2!i$z~QmuhJ!aN<|VOj=@ZLSS_vL4#G!V_X#i_T1hFAKMNP=MND?DYZ*O6$%9^a zQFl4-QrJ57Y37I>V-1a*u|?T9LnEEG_;VCcS!RoWv&A25v47l{I`#qF6w_cX(n-uJ zZn?>8GDh2N@y#Ydn=lj-gy!l;1s~!^gnC#=U=JH=`!96BxVvp}(H7}u zvrVQp4>MFugThFcm~kyb#hIaSCJc2Q!-8CMNbJ}+%kSspCwM#XkpXbr9@jYHr#>)p zSD!NdPm%<1GB3xD&f>IS09T(i2Ecy+&g2y^xpPLI&=;`NNS`O>L|`A6JoVB?;^* zj}+cIewg-R+HiK636-Ti6RNEw4IgedQ{6@qz_$EM5Gw3_Bj@wrs#p0KNSq2AN`wl# z8**3gA~n3%tq^f~9kd5&0;I}u*i8zg3h<4596)=ZQKPco#9<$)VQRH;0PTTKjmkk2 zhXbVEW_Fct=dFPDhH@%Lppw#uNgW~y>=0SDFgxz3(Mid&YtAQf1HkVXOH6w)Z7zXw z6DFp;aM6VN*5QpaP8wEh=2$ezak9w-0+_3}Fzs!j@RrX(QqQQX(z0Hrfrhgt*0c<7htVud$tol`QjL+Lz0(wB@R z8$=|FT<<0=yh9KW@(Ue7(?Qebe$$ZAeIP_S>%B+eTN5+IYye3ok6zI_{%fYm-HMTh z+6H!JQkrO)Gf|>aGAUCzAr`943e9a+t~^Y4 zC#|mgW27jV6)R#{XN8lE;4iu&p7pL$*wyx=bCK5UY&$HRlcnMB+ZQ*2Txw+uam7*y z6grJXz?#Tqq9AEp7dB*>Jv-9-uYeU6opTBPGqImI%O5C zb+WaDy{dhO)ts(2=RAcSU9}AtD9Yjn{gA+hct|AGR5?XXwR+uMQ>xaHU+g_8)LN3W z0*mpr5FFn5~Jb2gFTWFwB$f+u9cS_Q^LJp3a6xtL!Jrkt}9 z|2#kIogw5JP)2fLV^_3DAxFgwCnI6xc_Cx8kv~HI&tsf6w(uhZGW35E^Rg{SCNU(a z({wrn?Or{EXP-Wp>xqOE;se|hj|>xRhUwUJc+05n&#CU?*6KJ zyU#jumFI$2CqELXM?t`qzF0Fb^?66k3OlFGaL&@2-f0^}Yf^|6l0d#6=h!xa6ZVJ` zEdo15@K=`g6W(l19;WcuGbVfMNyR{9v9G$ffVJ0C_{5Bw+W}U{2qYQ(pvxI6MIHWlTrZQQxT0sNDEN9Ek~>udVO@YXUogp~8MkNG<2~H_gl_}$6!snv z@T>@g?7c{+{XQjrC9*yU=p}-CSB&;1QV$8-A#Q+Zd1xWu1P}^u11T2ZmcW7ENcsT* z7PwRW6N5#8{+R*qx1he4(c(b=t3mIx=ua3-2KuKAhHuWiEekXESQ!?U{E|TbgX!>N z3nG^zzckRR47k#Qc#8$41$eV%FR(o91s2%D0zZivVsW43#hs386qPHeB)D=J6_+cY zphBpqa$K7nUThv%x@aw(V)NyJ#@jZ)k1UAPmHdhTxhjL_EeN(IzcSFsSOK21;92X) z6V{O@1P%Z@g31}=2r8$IBdDCp8c&`OSbMYAaGYT218WKIwS**CpD^HY3m##xCeS$f z(8Q7F$s;=>E|9>nBd8oTj-Yac$9EYzY#e!9VB_H`2=EHd zmWHe)kQDj#0Vt5c0~Q32;X(@VD$gK@j~zjtO8%%o?>FE+3+}a!JZ2qvOn?X35mesf z@e^FzV;n(cw{he#p{ii1A<*DIm6P&Anp_fk)xA8 zCg68dfUj6^yLDu>b!4@W+j;zyL~WaK1eLAE5mdGqM^+0}4NEf6$p2tzv$Zq}m zOrs0kn*u$9drvpWmw+?}dKx1)8Duh$@qzv_kkGs37Vg|(1kDh%1iGD7GX@zCWMZJ( z7@1^{2|!u{-O8Qsv7N^mK^lU#K#yfrZIDqwGJ#f%NP{#0X%F-m?tJl@L56eYjLW{vgtZbhP2M&_Hs?SK#8mHX<6!y3(iHj7wPE3RW#wade!(6pL1wN}$yd;M*Qr%&=xEDIPG~Kj#N=|4*)JIEcK4qvEwLV%x{j`|6X#nkRp#8KA?E&fu|9##!r%rK~bocg9rfvA6a(DZ@ zo`FS!ef{lo`+EEPmh>zc9BA)fws@eYeSXi9TRJkGnU3)MyuWe8e}~;Y|1$YGVNFz4 z+`VwHZMe_$fdvbDMJOWFwQ$M2g-d(p4vvfw;;VgFJeaC%yN(P$4AiyZGq!U*A%02- z`v#-o>K|^d8*qeh@x^-{MTjDWzX_x&MBxYiRK@3i1lTseT>K_HF#n#$33dk6RfRM7 z;lkz1`Uk=l3m)*g9U|cte*3Qla)ZzGjbX5Gl-FZAeerXB9oza-KLCX9EUfkBn%;%K zLNwZ+577NaKQM&f30k}k!6SU(hlxb^o8UfYD7j|(qM_)TJMJ9il#CaohF3mZ6|ZZL zxt$wa|YHC7kh zXrYqDUs#`b)t_3MWU6pU(q>6YZnPer5tm+PEvDY}HSzOs Result[Plasmoid, String] { match h { -1 => "not a wasm file" -2 => "cannot read file" - -3 | -4 => "no plasmoid (moonplasma:desktop/plasmoid) in this module" + -3 | -4 => "no plasmoid (chandra:desktop/plasmoid) in this module" _ => "wasm runtime error" }, ) @@ -266,7 +266,7 @@ pub fn load(path : String, tokens : @theme.Tokens) -> Result[Plasmoid, String] { } } -///| Names of the moonplasma interfaces (besides types/theme) the widget at `h` imports. +///| Names of the chandra interfaces (besides types/theme) the widget at `h` imports. fn read_imports(h : Int) -> Array[String] { let buf = Bytes::make(512, b'\x00') let n = c_wasm_imports(h, buf) diff --git a/compositor/wasm/wasm_stub.c b/compositor/wasm/wasm_stub.c index 6c8a732..39a8162 100644 --- a/compositor/wasm/wasm_stub.c +++ b/compositor/wasm/wasm_stub.c @@ -1,4 +1,4 @@ -/* Wasm plasmoid host: runs the core module of a moonplasma plasmoid component +/* Wasm plasmoid host: runs the core module of a chandra plasmoid component * (or a bare core module) with wasmer's C API. Canonical-ABI marshalling stays in * MoonBit; this file instantiates, provides the host imports (theme, clock) and * exposes raw calls plus guest-memory reads. */ @@ -18,13 +18,13 @@ #define MAX_INST 512 enum { EX_INFO, EX_RENDER, EX_ONEVENT, EX_POPUP, EX_POST_INFO, EX_POST_RENDER, EX_POST_POPUP, EX_REALLOC, EX_N }; static const char *ex_names[EX_N] = { - "moonplasma:desktop/plasmoid@0.1.0#info", - "moonplasma:desktop/plasmoid@0.1.0#render", - "moonplasma:desktop/plasmoid@0.1.0#on-event", - "moonplasma:desktop/plasmoid@0.1.0#popup", - "cabi_post_moonplasma:desktop/plasmoid@0.1.0#info", - "cabi_post_moonplasma:desktop/plasmoid@0.1.0#render", - "cabi_post_moonplasma:desktop/plasmoid@0.1.0#popup", + "chandra:desktop/plasmoid@0.1.0#info", + "chandra:desktop/plasmoid@0.1.0#render", + "chandra:desktop/plasmoid@0.1.0#on-event", + "chandra:desktop/plasmoid@0.1.0#popup", + "cabi_post_chandra:desktop/plasmoid@0.1.0#info", + "cabi_post_chandra:desktop/plasmoid@0.1.0#render", + "cabi_post_chandra:desktop/plasmoid@0.1.0#popup", "cabi_realloc", }; @@ -381,9 +381,9 @@ static int load_bytes(Inst *in, const uint8_t *d, size_t n) { } -/* "moonplasma:desktop/@" -> (copied, NUL-terminated); "" for anything else. */ +/* "chandra:desktop/@" -> (copied, NUL-terminated); "" for anything else. */ static void iface_of(const wasm_name_t *m, char *out, size_t cap) { - const char *pre = "moonplasma:desktop/"; + const char *pre = "chandra:desktop/"; size_t pl = strlen(pre); out[0] = 0; if (m->size <= pl || memcmp(m->data, pre, pl) != 0) return; diff --git a/compositor/wasm/wasm_test.mbt b/compositor/wasm/wasm_test.mbt index 313bf80..35c5ea9 100644 --- a/compositor/wasm/wasm_test.mbt +++ b/compositor/wasm/wasm_test.mbt @@ -33,7 +33,7 @@ fn load_fixture(name : String) -> Result[Plasmoid, String] { ///| test "a plasmoid component loads and renders through wasmer" { let p = load_fixture("clock-digital.component.wasm").unwrap() - assert_eq(p.id, "org.moonplasma.clock.digital") + assert_eq(p.id, "org.chandra.clock.digital") assert_true(p.pref_w > 0 && p.pref_h > 0) let ops = p.render(p.pref_w, p.pref_h, test_tokens()) assert_true(ops.length() > 0) @@ -56,7 +56,7 @@ test "a plasmoid component loads and renders through wasmer" { ///| test "a bare core module loads too, and junk is rejected" { let p = load_fixture("clock-digital.core.wasm").unwrap() - assert_eq(p.id, "org.moonplasma.clock.digital") + assert_eq(p.id, "org.chandra.clock.digital") p.unload() assert_true(load("/nonexistent.wasm", test_tokens()) is Err(_)) } diff --git a/compositor/wayland/moon.pkg b/compositor/wayland/moon.pkg index 1c31745..f3707a2 100644 --- a/compositor/wayland/moon.pkg +++ b/compositor/wayland/moon.pkg @@ -1,7 +1,7 @@ import { "moonbitlang/core/builtin", - "moonplasma/desktop/compositor/sys" @sys, - "moonplasma/desktop/compositor/scene" @scene, + "chandra/desktop/compositor/sys" @sys, + "chandra/desktop/compositor/scene" @scene, } supported_targets = "+native+wasm" diff --git a/compositor/wayland/server.mbt b/compositor/wayland/server.mbt index 25b657e..f769a49 100644 --- a/compositor/wayland/server.mbt +++ b/compositor/wayland/server.mbt @@ -359,7 +359,7 @@ fn emit_output_info( g.i32(340) g.i32(190) g.i32(0) - g.str("MoonPlasma") + g.str("Chandra") g.str("Virtual-1") g.i32(0) c.send_msg(g.finish_msg(out_id, 0U)) @@ -1216,7 +1216,7 @@ pub fn WaylandServer::set_keymap(self : WaylandServer, keymap : Bytes) -> Unit { ///| fn WaylandServer::send_keymap(self : WaylandServer, c : ClientConn, kid : UInt) -> Unit { if self.keymap.length() > 0 { - let fd = @sys.memfd_create("moon-plasma-keymap", self.keymap.length()) + let fd = @sys.memfd_create("chandra-keymap", self.keymap.length()) if fd >= 0 { ignore(@sys.pwrite_bytes(fd, self.keymap, 0)) let w = WireWriter::new() diff --git a/config/apps.json b/config/apps.json index 8ca5d24..6099d0d 100644 --- a/config/apps.json +++ b/config/apps.json @@ -1,12 +1,12 @@ [ - {"id": "org.moonplasma.terminal", "name": "Terminal", "comment": "Command-line shell", "category": "System", "glyph": ">_"}, - {"id": "org.moonplasma.files", "name": "Files", "comment": "Browse folders and files", "category": "Utilities", "glyph": "F"}, - {"id": "org.moonplasma.browser", "name": "Web Browser", "comment": "Browse the web", "category": "Internet", "glyph": "W"}, - {"id": "org.moonplasma.settings", "name": "System Settings", "comment": "Configure the desktop", "category": "System", "glyph": "S"}, - {"id": "org.moonplasma.editor", "name": "Text Editor", "comment": "Edit plain text files", "category": "Utilities", "glyph": "T"}, - {"id": "org.moonplasma.music", "name": "Music Player", "comment": "Play your music library", "category": "Multimedia", "glyph": "M"}, - {"id": "org.moonplasma.calc", "name": "Calculator", "comment": "Do quick calculations", "category": "Utilities", "glyph": "="}, - {"id": "org.moonplasma.monitor", "name": "System Monitor", "comment": "Processes and resources", "category": "System", "glyph": "%"}, - {"id": "org.moonplasma.photos", "name": "Image Viewer", "comment": "View pictures", "category": "Graphics", "glyph": "I"}, - {"id": "org.moonplasma.notes", "name": "Notes", "comment": "Sticky notes", "category": "Office", "glyph": "N"} + {"id": "org.chandra.terminal", "name": "Terminal", "comment": "Command-line shell", "category": "System", "glyph": ">_"}, + {"id": "org.chandra.files", "name": "Files", "comment": "Browse folders and files", "category": "Utilities", "glyph": "F"}, + {"id": "org.chandra.browser", "name": "Web Browser", "comment": "Browse the web", "category": "Internet", "glyph": "W"}, + {"id": "org.chandra.settings", "name": "System Settings", "comment": "Configure the desktop", "category": "System", "glyph": "S"}, + {"id": "org.chandra.editor", "name": "Text Editor", "comment": "Edit plain text files", "category": "Utilities", "glyph": "T"}, + {"id": "org.chandra.music", "name": "Music Player", "comment": "Play your music library", "category": "Multimedia", "glyph": "M"}, + {"id": "org.chandra.calc", "name": "Calculator", "comment": "Do quick calculations", "category": "Utilities", "glyph": "="}, + {"id": "org.chandra.monitor", "name": "System Monitor", "comment": "Processes and resources", "category": "System", "glyph": "%"}, + {"id": "org.chandra.photos", "name": "Image Viewer", "comment": "View pictures", "category": "Graphics", "glyph": "I"}, + {"id": "org.chandra.notes", "name": "Notes", "comment": "Sticky notes", "category": "Office", "glyph": "N"} ] diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 9967510..244885f 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -1,9 +1,9 @@ -# moon-plasma architecture +# chandra architecture > Status legend used throughout: **[M0]** implemented in this repository today, > **[designed]** interface sketched here but not in `wit/` yet, **[open]** needs a decision. -moon-plasma is a KDE-Plasma-like desktop in which **every part is a WebAssembly +chandra is a KDE-Plasma-like desktop in which **every part is a WebAssembly component** (Component Model, WIT-defined interfaces, written in MoonBit) running on top of a deliberately tiny trusted **host**. The point is not to clone Plasma pixel for pixel; it is to take Plasma's *decomposition* (shell / window manager / @@ -12,7 +12,7 @@ versioned, permission-checked, hot-swappable interface. ## 1. Plasma → component-model map -| Plasma piece | What it does | moon-plasma counterpart | Component or host? | +| Plasma piece | What it does | chandra counterpart | Component or host? | |---|---|---|---| | `plasmashell` (containments, panels) | Hosts the desktop & panels, loads plasmoids | `shell` component exporting `desktop-surface` + `panel-layout` **[M0]** | component | | Plasmoids / widgets (QML + C++/JS) | Clock, task manager, kickoff… | `widget` world exporting `plasmoid` **[M0]**: `digital-clock`, `binary-clock`, `launcher` | component, one instance per widget | @@ -187,7 +187,7 @@ WASI-style, deny-by-default: ## 7. Versioning WIT packages -* Packages are semver'd (`moonplasma:desktop@0.1.0`). While `0.x`, any minor may +* Packages are semver'd (`chandra:desktop@0.1.0`). While `0.x`, any minor may break; components pin the exact package version in their world. * From `1.0`: **additive-only minors** – new interfaces, new functions, new worlds, new variant cases at the *end* only when consumers are required to @@ -195,9 +195,9 @@ WASI-style, deny-by-default: grow (e.g. `plasmoid-info`, `tokens`) should become `record` + `option`/`list` extension points before 1.0, or be replaced by a new interface version (`plasmoid@1.1`) that the host serves alongside the old one. -* Split by domain so versions move independently: `moonplasma:desktop` (types, - theme, plasmoid, panel), later `moonplasma:wm`, `moonplasma:search`, - `moonplasma:notify`, `moonplasma:config`, `moonplasma:session`, `moonplasma:vfs`. +* Split by domain so versions move independently: `chandra:desktop` (types, + theme, plasmoid, panel), later `chandra:wm`, `chandra:search`, + `chandra:notify`, `chandra:config`, `chandra:session`, `chandra:vfs`. * The host advertises the set of interface versions it implements and may serve N and N-1 side by side via adapters; a component declares what it targets and fails to load otherwise (no silent downgrade). @@ -223,7 +223,7 @@ does **not** transfer is `host/src/desktop.mjs`; it is intentionally small ## 9. Interface catalogue -Implemented in `wit/` (package `moonplasma:desktop@0.1.0`): +Implemented in `wit/` (package `chandra:desktop@0.1.0`): | Interface | Purpose | |---|---| diff --git a/docs/TOOLCHAIN.md b/docs/TOOLCHAIN.md index 45cd441..ee0b980 100644 --- a/docs/TOOLCHAIN.md +++ b/docs/TOOLCHAIN.md @@ -47,7 +47,7 @@ Component sizes are 24–33 KB each (release build, no wasm-opt). * Generated helper functions are emitted in nondeterministic order, so `scripts/gen-bindings.sh --check` compares sorted lines, not bytes. * `moon.mod.json` is no longer accepted by this moon (0.1.20261119): use `moon.mod`. -* jco strips the `@version` from import keys (`moonplasma:desktop/clock`), and +* jco strips the `@version` from import keys (`chandra:desktop/clock`), and maps WIT `variant` → `{tag, val}`, `enum` → string, `option` → value/`undefined`, `result` import returns → `{tag:'ok'|'err', val}` (or throw). * `moon test` runs on the wasm target through `moonrun`; packages that import the @@ -60,7 +60,7 @@ Component sizes are 24–33 KB each (release build, no wasm-opt). | Package | Relevance | Backends / caveat | |---|---|---| -| `mizchi/wit` 0.4.x | WIT parser/resolver in MoonBit | could power an in-MoonBit `moon-plasma` CLI that inspects worlds; not needed at M0 | +| `mizchi/wit` 0.4.x | WIT parser/resolver in MoonBit | could power an in-MoonBit `chandra` CLI that inspects worlds; not needed at M0 | | `moonrockz/wit` | WIT scanner/CST/formatter | same | | `mizchi/wite` 0.11 | component-aware analyzer/optimizer (`wite` can verify a component against WIT, compose WAC) | candidate replacement for `wasm-tools` size/verify steps | | `moonbitlang/async` | async runtime (native/…); not a component-model async | the component-model async ABI (WASIp3) is in wit-bindgen's backend but out of scope until hosts support it | @@ -96,16 +96,16 @@ wit-bindgen 0.63.0, wasmtime 51.0.0, jco 1.42.0, Node 20/24. ```bash wit-bindgen moonbit wit --world clock-widget --out-dir . \ - --gen-dir components/clock-digital/gen --project-name moonplasma/desktop --ignore-module-file + --gen-dir components/clock-digital/gen --project-name chandra/desktop --ignore-module-file moon build --target wasm --release wasm-tools component embed wit _build/wasm/release/build/components/clock-digital/gen/gen.wasm \ --world clock-widget --encoding utf16 -o e.wasm wasm-tools component new e.wasm -o build/components/clock-digital.wasm wasm-tools component wit build/components/clock-digital.wasm -# world root { import moonplasma:desktop/types@0.1.0; -# import moonplasma:desktop/clock@0.1.0; -# import moonplasma:desktop/theme@0.1.0; -# export moonplasma:desktop/plasmoid@0.1.0; } +# world root { import chandra:desktop/types@0.1.0; +# import chandra:desktop/clock@0.1.0; +# import chandra:desktop/theme@0.1.0; +# export chandra:desktop/plasmoid@0.1.0; } jco transpile build/components/clock-digital.wasm -o build/jco/clock-digital --instantiation async node host/src/cli.mjs --time 2026-11-24T14:07:00 # instantiates all components, prints the desktop ``` diff --git a/docs/compositor-design.md b/docs/compositor-design.md index eb20ab0..0cf0118 100644 --- a/docs/compositor-design.md +++ b/docs/compositor-design.md @@ -1,7 +1,7 @@ -# `moon-plasma` Compositor & Window Manager Architecture +# `chandra` Compositor & Window Manager Architecture > **Target repository:** [experiments/moon-plasma](https://git.site.latha.org/experiments/moon-plasma) -> **Scope:** Architectural design for evolving `moon-plasma` from its M0 JS/Canvas2D proof-of-concept into a native Wayland compositor and hot-swappable Window Manager (M3–M8), preserving its core invariant: **every policy is a sandboxed MoonBit WebAssembly component; the host only owns mechanism, devices, and scanout.** +> **Scope:** Architectural design for evolving `chandra` from its M0 JS/Canvas2D proof-of-concept into a native Wayland compositor and hot-swappable Window Manager (M3–M8), preserving its core invariant: **every policy is a sandboxed MoonBit WebAssembly component; the host only owns mechanism, devices, and scanout.** --- @@ -9,7 +9,7 @@ Traditional Wayland compositors (KWin, Sway, Mutter) bundle device management, Wayland protocol state, GPU compositing, window management policy, decorations, and shell UI into a single privileged process. A crash or logic bug in a decoration or tiling script can bring down the entire display server. -`moon-plasma` inverts this by splitting the compositor along a **typed WebAssembly Component Model (WIT) boundary**: +`chandra` inverts this by splitting the compositor along a **typed WebAssembly Component Model (WIT) boundary**: | Layer | Responsibility | Implementation | Trust Level | | :--- | :--- | :--- | :--- | @@ -81,14 +81,14 @@ In M0 (`host/src/desktop.mjs`), the host hardcodes hit-testing. In the composito ## 3. WIT Interface Design (`wit/` Extensions) -Building on `moonplasma:desktop@0.1.0` (`wit/types.wit`, `wit/plasmoid.wit`, `wit/shell.wit`), the compositor introduces two new domain packages (per `docs/ARCHITECTURE.md` §7 versioning rules) while remaining compatible with `wit-bindgen moonbit` 0.63.0 (`--encoding utf16`). +Building on `chandra:desktop@0.1.0` (`wit/types.wit`, `wit/plasmoid.wit`, `wit/shell.wit`), the compositor introduces two new domain packages (per `docs/ARCHITECTURE.md` §7 versioning rules) while remaining compatible with `wit-bindgen moonbit` 0.63.0 (`--encoding utf16`). -### 3.1 `moonplasma:compositor/surface@0.2.0` +### 3.1 `chandra:compositor/surface@0.2.0` ```wit -package moonplasma:compositor@0.2.0; +package chandra:compositor@0.2.0; interface surface { - use moonplasma:desktop/types@0.1.0.{size, rect}; + use chandra:desktop/types@0.1.0.{size, rect}; /// Unforgeable host handle to a committed client buffer (SHM or DMA-BUF). /// Components cannot read pixels; they can only inspect metadata and @@ -102,7 +102,7 @@ interface surface { /// Extended render-list op for compositing foreign surfaces & cached layers. variant composite-op { - draw(moonplasma:desktop/types@0.1.0.draw-op), + draw(chandra:desktop/types@0.1.0.draw-op), draw-surface(surface-draw), push-opacity(u8), pop-opacity, @@ -117,13 +117,13 @@ interface surface { } ``` -### 3.2 `moonplasma:wm/policy@0.2.0` +### 3.2 `chandra:wm/policy@0.2.0` ```wit -package moonplasma:wm@0.2.0; +package chandra:wm@0.2.0; interface policy { - use moonplasma:desktop/types@0.1.0.{rect, size, point, input-event}; - use moonplasma:compositor/surface@0.2.0.{buffer-surface, composite-op}; + use chandra:desktop/types@0.1.0.{rect, size, point, input-event}; + use chandra:compositor/surface@0.2.0.{buffer-surface, composite-op}; type window-id = u64; @@ -206,7 +206,7 @@ compositor/ │ ├── renderer.mbt # Pixmap, SrcOver blending, rounded rects, 5x7 font, shm blit, PNG/PPM │ └── renderer_test.mbt # Unit tests (wasm + native) ├── host/ # Compositor host wiring WaylandServer + lib/wm + SceneGraph + Renderer -│ ├── compositor.mbt # MoonPlasmaCompositor +│ ├── compositor.mbt # ChandraCompositor │ └── e2e_test.mbt # Native e2e Wayland client + SCM_RIGHTS + BSP/Floating + PNG test └── bin/ # Standalone native compositor binary └── main.mbt # CLI (--socket, --theme) @@ -215,14 +215,14 @@ compositor/ ### 4.2 MoonBit Components & Pure Libraries Following the existing `lib/*` + `components/*/gen/stub.mbt` split: - `lib/wm/`: Pure MoonBit tiling/stacking/focus state machines (unit-tested with `moon test` on both `wasm` and `native`). -- `components/wm-hybrid/`: Hybrid BSP tiling / Floating / Monocle WM component implementing `moonplasma:wm/policy`. +- `components/wm-hybrid/`: Hybrid BSP tiling / Floating / Monocle WM component implementing `chandra:wm/policy`. - `components/decoration-breeze/`: Default server-side decoration component. --- ## 5. Event Loop & Concurrency Model -As documented in `docs/TOOLCHAIN.md`, `moonbitlang/async` targets native/JS runtimes and is **not** WASI P3 component-model async. In the pure-MoonBit native compositor (`compositor/host/`), `MoonPlasmaCompositor::step()` drives a non-blocking poll loop over the listening Unix socket and connected Wayland client fds, dispatching `CompositorEvent`s into `@wm.WmState` and updating `SceneGraph` + `DamageTracker` synchronously with zero thread contention. +As documented in `docs/TOOLCHAIN.md`, `moonbitlang/async` targets native/JS runtimes and is **not** WASI P3 component-model async. In the pure-MoonBit native compositor (`compositor/host/`), `ChandraCompositor::step()` drives a non-blocking poll loop over the listening Unix socket and connected Wayland client fds, dispatching `CompositorEvent`s into `@wm.WmState` and updating `SceneGraph` + `DamageTracker` synchronously with zero thread contention. --- @@ -253,17 +253,17 @@ Each output renders a layered tree evaluated bottom-to-top: | Phase | Milestone | Deliverable | Verification Gate | | :--- | :--- | :--- | :--- | | **Phase 1** | **M3** | **Pure MoonBit Native Compositor** (`compositor/` with Wayland wire server, `lib/wm`, Breeze SSD, software rasterizer, PNG encoder). | `moon test --target native compositor/renderer compositor/host` passes e2e Wayland client + `SCM_RIGHTS` + BSP/Floating + PNG verification. | -| **Phase 2** | **M4** | **WM World & Components** (`moonplasma:wm/policy`, `decoration`, `components/wm-hybrid`, `components/decoration-breeze`). | `moon test` passes on `lib/wm`; `scripts/build-wm.sh` builds Wasm components cleanly. | +| **Phase 2** | **M4** | **WM World & Components** (`chandra:wm/policy`, `decoration`, `components/wm-hybrid`, `components/decoration-breeze`). | `moon test` passes on `lib/wm`; `scripts/build-wm.sh` builds Wasm components cleanly. | | **Phase 3** | **M5+** | **Interactive Input & Live Display Backend** (`wl_pointer` / `wl_keyboard` forwarding, DRM/KMS or nested X11/Wayland scanout). | Launch real Wayland clients (`foot`, `weston-terminal`) interactively. | --- ## 8. Window Manager (WM) Architecture -In `moon-plasma`, the **Window Manager is pure MoonBit policy** (`lib/wm/` and `components/wm-hybrid/`), completely decoupled from Wayland wire serialization and pixel rendering. +In `chandra`, the **Window Manager is pure MoonBit policy** (`lib/wm/` and `components/wm-hybrid/`), completely decoupled from Wayland wire serialization and pixel rendering. ### 8.1 Integration with the Compositor & Wayland Protocols -`MoonPlasmaCompositor` translates Wayland protocol events into `lib/wm` calls and applies the returned `Array[WmAction]` back to `WaylandServer`: +`ChandraCompositor` translates Wayland protocol events into `lib/wm` calls and applies the returned `Array[WmAction]` back to `WaylandServer`: | Wayland / Shell Event | Compositor (`compositor/wayland`) Action | WM (`lib/wm`) Role | | :--- | :--- | :--- | @@ -304,10 +304,10 @@ Workspace - **Negotiation:** On `xdg_toplevel` creation, the host advertises `zxdg_decoration_manager_v1` with default mode `ServerSide`. - Clients that accept SSD (most Qt/GTK/terminal apps) omit client shadows/titlebars; the host invokes the `decoration` MoonBit component. - Clients that insist on CSD (e.g., GTK4/libadwaita apps requesting `ClientSide`) are honored and wrapped in a minimal `0px` decoration node (only focus ring if configured). -- **`moonplasma:wm/decoration@0.2.0` Interface:** +- **`chandra:wm/decoration@0.2.0` Interface:** ```wit interface decoration { - use moonplasma:desktop/types@0.1.0.{rect, size, draw-op}; + use chandra:desktop/types@0.1.0.{rect, size, draw-op}; use policy.{window-state}; enum hit-role { none, titlebar, close, maximize, minimize, resize-n, resize-s, resize-e, resize-w, resize-nw, resize-ne, resize-sw, resize-se } @@ -330,7 +330,7 @@ Workspace - On startup, `wm-policy` registers bindings (e.g., `Super+Return` → launch terminal, `Super+Q` → close focused, `Super+1..9` → switch workspace, `Super+Space` → toggle floating/tiled, `Alt+Tab` → cycle MRU). - The host matches raw `xkbcommon` keysyms + modifiers in the input hot-path *before* forwarding to the focused Wayland client, invoking `wm.on-action(action_id)` on match. - **Host-Mediated Shell/Taskbar IPC (`window-registry` read-only grant):** - - Instead of an ad-hoc UNIX socket protocol (`plasma-shell` / `hyprctl`), `moon-plasma` panels, taskbars, and pager plasmoids import a **capability-attenuated `window-registry` WIT interface**: + - Instead of an ad-hoc UNIX socket protocol (`plasma-shell` / `hyprctl`), `chandra` panels, taskbars, and pager plasmoids import a **capability-attenuated `window-registry` WIT interface**: - `list-windows() -> list` (id, title, app-id, workspace, focused, minimized — *never* raw buffers or input). - `activate(id)` / `minimize(id)` / `close(id)` → routed by the host to `wm-policy.on-window-request(...)`. - A `task-manager` plasmoid on the panel can thus render live window buttons, show urgent badges, and switch focus using the exact same `plasmoid` + `draw-op` model as `clock-digital` and `launcher`. @@ -371,13 +371,13 @@ All layout math (`compute_bsp_rects`, `insert_leaf`, `remove_leaf`, `focus_direc ## 9. `wasi-gfx` GUI Loading & Presentation Architecture -To load and present the `moon-plasma` GUI portably across both the native MoonBit compositor and WebAssembly/browser hosts, `moon-plasma` integrates the [wasi-gfx](https://wasi-gfx.dev/) WIT specification (`wasi-gfx:surface@0.2.0` and `wasi-gfx:frame-buffer@0.2.0`): +To load and present the `chandra` GUI portably across both the native MoonBit compositor and WebAssembly/browser hosts, `chandra` integrates the [wasi-gfx](https://wasi-gfx.dev/) WIT specification (`wasi-gfx:surface@0.2.0` and `wasi-gfx:frame-buffer@0.2.0`): 1. **WIT Contracts (`wit/gfx/`):** - `wit/gfx/deps/wasi-gfx-frame-buffer-0.2.0/frame-buffer.wit`: `wasi-gfx:frame-buffer/frame-buffer@0.2.0` (`buffer` resource with `get-with-copy` / `set-with-copy`). - `wit/gfx/deps/wasi-gfx-surface-0.2.0/surface.wit`: `wasi-gfx:surface/surface@0.2.0` (`surface` resource, `create-desc`, `resize-event`, `frame-event`, `pointer-event`, `key-event`, and `stream<...>` event channels). - `wit/gfx/deps/wasi-gfx-surface-0.2.0/surface-frame-buffer.wit`: `wasi-gfx:surface/surface-frame-buffer@0.2.0` (`context` resource binding a `surface` to `get-current-buffer()` + `present()`). - - `wit/gfx/worlds.wit`: `moonplasma:gfx@0.2.0/gui-loader` world importing `wasi-gfx` and exporting `init-gui`, `render-frame`, `on-resize`, `on-pointer`, and `on-key`. + - `wit/gfx/worlds.wit`: `chandra:gfx@0.2.0/gui-loader` world importing `wasi-gfx` and exporting `init-gui`, `render-frame`, `on-resize`, `on-pointer`, and `on-key`. 2. **MoonBit `wasi-gfx` GUI Component (`components/gfx-gui/`):** - Built with `wit-bindgen moonbit wit/gfx --world gui-loader` and `scripts/build-gfx.sh`. @@ -385,7 +385,7 @@ To load and present the `moon-plasma` GUI portably across both the native MoonBi 3. **Pure-MoonBit Native `wasi-gfx` Runtime (`compositor/gfx/`):** - Implements `Surface`, `FrameBuffer`, `SurfaceFrameBufferContext`, `present_pixmap`, and `present_scene` in pure MoonBit. - - `MoonPlasmaCompositor::present_to_gfx` and `MoonPlasmaCompositor::handle_gfx_events` in `compositor/host/` connect the native Wayland compositor to `wasi-gfx` surfaces (also exposed via `--gfx-out ` in `compositor/bin/main.mbt`). + - `ChandraCompositor::present_to_gfx` and `ChandraCompositor::handle_gfx_events` in `compositor/host/` connect the native Wayland compositor to `wasi-gfx` surfaces (also exposed via `--gfx-out ` in `compositor/bin/main.mbt`). 4. **JS / Browser `wasi-gfx` Host Adapter (`host/src/wasi-gfx.mjs`, `host/web/main.mjs`):** - Provides `WasiGfxSurface`, `WasiGfxBuffer`, `WasiGfxFrameBufferContext`, and `createWasiGfxHost()` for both `jco`-transpiled `wasi-gfx` components and the browser desktop shell (`host/web/main.mjs`), routing input streams and presenting RGBA8888 frames onto the ``. diff --git a/host-wasm/Cargo.lock b/host-wasm/Cargo.lock index d1675cc..cefbac3 100644 --- a/host-wasm/Cargo.lock +++ b/host-wasm/Cargo.lock @@ -96,6 +96,17 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" +[[package]] +name = "chandra-host" +version = "0.1.0" +dependencies = [ + "ab_glyph", + "ab_glyph_rasterizer", + "cc", + "libc", + "wasmtime", +] + [[package]] name = "cobs" version = "0.3.0" @@ -564,17 +575,6 @@ dependencies = [ "rustix", ] -[[package]] -name = "moon-plasma-host" -version = "0.1.0" -dependencies = [ - "ab_glyph", - "ab_glyph_rasterizer", - "cc", - "libc", - "wasmtime", -] - [[package]] name = "multiversion_no_op" version = "1.0.0" diff --git a/host-wasm/Cargo.toml b/host-wasm/Cargo.toml index 9ab0ffa..4eda446 100644 --- a/host-wasm/Cargo.toml +++ b/host-wasm/Cargo.toml @@ -1,8 +1,8 @@ [package] -name = "moon-plasma-host" +name = "chandra-host" version = "0.1.0" edition = "2021" -description = "Runs the moon-plasma compositor wasm component (build/components/compositor.wasm) and gives it the OS surface it imports (wit/host/sys.wit)." +description = "Runs the chandra compositor wasm component (build/components/compositor.wasm) and gives it the OS surface it imports (wit/host/sys.wit)." [features] # Login-session display backend (DRM/KMS + libinput + libseat + xkbcommon). Needs those libraries' diff --git a/host-wasm/README.md b/host-wasm/README.md index 2968cd6..0ce40b9 100644 --- a/host-wasm/README.md +++ b/host-wasm/README.md @@ -1,15 +1,15 @@ -# moon-plasma-host +# chandra-host Runs the compositor **as a WebAssembly component**. ``` just compositor-wasm # build/compositor.wasm (the compositor, a component) -just host-wasm # host-wasm/target/release/moon-plasma-host (this crate) +just host-wasm # host-wasm/target/release/chandra-host (this crate) just run-wasm # both, then run in a window on your current Wayland session ``` The component (`components/compositor`, entry in `compositor/app`) imports exactly one interface, -`moonplasma:host/sys` ([`wit/host/sys.wit`](../wit/host/sys.wit)), and exports `run(args) -> s32`. +`chandra:host/sys` ([`wit/host/sys.wit`](../wit/host/sys.wit)), and exports `run(args) -> s32`. It is the same MoonBit code as the native compositor: the Wayland server, window manager, scene, rasteriser and shell. Only `compositor/sys` differs per target (`sys_native.mbt` over a C shim, `sys_wasm.mbt` over the WIT imports). The component holds integer handles and bytes only; every real @@ -17,15 +17,15 @@ file descriptor lives in this host, which implements `sys` with libc (sockets an `memfd`, `poll`, spawn, files, clock). ``` -moon-plasma-host build/compositor.wasm --socket PATH [--theme PATH] [--window] -moon-plasma-host build/compositor.wasm --socket PATH --gfx-out frame.png # one frame -moon-plasma-host build/compositor.wasm --socket PATH --gfx-out frame.png --serve # keep refreshing it +chandra-host build/compositor.wasm --socket PATH [--theme PATH] [--window] +chandra-host build/compositor.wasm --socket PATH --gfx-out frame.png # one frame +chandra-host build/compositor.wasm --socket PATH --gfx-out frame.png --serve # keep refreshing it ``` ## Drawing The compositor component decides what the screen shows and the host draws it -(`moonplasma:host/raster`, [`wit/host/raster.wit`](../wit/host/raster.wit)). Each frame the component +(`chandra:host/raster`, [`wit/host/raster.wit`](../wit/host/raster.wit)). Each frame the component sends a list of draw operations (fill, stroke, line, circle, text, clip), the windows with their decoration ops and a surface id, and the panel ops; `src/raster.rs` draws them natively into a framebuffer it owns (a port of `compositor/renderer`, with the same blend arithmetic). The pixels never @@ -49,10 +49,10 @@ against each other's rules (`cargo test` here, `moon test` for the MoonBit side) Working: Wayland server (real clients such as `foot` run and draw), window management, decorations, the desktop card, input routing, the nested window on the host session, real fonts (Allo Variable, -Adwaita Mono: the host rasterises glyphs, `moonplasma:host/font`) and the panel modules. +Adwaita Mono: the host rasterises glyphs, `chandra:host/font`) and the panel modules. **Panel modules** run in this host. A component can't embed a second runtime, so the compositor -drives them through `moonplasma:host/plasmoids` ([`wit/host/plasmoids.wit`](../wit/host/plasmoids.wit)): +drives them through `chandra:host/plasmoids` ([`wit/host/plasmoids.wit`](../wit/host/plasmoids.wit)): load, render, popup, on-event, plus the data they read (apps, windows, layouts, modules, system snapshot) and the requests they make (launch, focus, set layout, load/unload). `src/plasmoid.rs` instantiates each module as a real component against one world, `plasmoid-host` @@ -60,7 +60,7 @@ instantiates each module as a real component against one world, `plasmoid-host` each is served here. `cargo test --release` loads the built modules (`just modules` first). **Login session** (`--drm`): the host takes the display and input through the seat -(`moonplasma:host/display`, [`wit/host/display.wit`](../wit/host/display.wit)): DRM/KMS output with page +(`chandra:host/display`, [`wit/host/display.wit`](../wit/host/display.wit)): DRM/KMS output with page flips and a hardware cursor, libinput keyboard and pointer, an xkb keymap, libseat for device access and VT switching. It is the compositor's own C shim (`compositor/kms/kms_stub.c`) compiled into this host by `build.rs` (feature `drm`, on by default; `--no-default-features` leaves it out), so the native and @@ -68,10 +68,10 @@ wasm backends can't drift. Run `just run-drm` from a login VT, or `just install- Plasma to your display manager (`session/install.py`; `--native` installs the native compositor instead). Not yet exercised on a real VT; it is only built and instantiated. -Regenerating the host bindings (into a temp dir, then copy `interface/moonplasma/host`, +Regenerating the host bindings (into a temp dir, then copy `interface/chandra/host`, `world/compositor` and `components/compositor/gen/{ffi.mbt,world}`; regenerating in place would overwrite the hand-fixed `desktop/theme` package): `wit-bindgen moonbit wit/host --world compositor --out-dir $T --gen-dir components/compositor/gen ---project-name moonplasma/desktop --ignore-module-file --ignore-stub`, then -`scripts/gen-native-stubs.py interface/moonplasma/host/` (the imports are +--project-name chandra/desktop --ignore-module-file --ignore-stub`, then +`scripts/gen-native-stubs.py interface/chandra/host/` (the imports are wasm-only; this restores the native stand-ins and the per-file targets). diff --git a/host-wasm/src/kms.rs b/host-wasm/src/kms.rs index cfdcbcf..e73e274 100644 --- a/host-wasm/src/kms.rs +++ b/host-wasm/src/kms.rs @@ -1,7 +1,7 @@ //! The login-session display backend: calls into compositor/kms/kms_stub.c (built by build.rs), //! the same shim the native compositor uses. One display, one seat, global state. -use crate::moonplasma::host::display::{KeyState, Modifiers, Output, PointerPos, ScrollDelta, SeatEvent}; +use crate::chandra::host::display::{KeyState, Modifiers, Output, PointerPos, ScrollDelta, SeatEvent}; extern "C" { fn mp_kms_open() -> i32; diff --git a/host-wasm/src/main.rs b/host-wasm/src/main.rs index 0e38867..cc1ca06 100644 --- a/host-wasm/src/main.rs +++ b/host-wasm/src/main.rs @@ -1,12 +1,12 @@ -//! Native host for the moon-plasma compositor component. +//! Native host for the chandra compositor component. //! //! The compositor is a wasm component (build/compositor.wasm) that imports exactly one -//! interface, `moonplasma:host/sys` (wit/host/sys.wit): sockets, memfd, poll, spawn, files, time. +//! interface, `chandra:host/sys` (wit/host/sys.wit): sockets, memfd, poll, spawn, files, time. //! This program is the other side of that interface. The component only ever holds integer //! handles; every real file descriptor lives here. //! -//! moon-plasma-host [--component PATH] [-- compositor args...] -//! moon-plasma-host build/compositor.wasm --socket /run/user/1000/wayland-moon-0 --window +//! chandra-host [--component PATH] [-- compositor args...] +//! chandra-host build/compositor.wasm --socket /run/user/1000/wayland-moon-0 --window use std::ffi::CString; use std::io::Read; @@ -28,13 +28,13 @@ wasmtime::component::bindgen!({ // Draw operations are compared to reuse the cached wallpaper. additional_derives: [PartialEq], with: { - "moonplasma:desktop/types@0.1.0": plasmoid::ph::moonplasma::desktop::types, - "moonplasma:desktop/theme@0.1.0": plasmoid::ph::moonplasma::desktop::theme, + "chandra:desktop/types@0.1.0": plasmoid::ph::chandra::desktop::types, + "chandra:desktop/theme@0.1.0": plasmoid::ph::chandra::desktop::theme, }, }); -use moonplasma::host::font::Glyph; -use moonplasma::host::sys::{Host, Received}; +use chandra::host::font::Glyph; +use chandra::host::sys::{Host, Received}; #[derive(Default)] struct State { @@ -44,7 +44,7 @@ struct State { started: Option, /// TTF faces loaded by the component (`font.load`), by slot, and their glyph cache. fonts: raster::Fonts, - /// The framebuffer and client surfaces behind `moonplasma:host/raster`. + /// The framebuffer and client surfaces behind `chandra:host/raster`. raster: raster::Raster, /// Runs the panel modules; set once the engine exists. pl: Option, @@ -123,10 +123,10 @@ impl State { } } -impl moonplasma::host::plasmoids::Host for State { - fn load(&mut self, path: String) -> Result { +impl chandra::host::plasmoids::Host for State { + fn load(&mut self, path: String) -> Result { let l = self.pl().load(&path)?; - Ok(moonplasma::host::plasmoids::Loaded { + Ok(chandra::host::plasmoids::Loaded { handle: l.handle, id: l.info.id, name: l.info.name, @@ -141,27 +141,27 @@ impl moonplasma::host::plasmoids::Host for State { self.pl().unload(handle); } - fn set_tokens(&mut self, t: plasmoid::ph::moonplasma::desktop::theme::Tokens) { + fn set_tokens(&mut self, t: plasmoid::ph::chandra::desktop::theme::Tokens) { self.pl().shared.borrow_mut().tokens = Some(t); } fn render( &mut self, handle: u32, - box_: plasmoid::ph::moonplasma::desktop::types::Size, - ) -> Vec { + box_: plasmoid::ph::chandra::desktop::types::Size, + ) -> Vec { self.pl().render(handle, box_) } - fn popup(&mut self, handle: u32) -> Option { - self.pl().popup(handle).map(|p| moonplasma::host::plasmoids::PopupSurface { box_: p.size, ops: p.ops }) + fn popup(&mut self, handle: u32) -> Option { + self.pl().popup(handle).map(|p| chandra::host::plasmoids::PopupSurface { box_: p.size, ops: p.ops }) } fn on_event( &mut self, handle: u32, on_popup: bool, - event: plasmoid::ph::moonplasma::desktop::types::InputEvent, + event: plasmoid::ph::chandra::desktop::types::InputEvent, ) -> bool { self.pl().on_event(handle, on_popup, event) } @@ -183,8 +183,8 @@ impl moonplasma::host::plasmoids::Host for State { self.pl().shared.borrow_mut().wallpaper = current; } - fn publish_system(&mut self, s: moonplasma::host::plasmoids::SystemSnapshot) { - use plasmoid::ph::moonplasma::desktop::system::Snapshot; + fn publish_system(&mut self, s: chandra::host::plasmoids::SystemSnapshot) { + use plasmoid::ph::chandra::desktop::system::Snapshot; self.pl().shared.borrow_mut().system = Some(Snapshot { cpu_permille: s.cpu_permille, mem_used_kib: s.mem_used_kib, @@ -198,13 +198,13 @@ impl moonplasma::host::plasmoids::Host for State { }); } - fn publish_windows(&mut self, wins: Vec) { + fn publish_windows(&mut self, wins: Vec) { self.pl().shared.borrow_mut().windows = wins.into_iter().map(|w| (w.id, w.title, w.app_id, w.focused)).collect(); } - fn next_request(&mut self) -> Option { - use moonplasma::host::plasmoids::Request as R; + fn next_request(&mut self) -> Option { + use chandra::host::plasmoids::Request as R; use plasmoid::Req; let r = self.pl().shared.borrow_mut().requests.pop_front()?; Some(match r { @@ -239,8 +239,8 @@ impl moonplasma::host::plasmoids::Host for State { self.pl().picker_start() } - fn picker_poll(&mut self) -> moonplasma::host::plasmoids::PickerState { - use moonplasma::host::plasmoids::PickerState as P; + fn picker_poll(&mut self) -> chandra::host::plasmoids::PickerState { + use chandra::host::plasmoids::PickerState as P; match self.pl().picker_poll() { None => P::Open, Some(None) => P::Cancelled, @@ -249,8 +249,8 @@ impl moonplasma::host::plasmoids::Host for State { } } -impl moonplasma::host::display::Host for State { - fn open(&mut self) -> Option { +impl chandra::host::display::Host for State { + fn open(&mut self) -> Option { #[cfg(feature = "drm")] { kms::open() @@ -289,7 +289,7 @@ impl moonplasma::host::display::Host for State { #[cfg(not(feature = "drm"))] let _ = shape; } - fn take_input(&mut self) -> Vec { + fn take_input(&mut self) -> Vec { #[cfg(feature = "drm")] return kms::take_input(); #[cfg(not(feature = "drm"))] @@ -301,7 +301,7 @@ impl moonplasma::host::display::Host for State { } } -impl moonplasma::host::font::Host for State { +impl chandra::host::font::Host for State { fn load(&mut self, slot: u32, path: String) -> bool { self.fonts.load(slot, &path) } @@ -312,7 +312,7 @@ impl moonplasma::host::font::Host for State { } } -impl moonplasma::host::raster::Host for State { +impl chandra::host::raster::Host for State { fn capture(&mut self, fd: i32, offset: i32, stride: i32, width: i32, height: i32, format: i32) -> u32 { if fd < 0 || offset < 0 || stride <= 0 || width <= 0 || height <= 0 { return 0; @@ -343,7 +343,7 @@ impl moonplasma::host::raster::Host for State { self.raster.release(id); } - fn submit(&mut self, f: moonplasma::host::raster::Frame) { + fn submit(&mut self, f: chandra::host::raster::Frame) { self.raster.submit(&f, &mut self.fonts); } @@ -353,7 +353,7 @@ impl moonplasma::host::raster::Host for State { fn export_memfd(&mut self) -> i32 { let data = self.raster.to_argb8888(); - let Ok(name) = CString::new("moon-plasma-frame") else { return -1 }; + let Ok(name) = CString::new("chandra-frame") else { return -1 }; unsafe { let fd = libc::memfd_create(name.as_ptr(), libc::MFD_CLOEXEC); if fd < 0 { @@ -730,11 +730,11 @@ fn main() -> Result<()> { } }; let mut linker: Linker = Linker::new(&engine); - moonplasma::host::sys::add_to_linker::>(&mut linker, |s| s)?; - moonplasma::host::font::add_to_linker::>(&mut linker, |s| s)?; - moonplasma::host::raster::add_to_linker::>(&mut linker, |s| s)?; - moonplasma::host::display::add_to_linker::>(&mut linker, |s| s)?; - moonplasma::host::plasmoids::add_to_linker::>(&mut linker, |s| s)?; + chandra::host::sys::add_to_linker::>(&mut linker, |s| s)?; + chandra::host::font::add_to_linker::>(&mut linker, |s| s)?; + chandra::host::raster::add_to_linker::>(&mut linker, |s| s)?; + chandra::host::display::add_to_linker::>(&mut linker, |s| s)?; + chandra::host::plasmoids::add_to_linker::>(&mut linker, |s| s)?; let mut store = Store::new(&engine, State::default()); store.data_mut().pl = Some(plasmoid::Runtime::new(&engine)?); let compositor = Compositor::instantiate(&mut store, &component, &linker)?; diff --git a/host-wasm/src/plasmoid.rs b/host-wasm/src/plasmoid.rs index e55bdd3..78bc455 100644 --- a/host-wasm/src/plasmoid.rs +++ b/host-wasm/src/plasmoid.rs @@ -22,8 +22,8 @@ pub mod ph { additional_derives: [PartialEq], }); } -use ph::exports::moonplasma::desktop as ex; -use ph::moonplasma::desktop as d; +use ph::exports::chandra::desktop as ex; +use ph::chandra::desktop as d; /// What a module asked of the compositor during a call. pub enum Req { @@ -347,11 +347,11 @@ impl Runtime { return Err("not a wasm file".to_string()); } let component = Component::new(&self.engine, &bytes) - .map_err(|_| "no plasmoid (moonplasma:desktop/plasmoid) in this module".to_string())?; + .map_err(|_| "no plasmoid (chandra:desktop/plasmoid) in this module".to_string())?; // The capability grant: the host interfaces the binary imports, besides the base ones. let mut imports: Vec = Vec::new(); for (name, _) in component.component_type().imports(&self.engine) { - if let Some(rest) = name.strip_prefix("moonplasma:desktop/") { + if let Some(rest) = name.strip_prefix("chandra:desktop/") { let iface = rest.split('@').next().unwrap_or(rest).to_string(); if iface != "types" && !imports.contains(&iface) { imports.push(iface); @@ -362,7 +362,7 @@ impl Runtime { let inst = ph::PlasmoidHost::instantiate(&mut store, &component, &self.linker) .map_err(|_| "wasm runtime error".to_string())?; let info = inst - .moonplasma_desktop_plasmoid() + .chandra_desktop_plasmoid() .call_info(&mut store) .map_err(|_| "widget trapped in info()".to_string())?; let l = Loaded { store, inst }; @@ -392,18 +392,18 @@ impl Runtime { /// A trapping module yields no ops. pub fn render(&mut self, handle: u32, size: d::types::Size) -> Vec { let Some(l) = self.get(handle) else { return Vec::new() }; - l.inst.moonplasma_desktop_plasmoid().call_render(&mut l.store, size).unwrap_or_default() + l.inst.chandra_desktop_plasmoid().call_render(&mut l.store, size).unwrap_or_default() } pub fn popup(&mut self, handle: u32) -> Option { let l = self.get(handle)?; - l.inst.moonplasma_desktop_plasmoid().call_popup(&mut l.store).ok().flatten() + l.inst.chandra_desktop_plasmoid().call_popup(&mut l.store).ok().flatten() } pub fn on_event(&mut self, handle: u32, on_popup: bool, ev: d::types::InputEvent) -> bool { let Some(l) = self.get(handle) else { return false }; let target = if on_popup { ex::plasmoid::Surface::Popup } else { ex::plasmoid::Surface::Widget }; - l.inst.moonplasma_desktop_plasmoid().call_on_event(&mut l.store, target, &ev).unwrap_or(false) + l.inst.chandra_desktop_plasmoid().call_on_event(&mut l.store, target, &ev).unwrap_or(false) } pub fn picker_start(&mut self) -> bool { @@ -522,7 +522,7 @@ mod tests { fn modules_are_rejected_cleanly() { let mut rt = runtime(); assert!(rt.load("/nonexistent.wasm").is_err()); - let junk = std::env::temp_dir().join("moon-plasma-junk.wasm"); + let junk = std::env::temp_dir().join("chandra-junk.wasm"); std::fs::write(&junk, b"not wasm at all").unwrap(); assert!(rt.load(junk.to_str().unwrap()).is_err()); } diff --git a/host-wasm/src/raster.rs b/host-wasm/src/raster.rs index 7503f25..2c947a2 100644 --- a/host-wasm/src/raster.rs +++ b/host-wasm/src/raster.rs @@ -1,11 +1,11 @@ -//! The host's rasteriser (`moonplasma:host/raster`). +//! The host's rasteriser (`chandra:host/raster`). //! //! A direct port of compositor/renderer (the pure-MoonBit software renderer), so a frame comes out //! pixel for pixel the same, but native: the compositor component sends draw operations and window //! surface ids, and the pixels never cross the component boundary. Window buffers are copied out of //! the client's shared memory once, at commit (`capture`), converted to RGBA, and kept here. -use crate::moonplasma::host::raster as wt; +use crate::chandra::host::raster as wt; use ab_glyph::{Font, FontVec, OutlineCurve}; use ab_glyph_rasterizer::{point, Rasterizer}; use std::collections::HashMap; diff --git a/host/package-lock.json b/host/package-lock.json index 4e9d6e9..16d4dff 100644 --- a/host/package-lock.json +++ b/host/package-lock.json @@ -1,11 +1,11 @@ { - "name": "moon-plasma-host", + "name": "chandra-host", "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "moon-plasma-host", + "name": "chandra-host", "version": "0.1.0", "devDependencies": { "@bytecodealliance/jco": "1.42.0", diff --git a/host/package.json b/host/package.json index edec94e..b4a6aae 100644 --- a/host/package.json +++ b/host/package.json @@ -1,9 +1,9 @@ { - "name": "moon-plasma-host", + "name": "chandra-host", "private": true, "version": "0.1.0", "type": "module", - "description": "Host runtime for moon-plasma (M0: Node/browser host over jco-transpiled components)", + "description": "Host runtime for chandra (M0: Node/browser host over jco-transpiled components)", "scripts": { "test": "node --test test/*.test.mjs" }, diff --git a/host/serve.mjs b/host/serve.mjs index 7465401..30ba6ed 100644 --- a/host/serve.mjs +++ b/host/serve.mjs @@ -26,5 +26,5 @@ export function serve(port = 0) { if (process.argv[1] === fileURLToPath(import.meta.url)) { const srv = await serve(Number(process.argv[2] ?? process.env.PORT ?? 8080)); - console.log(`moon-plasma host: http://127.0.0.1:${srv.address().port}/`); + console.log(`chandra host: http://127.0.0.1:${srv.address().port}/`); } diff --git a/host/src/desktop.mjs b/host/src/desktop.mjs index d1502f8..90b4266 100644 --- a/host/src/desktop.mjs +++ b/host/src/desktop.mjs @@ -1,4 +1,4 @@ -// moon-plasma host core (platform-agnostic: runs in Node and the browser). +// chandra host core (platform-agnostic: runs in Node and the browser). // // Responsibilities (the *only* things that are not components): // * instantiate components and broker capabilities (deny-by-default grants) @@ -10,7 +10,7 @@ import { CAPABILITIES } from './platform.mjs'; import { place, translate } from './scene.mjs'; -const PKG = 'moonplasma:desktop'; +const PKG = 'chandra:desktop'; const PLASMOID = `${PKG}/plasmoid`; const PANEL = `${PKG}/panel-layout`; const DESKTOP = `${PKG}/desktop-surface`; diff --git a/host/test/desktop.test.mjs b/host/test/desktop.test.mjs index 9dae71d..4d5c48e 100644 --- a/host/test/desktop.test.mjs +++ b/host/test/desktop.test.mjs @@ -15,7 +15,7 @@ const texts = (ops) => ops.filter((o) => o.tag === 'text').map((o) => o.val.text const configWith = async (mutate) => { const cfg = JSON.parse(await readFile(join(ROOT, 'config', 'desktop.json'), 'utf8')); mutate(cfg); - const dir = await mkdtemp(join(tmpdir(), 'moonplasma-')); + const dir = await mkdtemp(join(tmpdir(), 'chandra-')); const p = join(dir, 'desktop.json'); await writeFile(p, JSON.stringify(cfg)); return p; @@ -29,7 +29,7 @@ test('boots shell + widgets and composes a frame', async () => { const t = texts(f.ops); assert.ok(t.includes('14:07'), `clock text missing: ${t}`); assert.ok(t.includes('Tue 24 Nov')); - assert.ok(t.includes('moon-plasma')); + assert.ok(t.includes('chandra')); assert.ok(t.includes('Applications')); assert.equal(desktop.faults.length, 0); }); @@ -60,7 +60,7 @@ test('launcher: click opens popup, row click launches via host capability, popup // second row (52px header + 46px rows) desktop.pointer('move', pr.x + 20, pr.y + 52 + 46 + 5); desktop.pointer('down', pr.x + 20, pr.y + 52 + 46 + 5); - assert.deepEqual(platform.launches, ['org.moonplasma.files']); + assert.deepEqual(platform.launches, ['org.chandra.files']); desktop.frame(); assert.equal(desktop.hit.popup, null, 'popup closed after launch'); }); @@ -76,7 +76,7 @@ test('launcher: keyboard search narrows the list and Enter launches the first ma const t = texts(f.ops); assert.ok(t.includes('Calculator') && !t.includes('Terminal')); desktop.key('Enter'); - assert.deepEqual(platform.launches, ['org.moonplasma.calc']); + assert.deepEqual(platform.launches, ['org.chandra.calc']); }); test('clicking outside the popup dismisses it (focus-lost)', async () => { diff --git a/host/web/index.html b/host/web/index.html index ddf885b..4f2d4fb 100644 --- a/host/web/index.html +++ b/host/web/index.html @@ -2,7 +2,7 @@ - moon-plasma + chandra