v0.6.32026-11-16
v0.6.3 让文本区能自动填满容器。TextArea.width 改为 ?f32 类型,传 null 即可占满父容器剩余宽度,与 TextInput、CodeEditor 的行为一致。宽度直接取自当前帧的布局结果,因此窗口缩放时文本区会即时跟随,不会出现一帧延迟,也不再需要额外探测宽度。默认值仍是固定 300。类型变更对既有代码无影响,原来写死数值的宽度可以原样编译。
v0.6.22026-11-16
v0.6.2 为 macOS 带来透明标题栏,同时新增窗口最小尺寸限制。
Config.title_bar = .transparent 让内容铺满整个窗口,红绿灯按钮悬浮其上,效果类似 Safari 和备忘录。cx.titleBarInset() 会在绑定和每次尺寸变化时返回内容区的内边距,.standard 模式、全屏及其他平台下为零。空白区域可拖动窗口,未激活窗口同样有效;双击行为跟随系统设置;红绿灯按钮照常点击,主题切换时颜色同步。
Config.minwidth / minheight 用逻辑像素设定用户可缩到的最小内容尺寸,设为 0 表示不限制。macOS、Linux(Wayland)和 Windows 会强制执行,Web 与 fbdev 忽略。若最小值超过 width/height 或帧缓冲区上限,编译期即报错并指明字段名。
另外修正了一个跨平台不一致:WindowOptions.minsize / maxsize 现在统一按内容尺寸解释,此前 macOS 误按窗口框架尺寸处理。
v0.6.12026-11-16
0.6.1 提前上线,带来两个小改动。
新增 animation.loop(cx, key, periodms):返回 0 到 1 的相位值,每 periodms 循环一次,从首次构建开始计时。只有读取它的构建才会请求帧,停止读取后不产生任何定时器或清理开销,应用直接进入空闲;循环回来时相位从 0 重新开始,上限为 60 秒。动画示例新增 Start/Stop Pulse 按钮,实测 120 Hz 屏幕上脉冲时 119.8 fps,停止后帧数归零。
macOS 标题栏现在跟随应用主题,启动和 effects.setTheme 切换时都会生效——此前浅色主题下标题栏仍是深色。深浅判断依据 Theme.isDark():背景比文字暗即为深色主题。仪表盘示例的 T 键现在用于切换主题。
v0.6.02026-11-15
Gooey 0.6: background jobs, programmatic scroll, long content without budget hikes, a sealed public API, and a complete resource budget.
Breaking changes
- oninit is now fn (State, gooey.Init, *Effects) void. gooey.Init carries the process's io and environ, so apps no longer need globals around App.main. (#266)
- Cx and Painter are sealed: cx.window, Painter.window and Painter.clip_depth are gone. Use cx.now(), cx.bounds(id), cx.scroll(id) and cx.limits() instead. (#259)
- gooey.text keeps Metrics, FontWeight, FontFamily, FontVariant, codepointCount and runcodepointcount_max. gooey.accessibility keeps Role, State, Live, HeadingLevel and Orientation. The full modules, and Query, moved to gooey.internals. (#262)
- Charts take comptime capacities: LineChart(cap), ScatterChart(cap), BarChart(cap), PieChart(cap). charts.Series and charts.CategorySeries are removed; use each chart type's .Series. (#264)
- A List row's height function now receives the row width: pub fn height(cx, index, width) f32. (#267)
- ResourceLimits gains events.jobcountmax, jobinputbytesmax, jobresultcountmax, jobresultbytesmax (#266) and text.textsizeslotcount_max (#267). nano and small event queues are 256, and every queue must hold one input burst (#256). A budget built from a profile gets the profile's values; one written field by field must set them.
- List and CodeEditor no longer read internals; any .internals use under components/ or charts/ fails the import ban. (#259)
New
- Background jobs. effects.spawn(Job, &input, .{ .onresult, .ondone }) runs a job on a Gooey-owned worker. A job posts typed results with job.post(&result), which wakes the app; results arrive as handler calls with effects.jobResult(Job). effects.cancelJob(id) cancels cooperatively. Workers, inputs and results live in slots reserved at init, so nothing allocates. A full job table fails fast naming events.jobcountmax. Closing the app cancels and joins every worker before the new Config.on_deinit(state). Web and single-threaded builds run a job right after the drain that spawned it. See the background example. (#266)
- Programmatic scroll. effects.scrollTo(id, .start | .end | offset | child) takes effect the same frame. ui.Scroll{ .anchor = .end } keeps a box pinned to its end while content grows, and releases on a wheel, scrollbar drag or focus move away from the end. List.anchor and List.scrollTo do the same for lists. cx.scroll(id) reports target and at_end. (#263)
- cx.measureText(text, options) returns a text's wrapped size with layout's own wrapping, so List rows can size themselves from their content. Building a 400-row list of 800 B messages fell from 4.65 to 0.047 ms. (#267)
- Public reads on Cx: now(), bounds(id) (last frame), scroll(id) and limits(). ui now exports Direction, Layer, Anchor, Scroll, ClipPolicy, CursorShape, PointerEvents, KeyContext and ActionBinding. (#259, #262)
Changes
- ui.text past 1,024 codepoints no longer panics. Layout splits it into shaping runs at line and word breaks, and wrapping matches a single run. (#260)
- Paint outside a scroll or clip box is culled at emit; hit records and accessibility nodes are kept, so screen readers and Tab still reach every element. Paint records per frame for a long chat transcript fell from 43,387 to 1,510. Scrolling a 242 KB transcript on a 120 Hz Mac now runs at 120 fps with a main-thread p50 under 0.5 ms; v0.5.5 managed 16 fps on its newest 40 KiB. (#260, #261)
- Fixed: a word at the end of a paragraph could run past the wrap width. It now wraps like any other word. (#260)
- Linux: without server-side decorations, a press in the top 32 px or the 8 px edges no longer moves or resizes the window when it lands on a button, text field, drag source or scrollbar. Empty chrome still moves and resizes. (#258)
- Wayland: on libwayland 1.25 or later, events are read one at a time while the input queue has room, a hard bound on any burst. Older libwayland keeps the soft 256 bound with fail-fast. (#265)
- Platform intake and web buffers, clipboards and dialog buffers are sized from the budget. A 10 KB web paste keeps 8 KiB instead of 256 B, and overflows log the field to raise. Dialog failures complete as failed on every backend. Windows focus loss is one focus_lost event. D3D11 refuses a budget past its 128 MiB buffer bound by name. (#256)
- Charts state shrank from 1.58 MB to 6 KB in the dashboard; idle RSS fell 21.2 → 18.8 MiB. (#264)
- The resource budget is complete: every Gooey-owned capacity, including components and charts, comes from ResourceLimits or a comptime capacity.
Known issues
- Moving VoiceOver focus does not scroll a scroll box; Tab focus does.
- Plain ui.text is not exposed to screen readers.
Full changelog: https://github.com/duanebester/gooey/compare/v0.5.5...v0.6.0
v0.5.52026-11-15
v0.5.5 放宽了资源预算、修掉两个崩溃,并让输入法合并不再串台。
资源额度(ResourceLimits)新增 SVG、图片、无障碍值与对话框等多条上限,SVG 和图片缓存改为按预算动态扩容,不再受固定 2048px 帧束缚,lucide-demo 首屏在 large 档填充快了约 3.7 倍。
崩溃修复两处:代码编辑器打开超过 64 KiB 的文件、文件对话框选择 1 KiB 到 events.dialogpathbytes_max 之间路径时的 panic。无障碍值现在会像原生控件一样保留光标所在整行。
输入法方面,合状态下切换焦点,文字会提交到它被输入的框里,不再漏进下一个字段,已用 Kotoeri、微软日语、Anthy、Mozc 验证。
另外来自 WWW4R4E 的两个平台修复:Linux 按键长按重复遵循合成器的速率与延迟;Vulkan 改为每个交换链图像一个 present 信号量,交换链重建会等待呈现完成,校验层报错从数百条降到零。
v0.5.42026-11-15
v0.5.4:拖放功能回归,并补齐键盘与无障碍支持,同时把资源预算的覆盖范围扩到无障碍树和文本缓存。
破坏性变更:ResourceLimits 新增 a11y 预算(elementcountmax、announcementcountframemax、announcementbytesframemax)和四个 text 字段(glyphcachecountmax、shapedruncountmax、measureslotcountmax、preeditbytesmax)。逐字段手写的预算必须补齐这些项,从 profile 构建的会沿用 profile 取值。若干内部实现改为初始化时定容(仅涉及 gooey.internals,非公开 API),textengine.preeditbytesmax 移除,FontConfig.limits 更名为 FontConfig.text。
拖放走类型化路线:Box.draggable = .of(T, payload)、Box.droptarget = .of(T, handler),拖动中可用 cx.drag(T) 读取 payload、over、坐标,.drag 层承载预览;Escape、按下鼠标或平台接管手势都会取消拖动。键盘路径用 effects.startDrag(id) 起拖,Tab、Shift+Tab 与方向键在可接收该载荷的目标间移动,Enter 或 Space 落放,Drag(T).keyboard 区分两条路径,VoiceOver 会朗读拾起、各目标与落放。dragdrop 示例(zig build run-drag-drop)演示在列表间移动卡片。
无障碍树、两帧节点及 macOS、web、Windows 桥接和公告数量改由 ResourceLimits.a11y 定容,超限时快速失败并指明字段,不再静默丢弃;nano 下树体积从 488 KB 降到 32 KB。字形、shaped-run、文本宽度缓存与 IME 组成缓冲由 ResourceLimits.text 在初始化预留,缓存撑爆同样报错,过长的输入法组合会被截断并记录,三者在 nano 下占 0.32 MB(此前 1.41 MB)。
另有几处修补:macOS 上 A11y.description 作为元素帮助朗读延迟提示,与 Windows 一致;折线图面积填充改用与折线同点的三角带,消除竖向接缝和锯齿顶边;示例方面 virtual-list 会折行长消息,data-table 列宽填满至滚动条。
v0.5.32026-11-14
gooey 0.5.3 拉开了 0.6 周期的序幕:指针捕获与取消、纳入资源预算的字体与布局、非递归布局,以及帧追踪与 macOS 帧率修正。破坏性变更集中在容量配置:字体上限改设 ResourceLimits.text.fonts,Config.fonts.limits 与 fontLimitsFor 删除;LayoutEngine.init 改用 LayoutCapacity.fromLimits(&limits),布局的 MAX 常量与增长式 arena 一并移除,window.boxdepthmax 归入 ResourceLimits.build.boxdepthmax;A11y.Range 必须给出 orientation。交互上,Box.onpointerdrag 现报告 begin、move、end 与 cancel,各宿主在焦点或捕获被夺走时发出 pointercancelled,拖动可回到起点。布局改用显式栈,深度可撑到预算上限(此前 47 层嵌套会崩),速度快 1–29%,预留内存从 6.0 MiB 降到 0.19 MiB。另修复按住按钮拖动时事件队列溢出导致的 panic;-Dframe-trace 记录逐帧阶段耗时,zig build frame-trace-report 汇总。
v0.5.22026-11-14
v0.5.2 为 0.4 迁移收尾:Style 与 Box 的公开字段要么真正可用、要么直接删掉,0.3.1 遗留项清理干净,文档与代码对齐,CI 补上 Windows 测试(Vulkan 与 Direct3D 11 各构建全部示例)。
破坏性变更集中在两处。拖放整体推迟到 0.6,Box.draggable、Box.droptarget、DragSource、DropTarget 从 API 移除——过去用它们会在运行时 panic,现在直接编译报错。gooey.internals 与 gooey.testing 删掉一批名字:布局引擎的 id 相关接口、MockRenderer 与 interfaceverify、ImageLoader 和 asset_cache 骨架、无障碍树的布局 id 查找,以及 21 个未使用的 limits 常量。
真正能用的新能力:Style.opacity 生效,可淡入淡出盒子及其子树,嵌套值相乘,超出 0–1 会给出明确的 panic 信息;grow 权重按比例分配剩余空间(此前布局引擎根本不支持权重);Style.pointer_events = .none 让点击、悬停、光标与滚轮事件穿透盒子,子元素仍能收到。内存方面,布局引擎那两张 4,096 条的 id 映射表已移除,每个窗口占用更少;核心契约的代码示例也恢复可编译。
构建/绘制
v0.5.12026-11-14
Layout cleanup and a floating-layout fix. Rendering is identical to v0.5.0 apart from the fix below.
Breaking changes
The layout engine no longer builds render commands. Nothing has read them since 0.5.0, because the core paints from element bounds.
- LayoutEngine.endFrame now returns void. It used to return []const RenderCommand.
- Removed:
- layout.render_commands, including RenderCommand, RenderCommandType, RenderCommandList and RenderData.
- layout.scroll_pass.
- LayoutEngine.getZIndex.
- FloatingConfig.z_index. The core always set it to 0, and it changed nothing.
- limits.MAXRENDERCOMMANDS, which nothing used.
Apps built on gooey.App don't touch any of these.
Changes
- Layout is faster: endFrame is 14–28% faster across the layout benchmarks, and a full frame is 3–16% faster. Each window reserves about 4.6 MB less virtual memory. (#221)
- Fixed: wrapped text inside a floating element (a modal, menu or popover) now grows that element. Before, the element kept the height of its unwrapped content, and the extra lines spilled past its bottom padding. A floating child also no longer counts toward its host's height. (#222)
- The nested_overlay example's title now wraps instead of running past the modal. (#222)
Full changelog: https://github.com/duanebester/gooey/compare/v0.5.0...v0.5.1
v0.5.02026-11-14
Phase 6 retires src/scene/, the last large 0.3 subsystem. Every renderer has drawn the packed frame since 0.4.3, and this release deletes the old path: −10,127 lines. Rendering is identical to v0.4.4 on Metal, WebGPU, Vulkan, DX11 and the CPU renderer.
Breaking changes
Apps that spell out a resource budget change one word:
| Old | New |
| --- | --- |
| ResourceLimits.scene (e.g. limits.scene.glyphcountframemax) | ResourceLimits.paint (limits.paint.glyphcountframemax) |
| SceneLimits | PaintLimits |
| SceneLimits.sceneBytes() | PaintLimits.paintBytes() |
| Violation.Budget.scene | Violation.Budget.paint |
Removed: gooey.text.renderText, gooey.text.RenderTextOptions, gooey.internals.scene, internals.platform.linux.unified, SceneLimits.sortKeyCountMax, SceneLimits.unifiedPrimitiveCountMax (use packedframe.quadCapacity), limits.MAXSORTKEYS, limits.MAXPERSISTENT_MESHES, and the bench-scene build step.
Changes
- The paint budget now measures what a window actually reserves. Per window, standard drops from 3.57 to 2.83 MiB, and large rises from 23.2 to 33.7 MiB because its mesh pools are now counted. See docs/v0.4.0-memory-budget.md. (#218)
- core-bench gains pack benchmarks, and the import ban rejects src/scene/ and src/platform/unified.zig. (#218)
- macOS VoiceOver: Select options are announced as options and the chosen one as "selected", and closing the list returns VoiceOver to the combo box. (#219)
Full changelog: https://github.com/duanebester/gooey/compare/v0.4.4...v0.5.0