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
+6
-18
@@ -1,28 +1,16 @@
|
||||
package imgui.extension.imnodes.flag;
|
||||
|
||||
import imgui.binding.annotation.BindingAstEnum;
|
||||
import imgui.binding.annotation.BindingSource;
|
||||
|
||||
/**
|
||||
* This enum controls the way the attribute pins behave.
|
||||
*/
|
||||
@BindingSource
|
||||
public final class ImNodesAttributeFlags {
|
||||
|
||||
private ImNodesAttributeFlags() {
|
||||
}
|
||||
|
||||
public static final int None = 0;
|
||||
|
||||
/**
|
||||
* Allow detaching a link by left-clicking and dragging the link at a pin it is connected to.
|
||||
* NOTE: the user has to actually delete the link for this to work. A deleted link can be
|
||||
* detected by calling IsLinkDestroyed() after EndNodeEditor().
|
||||
*/
|
||||
public static final int EnableLinkDetachWithDragClick = 1;
|
||||
|
||||
/**
|
||||
* Visual snapping of an in progress link will trigger IsLink Created/Destroyed events. Allows
|
||||
* for previewing the creation of a link while dragging it across attributes. See here for demo:
|
||||
* https://github.com/Nelarius/imnodes/issues/41#issuecomment-647132113 NOTE: the user has to
|
||||
* actually delete the link for this to work. A deleted link can be detected by calling
|
||||
* IsLinkDestroyed() after EndNodeEditor().
|
||||
*/
|
||||
public static final int EnableLinkCreationOnSnap = 1 << 1;
|
||||
@BindingAstEnum(file = "ast-imnodes.json", qualType = "ImNodesAttributeFlags_")
|
||||
public Void __;
|
||||
}
|
||||
Reference in new issue
Block a user