Commit 32f4c23
feat(api): bump Dear ImGui from 1.90.9 to 1.92.7
* feat(api): bump Dear ImGui 1.90.9 -> 1.92.7-docking
This is the substantial 21-month Dear ImGui catch-up. Upstream's 1.92.0
is the largest breaking release since 2015 (font subsystem rework,
ImTextureRef, atlas rewrite), so this PR absorbs those in addition to
the 1.91.x accumulated changes.
Submodule bumps:
- imgui: v1.90.9-docking -> v1.92.7-docking (~2088 commits, Apr 2026)
- implot: 1f7a8c0 (2023) -> v0.17 (Nov 2025) -- required because the
older implot doesn't compile against imgui 1.92 (missing FontSize /
FindGlyph / CalcFontSize symbols). v0.17 has the 1.92 compat guards
and is NON-BREAKING for Java consumers (still the old flags/offset/
stride API). The ImPlotSpec migration to implot v1.0 lands in its
own separate PR.
- imgui-node-editor: b302971 -> 021aa0e (+ a small local patch --
see patches/)
- imnodes: 8563e16 -> b2ec254 -- upstream fix for imgui 1.92.0. The
node-editor and imnodes bumps are required for imgui 1.92 compat,
not cherry-picked.
Key Java binding changes (consumer-visible):
- ImFont: fields Ascent, Descent, FontSize, FallbackAdvanceX,
FallbackGlyph, ConfigDataCount, EllipsisCharCount, EllipsisWidth,
EllipsisCharStep, DirtyLookupTables were removed (moved to
ImFontBaked upstream, not yet surfaced in the Java binding --
follow-up). Methods FindGlyph, FindGlyphNoFallback, GetCharAdvance
were similarly moved. Kept: IsLoaded, GetDebugName, CalcTextSizeA,
RenderChar, RenderText (last param is now `int flags` rather than
`bool cpuFineClip`), plus new LegacySize and FallbackChar.
- ImGui.PushFont(font) -> PushFont(font, size) -- size is now
required; pass 0.0f to keep current size.
- ImGui.Image(): removed tint_col and border_col params; use new
ImageWithBg() for tinting, or ImGuiCol_ImageBorder for the border.
- ImFontAtlas: dropped TexDesiredWidth (use TexMinWidth/TexMaxWidth
on the C++ side -- not yet Java-surfaced).
- ImFontConfig: GlyphExtraSpacing (ImVec2) -> GlyphExtraAdvanceX
(float); FontBuilderFlags -> FontLoaderFlags.
- ImGuiIO: removed PlatformLocaleDecimalPoint (moved to
style.LocaleDecimalPoint); removed BackendUsingLegacyKeyArrays,
BackendUsingLegacyNavInputArray.
- ImGuiKey_KeysData_SIZE -> ImGuiKey_NamedKey_COUNT.
- ImGuiStyle: TabMinWidthForCloseButton split into
TabCloseButtonMinWidthSelected and
TabCloseButtonMinWidthUnselected.
- ImGuiChildFlags.Border -> ImGuiChildFlags.Borders (upstream rename
in 1.91.1).
- Flag enum: ImGuiFreeTypeBuilderFlags -> ImGuiFreeTypeLoaderFlags
(upstream rename in 1.92). File renamed accordingly.
- Internal: SetCurrentFont signature now takes
(font, fontSizeBeforeScaling, fontSizeAfterScaling);
UpdateHoveredWindowAndCaptureFlags now takes a mousePos;
GetContentRegionMaxAbs was removed (compute manually).
- LWJGL GLFW backend: replace ImGuiKey.ModCtrl/ModShift/ModAlt/
ModSuper with ImGuiKey.ImGuiMod_Ctrl etc. (upstream renamed
ImGuiKey_ModCtrl -> ImGuiMod_Ctrl, the old names moved to
ReservedForModCtrl).
Build-side:
- imgui-node-editor has an unreleased upstream fix pending for
imgui 1.92's new operator*(float, ImVec2). A 3-line patch is
included under patches/ and applied automatically at build time
via a new applyVendorPatches gradle task, wired as a dependency
of generateLibs. Idempotent. The patch can be removed once
node-editor upstream ships a 1.92 compat release.
Not done in this PR (reserved for follow-ups):
- ImFontBaked wrapper for per-size glyph/metric access.
- ImTextureRef Java wrapper type. Today Java passes texture
handles as `long`; imgui's backward-compat implicit conversion
from ImTextureID -> ImTextureRef makes this work, but surfacing
the new type would let callers use dynamic textures.
- Surfacing new APIs: TextLink/TextLinkOpenURL, Multi-Select,
NextMarker variants, ImageWithBg overloads, etc. All the flag
enums are AST-driven so they're already available.
- ImGui 1.92 multi-select API (BeginMultiSelect / EndMultiSelect
and ~13 new flags) and new widgets (TextLink / TextLinkOpenURL)
are not yet surfaced in the Java binding.
Verified: :imgui-binding:generateApi + generateLibs + :example:run
on JDK 26 + macOS arm64 with the existing ImPlot demo rendering
correctly through the LWJGL3 GLFW/OpenGL backend.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(api): surface new ImGuiStyle fields (FontScaleMain/Dpi, SeparatorSize)
Follow-on to the 1.92 bump: expose three new ImGuiStyle fields added
by imgui 1.92/1.92.7:
- FontScaleMain: main global scale factor (replaces io.FontGlobalScale).
- FontScaleDpi: DPI-driven global scale factor.
- SeparatorSize: thickness of the Separator() line.
Pure additions; no existing API changes.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(api): add TextLink, TextLinkOpenURL, GlyphExcludeRanges (imgui 1.91/1.92)
Additive surface work layered on top of the imgui 1.92 bump:
- ImGui.TextLink(label) -> boolean: inline hyperlink widget (imgui 1.91),
returns true when clicked. Style via ImGuiCol_TextLink.
- ImGui.TextLinkOpenURL(label, url): hyperlink that opens the given URL
on click via io.PlatformOpenInShellFn. Uses OS defaults on
Windows/Linux/macOS.
- ImFontConfig.GlyphExcludeRanges: exclude Unicode ranges from a font
source when merging multiple fonts (new in imgui 1.92); mirrors the
existing GlyphRanges setter pattern.
Demo: Main.java gains two inline examples -- an "increment" TextLink
next to the counter, and a "Dear ImGui on GitHub" TextLinkOpenURL
line below the slider.
Backend fix: ImGuiImplGlfw.shutdown() now null-guards the cursor
destroy loop. Since imgui 1.91 added ImGuiMouseCursor_Wait and
_Progress slots that GLFW has no standard cursor for, those array
entries stay zero-initialized. Upstream C code passes NULL to
glfwDestroyCursor fine; LWJGL's Java wrapper asserts non-null and
crashes on shutdown. This was blocking clean app exit with imgui
1.92.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(api): expose more 1.91/1.92 additions (io config, style fields, items, atlas)
Batch of cheap, additive surface additions to round out imgui 1.91/1.92
coverage. No breaking changes.
ImGuiIO:
- ConfigDpiScaleFonts, ConfigDpiScaleViewports (docking branch DPI
auto-scale, 1.92)
- ConfigErrorRecovery + EnableAssert/EnableDebugLog/EnableTooltip
(1.91.6)
- ConfigDebugHighlightIdConflicts (1.91.0)
ImGuiStyle:
- ImageRounding, ImageBorderSize (1.92; rounded image calls)
- TreeLinesFlags, TreeLinesSize, TreeLinesRounding (1.92; tree node
hierarchy connector lines)
- ColorMarkerSize (1.92.7; R/G/B/A color markers in ColorEdit4)
ImGui:
- GetItemFlags(): returns generic ImGuiItemFlags of last item (1.91)
- IsItemToggledSelection(): per-item multi-select toggle query (1.91)
- SetNextItemSelectionUserData(long): opaque 64-bit selection id for
Multi-Select (1.91) -- foundational for the full Multi-Select API
which is deferred to its own PR
ImFontAtlas:
- AddFontDefaultVector(): embedded scalable ProggyForever font (1.92)
- AddFontDefaultBitmap(): embedded pixel-clean bitmap font (1.92)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(api): expose io.ConfigDockingNoDockingOver (imgui 1.92)
One small docking-branch field added in 1.92 that we'd missed: if set,
docking is limited to splitting windows only (no merging into the same
tab-bar). Complements the existing ConfigDockingNoSplit. Scalar bool.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(api): surface ImFontAtlas TexMinWidth/MaxWidth/MaxHeight (imgui 1.92)
Four new atlas dimension fields introduced in imgui 1.92 as the
replacement for the removed TexDesiredWidth:
- TexMinWidth (default 512)
- TexMinHeight (default 128)
- TexMaxWidth (default 8192)
- TexMaxHeight (default 8192)
These matter for legacy backends that don't report
ImGuiBackendFlags_RendererHasTextures -- the 8192x8192 default cap is
not enough when loading large glyph sets (e.g. full CJK_UNIFIED_IDEOGRAPHS
at 14+12pt) and triggers 'Out of texture memory' assertions during the
first-frame atlas build. Callers can now set e.g.
atlas.setTexMaxWidth(16384);
atlas.setTexMaxHeight(16384);
before adding fonts.
Discovered while porting a downstream app with extensive CJK glyphs to
the 1.92 binding.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(docs): javadoc errors from 1.92 header comments and stale {@link}
Strict doclint on JDK 17 rejects three patterns carried over verbatim
from Dear ImGui 1.92 headers into Java Javadoc, producing hard errors
that fail the CI `Build Java` step:
1. ImFont.java (LegacySize field): `{@link ImGui#pushFont(ImFont)}` —
1.92 replaced the 1-arg overload with `pushFont(ImFont, float)`, so
the reference no longer resolves. Updated link to match new signature.
2. ImGui.java (TableGetHoveredColumn): bare `&` in
`(TableGetColumnFlags() & ImGuiTableColumnFlags_IsHovered)` — wrapped
the expression in `{@code ...}`.
3. ImGui.java (mouse-dragging family): bare `<` in
`(uses io.MouseDraggingThreshold if lock_threshold < 0.0f)` — wrapped
in `{@code ...}`. Covers 14 occurrences across Is/Get/Reset Mouse
Dragging overloads.
4. ImGuiChildFlags.java: `"Demo->Child->Auto-resize with Constraints"` —
wrapped menu path in `{@code ...}` (matches the treatment applied in
the 1.90.9 bump commit 634e28b).
Fixed both the hand-written source files under src/main and the
committed generated mirrors under src/generated so a subsequent
generateApi run won't undo the fixes. Verified locally with
`javadoc -Xdoclint:all` over the full source+generated tree:
0 errors, 100 warnings (same shape as main's pre-1.92 baseline).
* fix(api): populate ImGuiFreeTypeLoaderFlags (was empty after 1.92 rename)
The @BindingAstEnum annotation on the source file used
qualType = "ImGuiFreeTypeLoaderFlags" (no trailing underscore). In
imgui 1.92 the actual enum in misc/freetype/imgui_freetype.h is
named ImGuiFreeTypeLoaderFlags_; the unsuffixed ImGuiFreeTypeLoaderFlags
is only a typedef for unsigned int. All other flag classes in the
binding use the _-suffixed form (ImGuiCol_, ImGuiTableRowFlags_, ...).
As a result the AST-driven generator found no matching enum members
and emitted an empty class, breaking any caller that needs the
hinting / styling / color / bitmap flags.
Regenerated mirror under src/generated now exposes the 10 flags
(NoHinting, NoAutoHint, ForceAutoHint, LightHinting, MonoHinting,
Bold, Oblique, Monochrome, LoadColor, Bitmap) plus the
ImGuiFreeTypeBuilderFlags_* obsolete aliases upstream keeps under
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS. The aliases don't strip
because their prefix doesn't match sanitizeName -- this mirrors the
existing pattern for other flag classes carrying similar compat
entries (ImGuiCol.TabActive, ImGuiDockNodeFlags.NoSplit, etc.).
Reported by SpaiR on the 1.92 bump PR.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(natives): update font-loader API surface for imgui 1.92
imgui 1.92 replaced ImFontBuilderIO with ImFontLoader and renamed
the public entry points:
ImGuiFreeType::GetBuilderForFreeType() -> GetFontLoader()
ImFontAtlasGetBuilderForStbTruetype() -> ImFontAtlasGetFontLoaderForStbTruetype()
atlas->FontBuilderIO = X -> atlas->SetFontLoader(X)
Three places in this binding hard-coded the old names; the CI's
Build Native step surfaced all of them once #383 unblocked it.
GenerateLibs.groovy: the stb_truetype-default hack rewrites the
body of imgui_draw.cpp after vendoring. The replacement pair is
refreshed to the 1.92 names so the rewrite still finds its anchor.
Previously it failed with:
Unable to replace [imgui_draw.cpp] with content
[ImFontAtlasGetBuilderForStbTruetype()]!
ImFontAtlas.setFreeTypeRenderer: the JNI body used the removed
FontBuilderIO field. Rewritten to the new SetFontLoader() API.
Since ImFontAtlasGetFontLoaderForStbTruetype is declared only in
imgui_internal.h (which the JNI translation unit doesn't pull in),
the function is locally forward-declared as extern inside the
method body rather than dragging imgui_internal.h file-wide.
Verified: ./gradlew :imgui-binding:generateLibs on JDK 25 / macOS
arm64 produces a working libimgui-java64.dylib.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 35f3c75 commit 32f4c23
66 files changed
Lines changed: 20363 additions & 11811 deletions
File tree
- buildSrc
- scripts
- src/main
- groovy/tool/generator
- resources/generator/api/ast
- example/src/main/java
- imgui-binding
- src
- generated/java/imgui
- extension/implot/flag
- flag
- internal
- flag
- main/java/imgui
- flag
- internal
- imgui-lwjgl3/src/main/java/imgui/glfw
- include
- patches
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
| 319 | + | |
320 | 320 | | |
321 | | - | |
| 321 | + | |
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
325 | | - | |
| 325 | + | |
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
0 commit comments