Spike Wayland compositor, hybrid MoonBit WM, SSD decorations, and wasmtime native host
This commit is contained in:
1 parent
880ecd4102
commit
17a8a46cfd
56 files changed
+8924
-11
No files matched your search
@@ -0,0 +1,71 @@
|
||||
package moonplasma:wm@0.2.0;
|
||||
|
||||
interface policy {
|
||||
use moonplasma:desktop/types@0.1.0.{rect, size, point};
|
||||
|
||||
type window-id = u64;
|
||||
|
||||
flags window-caps {
|
||||
can-move,
|
||||
can-resize,
|
||||
can-maximize,
|
||||
can-minimize,
|
||||
can-fullscreen,
|
||||
}
|
||||
|
||||
enum layout-mode {
|
||||
floating,
|
||||
tiling,
|
||||
monocle,
|
||||
}
|
||||
|
||||
record window-state {
|
||||
id: window-id,
|
||||
app-id: string,
|
||||
title: string,
|
||||
geometry: rect,
|
||||
min-size: size,
|
||||
max-size: option<size>,
|
||||
focused: bool,
|
||||
maximized: bool,
|
||||
fullscreen: bool,
|
||||
workspace: u32,
|
||||
caps: window-caps,
|
||||
}
|
||||
|
||||
variant window-request {
|
||||
maximize(bool),
|
||||
fullscreen(bool),
|
||||
minimize(bool),
|
||||
close,
|
||||
activate,
|
||||
move-to(point),
|
||||
resize-to(size),
|
||||
}
|
||||
|
||||
variant wm-action {
|
||||
set-geometry(tuple<window-id, rect>),
|
||||
focus(window-id),
|
||||
raise(window-id),
|
||||
close(window-id),
|
||||
set-maximized(tuple<window-id, bool>),
|
||||
set-fullscreen(tuple<window-id, bool>),
|
||||
}
|
||||
|
||||
variant input-target {
|
||||
client(tuple<window-id, point>),
|
||||
decoration(tuple<window-id, point>),
|
||||
shell-panel(point),
|
||||
none,
|
||||
}
|
||||
|
||||
/// Called on startup or WM hot-swap to synchronize existing windows.
|
||||
sync-windows: func(outputs: list<rect>, windows: list<window-state>) -> list<wm-action>;
|
||||
on-window-open: func(win: window-state, work-area: rect) -> list<wm-action>;
|
||||
on-window-close: func(id: window-id) -> list<wm-action>;
|
||||
on-window-request: func(id: window-id, req: window-request, work-area: rect) -> list<wm-action>;
|
||||
on-pointer: func(pos: point, button: option<u32>, pressed: bool) -> input-target;
|
||||
set-layout-mode: func(mode: layout-mode, work-area: rect) -> list<wm-action>;
|
||||
/// Returns window IDs in bottom-to-top Z-order.
|
||||
stacking-order: func() -> list<window-id>;
|
||||
}
|
||||
Reference in new issue
Block a user