CI / test (push) Successful in 12m25s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hhiJfJNAYqWzQiuKMf
117 lines
2.8 KiB
Plaintext
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
|