Files
chandra/lib/wm/pkg.generated.mbti
VandClaude Opus 5.5 af774d76fe
CI / test (push) Failing after 16s
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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hi3L9oVBoRd373Qr4n
2026-11-25 17:12:57 +00:00

172 lines
4.0 KiB
Plaintext

// Generated using `moon info`, DON'T EDIT IT
package "chandra/desktop/lib/wm"
import {
"moonbitlang/core/debug",
}
// Values
pub fn clamp_int(Int32, Int32, Int32) -> Int32
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
pub fn insert_leaf(BspNode?, UInt64, horizontal? : Bool) -> BspNode
pub fn remove_leaf(BspNode?, UInt64) -> BspNode?
// Errors
// Types and methods
#derive(Eq, Show, @debug.Debug)
pub(all) enum BspNode {
Leaf(UInt64)
Split(horizontal~ : Bool, ratio~ : Double, left~ : BspNode, right~ : BspNode)
}
#derive(Eq, Show)
pub(all) enum DragMode {
Move
ResizeN
ResizeS
ResizeE
ResizeW
ResizeNW
ResizeNE
ResizeSW
ResizeSE
}
pub(all) struct DragSession {
win_id : UInt64
mode : DragMode
start_ptr_x : Int32
start_ptr_y : Int32
start_rect : Rect
}
#derive(Eq, Show, @debug.Debug)
pub(all) enum InputHit {
Client(UInt64, Int32, Int32)
Decoration(UInt64, Int32, Int32)
ShellPanel(Int32, Int32)
HitNone
}
#derive(Eq, Show, @debug.Debug)
pub(all) enum LayoutMode {
Floating
Tiling
Monocle
}
#derive(Eq, Show, @debug.Debug)
pub(all) struct Rect {
x : Int32
y : Int32
w : Int32
h : Int32
}
pub fn Rect::contains(Self, Int32, Int32) -> Bool
#derive(Eq, Show, @debug.Debug)
pub(all) struct Size {
w : Int32
h : Int32
}
pub(all) struct SplitHandle {
path : Array[Bool]
horizontal : Bool
rect : Rect
area : Rect
}
pub(all) struct WindowRecord {
id : UInt64
app_id : String
title : String
mut geometry : Rect
mut floating_geometry : Rect
min_size : Size
max_size : Size?
mut focused : Bool
mut maximized : Bool
mut fullscreen : Bool
mut minimized : Bool
mut is_floating : Bool
workspace : UInt32
can_move : Bool
can_resize : Bool
can_maximize : Bool
can_minimize : Bool
can_fullscreen : Bool
}
#derive(Eq, Show, @debug.Debug)
pub(all) enum WindowRequest {
Maximize(Bool)
Fullscreen(Bool)
Minimize(Bool)
Close
Activate
MoveTo(Int32, Int32)
ResizeTo(Int32, Int32)
}
#derive(Eq, Show, @debug.Debug)
pub(all) enum WmAction {
SetGeometry(UInt64, Rect)
Focus(UInt64)
Raise(UInt64)
Close(UInt64)
SetMaximized(UInt64, Bool)
SetFullscreen(UInt64, Bool)
}
pub(all) struct WmState {
workspaces : Array[Workspace]
windows : Map[UInt64, WindowRecord]
mut active_workspace : UInt32
mut focused : UInt64?
mut inner_gap : Int32
mut outer_gap : Int32
mut titlebar_h : Int32
mut border_w : Int32
mut cascade_step : Int32
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::fit_work_area(Self, Rect) -> Array[WmAction]
pub fn WmState::float_window(Self, UInt64, Rect) -> Array[WmAction]
pub fn WmState::handle_request(Self, UInt64, WindowRequest, Rect) -> Array[WmAction]
pub fn WmState::hit_test(Self, Int32, Int32, Rect?) -> InputHit
pub fn WmState::new(inner_gap? : Int32, outer_gap? : Int32, titlebar_h? : Int32, border_w? : Int32) -> Self
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]
pub fn WmState::update_drag(Self, Int32, Int32) -> WmAction?
pub(all) struct Workspace {
id : UInt32
mut mode : LayoutMode
mut tree : BspNode?
floating : Array[UInt64]
mru : Array[UInt64]
mut fullscreen : UInt64?
}
pub fn Workspace::new(UInt32, mode? : LayoutMode) -> Self
// Type aliases
// Traits