75 Commits
Author SHA1 Message Date
MRLokop d9aa2c811b fix: use real UTF-8 for jstring -> native conversion
CI / Build Java (push) Has been cancelled
CI / Build Native (macos-latest - macos) (push) Has been cancelled
CI / Build Native (ubuntu-latest - linux) (push) Has been cancelled
CI / Build Native (ubuntu-latest - windows) (push) Has been cancelled
CI / Archive Natives (push) Has been cancelled
CI / Update Binaries (push) Has been cancelled
CI / Release (push) Has been cancelled
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).
2026-04-20 11:04:08 +03:00
RobotandClaude Sonnet 4.6 34c40304f6 feat: add IMGUI_USE_WCHAR32 support, cross-compile natives, publish to mvn.mrlokop.dev
CI / Build Java (push) Has been cancelled
CI / Build Native (macos-latest - macos) (push) Has been cancelled
CI / Build Native (ubuntu-latest - linux) (push) Has been cancelled
CI / Build Native (ubuntu-latest - windows) (push) Has been cancelled
CI / Archive Natives (push) Has been cancelled
CI / Update Binaries (push) Has been cancelled
CI / Release (push) Has been cancelled
- 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>
2026-04-20 10:29:43 +03:00
dependabot[bot] 64b2fbe01b build(deps): bump com.fasterxml.jackson.core:jackson-core (#347)
Bumps [com.fasterxml.jackson.core:jackson-core](https://github.com/FasterXML/jackson-core) from 2.18.0 to 2.20.0.
- [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.18.0...jackson-core-2.20.0)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-core
  dependency-version: 2.20.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-09 15:22:09 +02:00
SpaiR 7b8f06a37b build: migrate to Central Portal publishing 2025-08-26 16:11:08 +03:00
SpaiR 634e28b76a feat(api): bump Dear ImGui from 1.89.0 to 1.90.9 2025-08-26 13:33:36 +03:00
SpaiR 0efd9608a9 chore(build): update Gradle to 8.14.3, upgrade plugin 2025-07-22 09:50:34 +03:00
SpaiR d6d85b922d fix(generator): remove invalid array setter with return value 2025-01-30 13:32:48 +02:00
SpaiR e70576f322 feat(api): bump Dear ImGui from 1.88 to 1.89.9
resolves #134
resolves #135
resolves #145
resolves #220
resolves #310

- Bump imgui-node-editor to the latest coomit
- Bump implot from 0.13 to 0.16
2025-01-29 15:24:43 +02:00
SpaiR 666d1112ab feat(api): bump Dear ImGui from 1.87 to 1.88 (#309) 2024-12-27 18:02:10 +02:00
dependabot[bot] 2ec3ef2a12 build(deps): bump com.fasterxml.jackson.core:jackson-core (#279)
Bumps [com.fasterxml.jackson.core:jackson-core](https://github.com/FasterXML/jackson-core) from 2.17.2 to 2.18.0.
- [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.17.2...jackson-core-2.18.0)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-21 10:22:07 +03:00
dependabot[bot] e6bc988710 build(deps): bump com.fasterxml.jackson.core:jackson-databind (#277)
Bumps [com.fasterxml.jackson.core:jackson-databind](https://github.com/FasterXML/jackson) from 2.17.2 to 2.18.0.
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-21 10:14:32 +03:00
SpaiR 8b24fea539 chore: regenerate AST 2024-10-21 10:12:23 +03:00
Sebastian Erives 7be2a2942f feat(api): update imnodes bindings to latest version (#282)
resolve #193
fixes #290

* fix(api): fix imnodes getNode___Pos & generate latest bindings
* fix(api): add optional arguments for ImNodes style methods
2024-10-21 09:53:00 +03:00
SpaiR c4c03bee9f feat(api): use uintptr_t instead of intptr_t for pointers (#265)
Image methods now accept the `long` type instead of `int`,
as they are expected to work with pointers as well.
2024-08-29 16:54:43 +03:00
SpaiR 9518b1cec6 feat: ArgVariant annotation and plot methods with count parameter (#264)
* 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
2024-08-26 11:33:55 +03:00
SpaiR 2086b7977b feat(generator): create unwrapped methods for methods with dst arg (#263)
Also, minor fixes for binding declarations.
2024-08-21 14:31:05 +03:00
SpaiR 8f76b2083f fix: return methods lost during integration of binding generation API 2024-08-19 14:34:02 +03:00
dependabot[bot] 9fbffddbd9 build(deps): bump com.badlogicgames.gdx:gdx-jnigen from 2.5.1 to 2.5.2 (#259)
Bumps [com.badlogicgames.gdx:gdx-jnigen](https://github.com/libgdx/gdx-jnigen) from 2.5.1 to 2.5.2.
- [Release notes](https://github.com/libgdx/gdx-jnigen/releases)
- [Changelog](https://github.com/libgdx/gdx-jnigen/blob/master/CHANGES)
- [Commits](https://github.com/libgdx/gdx-jnigen/compare/2.5.1...2.5.2)

---
updated-dependencies:
- dependency-name: com.badlogicgames.gdx:gdx-jnigen
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-19 13:59:27 +03:00
SpaiR 1bc1eb5b36 chore: resolve Kotlin warnings 2024-08-18 10:58:06 +03:00
SpaiR d252c145c5 feat(api): make FreeType a toggleable option which is disabled by default (#254)
* 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.
2024-08-18 10:45:27 +03:00
SpaiR 47d97102f7 feat(api): Dear ImGui v1.87 + ImPlot v0.13 (#252)
* 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
2024-08-16 15:35:42 +03:00
dependabot[bot] 341b0af179 build(deps): bump com.fasterxml.jackson.core:jackson-databind (#250)
Bumps [com.fasterxml.jackson.core:jackson-databind](https://github.com/FasterXML/jackson) from 2.14.2 to 2.17.2.
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-12 16:53:29 +03:00
dependabot[bot] 4f6da8181d build(deps): bump com.fasterxml.jackson.core:jackson-core from 2.14.2 to 2.17.2 (#251)
* build(deps): bump fr.inria.gforge.spoon:spoon-core from 10.3.0 to 11.1.0 (#249)

Bumps fr.inria.gforge.spoon:spoon-core from 10.3.0 to 11.1.0.

---
updated-dependencies:
- dependency-name: fr.inria.gforge.spoon:spoon-core
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump com.fasterxml.jackson.core:jackson-core

Bumps [com.fasterxml.jackson.core:jackson-core](https://github.com/FasterXML/jackson-core) from 2.14.2 to 2.17.2.
- [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.14.2...jackson-core-2.17.2)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-12 16:52:33 +03:00
SpaiR 6ee9625e3f build(generator): make evaluatedValue to be an Int instead of String 2024-08-11 12:08:35 +03:00
SpaiR 746c4887b8 build(generator): create AST tree with all includes and type definitions 2024-08-11 12:08:35 +03:00
SpaiR 7b8ca029c0 build(generator): ast enum content for numbers
Take into account cases, when enum value can be a number.
2024-08-11 12:08:35 +03:00
SpaiR 588903f7f7 feat: remove offset property from GenerateAst JSON (#243)
* fix: GenerateAst task didn't work

* feat: remove offset property from GenerateAst JSON
2024-08-09 11:13:36 +03:00
SpaiR 555b3d4aba build(deps): bump com.badlogicgames.gdx:gdx-jnigen from 2.4.0 to 2.5.1 (#242) 2024-08-08 16:32:46 +03:00
SpaiR 4e884a1a17 build(deps): bump Gradle from 7.4.2 to 8.9 2024-08-08 14:46:23 +03:00
SpaiR 8a8cd22ed6 feat: introduce binding generator
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.
2024-08-08 14:46:23 +03:00
SpaiR 46c008eb02 build(binding): add universal macOS ARM64 dylib and static FreeType compilation
- 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.
2024-08-07 09:41:09 +03:00
Rex Fleischerand@Tom-Ski @zly2006 be4734090e build(binding): macOS ARM64 native binaries (#223)
Co-authored-by: @Tom-Ski @zly2006
2024-08-05 00:37:32 +03:00
ΔeltaandSpaiR 194381c44e feat(api): add bindings for imgui-knobs (#211)
* feat(api): add bindings for imgui-knobs

Add bindings for the imgui-knobs extension

* Update example/src/main/java/Extra.java

Update styling

Co-authored-by: SpaiR <klimbetoo@gmail.com>

* Update example/src/main/java/Extra.java

Update styling

Co-authored-by: SpaiR <klimbetoo@gmail.com>

* Update .gitignore

Remove gradle.properties from git ignore

* Update styling

Update styling, field names set to UPPER_CASE, remove throwing exceptions from constructors, refactored flags to general style

---------

Co-authored-by: SpaiR <klimbetoo@gmail.com>
2024-01-09 10:34:10 +02:00
dependabot[bot] 297e69d5d4 up: bump com.badlogicgames.gdx:gdx-jnigen from 2.3.1 to 2.4.0 (#184)
Bumps [com.badlogicgames.gdx:gdx-jnigen](https://github.com/libgdx/gdx-jnigen) from 2.3.1 to 2.4.0.
- [Release notes](https://github.com/libgdx/gdx-jnigen/releases)
- [Changelog](https://github.com/libgdx/gdx-jnigen/blob/master/CHANGES)
- [Commits](https://github.com/libgdx/gdx-jnigen/commits)

---
updated-dependencies:
- dependency-name: com.badlogicgames.gdx:gdx-jnigen
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-19 21:43:46 +03:00
dependabot[bot] e4ee51527a [Build] Bump com.badlogicgames.gdx:gdx-jnigen from 2.0.1 to 2.3.1 (#168)
Bumps [com.badlogicgames.gdx:gdx-jnigen](https://github.com/libgdx/gdx-jnigen) from 2.0.1 to 2.3.1.
- [Release notes](https://github.com/libgdx/gdx-jnigen/releases)
- [Changelog](https://github.com/libgdx/gdx-jnigen/blob/master/CHANGES)
- [Commits](https://github.com/libgdx/gdx-jnigen/compare/v2.0.1...2.3.1)

---
updated-dependencies:
- dependency-name: com.badlogicgames.gdx:gdx-jnigen
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-14 09:46:17 +02:00
SpaiR e2cfbdcf3f [Build] Change comparison for binary libraries
Instead of size we will compare hash of the `imgui-binding/src/main` folder.
2022-12-27 12:30:06 +02:00
SpaiR a2bacb292e [Build] Update artifacts only when needed (#150) 2022-12-15 12:36:35 +02:00
SpaiR 2957cb4b88 [Build] CI refactor (#149)
* [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
2022-12-12 21:45:50 +02:00
SpaiR f01a5a573d [Build] Tweak build classes 2022-04-17 22:57:06 +03:00
SpaiR a6ca631506 [Build] Add more logs to the release script 2022-02-02 20:45:09 +02:00
Trevor Flynn fefac80157 [API] Memory editor extension (#110)
* 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
2022-02-02 13:17:07 +02:00
Trevor FlynnandSpaiR 74203bc333 [API] Add a mechanism for Dear ImGui assertion callbacks (#100)
* 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>
2021-12-26 14:11:56 +02:00
SpaiR adf9d5fe4e [Build] Update publish scripts 2021-12-18 10:49:09 +02:00
Trevor Flynn 0bbbc2e037 [API] Implement ImGuiFileDialog extension (#89)
* 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
2021-11-16 13:07:13 +02:00
Adam GrzegorzewskiandSpaiR 4e56056222 [API] Bindings for ImGuiColorTextEdit (#79)
* Add ImGuiColorTextEdit submodule

* ImGuiColorTextEdit integration

* Remove unused Identifier class (oops)

* Fix checkstyle

* Small tweaks and fixes

* Remove empty line before imports

Co-authored-by: SpaiR <klimbetoo@gmail.com>
2021-09-12 11:22:43 +03:00
SpaiR 255f2e2286 [Build] Move sourceCompatibility option to the root build file 2021-08-29 10:29:54 +03:00
SpaiR 1544682cc4 [Build] Add workflows for automatic releases 2021-07-10 14:15:45 +03:00
92fa416657 [API] Include ImPlot (#56)
* 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>
2021-06-21 16:07:16 +03:00
SpaiR 37bc815a06 [Build] Add FreeType support for CI 2021-05-30 16:11:54 +03:00
SpaiR 39a86991f2 [Build] Drop 32bit support 2021-05-30 14:30:00 +03:00