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:
1 parent
e64df5a433
commit
8a8cd22ed6
323 files changed
+113518
-15318
No files matched your search
@@ -1,51 +1,16 @@
|
||||
package imgui.flag;
|
||||
|
||||
import imgui.binding.annotation.BindingAstEnum;
|
||||
import imgui.binding.annotation.BindingSource;
|
||||
|
||||
/**
|
||||
* User fill ImGuiIO.KeyMap[] array with indices into the ImGuiIO.KeysDown[512] array
|
||||
*/
|
||||
@BindingSource
|
||||
public final class ImGuiKey {
|
||||
private ImGuiKey() {
|
||||
}
|
||||
|
||||
public static final int Tab = 0;
|
||||
public static final int LeftArrow = 1;
|
||||
public static final int RightArrow = 2;
|
||||
public static final int UpArrow = 3;
|
||||
public static final int DownArrow = 4;
|
||||
public static final int PageUp = 5;
|
||||
public static final int PageDown = 6;
|
||||
public static final int Home = 7;
|
||||
public static final int End = 8;
|
||||
public static final int Insert = 9;
|
||||
public static final int Delete = 10;
|
||||
public static final int Backspace = 11;
|
||||
public static final int Space = 12;
|
||||
public static final int Enter = 13;
|
||||
public static final int Escape = 14;
|
||||
public static final int KeyPadEnter = 15;
|
||||
/**
|
||||
* for text edit CTRL+A: select all
|
||||
*/
|
||||
public static final int A = 16;
|
||||
/**
|
||||
* for text edit CTRL+C: copy
|
||||
*/
|
||||
public static final int C = 17;
|
||||
/**
|
||||
* for text edit CTRL+V: paste
|
||||
*/
|
||||
public static final int V = 18;
|
||||
/**
|
||||
* for text edit CTRL+X: cut
|
||||
*/
|
||||
public static final int X = 19;
|
||||
/**
|
||||
* for text edit CTRL+Y: redo
|
||||
*/
|
||||
public static final int Y = 20;
|
||||
/**
|
||||
* for text edit CTRL+Z: undo
|
||||
*/
|
||||
public static final int Z = 21;
|
||||
public static final int COUNT = 22;
|
||||
@BindingAstEnum(file = "ast-imgui.json", qualType = "ImGuiKey_")
|
||||
public Void __;
|
||||
}
|
||||
Reference in new issue
Block a user