Wasm panel modules, widget host, merged plasmoid host design, and shell/UI work
Panel and wasm host - The panel is built from wasm plasmoid modules (compositor/wasm: wasmer-backed host). Modules get capabilities by importing host interfaces; the host publishes data tables and serves a request queue (launch, focus window, set layout, inspector, load/unload modules). New WIT: windows, layout-control, inspector, modules, system. - Merged two competing host designs: generic tables + requests are the base; the `system` snapshot and the id-stable `windows.all/focus` (Desktop Pulse) run on top of it. - Panel widgets: load a .wasm from a path or file chooser, reorder by dragging, right-click replace/remove/add, saved to panel.edn. - Desktop widget, system sampler (sysinfo), app catalog/humanised names, Interface Explorer (inspector), real font rendering (compositor/font, assets/fonts). Compositor - Drag the divider between tiled windows; lower tiled rows leave room for the title bar. - Title-bar buttons, 12-hour clock, truncated titles, task-list/layout menus. - DRM/KMS session, tcc debug builds (vendored tinycc incl. conftest.c), justfile recipes (modules, run, test), pixi.toml. Known gaps - The sources for the pulse, tasks, layout, inspector, module-manager, moon-* and clock-digital12 modules are not in the tree yet, so `just modules` stops at pulse and the host tests that load those modules fail until they land. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
080377fd79
commit
0145981c6a
57 files changed
+11461
-221
No files matched your search
@@ -6,6 +6,7 @@ fn main {
|
||||
let mut socket_path = "/tmp/wayland-moon-0"
|
||||
let mut theme_path = "config/themes/moon-night.json"
|
||||
let mut gfx_out = ""
|
||||
let widgets : Array[String] = []
|
||||
let mut windowed = false
|
||||
let mut drm = false
|
||||
let mut width = 1280
|
||||
@@ -26,6 +27,9 @@ fn main {
|
||||
} else if a == "--drm" {
|
||||
drm = true
|
||||
i = i + 1
|
||||
} else if a == "--widget" && i + 1 < args.length() {
|
||||
widgets.push(args[i + 1])
|
||||
i = i + 2
|
||||
} else if a == "--gfx-out" && i + 1 < args.length() {
|
||||
gfx_out = args[i + 1]
|
||||
i = i + 2
|
||||
@@ -71,6 +75,14 @@ fn main {
|
||||
|
||||
match @host.MoonPlasmaCompositor::new(socket_path, theme, width, height) {
|
||||
Some(comp) => {
|
||||
comp.shell.persist = true // remember which modules are loaded in the panel
|
||||
comp.shell.screen_w = width // the panel can't place widgets before it knows its width
|
||||
if widgets.length() > 0 {
|
||||
ignore(comp.compose_frame()) // boots the panel and sets the theme tokens modules are loaded with
|
||||
for path in widgets {
|
||||
ignore(comp.shell.load_path(path))
|
||||
}
|
||||
}
|
||||
if gfx_out.length() > 0 {
|
||||
let pixmap = comp.present_to_gfx(gfx_ctx)
|
||||
let png = @renderer.encode_png(pixmap)
|
||||
|
||||
@@ -18,7 +18,7 @@ pkgtype(kind: "executable")
|
||||
options(
|
||||
link: {
|
||||
"native": {
|
||||
"cc-link-flags": "-ldrm -linput -lseat -lxkbcommon -ludev",
|
||||
"cc-link-flags": "-ldrm -linput -lseat -lxkbcommon -ludev -lwasmer",
|
||||
},
|
||||
},
|
||||
)
|
||||
Reference in new issue
Block a user