feat(api): update imnodes bindings to latest version (#282)
resolve #193 fixes #290 * fix(api): fix imnodes getNode___Pos & generate latest bindings * fix(api): add optional arguments for ImNodes style methods
This commit is contained in:
1 parent
c776b1b384
commit
7be2a2942f
13 files changed
+1021
-1990
No files matched your search
@@ -179,26 +179,50 @@ public final class ImNodes {
|
||||
nStyleColorsDark();
|
||||
}
|
||||
|
||||
public static void styleColorsDark(final ImNodesStyle style) {
|
||||
nStyleColorsDark(style.ptr);
|
||||
}
|
||||
|
||||
private static native void nStyleColorsDark(); /*
|
||||
ImNodes::StyleColorsDark();
|
||||
*/
|
||||
|
||||
private static native void nStyleColorsDark(long style); /*
|
||||
ImNodes::StyleColorsDark(reinterpret_cast<ImNodesStyle*>(style));
|
||||
*/
|
||||
|
||||
public static void styleColorsClassic() {
|
||||
nStyleColorsClassic();
|
||||
}
|
||||
|
||||
public static void styleColorsClassic(final ImNodesStyle style) {
|
||||
nStyleColorsClassic(style.ptr);
|
||||
}
|
||||
|
||||
private static native void nStyleColorsClassic(); /*
|
||||
ImNodes::StyleColorsClassic();
|
||||
*/
|
||||
|
||||
private static native void nStyleColorsClassic(long style); /*
|
||||
ImNodes::StyleColorsClassic(reinterpret_cast<ImNodesStyle*>(style));
|
||||
*/
|
||||
|
||||
public static void styleColorsLight() {
|
||||
nStyleColorsLight();
|
||||
}
|
||||
|
||||
public static void styleColorsLight(final ImNodesStyle style) {
|
||||
nStyleColorsLight(style.ptr);
|
||||
}
|
||||
|
||||
private static native void nStyleColorsLight(); /*
|
||||
ImNodes::StyleColorsLight();
|
||||
*/
|
||||
|
||||
private static native void nStyleColorsLight(long style); /*
|
||||
ImNodes::StyleColorsLight(reinterpret_cast<ImNodesStyle*>(style));
|
||||
*/
|
||||
|
||||
/**
|
||||
* The top-level function call. Call this before calling BeginNode/EndNode. Calling this function
|
||||
* will result the node editor grid workspace being rendered.
|
||||
@@ -551,29 +575,106 @@ public final class ImNodes {
|
||||
ImVec2 gridPos = ImVec2(gridPosX, gridPosY);
|
||||
ImNodes::SetNodeGridSpacePos(nodeId, gridPos);
|
||||
*/
|
||||
|
||||
public static void getNodeScreenSpacePos(final int nodeId) {
|
||||
nGetNodeScreenSpacePos(nodeId);
|
||||
|
||||
public static ImVec2 getNodeScreenSpacePos(final int nodeId) {
|
||||
final ImVec2 dst = new ImVec2();
|
||||
nGetNodeScreenSpacePos(dst, nodeId);
|
||||
return dst;
|
||||
}
|
||||
|
||||
private static native void nGetNodeScreenSpacePos(int nodeId); /*
|
||||
ImNodes::GetNodeScreenSpacePos(nodeId);
|
||||
public static float getNodeScreenSpacePosX(final int nodeId) {
|
||||
return nGetNodeScreenSpacePosX(nodeId);
|
||||
}
|
||||
|
||||
public static float getNodeScreenSpacePosY(final int nodeId) {
|
||||
return nGetNodeScreenSpacePosY(nodeId);
|
||||
}
|
||||
|
||||
public static void getNodeScreenSpacePos(final ImVec2 dst, final int nodeId) {
|
||||
nGetNodeScreenSpacePos(dst, nodeId);
|
||||
}
|
||||
|
||||
private static native void nGetNodeScreenSpacePos(ImVec2 dst, int nodeId); /*
|
||||
Jni::ImVec2Cpy(env, ImNodes::GetNodeScreenSpacePos(nodeId), dst);
|
||||
*/
|
||||
|
||||
public static void getNodeEditorSpacePos(final int nodeId) {
|
||||
nGetNodeEditorSpacePos(nodeId);
|
||||
}
|
||||
|
||||
private static native void nGetNodeEditorSpacePos(int nodeId); /*
|
||||
ImNodes::GetNodeEditorSpacePos(nodeId);
|
||||
private static native float nGetNodeScreenSpacePosX(int nodeId); /*
|
||||
return ImNodes::GetNodeScreenSpacePos(nodeId).x;
|
||||
*/
|
||||
|
||||
public static void getNodeGridSpacePos(final int nodeId) {
|
||||
nGetNodeGridSpacePos(nodeId);
|
||||
private static native float nGetNodeScreenSpacePosY(int nodeId); /*
|
||||
return ImNodes::GetNodeScreenSpacePos(nodeId).y;
|
||||
*/
|
||||
|
||||
public static ImVec2 getNodeEditorSpacePos(final int nodeId) {
|
||||
final ImVec2 dst = new ImVec2();
|
||||
nGetNodeEditorSpacePos(dst, nodeId);
|
||||
return dst;
|
||||
}
|
||||
|
||||
private static native void nGetNodeGridSpacePos(int nodeId); /*
|
||||
ImNodes::GetNodeGridSpacePos(nodeId);
|
||||
public static float getNodeEditorSpacePosX(final int nodeId) {
|
||||
return nGetNodeEditorSpacePosX(nodeId);
|
||||
}
|
||||
|
||||
public static float getNodeEditorSpacePosY(final int nodeId) {
|
||||
return nGetNodeEditorSpacePosY(nodeId);
|
||||
}
|
||||
|
||||
public static void getNodeEditorSpacePos(final ImVec2 dst, final int nodeId) {
|
||||
nGetNodeEditorSpacePos(dst, nodeId);
|
||||
}
|
||||
|
||||
private static native void nGetNodeEditorSpacePos(ImVec2 dst, int nodeId); /*
|
||||
Jni::ImVec2Cpy(env, ImNodes::GetNodeEditorSpacePos(nodeId), dst);
|
||||
*/
|
||||
|
||||
private static native float nGetNodeEditorSpacePosX(int nodeId); /*
|
||||
return ImNodes::GetNodeEditorSpacePos(nodeId).x;
|
||||
*/
|
||||
|
||||
private static native float nGetNodeEditorSpacePosY(int nodeId); /*
|
||||
return ImNodes::GetNodeEditorSpacePos(nodeId).y;
|
||||
*/
|
||||
|
||||
public static ImVec2 getNodeGridSpacePos(final int nodeId) {
|
||||
final ImVec2 dst = new ImVec2();
|
||||
nGetNodeGridSpacePos(dst, nodeId);
|
||||
return dst;
|
||||
}
|
||||
|
||||
public static float getNodeGridSpacePosX(final int nodeId) {
|
||||
return nGetNodeGridSpacePosX(nodeId);
|
||||
}
|
||||
|
||||
public static float getNodeGridSpacePosY(final int nodeId) {
|
||||
return nGetNodeGridSpacePosY(nodeId);
|
||||
}
|
||||
|
||||
public static void getNodeGridSpacePos(final ImVec2 dst, final int nodeId) {
|
||||
nGetNodeGridSpacePos(dst, nodeId);
|
||||
}
|
||||
|
||||
private static native void nGetNodeGridSpacePos(ImVec2 dst, int nodeId); /*
|
||||
Jni::ImVec2Cpy(env, ImNodes::GetNodeGridSpacePos(nodeId), dst);
|
||||
*/
|
||||
|
||||
private static native float nGetNodeGridSpacePosX(int nodeId); /*
|
||||
return ImNodes::GetNodeGridSpacePos(nodeId).x;
|
||||
*/
|
||||
|
||||
private static native float nGetNodeGridSpacePosY(int nodeId); /*
|
||||
return ImNodes::GetNodeGridSpacePos(nodeId).y;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Enable or disable grid snapping.
|
||||
*/
|
||||
public static void snapNodeToGrid(final int nodeId) {
|
||||
nSnapNodeToGrid(nodeId);
|
||||
}
|
||||
|
||||
private static native void nSnapNodeToGrid(int nodeId); /*
|
||||
ImNodes::SnapNodeToGrid(nodeId);
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -40,29 +40,31 @@ public final class ImNodesCol {
|
||||
|
||||
public static final int GridLine = 15;
|
||||
|
||||
public static final int MiniMapBackground = 16;
|
||||
public static final int GridLinePrimary = 16;
|
||||
|
||||
public static final int MiniMapBackgroundHovered = 17;
|
||||
public static final int MiniMapBackground = 17;
|
||||
|
||||
public static final int MiniMapOutline = 18;
|
||||
public static final int MiniMapBackgroundHovered = 18;
|
||||
|
||||
public static final int MiniMapOutlineHovered = 19;
|
||||
public static final int MiniMapOutline = 19;
|
||||
|
||||
public static final int MiniMapNodeBackground = 20;
|
||||
public static final int MiniMapOutlineHovered = 20;
|
||||
|
||||
public static final int MiniMapNodeBackgroundHovered = 21;
|
||||
public static final int MiniMapNodeBackground = 21;
|
||||
|
||||
public static final int MiniMapNodeBackgroundSelected = 22;
|
||||
public static final int MiniMapNodeBackgroundHovered = 22;
|
||||
|
||||
public static final int MiniMapNodeOutline = 23;
|
||||
public static final int MiniMapNodeBackgroundSelected = 23;
|
||||
|
||||
public static final int MiniMapLink = 24;
|
||||
public static final int MiniMapNodeOutline = 24;
|
||||
|
||||
public static final int MiniMapLinkSelected = 25;
|
||||
public static final int MiniMapLink = 25;
|
||||
|
||||
public static final int MiniMapCanvas = 26;
|
||||
public static final int MiniMapLinkSelected = 26;
|
||||
|
||||
public static final int MiniMapCanvasOutline = 27;
|
||||
public static final int MiniMapCanvas = 27;
|
||||
|
||||
public static final int COUNT = 28;
|
||||
public static final int MiniMapCanvasOutline = 28;
|
||||
|
||||
public static final int COUNT = 29;
|
||||
}
|
||||
@@ -19,4 +19,14 @@ public final class ImNodesStyleFlags {
|
||||
* Definition: {@code 1 << 2}
|
||||
*/
|
||||
public static final int GridLines = 4;
|
||||
|
||||
/**
|
||||
* Definition: {@code 1 << 3}
|
||||
*/
|
||||
public static final int GridLinesPrimary = 8;
|
||||
|
||||
/**
|
||||
* Definition: {@code 1 << 4}
|
||||
*/
|
||||
public static final int GridSnapping = 16;
|
||||
}
|
||||
Reference in new issue
Block a user