Files
chandra/lib/dock/pkg.generated.mbti
T
Claude 9f7489cfea
CI / test (push) Failing after 12m30s
Face unlock window: live camera preview, Snap, thumbnails, one password on Apply
Settings > Session "Add or remove faces…" (and "Remove…" on a face) opens a
compositor-drawn Face unlock window instead of running root steps one by one:

- chandra-face camera runs as the user (no password): it streams a small live
  picture with the face box and a cropped thumbnail per snap; the snaps'
  embeddings stay in that process, nothing is written to disk.
- Click a snap to drop it; mark saved faces Remove/Keep.
- Apply saves the snaps as one face and removes the marked ones in one root
  `chandra-face apply` (JSON on stdin, validated) through run0/pkexec: one
  password prompt.
- New raster host function image-pixels (host-wasm, wasmhost, native) for the
  window's pictures.

Tests: camera session and apply in face/test_face.py; the window end to end
against a fake tool in compositor/host/face_test.mbt. Docs explain why the
change itself still needs root.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hhiJfJNAYqWzQiuKMf
2026-11-26 02:36:29 +00:00

119 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 titled_at(Array[DockItem], DockConfig, Int32, Int32, Int32) -> Bool
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