Files
chandra/lib/dock/pkg.generated.mbti
T
Claude 6253371cb3
CI / test (push) Failing after 30s
Dock and task manager are one module: titled window pills, pins, Super+1..9
The panel had a task list and, beside it, a dock showing the same running
apps again. They are now one module, the dock, in the task list's place:

- Pinned apps, then running ones; an app with windows is a pill with its
  window's title (or name and window count) while there is room, an icon
  when the panel is crowded ("Show window titles" in Dock settings).
- Its right-click menu has the task list's window commands (Minimize /
  Restore, Maximize) for a single window, or the app's windows by title.
- It stretches like the task list did; new panels get it instead of
  tasks. A saved panel's "tasks" becomes the dock (one dock, where the
  task list was); pins are the dock's own setting, so they carry over.
- An empty dock shows a "+ Add apps" tile that opens the Applications
  menu, where right-clicking an app offers Open and Pin to dock (adding a
  dock to the panel if there is none).
- Super+1 .. Super+9 open the dock's first nine apps like a click
  (shortcut "dock-apps", rebindable in Settings > Shortcuts).
- "New window" / "Open" only for apps the catalog can start.

The tasks component, lib/panel's pill geometry and the taskbar-widget
world are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hiPCFHRxaJQvwex6ry
2026-11-26 00:08:05 +00:00

117 lines
2.8 KiB
Plaintext

// Generated using `moon info`, DON'T EDIT IT
package "chandra/desktop/lib/dock"
import {
"chandra/desktop/interface/chandra/desktop/theme",
"chandra/desktop/interface/chandra/desktop/types",
"moonbitlang/core/debug",
}
// Values
pub fn activate(DockItem, UInt64?) -> DockAction
pub fn app_glyph(String, String) -> String
pub fn app_icon(Int32, Int32, Int32, String, String, hover? : Bool) -> Array[@types.DrawOp]
pub fn click_target(DockItem, UInt64?) -> UInt64?
pub let config : DockConfig
pub fn decode_pins(String) -> Array[String]?
pub let default_pin_count : Int32
pub fn encode_pins(Array[String]) -> String
pub fn handle(Array[DockItem], DockConfig, Int32, Int32, Int32, UInt64?, @types.InputEvent) -> (Int32, Bool, DockAction)
pub fn icon_size(DockConfig, Int32) -> Int32
pub fn item_at(Array[DockItem], DockConfig, Int32, Int32, Int32, Int32) -> Int32
pub fn item_center(Array[DockItem], DockConfig, Int32, Int32, Int32) -> Int32
pub fn item_size(DockConfig, Int32, Int32, Int32) -> Int32
pub fn item_title(DockItem) -> String
pub fn items(DockConfig, Array[@types.AppEntry], Array[DockWindow]) -> Array[DockItem]
pub let label_max : Int32
pub let label_min : Int32
pub fn match_app(String, Array[String]) -> String?
pub fn match_name(String, Array[@types.AppEntry]) -> String?
pub fn move_pin(Array[String], String, Int32) -> Array[String]
pub fn owner_of(String, Array[String], Array[@types.AppEntry], catalog_ids? : Array[String]) -> String?
pub fn preferred_width(Array[DockItem], DockConfig, Int32) -> Int32
pub fn render(@types.Size, @theme.Tokens, DockConfig, Array[DockItem], Int32, (String) -> UInt32) -> Array[@types.DrawOp]
pub let size_choices : Array[String]
pub fn tile_color(String) -> @types.Color
pub fn toggle_pin(Array[String], String) -> Array[String]
// Errors
// Types and methods
#derive(Eq, @debug.Debug)
pub(all) struct ConfigEntry {
key : String
label : String
choices : Array[String]
value : String
}
#derive(Eq, @debug.Debug)
pub(all) enum DockAction {
Nothing
Launch(String)
Focus(UInt64)
}
pub(all) struct DockConfig {
mut pinned : Array[String]?
mut size : String
mut magnify : Bool
mut running : Bool
mut titles : Bool
}
pub fn DockConfig::from_pairs(Array[(String, String)]) -> Self
pub fn DockConfig::items(Self) -> Array[ConfigEntry]
pub fn DockConfig::new() -> Self
pub fn DockConfig::pins(Self, Array[@types.AppEntry]) -> Array[String]
pub fn DockConfig::set(Self, String, String) -> Bool
#derive(@debug.Debug)
pub(all) struct DockItem {
id : String
name : String
glyph : String
pinned : Bool
windows : Array[UInt64]
focused : Bool
title : String
minimized : Int32
}
pub(all) struct DockWindow {
id : UInt64
app_id : String
focused : Bool
title : String
minimized : Bool
}
// Type aliases
// Traits