JNI's GetStringUTFChars emits MUTF-8, which encodes codepoints above
U+FFFF as a surrogate-pair of two 3-byte sequences. ImGui's UTF-8 decoder
rejects those, so SMP emoji (U+1F000+) never reach the glyph atlas even
when the glyph is registered.
Add Jni::ToTrueUtf8 / Jni::FreeTrueUtf8 helpers in jni_common that decode
via GetStringChars (UTF-16) and emit proper 1/2/3/4-byte UTF-8, then
route every generator- and manually-written JNI call site through them
(1921 occurrences across the generated tree and 3 hand-written files,
plus the jni_content.kt generator template so future regenerations stay
consistent).
- Enable IMGUI_USE_WCHAR32 in imconfig.h (ImWchar = uint32_t)
- Extend ImFontGlyphRangesBuilder, ImFontConfig, ImFontAtlas for 32-bit codepoints
- Cross-compile natives for macOS universal, Linux x86_64 (glibc), Windows x86_64
- Publish as org.nnstd.imgui:...:1.90.0-wchar32+mrlokop2 to mvn.mrlokop.dev
- Add BUILDING.md with full rebuild and publish instructions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(generator): introduce ArgVariant annotation
New annotation provides an ability to generate methods definitions for different types and names.
* feat(api): expose count param for plot* methods
* deps(build): bump FreeType from 2.12.1 to 2.13.3
* fix(generator): add missing ImGuiFreeTypeBuilderFlags
* feat(generator): add possibility to provide additional defines specifically for AST
* feat(api): make FreeType optional and disabled by default
FreeType renderer is still included in the final build.
Its usage is toggleable and DISABLED by default.
* build(deps): bump Dear ImGui from 1.86 to 1.87
* build(deps): bump implot from 0.12 to 0.13
* feat(api,binding): adapt API to Dear ImGui v1.87
* feat(api,binding): adapt API to implot v0.13
* build: generate API for latest changes
* chore(binding): add missing super call for ImGuiStructDestroyable constructor
* chore: minor code style
* feat: adapt ImGuiImplGlfw to 1.87
* feat: adapt ImGuiImplGl3 to 1.87
* feat: adapt imgui-app module to 1.87
* fix: javadoc for updated imgui-binding
* fix: loosing data when setting struct field of char* type
Since we manually release chars, to store them in field we need to do a local copy.
* fix: invalid methods to check program linking in OpenGL
* chore: remove dedicated method to check GLFW version
* fix: add missing include
A squash of hundreds of commits with a binding API generator.
The API generator works with a hybrid model:
1. We define methods and fields in the code.
2. Mark them with API annotations.
3. For specific use cases, we use the old approach with JNI generation comments.
There is also an API to generate an AST tree, which is saved to JSON.
This JSON can be used for full API generation by declaring only field/method names.
Currently, it is used to generate constants.
By eyeballing, 95% of the API has been converted to the new approach.
This is sufficient for the current moment. Only edge cases with specific API calls are left.
fix: ambiguous call for ImGui::GetColorU32
build: disable checkstyle for imgui-binding module
Since the module is heavily generated, checkstyle for it doesn't make sense.
build: make buildSrc to use JDK 11
build: make generateApi optional when compiling project
Initially generated module was not included to the project VCS.
Since it's now in the separate src folder, we don't need to call generator every time.
Only when a new generation result is required.
- Static FreeType linking flow for all OS
- Flow to build universal binaries for macOS (x86_64, aarch64)
- Simplified CI workflow by removing FreeType branches from the build matrix
Added 2 new scripts:
1. `buildSrc/scripts/vendor_freetype.sh`
2. `buildSrc/scripts/build.sh`
The first script prepares FreeType for usage in the build process.
The result of this script is used in the `GenerateLibs` task.
Other ways of building with FreeType are removed.
If it's impossible to build with FreeType, it is recommended to set `freetype=false`.
The second script aggregates commands to build native binaries.
It includes specific steps, such as creating a universal library for macOS and copying the result to the specific folder `/tmp/imgui/dst`.
Script 1 can be used for local builds. Script 2 is primarily intended for use in CI.
* [Build] CI refactor
* [Build] Fix GenerateLibs
* [Build] Up actions/checkout@v3
* [Build] Remove actions/gradle-build-action
* [Build] Uncomment publish/release jobs
* [Build] Delete obsolete jobs
* [Build] Add more info to the jar manifest
* [Build] Make checkout to fetch tags
* [Build] Return job to update binaries
* [Doc] Update README
* Working on memory editor bindings for SpaiR/imgui-java#109
* Initial working implementation
* Add mising entry for imgui_club in .gitmodules
* Sorry, fixing readme link type and description for memory editor.
* Rename .club package to .memedit
* Rename _club.h to _memedit.h
* Syncing wip to github
* Assertion callback works
* Restore example that does not crash
* Add comment in build script. Merge with upstream.
* Fix assert always triggering
* Resolve jvm env at runtime to prevent looking up bad stack address
* Fixed EXCEPTION_ACCESS_VIOLATION within native code after callback was complete.
* Fix linting errors
* Change ImGui to Dear ImGui
Co-authored-by: SpaiR <klimbetoo@gmail.com>
* Move jvm native layer to its own header/source
Co-authored-by: SpaiR <klimbetoo@gmail.com>
* Initial setup for ImGuiFileDialog extension
* Need to resolve linker errors. Working on PaneFun callback.
* Remove jni callback code that is not compiling to expose linker error.
* Callbacks for paneFun not yet implemented. Linker error still present, seems that some header is being included multiple times.
* Fixed linker errors. Added example for demo.
* Add support for multiple callbacks
* Callbacks work
* Add implot submodule.
* Add implot to generateLibs
* Add _implot.h
* Add placeholder ImPlot java classes.
* Create demo window.
* Try to show the ImPlot demo in the window.
* Create ImPlot context.
* Fix final check.
* Implement ImPlotFlags.
* Implement the rest of the enums.
* Make classes final.
* Implement ImPlotContext and related methods
* Added more methods to ImPlot wrapper (mostly plot utils)
* Implement ImPlotPoint
* Implement ImPlotRange
* Switch native method to static in ImPlotPoint
* Implement ImPlotLimits
* Finish ImPlot Plot Utils bindings
* Implement more ImPlot methods (Miscellaneous)
* Implement more ImPlot methods (Legend utils/tools)
* Implement more ImPlot methods (Drag and drop utils)
* Implement more ImPlot methods (Plot tools)
* Implement more ImPlot methods (most plot items)
* Fix compile error (casting to double and not Double)
* Fix ImDrawData.getCmdListCmdBufferTextureId()
* Implement more ImPlot methods (rest of plot items)
(except for PlotImage, which is not currently supported)
* Fix ImGui binding problems due to API changes
* Adhere to style guidelines.
* Fix imguizmo submodule
* Fix API
* Implement ImPlotStyle
* Implement more ImPlot methods (Plot and Item styling)
* Implement remainder of ImPlot methods (Colormaps)
* Modify ImPlot example program
* Fix ImPlot example program bug
* ImPlot bugfixes
* Update ImPlot Demo
* Revert merge errors.
* Make the submodules the version on master.
* Fix URL/style in ExampleImPlot
* Fix merge conflicts with example ImPlot context creation
* Remove unneccesary static block for field declarations
* Revert libimgui-java64.so
* Change construction to use define (vs passing a pointer)
* Fixed memory leaks
Changed ImPlotLimits, ImPlotRange, and ImPlotPoint to extend ImGuiStructDestroyable instead of ImGuiStruct so user-created instances can be destroyed. Methods that create instances that must be destroyed manually specify this in the docs.
* Fix style violations
* Fix compile error
* Replace exception type
Co-authored-by: Perry MacMurray <perrymacmurray@gmail.com>
Co-authored-by: Perry <pmacmurray@ihmc.org>
Co-authored-by: SpaiR <klimbetoo@gmail.com>