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
@@ -8,7 +8,9 @@ import {
|
||||
// Values
|
||||
pub fn clamp_int(Int32, Int32, Int32) -> Int32
|
||||
|
||||
pub fn compute_bsp_rects(BspNode, Rect, Int32) -> Array[(UInt64, Rect)]
|
||||
pub fn compute_bsp_rects(BspNode, Rect, Int32, vgap? : Int32) -> Array[(UInt64, Rect)]
|
||||
|
||||
pub fn compute_split_handles(BspNode, Rect, Int32, Int32) -> Array[SplitHandle]
|
||||
|
||||
pub fn compute_work_area(Rect, excl_top? : Int32, excl_right? : Int32, excl_bottom? : Int32, excl_left? : Int32) -> Rect
|
||||
|
||||
@@ -76,6 +78,13 @@ pub(all) struct Size {
|
||||
h : Int32
|
||||
}
|
||||
|
||||
pub(all) struct SplitHandle {
|
||||
path : Array[Bool]
|
||||
horizontal : Bool
|
||||
rect : Rect
|
||||
area : Rect
|
||||
}
|
||||
|
||||
pub(all) struct WindowRecord {
|
||||
id : UInt64
|
||||
app_id : String
|
||||
@@ -131,6 +140,7 @@ pub(all) struct WmState {
|
||||
mut drag : DragSession?
|
||||
}
|
||||
pub fn WmState::close_window(Self, UInt64, Rect) -> Array[WmAction]
|
||||
pub fn WmState::drag_split(Self, SplitHandle, Int32, Int32, Rect) -> Array[WmAction]
|
||||
pub fn WmState::end_drag(Self) -> Unit
|
||||
pub fn WmState::handle_request(Self, UInt64, WindowRequest, Rect) -> Array[WmAction]
|
||||
pub fn WmState::hit_test(Self, Int32, Int32, Rect?) -> InputHit
|
||||
@@ -138,6 +148,7 @@ pub fn WmState::new(inner_gap? : Int32, outer_gap? : Int32, titlebar_h? : Int32,
|
||||
pub fn WmState::open_window(Self, WindowRecord, Rect) -> Array[WmAction]
|
||||
pub fn WmState::relayout(Self, UInt32, Rect) -> Array[WmAction]
|
||||
pub fn WmState::set_layout_mode(Self, LayoutMode, Rect) -> Array[WmAction]
|
||||
pub fn WmState::split_handles(Self, Rect) -> Array[SplitHandle]
|
||||
pub fn WmState::stacking_order(Self) -> Array[UInt64]
|
||||
pub fn WmState::start_drag(Self, UInt64, DragMode, Int32, Int32) -> Bool
|
||||
pub fn WmState::sync_windows(Self, Rect, Array[WindowRecord]) -> Array[WmAction]
|
||||
|
||||
+16
-2
@@ -457,8 +457,10 @@ pub fn WmState::relayout(
|
||||
w: if rect.w < min_w { min_w } else { rect.w },
|
||||
h: if rect.h < min_h { min_h } else { rect.h },
|
||||
}
|
||||
win.geometry = clamped
|
||||
actions.push(SetGeometry(id, clamped))
|
||||
// A maximized tiled window covers the whole padded work area.
|
||||
let g = if win.maximized { padded } else { clamped }
|
||||
win.geometry = g
|
||||
actions.push(SetGeometry(id, g))
|
||||
}
|
||||
None => ()
|
||||
}
|
||||
@@ -801,6 +803,18 @@ pub fn WmState::stacking_order(self : WmState) -> Array[UInt64] {
|
||||
}
|
||||
|
||||
collect_tree(ws.tree, order, ws.fullscreen, self.windows)
|
||||
// Maximized tiled windows are drawn above their neighbours.
|
||||
let below : Array[UInt64] = []
|
||||
let above : Array[UInt64] = []
|
||||
for id in order {
|
||||
match self.windows.get(id) {
|
||||
Some(w) => if w.maximized { above.push(id) } else { below.push(id) }
|
||||
None => below.push(id)
|
||||
}
|
||||
}
|
||||
order.clear()
|
||||
order.append(below)
|
||||
order.append(above)
|
||||
for id in ws.floating {
|
||||
if ws.fullscreen != Some(id) {
|
||||
match self.windows.get(id) {
|
||||
|
||||
Reference in new issue
Block a user