SetNextWindowCached(key): opt-in cached windows on top of the refresh policy (skip contents while idle), t_cached_window test, README snippet
Build & Release / build (push) Canceled after 0s

This commit is contained in:
4DBug
2026-10-08 20:43:56 -05:00
parent df4cf4cd80
commit 14e6da3b29
14 changed files with 241 additions and 10 deletions
+6 -1
View File
@@ -39,6 +39,11 @@ def upstream_decls():
return decls
LOOSE = "(...any) -> ...any"
PORT_ONLY = { # port additions that aren't in imgui.h
"SetNextWindowCached": "(key: any) -> ()",
"NewTextBuffer": "(str: string, size: number?) -> {number}",
"TextBufferToString": "(buf: {number}) -> string",
}
def signature(port_params, ret, cparams):
if any(p == "..." for p in cparams):
@@ -103,7 +108,7 @@ def types_header(files):
"export type ImGuiAPI = {"]
for name in sorted(fns):
d = decls.get(name)
sig = signature(fns[name], *d[0]) if d and len(d) == 1 else LOOSE
sig = PORT_ONLY.get(name) or (signature(fns[name], *d[0]) if d and len(d) == 1 else LOOSE)
lines.append(" %s: %s," % (name, sig))
lines += [" [string]: any,", "}"]
for name, keys in sorted(enums(files).items()):