Commit Graph
7 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
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 3725ddf2f9 [Build] Add a "one include" header files 2021-04-10 15:30:00 +03:00
SpaiR e9cfd62137 [WIP] Viewports backend, 2 2020-08-30 21:10:18 +03:00
SpaiR 7a0e9ec942 Add ImGuiListClipper
Add ImGuiListClipper
2020-06-06 16:01:02 +03:00
SpaiR 1c037e826a Add basic support of Java<->Native callbacks
Implement them for ImGuiIO::GetClipboardTextFn and ImGuiIO::SetClipboardTextFn
2020-01-03 19:24:24 +03:00
SpaiR fcecffa5fa ImGui API 2019-12-29 23:59:38 +03:00