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.
This commit is contained in:
SpaiR committed 2024-08-08 14:46:23 +03:00
1 parent e64df5a433
commit 8a8cd22ed6
323 files changed
+113518 -15318

No files matched your search

@@ -0,0 +1,143 @@
package imgui.flag;
/**
* Enumeration for PushStyleVar() / PopStyleVar() to temporarily modify the ImGuiStyle structure.
* - The enum only refers to fields of ImGuiStyle which makes sense to be pushed/popped inside UI code.
* During initialization or between frames, feel free to just poke into ImGuiStyle directly.
* - Tip: Use your programming IDE navigation facilities on the names in the _second column_ below to find the actual members and their description.
* In Visual Studio IDE: CTRL+comma ("Edit.NavigateTo") can follow symbols in comments, whereas CTRL+F12 ("Edit.GoToImplementation") cannot.
* With Visual Assist installed: ALT+G ("VAssistX.GoToImplementation") can also follow symbols in comments.
* - When changing this enum, you need to update the associated internal table GStyleVarInfo[] accordingly. This is where we link enum values to members offset/type.
*/
public final class ImGuiStyleVar {
private ImGuiStyleVar() {
}
/**
* float Alpha
*/
public static final int Alpha = 0;
/**
* float DisabledAlpha
*/
public static final int DisabledAlpha = 1;
/**
* ImVec2 WindowPadding
*/
public static final int WindowPadding = 2;
/**
* float WindowRounding
*/
public static final int WindowRounding = 3;
/**
* float WindowBorderSize
*/
public static final int WindowBorderSize = 4;
/**
* ImVec2 WindowMinSize
*/
public static final int WindowMinSize = 5;
/**
* ImVec2 WindowTitleAlign
*/
public static final int WindowTitleAlign = 6;
/**
* float ChildRounding
*/
public static final int ChildRounding = 7;
/**
* float ChildBorderSize
*/
public static final int ChildBorderSize = 8;
/**
* float PopupRounding
*/
public static final int PopupRounding = 9;
/**
* float PopupBorderSize
*/
public static final int PopupBorderSize = 10;
/**
* ImVec2 FramePadding
*/
public static final int FramePadding = 11;
/**
* float FrameRounding
*/
public static final int FrameRounding = 12;
/**
* float FrameBorderSize
*/
public static final int FrameBorderSize = 13;
/**
* ImVec2 ItemSpacing
*/
public static final int ItemSpacing = 14;
/**
* ImVec2 ItemInnerSpacing
*/
public static final int ItemInnerSpacing = 15;
/**
* float IndentSpacing
*/
public static final int IndentSpacing = 16;
/**
* ImVec2 CellPadding
*/
public static final int CellPadding = 17;
/**
* float ScrollbarSize
*/
public static final int ScrollbarSize = 18;
/**
* float ScrollbarRounding
*/
public static final int ScrollbarRounding = 19;
/**
* float GrabMinSize
*/
public static final int GrabMinSize = 20;
/**
* float GrabRounding
*/
public static final int GrabRounding = 21;
/**
* float TabRounding
*/
public static final int TabRounding = 22;
/**
* ImVec2 ButtonTextAlign
*/
public static final int ButtonTextAlign = 23;
/**
* ImVec2 SelectableTextAlign
*/
public static final int SelectableTextAlign = 24;
public static final int COUNT = 25;
}