You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
An agent can subscribe to control changes. Agent::subscribe(query) returns a Subscription for the controls a ControlQuery matches; each frame, Subscription::observe returns a ControlChange for every control whose value, checked state or states changed, or that appeared or went away, with its previous and current ControlValue. When the application records the change it applied with ControlMetadata::changed or Field::changed, the change also carries its ChangeReason and ChangeSource, so an agent can tell a keyboard edit from a click or its own action.
run() draws in Graphite mode on terminals that can show it. It resolves the application's ModePolicy against the probed terminal instead of a cell-only backend: Graphite when the terminal draws pixel images and reports its cell size, Cell otherwise, with LUNATUI_MODE still overriding. An application draws Graphite by building its RenderCx from RenderFrame::parts in RenderFrame::mode; one that only implements render keeps drawing cells. PixelLayer::cell_pixels and set_cell_pixels expose the cell size images are drawn at, and run() updates it from the terminal's window-size report on resize. The new activity_monitor_live example draws the activity monitor live this way.
Graphite text can start fast on a tight CPU budget. UiFont::InterCompact draws with compact copies of Inter and JetBrains Mono that keep Latin with Latin-1 and Latin Extended-A, punctuation, currency, arrows, mathematical and technical symbols, box drawing, block elements and geometric shapes, and it has no fallback fonts, so any other character draws as the missing-glyph box. The three files it uses parse in under 3 ms on a developer machine, against about 30 ms for full Inter, JetBrains Mono and the Noto Sans fallback that box drawing and block elements reach through. BundledText::load parses every font file a text can draw with, and BundledText::loaded says whether that is done, so a program can draw its first frame in cells and load the fonts in a later call. lunatui_fonts::Family::compact returns the compact files, COMPACT_RANGES lists what they keep, and scripts/subset-fonts.py writes them. They add about 200 KB. The graphite_fonts example draws a fourth specimen with the compact fonts.
Changed
In Kitty, an image listed later in a frame now stays above an earlier image at the same depth. Kitty stacks images with the same z-index by image id, so a row image uploaded again with a higher id could cover a badge drawn over it. PixelLayer sends 256 × depth plus the image's place in the frame as the z-index, so depth still decides first and negative depths stay under text. Depths must lie in PIXEL_DEPTHS, −8,388,608 to 8,388,607, where that z-index cannot saturate; an image at a depth outside it is refused, and a widget then draws its cells. Depths below −4,194,304 draw under cell backgrounds.