Files
chandra/compositor/renderer/pkg.generated.mbti
T
Claude 51b914f6cf
CI / test (push) Failing after 19s
Alt+Tab switcher: show a preview of each window
The switcher is now a grid of cards: a scaled-down picture of each window's
last frame over its app icon and title, the selected card lit. Cards wrap
into rows and shrink to fit small screens.

- Previews keep the buffer's aspect ratio and are never enlarged.
- Minimized windows show the last frame they drew, dimmed, marked
  "minimized". A window with no buffer yet shows its app icon (or its
  initial) on a plain tile.
- Cheap: nothing is scaled while the switcher is closed. A preview is made
  when the switcher opens and again only when that window commits a new
  buffer (or its shown size changes), into the same image handle; handles
  of closed windows are reused. The native scaler samples at most 3x3
  points per preview pixel, so big windows cost about the same as small.
- Both hosts: native scales the wl_shm snapshot in the software renderer
  (renderer.shm_thumbnail + set_image); the wasm compositor asks the host
  with the new chandra:host/raster thumbnail(surface, w, h, reuse), which
  scales the captured surface natively, so no pixels cross the boundary.
- Frames the screenshot overlay held back mark previews stale too.

Tests: switcher_test (preview pixels, aspect, no-buffer, stale and
remade into the same handle, minimized), renderer shm_thumbnail/set_image,
host-wasm thumbnail scaling and handle reuse. Pre-existing failures on
main are unchanged (6 panel-module host tests, the screenshot panel
module test, host-wasm translucent_surfaces_blend).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hjDvAsSQUdTTUGA3n5
2026-11-25 19:14:30 +00:00

61 lines
1.2 KiB
Plaintext

// Generated using `moon info`, DON'T EDIT IT
package "chandra/desktop/compositor/renderer"
import {
"chandra/desktop/compositor/scene",
}
// Values
pub fn add_image(Pixmap) -> UInt32
pub fn blit_shm_surface(Pixmap, @scene.ShmBufferSnapshot, @scene.Rect) -> Unit
pub fn decode_png(Bytes) -> Pixmap?
pub fn draw_ops(Pixmap, Array[@scene.DrawOp], Int32, Int32) -> Unit
pub fn encode_png(Pixmap) -> Bytes
pub fn encode_png_compressed(Pixmap) -> Bytes
pub fn encode_ppm(Pixmap) -> Bytes
pub fn render_scene(@scene.SceneGraph) -> Pixmap
pub fn scale_pixmap(Pixmap, Int32, Int32) -> Pixmap
pub fn set_image(UInt32, Pixmap) -> UInt32
pub fn set_glyph_source((Int32, Int32, Bool, Bool) -> Glyph) -> Unit
pub fn shm_thumbnail(@scene.ShmBufferSnapshot, Int32, Int32) -> Pixmap?
pub fn text_width(String, Int32, Bool, Bool) -> Int32
pub fn zlib_compress(FixedArray[Byte]) -> Array[Byte]
// Errors
// Types and methods
pub(all) struct Glyph {
w : Int32
h : Int32
xoff : Int32
yoff : Int32
advance : Int32
coverage : Bytes
embolden : Bool
}
pub(all) struct Pixmap {
width : Int32
height : Int32
data : FixedArray[Byte]
}
pub fn Pixmap::new(Int32, Int32) -> Self
pub fn Pixmap::pixel(Self, Int32, Int32) -> @scene.Rgba?
// Type aliases
// Traits