Commit Graph
16 Commits
Author SHA1 Message Date
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 9026dcd4ad [API] Dear ImGui v1.84.1 2021-08-29 11:17:15 +03:00
SpaiR 3725ddf2f9 [Build] Add a "one include" header files 2021-04-10 15:30:00 +03:00
SpaiR 36415d60f3 [API] Add API to directly return ImVec2/ImVec4 2021-02-27 16:16:03 +02:00
SpaiR 91d636a659 [API] Remove lazy-created sructs and add methods to verify struct pointer 2021-02-27 16:15:11 +02:00
SpaiR ca23217a83 [API] Fix checkstyle 2021-02-20 13:09:52 +02:00
SpaiR cd6432b4b7 [API] Add ImFont methods
Added:
 - FindGlyph
 - FindGlyphNoFallback
 - GetCharAdvance
 - IsLoaded
 - GetDebugName
 - CalcTextSizeA
 - CalcWordWrapPositionA
 - RenderChar
 - RenderText
2021-02-20 12:16:10 +02:00
SpaiR 8ac8a0719b [API] Add API for Dear ImGui v1.79 2020-10-17 14:58:04 +03:00
SpaiR 1dcf2328a4 Refactor mapping to the native structs 2020-08-23 16:49:16 +03:00
SpaiR 5fc32e8d6e Add ImFont helper methods to get ImVec2 values 2020-07-09 13:28:44 +03:00
SpaiR fbe0ed5a08 Fix getBackgroundDrawList() and getForegroundDrawList(). Add methods to create draw list objects with constant pointer 2020-06-06 16:01:02 +03:00
SpaiR 162c1cd0dd Fix javadoc 2020-04-09 11:17:50 +03:00
SpaiR 42262e1a68 Remove unnecessary cast to long, which breaks builds for Win x64 2020-04-09 10:34:31 +03:00
SpaiR f05ff1e571 Fix windows64 compilation 2020-02-11 01:10:08 +03:00
SpaiR eed23dbd39 Update binding API to Dear ImGui v1.75 2020-02-10 23:18:12 +03:00
SpaiR e28eefd789 [fonts] Add ImFont 2020-02-10 22:02:44 +03:00