CI / test (push) Failing after 12m30s
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
136 lines
2.2 KiB
Plaintext
136 lines
2.2 KiB
Plaintext
// Generated using `moon info`, DON'T EDIT IT
|
|
package "chandra/desktop/interface/chandra/host/raster"
|
|
|
|
// Values
|
|
pub fn capture(Int32, Int32, Int32, Int32, Int32, Int32) -> UInt32
|
|
|
|
pub fn export_memfd() -> Int32
|
|
|
|
pub fn grab_recording_frame(Int32, Int32, Int32, Int32, Bool, Int32, Int32) -> Bool
|
|
|
|
pub fn image_pixels(Int32, Int32, FixedArray[Byte], UInt32) -> UInt32
|
|
|
|
pub fn load_image(String) -> UInt32
|
|
|
|
pub fn read_frame() -> FixedArray[Byte]
|
|
|
|
pub fn release(UInt32) -> Unit
|
|
|
|
pub fn send_recording_frame(Int32) -> Int32
|
|
|
|
pub fn snapshot_frame() -> Bool
|
|
|
|
pub fn snapshot_pixels(Int32, Int32, Int32, Int32, Int32, Int32) -> FixedArray[Byte]
|
|
|
|
pub fn snapshot_png(Int32, Int32, Int32, Int32) -> FixedArray[Byte]
|
|
|
|
pub fn submit(Frame) -> Unit
|
|
|
|
pub fn thumbnail(UInt32, Int32, Int32, UInt32) -> UInt32
|
|
|
|
pub fn write_frame_png(String) -> Bool
|
|
|
|
// Errors
|
|
|
|
// Types and methods
|
|
pub(all) struct Color {
|
|
r : Byte
|
|
g : Byte
|
|
b : Byte
|
|
a : Byte
|
|
}
|
|
|
|
pub(all) struct Disc {
|
|
cx : Int32
|
|
cy : Int32
|
|
radius : Int32
|
|
color : Color
|
|
filled : Bool
|
|
}
|
|
|
|
pub(all) struct Fill {
|
|
area : Rect
|
|
color : Color
|
|
radius : Int32
|
|
}
|
|
|
|
pub(all) struct Frame {
|
|
width : Int32
|
|
height : Int32
|
|
wallpaper : Array[Op]?
|
|
background : Array[Op]
|
|
windows : Array[Window]
|
|
panel : Array[Op]
|
|
popups : Array[Popup]
|
|
}
|
|
|
|
pub(all) struct Label {
|
|
x : Int32
|
|
y : Int32
|
|
text : String
|
|
size : Int32
|
|
color : Color
|
|
align : Byte
|
|
bold : Bool
|
|
mono : Bool
|
|
}
|
|
|
|
pub(all) enum Op {
|
|
FillRect(Fill)
|
|
StrokeRect(Stroke)
|
|
DrawLine(Segment)
|
|
DrawCircle(Disc)
|
|
DrawText(Label)
|
|
PushClip(Rect)
|
|
PopClip
|
|
DrawImage(Picture)
|
|
}
|
|
|
|
pub(all) struct Picture {
|
|
area : Rect
|
|
image : UInt32
|
|
}
|
|
|
|
pub(all) struct Popup {
|
|
area : Rect
|
|
surface : UInt32
|
|
}
|
|
|
|
pub(all) struct Rect {
|
|
x : Int32
|
|
y : Int32
|
|
w : Int32
|
|
h : Int32
|
|
}
|
|
|
|
pub(all) struct Segment {
|
|
x0 : Int32
|
|
y0 : Int32
|
|
x1 : Int32
|
|
y1 : Int32
|
|
color : Color
|
|
width : Int32
|
|
}
|
|
|
|
pub(all) struct Stroke {
|
|
area : Rect
|
|
color : Color
|
|
width : Int32
|
|
radius : Int32
|
|
}
|
|
|
|
pub(all) struct Window {
|
|
geometry : Rect
|
|
inset_top : Int32
|
|
inset_right : Int32
|
|
inset_bottom : Int32
|
|
inset_left : Int32
|
|
deco : Array[Op]
|
|
fullscreen : Bool
|
|
surface : UInt32
|
|
}
|
|
|
|
// Type aliases
|
|
|
|
// Traits
|