Apps submit mutli-plane images with glyphs, rather than mere images

This commit is contained in:
James Babcock committed 2026-08-16 21:01:20 -07:00
1 parent df85fb4072
commit fdf683761e
22 files changed
+348 -101

No files matched your search

+1 -1
View File
@@ -37,7 +37,7 @@ const launcherApp: AppDefinition = {
],
launchApp: (appId) => ctx.launchApp(appId),
uninstallApp: (appId) => ctx.uninstallApp(appId),
submitFrame: (image, paintMs, frameId) => ctx.submitWindowFrame(LAUNCHER_SURFACE_ID, image, paintMs, frameId),
submitFrame: (planes, paintMs, frameId) => ctx.submitWindowFrame(LAUNCHER_SURFACE_ID, planes, paintMs, frameId),
setSurfaceVisible: (visible) => ctx.setWindowSurfaceVisible(LAUNCHER_SURFACE_ID, visible),
}),
);
+3 -2
View File
@@ -1,6 +1,7 @@
import { getDefaultSmallFont, type BdfFont } from "../../graphics/bdffont";
import { truncateText } from "../../graphics/textwrap";
import { GrayImage } from "../../graphics/image";
import { type Plane } from "../../graphics/plane";
import { renderIcon, type IconName } from "../../graphics/icons";
import { clamp } from "../../util/numeric-util";
import {
@@ -37,8 +38,8 @@ export type LauncherOptions = {
apps: () => LauncherAppEntry[];
launchApp: (appId: string) => Promise<void> | void;
uninstallApp: (appId: string) => Promise<void> | void;
/** Submit a painted viewport-sized frame to this window's surface. */
submitFrame: (image: GrayImage, paintMs: number, frameId: number) => Promise<void>;
/** Submit a painted viewport-sized frame (as planes) to this window's surface. */
submitFrame: (planes: Plane[], paintMs: number, frameId: number) => Promise<void>;
/** Flip the launcher's compositor surface visibility on foreground changes. */
setSurfaceVisible: (visible: boolean) => void;
};