CI / test (push) Failing after 16s
- New 'session-settings' capability (wit/capabilities.wit: settings, is-on, set-setting) and 'session-settings' panel module: a "Session" button whose popup lists the session settings, each with an on/off switch. Clicking a row flips it at once (the list stays open); Up/Down move the highlight, Enter or Space flips it, Escape or a click elsewhere closes. In the default panel, between Wallpaper and Log out. - Two settings to start with, kept in state.edn and written only when off (absent means on): "Reopen windows at login" (:restore-session, the key session restore already read) and "Remember window positions" (:remember-windows; when off, floating windows aren't placed where their app was left and new places aren't recorded, but the saved ones are kept). - Served by both hosts: wasmer stub (native; settings table 6, bit mask in host int 3, requests 10/11) and host-wasm (publish-session-settings, set-session-setting request). - Tests: native end-to-end (open, click both rows, keyboard, Escape), a state.edn round trip that checks both settings take effect, and a host-wasm module test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hgxf6exeYrDGcy4WW3
43 lines
1.0 KiB
MoonBit
43 lines
1.0 KiB
MoonBit
// Generated by `wit-bindgen` 0.63.0. DO NOT EDIT!
|
|
///|
|
|
pub(all) struct PlasmoidInfo {
|
|
id : String; name : String; preferred : @types.Size; min_width : UInt; stretch : Bool
|
|
}
|
|
///|
|
|
pub(all) struct PopupSurface {
|
|
size : @types.Size; ops : Array[@types.DrawOp]
|
|
}
|
|
///|
|
|
pub(all) enum Surface {
|
|
WIDGET; POPUP
|
|
} derive()
|
|
|
|
///|
|
|
pub fn Surface::ordinal(self : Surface) -> Int {
|
|
match self {
|
|
WIDGET => 0
|
|
POPUP => 1
|
|
}
|
|
}
|
|
|
|
///|
|
|
pub fn Surface::from(self : Int) -> Surface {
|
|
match self {
|
|
0 => WIDGET
|
|
1 => POPUP
|
|
_ => panic()
|
|
}
|
|
}
|
|
///|
|
|
declare pub fn info() -> PlasmoidInfo
|
|
///|
|
|
/// Draw the widget into a `size` box (local coordinates).
|
|
declare pub fn render(size : @types.Size) -> Array[@types.DrawOp]
|
|
///|
|
|
/// Present when the widget wants a popup surface (e.g. a launcher menu).
|
|
declare pub fn popup() -> PopupSurface?
|
|
///|
|
|
/// Returns true when the widget's visuals changed and a redraw is needed.
|
|
declare pub fn on_event(target : Surface, event : @types.InputEvent) -> Bool
|
|
|