diff --git a/imgui-binding/src/generated/java/imgui/internal/ImGui.java b/imgui-binding/src/generated/java/imgui/internal/ImGui.java index 894c5f8f..0339705d 100644 --- a/imgui-binding/src/generated/java/imgui/internal/ImGui.java +++ b/imgui-binding/src/generated/java/imgui/internal/ImGui.java @@ -5,6 +5,8 @@ import imgui.ImGuiPlatformMonitor; import imgui.ImGuiViewport; import imgui.ImVec2; +import imgui.ImVec4; +import imgui.type.ImBoolean; import imgui.type.ImFloat; import imgui.type.ImInt; @@ -1106,8 +1108,252 @@ public static void dockBuilderFinish(final int nodeId) { ImGui::DockBuilderFinish(nodeId); */ + + // Widgets + + public static void textEx(final String beginText) { + nTextEx(beginText); + } + + public static void textEx(final String beginText, final String endText) { + nTextEx(beginText, endText); + } + + public static void textEx(final String beginText, final String endText, final int imGuiTextFlags) { + nTextEx(beginText, endText, imGuiTextFlags); + } + + private static native void nTextEx(String beginText); /*MANUAL + auto beginText = obj_beginText == NULL ? NULL : (char*)env->GetStringUTFChars(obj_beginText, JNI_FALSE); + ImGui::TextEx(beginText); + if (beginText != NULL) env->ReleaseStringUTFChars(obj_beginText, beginText); + */ + + private static native void nTextEx(String beginText, String endText); /*MANUAL + auto beginText = obj_beginText == NULL ? NULL : (char*)env->GetStringUTFChars(obj_beginText, JNI_FALSE); + auto endText = obj_endText == NULL ? NULL : (char*)env->GetStringUTFChars(obj_endText, JNI_FALSE); + ImGui::TextEx(beginText, endText); + if (beginText != NULL) env->ReleaseStringUTFChars(obj_beginText, beginText); + if (endText != NULL) env->ReleaseStringUTFChars(obj_endText, endText); + */ + + private static native void nTextEx(String beginText, String endText, int imGuiTextFlags); /*MANUAL + auto beginText = obj_beginText == NULL ? NULL : (char*)env->GetStringUTFChars(obj_beginText, JNI_FALSE); + auto endText = obj_endText == NULL ? NULL : (char*)env->GetStringUTFChars(obj_endText, JNI_FALSE); + ImGui::TextEx(beginText, endText, static_cast(imGuiTextFlags)); + if (beginText != NULL) env->ReleaseStringUTFChars(obj_beginText, beginText); + if (endText != NULL) env->ReleaseStringUTFChars(obj_endText, endText); + */ + + public static boolean buttonEx(final String label) { + return nButtonEx(label); + } + + public static boolean buttonEx(final String label, final ImVec2 size) { + return nButtonEx(label, size.x, size.y); + } + + public static boolean buttonEx(final String label, final float sizeX, final float sizeY) { + return nButtonEx(label, sizeX, sizeY); + } + + public static boolean buttonEx(final String label, final ImVec2 size, final int imGuiButtonFlags) { + return nButtonEx(label, size.x, size.y, imGuiButtonFlags); + } + + public static boolean buttonEx(final String label, final float sizeX, final float sizeY, final int imGuiButtonFlags) { + return nButtonEx(label, sizeX, sizeY, imGuiButtonFlags); + } + + public static boolean buttonEx(final String label, final int imGuiButtonFlags) { + return nButtonEx(label, imGuiButtonFlags); + } + + private static native boolean nButtonEx(String obj_label); /*MANUAL + auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); + auto _result = ImGui::ButtonEx(label); + if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); + return _result; + */ + + private static native boolean nButtonEx(String obj_label, float sizeX, float sizeY); /*MANUAL + auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); + ImVec2 size = ImVec2(sizeX, sizeY); + auto _result = ImGui::ButtonEx(label, size); + if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); + return _result; + */ + + private static native boolean nButtonEx(String obj_label, float sizeX, float sizeY, int imGuiButtonFlags); /*MANUAL + auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); + ImVec2 size = ImVec2(sizeX, sizeY); + auto _result = ImGui::ButtonEx(label, size, static_cast(imGuiButtonFlags)); + if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); + return _result; + */ + + private static native boolean nButtonEx(String obj_label, int imGuiButtonFlags); /*MANUAL + auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); + auto _result = ImGui::ButtonEx(label, ImVec2(0,0), static_cast(imGuiButtonFlags)); + if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); + return _result; + */ + + public static boolean closeButton(final int id, final ImVec2 pos) { + return nCloseButton(id, pos.x, pos.y); + } + + public static boolean closeButton(final int id, final float posX, final float posY) { + return nCloseButton(id, posX, posY); + } + + private static native boolean nCloseButton(int id, float posX, float posY); /*MANUAL + ImVec2 pos = ImVec2(posX, posY); + auto _result = ImGui::CloseButton((ImGuiID)id, pos); + return _result; + */ + + public static boolean arrowButtonEx(final String strId, final int imGuiDir, final ImVec2 size) { + return nArrowButtonEx(strId, imGuiDir, size.x, size.y); + } + + public static boolean arrowButtonEx(final String strId, final int imGuiDir, final float sizeX, final float sizeY) { + return nArrowButtonEx(strId, imGuiDir, sizeX, sizeY); + } + + public static boolean arrowButtonEx(final String strId, final int imGuiDir, final ImVec2 size, final int imGuiButtonFlags) { + return nArrowButtonEx(strId, imGuiDir, size.x, size.y, imGuiButtonFlags); + } + + public static boolean arrowButtonEx(final String strId, final int imGuiDir, final float sizeX, final float sizeY, final int imGuiButtonFlags) { + return nArrowButtonEx(strId, imGuiDir, sizeX, sizeY, imGuiButtonFlags); + } + + private static native boolean nArrowButtonEx(String obj_strId, int imGuiDir, float sizeX, float sizeY); /*MANUAL + auto strId = obj_strId == NULL ? NULL : (char*)env->GetStringUTFChars(obj_strId, JNI_FALSE); + ImVec2 size = ImVec2(sizeX, sizeY); + auto _result = ImGui::ArrowButtonEx(strId, static_cast(imGuiDir), size); + if (strId != NULL) env->ReleaseStringUTFChars(obj_strId, strId); + return _result; + */ + + private static native boolean nArrowButtonEx(String obj_strId, int imGuiDir, float sizeX, float sizeY, int imGuiButtonFlags); /*MANUAL + auto strId = obj_strId == NULL ? NULL : (char*)env->GetStringUTFChars(obj_strId, JNI_FALSE); + ImVec2 size = ImVec2(sizeX, sizeY); + auto _result = ImGui::ArrowButtonEx(strId, static_cast(imGuiDir), size, static_cast(imGuiButtonFlags)); + if (strId != NULL) env->ReleaseStringUTFChars(obj_strId, strId); + return _result; + */ + + public static void scrollbar(final int axis) { + nScrollbar(axis); + } + + private static native void nScrollbar(int axis); /* + ImGui::Scrollbar(static_cast(axis)); + */ + + public static boolean imageButtonEx(final int id, final long userTextureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1, final ImVec2 padding, final ImVec4 bgCol, final ImVec4 tintCol) { + return nImageButtonEx(id, userTextureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y, padding.x, padding.y, bgCol.x, bgCol.y, bgCol.z, bgCol.w, tintCol.x, tintCol.y, tintCol.z, tintCol.w); + } + + public static boolean imageButtonEx(final int id, final long userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y, final float paddingX, final float paddingY, final float bgColX, final float bgColY, final float bgColZ, final float bgColW, final float tintColX, final float tintColY, final float tintColZ, final float tintColW) { + return nImageButtonEx(id, userTextureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y, paddingX, paddingY, bgColX, bgColY, bgColZ, bgColW, tintColX, tintColY, tintColZ, tintColW); + } + + private static native boolean nImageButtonEx(int id, long userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y, float paddingX, float paddingY, float bgColX, float bgColY, float bgColZ, float bgColW, float tintColX, float tintColY, float tintColZ, float tintColW); /*MANUAL + ImVec2 size = ImVec2(sizeX, sizeY); + ImVec2 uv0 = ImVec2(uv0X, uv0Y); + ImVec2 uv1 = ImVec2(uv1X, uv1Y); + ImVec2 padding = ImVec2(paddingX, paddingY); + ImVec4 bgCol = ImVec4(bgColX, bgColY, bgColZ, bgColW); + ImVec4 tintCol = ImVec4(tintColX, tintColY, tintColZ, tintColW); + auto _result = ImGui::ImageButtonEx((ImGuiID)id, (ImTextureID)(uintptr_t)userTextureId, size, uv0, uv1, padding, bgCol, tintCol); + return _result; + */ + + public static void separatorEx(final int imGuiSeparatorFlags) { + nSeparatorEx(imGuiSeparatorFlags); + } + + private static native void nSeparatorEx(int imGuiSeparatorFlags); /* + ImGui::SeparatorEx(static_cast(imGuiSeparatorFlags)); + */ + + public static ImRect getWindowScrollbarRect(final ImGuiWindow imGuiWindow, final int axis) { + final ImRect dst = new ImRect(); + nGetWindowScrollbarRect(dst, imGuiWindow.ptr, axis); + return dst; + } + + public static void getWindowScrollbarRect(final ImRect dst, final ImGuiWindow imGuiWindow, final int axis) { + nGetWindowScrollbarRect(dst, imGuiWindow.ptr, axis); + } + + private static native void nGetWindowScrollbarRect(ImRect dst, long imGuiWindow, int axis); /* + Jni::ImRectCpy(env, ImGui::GetWindowScrollbarRect(reinterpret_cast(imGuiWindow), static_cast(axis)), dst); + */ + + public static int getWindowScrollbarID(final ImGuiWindow window, final int axis) { + return nGetWindowScrollbarID(window.ptr, axis); + } + + private static native int nGetWindowScrollbarID(long window, int axis); /* + return ImGui::GetWindowScrollbarID(reinterpret_cast(window), static_cast(axis)); + */ + + public static int getWindowResizeCornerID(final ImGuiWindow window, final int n) { + return nGetWindowResizeCornerID(window.ptr, n); + } + + private static native int nGetWindowResizeCornerID(long window, int n); /* + return ImGui::GetWindowResizeCornerID(reinterpret_cast(window), n); + */ + + public static int getWindowResizeBorderID(final ImGuiWindow window, final int dir) { + return nGetWindowResizeBorderID(window.ptr, dir); + } + + private static native int nGetWindowResizeBorderID(long window, int dir); /* + return ImGui::GetWindowResizeBorderID(reinterpret_cast(window), static_cast(dir)); + */ + // Widgets low-level behaviors + public static boolean buttonBehavior(final ImRect bb, final int id, final ImBoolean outHovered, final ImBoolean outHeld) { + return nButtonBehavior(bb.min.x, bb.min.y, bb.max.x, bb.max.y, id, outHovered != null ? outHovered.getData() : null, outHeld != null ? outHeld.getData() : null); + } + + public static boolean buttonBehavior(final float bbMinX, final float bbMinY, final float bbMaxX, final float bbMaxY, final int id, final ImBoolean outHovered, final ImBoolean outHeld) { + return nButtonBehavior(bbMinX, bbMinY, bbMaxX, bbMaxY, id, outHovered != null ? outHovered.getData() : null, outHeld != null ? outHeld.getData() : null); + } + + public static boolean buttonBehavior(final ImRect bb, final int id, final ImBoolean outHovered, final ImBoolean outHeld, final int imGuiButtonFlags) { + return nButtonBehavior(bb.min.x, bb.min.y, bb.max.x, bb.max.y, id, outHovered != null ? outHovered.getData() : null, outHeld != null ? outHeld.getData() : null, imGuiButtonFlags); + } + + public static boolean buttonBehavior(final float bbMinX, final float bbMinY, final float bbMaxX, final float bbMaxY, final int id, final ImBoolean outHovered, final ImBoolean outHeld, final int imGuiButtonFlags) { + return nButtonBehavior(bbMinX, bbMinY, bbMaxX, bbMaxY, id, outHovered != null ? outHovered.getData() : null, outHeld != null ? outHeld.getData() : null, imGuiButtonFlags); + } + + private static native boolean nButtonBehavior(float bbMinX, float bbMinY, float bbMaxX, float bbMaxY, int id, boolean[] obj_outHovered, boolean[] obj_outHeld); /*MANUAL + auto outHovered = obj_outHovered == NULL ? NULL : (bool*)env->GetPrimitiveArrayCritical(obj_outHovered, JNI_FALSE); + auto outHeld = obj_outHeld == NULL ? NULL : (bool*)env->GetPrimitiveArrayCritical(obj_outHeld, JNI_FALSE); + auto _result = ImGui::ButtonBehavior(ImRect(bbMinX, bbMinY, bbMaxX, bbMaxY), (ImGuiID)id, (outHovered != NULL ? &outHovered[0] : NULL), (outHeld != NULL ? &outHeld[0] : NULL)); + if (outHovered != NULL) env->ReleasePrimitiveArrayCritical(obj_outHovered, outHovered, JNI_FALSE); + if (outHeld != NULL) env->ReleasePrimitiveArrayCritical(obj_outHeld, outHeld, JNI_FALSE); + return _result; + */ + + private static native boolean nButtonBehavior(float bbMinX, float bbMinY, float bbMaxX, float bbMaxY, int id, boolean[] obj_outHovered, boolean[] obj_outHeld, int imGuiButtonFlags); /*MANUAL + auto outHovered = obj_outHovered == NULL ? NULL : (bool*)env->GetPrimitiveArrayCritical(obj_outHovered, JNI_FALSE); + auto outHeld = obj_outHeld == NULL ? NULL : (bool*)env->GetPrimitiveArrayCritical(obj_outHeld, JNI_FALSE); + auto _result = ImGui::ButtonBehavior(ImRect(bbMinX, bbMinY, bbMaxX, bbMaxY), (ImGuiID)id, (outHovered != NULL ? &outHovered[0] : NULL), (outHeld != NULL ? &outHeld[0] : NULL), static_cast(imGuiButtonFlags)); + if (outHovered != NULL) env->ReleasePrimitiveArrayCritical(obj_outHovered, outHovered, JNI_FALSE); + if (outHeld != NULL) env->ReleasePrimitiveArrayCritical(obj_outHeld, outHeld, JNI_FALSE); + return _result; + */ + public static boolean splitterBehavior(final ImRect bb, final int id, final int axis, final ImFloat size1, final ImFloat size2, final float minSize1, final float minSize2) { return nSplitterBehavior(bb.min.x, bb.min.y, bb.max.x, bb.max.y, id, axis, size1 != null ? size1.getData() : null, size2 != null ? size2.getData() : null, minSize1, minSize2); } @@ -1176,17 +1422,4 @@ public static boolean splitterBehavior(final float bbMinX, final float bbMinY, f return _result; */ - public static ImRect getWindowScrollbarRect(final ImGuiWindow imGuiWindow, final int axis) { - final ImRect dst = new ImRect(); - nGetWindowScrollbarRect(dst, imGuiWindow.ptr, axis); - return dst; - } - - public static void getWindowScrollbarRect(final ImRect dst, final ImGuiWindow imGuiWindow, final int axis) { - nGetWindowScrollbarRect(dst, imGuiWindow.ptr, axis); - } - - private static native void nGetWindowScrollbarRect(ImRect dst, long imGuiWindow, int axis); /* - Jni::ImRectCpy(env, ImGui::GetWindowScrollbarRect(reinterpret_cast(imGuiWindow), static_cast(axis)), dst); - */ } diff --git a/imgui-binding/src/generated/java/imgui/internal/flag/ImGuiButtonFlags.java b/imgui-binding/src/generated/java/imgui/internal/flag/ImGuiButtonFlags.java new file mode 100644 index 00000000..e96a1788 --- /dev/null +++ b/imgui-binding/src/generated/java/imgui/internal/flag/ImGuiButtonFlags.java @@ -0,0 +1,162 @@ +package imgui.internal.flag; + + +public final class ImGuiButtonFlags { + private ImGuiButtonFlags() { + } + + /** + * Definition: {@code 0} + */ + public static final int None = 0; + + /** + * React on left mouse button (default) + * + *

Definition: {@code 1 << 0} + */ + public static final int MouseButtonLeft = 1; + + /** + * React on right mouse button + * + *

Definition: {@code 1 << 1} + */ + public static final int MouseButtonRight = 2; + + /** + * React on center mouse button + * + *

Definition: {@code 1 << 2} + */ + public static final int MouseButtonMiddle = 4; + + /** + * [Internal] + * + *

Definition: {@code ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_MouseButtonMiddle} + */ + public static final int MouseButtonMask_ = 7; + + /** + * [Internal] + * + *

Definition: {@code ImGuiButtonFlags_MouseButtonLeft} + */ + public static final int MouseButtonDefault_ = 1; + + /** + * return true on click (mouse down event) + * + *

Definition: {@code 1 << 4} + */ + public static final int PressedOnClick = 16; + + /** + * [Default] return true on click + release on same item{@code <}-- this is what the majority of Button are using + * + *

Definition: {@code 1 << 5} + */ + public static final int PressedOnClickRelease = 32; + + /** + * return true on click + release even if the release event is not done while hovering the item + * + *

Definition: {@code 1 << 6} + */ + public static final int PressedOnClickReleaseAnywhere = 64; + + /** + * return true on release (default requires click+release) + * + *

Definition: {@code 1 << 7} + */ + public static final int PressedOnRelease = 128; + + /** + * return true on double-click (default requires click+release) + * + *

Definition: {@code 1 << 8} + */ + public static final int PressedOnDoubleClick = 256; + + /** + * return true when held into while we are drag and dropping another item (used by e.g. tree nodes, collapsing headers) + * + *

Definition: {@code 1 << 9} + */ + public static final int PressedOnDragDropHold = 512; + + /** + * hold to repeat + * + *

Definition: {@code 1 << 10} + */ + public static final int Repeat = 1024; + + /** + * allow interactions even if a child window is overlapping + * + *

Definition: {@code 1 << 11} + */ + public static final int FlattenChildren = 2048; + + /** + * require previous frame HoveredId to either match id or be null before being usable, use along with SetItemAllowOverlap() + * + *

Definition: {@code 1 << 12} + */ + public static final int AllowItemOverlap = 4096; + + /** + * disable automatically closing parent popup on press // [UNUSED] + * + *

Definition: {@code 1 << 13} + */ + public static final int DontClosePopups = 8192; + + /** + * vertically align button to match text baseline - ButtonEx() only // FIXME: Should be removed and handled by SmallButton(), not possible currently because of DC.CursorPosPrevLine + * + *

Definition: {@code 1 << 15} + */ + public static final int AlignTextBaseLine = 32768; + + /** + * disable mouse interaction if a key modifier is held + * + *

Definition: {@code 1 << 16} + */ + public static final int NoKeyModifiers = 65536; + + /** + * don't set ActiveId while holding the mouse (ImGuiButtonFlags_PressedOnClick only) + * + *

Definition: {@code 1 << 17} + */ + public static final int NoHoldingActiveId = 131072; + + /** + * don't override navigation focus when activated + * + *

Definition: {@code 1 << 18} + */ + public static final int NoNavFocus = 262144; + + /** + * don't report as hovered when nav focus is on this item + * + *

Definition: {@code 1 << 19} + */ + public static final int NoHoveredOnFocus = 524288; + + /** + * Definition: {@code ImGuiButtonFlags_PressedOnClick | ImGuiButtonFlags_PressedOnClickRelease | ImGuiButtonFlags_PressedOnClickReleaseAnywhere | ImGuiButtonFlags_PressedOnRelease | ImGuiButtonFlags_PressedOnDoubleClick | ImGuiButtonFlags_PressedOnDragDropHold} + */ + public static final int PressedOnMask_ = 1008; + + /** + * Definition: {@code ImGuiButtonFlags_PressedOnClickRelease} + */ + public static final int PressedOnDefault_ = 32; +} diff --git a/imgui-binding/src/generated/java/imgui/internal/flag/ImGuiSeparatorFlags.java b/imgui-binding/src/generated/java/imgui/internal/flag/ImGuiSeparatorFlags.java new file mode 100644 index 00000000..499f1575 --- /dev/null +++ b/imgui-binding/src/generated/java/imgui/internal/flag/ImGuiSeparatorFlags.java @@ -0,0 +1,27 @@ +package imgui.internal.flag; + + +public class ImGuiSeparatorFlags { + + /** + * Definition: {@code 0} + */ + public static final int None = 0; + + /** + * Axis default to current layout type, so generally Horizontal unless e.g. in a menu bar + * + *

Definition: {@code 1 << 0} + */ + public static final int Horizontal = 1; + + /** + * Definition: {@code 1 << 1} + */ + public static final int Vertical = 2; + + /** + * Definition: {@code 1 << 2} + */ + public static final int SpanAllColumns = 4; +} diff --git a/imgui-binding/src/generated/java/imgui/internal/flag/ImGuiTextFlags.java b/imgui-binding/src/generated/java/imgui/internal/flag/ImGuiTextFlags.java new file mode 100644 index 00000000..44a652fb --- /dev/null +++ b/imgui-binding/src/generated/java/imgui/internal/flag/ImGuiTextFlags.java @@ -0,0 +1,15 @@ +package imgui.internal.flag; + + +public class ImGuiTextFlags { + + /** + * Definition: {@code 0} + */ + public static final int None = 0; + + /** + * Definition: {@code 1 << 0} + */ + public static final int NoWidthForLargeClippedText = 1; +} diff --git a/imgui-binding/src/main/java/imgui/internal/ImGui.java b/imgui-binding/src/main/java/imgui/internal/ImGui.java index e8fc1f9e..46893e3c 100644 --- a/imgui-binding/src/main/java/imgui/internal/ImGui.java +++ b/imgui-binding/src/main/java/imgui/internal/ImGui.java @@ -5,10 +5,12 @@ import imgui.ImGuiPlatformMonitor; import imgui.ImGuiViewport; import imgui.ImVec2; +import imgui.ImVec4; import imgui.binding.annotation.ArgValue; import imgui.binding.annotation.BindingMethod; import imgui.binding.annotation.BindingSource; import imgui.binding.annotation.OptArg; +import imgui.type.ImBoolean; import imgui.type.ImFloat; import imgui.type.ImInt; @@ -332,11 +334,48 @@ public static void init() { @BindingMethod public static native void DockBuilderFinish(int nodeId); - // Widgets low-level behaviors + + // Widgets @BindingMethod - public static native boolean SplitterBehavior(ImRect bb, int id, @ArgValue(staticCast = "ImGuiAxis") int axis, ImFloat size1, ImFloat size2, float minSize1, float minSize2, @OptArg float hoverExtend, @OptArg float hoverVisibilityDelay, @OptArg int bgCol); + public static native void TextEx(String beginText, @OptArg String endText, @OptArg @ArgValue(staticCast = "ImGuiTextFlags_") int imGuiTextFlags); + + @BindingMethod + public static native boolean ButtonEx(String label, @OptArg(callValue = "ImVec2(0,0)") ImVec2 size, @OptArg @ArgValue(staticCast = "ImGuiButtonFlags") int imGuiButtonFlags); + + @BindingMethod + public static native boolean CloseButton(@ArgValue(callPrefix = "(ImGuiID)") int id, ImVec2 pos); + + @BindingMethod + public static native boolean ArrowButtonEx(String strId, @ArgValue(staticCast = "ImGuiDir") int imGuiDir, ImVec2 size, @OptArg @ArgValue(staticCast = "ImGuiButtonFlags") int imGuiButtonFlags); + + @BindingMethod + public static native void Scrollbar(@ArgValue(staticCast = "ImGuiAxis") int axis); + + @BindingMethod + public static native boolean ImageButtonEx(@ArgValue(callPrefix = "(ImGuiID)") int id, @ArgValue(callPrefix = "(ImTextureID)(uintptr_t)") long userTextureId, ImVec2 size, ImVec2 uv0, ImVec2 uv1, ImVec2 padding, ImVec4 bgCol, ImVec4 tintCol); + + @BindingMethod + public static native void SeparatorEx(@ArgValue(staticCast = "ImGuiSeparatorFlags_") int imGuiSeparatorFlags); @BindingMethod public static native ImRect GetWindowScrollbarRect(ImGuiWindow imGuiWindow, @ArgValue(staticCast = "ImGuiAxis") int axis); + + @BindingMethod + public static native int GetWindowScrollbarID(ImGuiWindow window, @ArgValue(staticCast = "ImGuiAxis") int axis); + + @BindingMethod + public static native int GetWindowResizeCornerID(ImGuiWindow window, int n); + + @BindingMethod + public static native int GetWindowResizeBorderID(ImGuiWindow window, @ArgValue(staticCast = "ImGuiDir") int dir); + + // Widgets low-level behaviors + + @BindingMethod + public static native boolean ButtonBehavior(ImRect bb, @ArgValue(callPrefix = "(ImGuiID)") int id, ImBoolean outHovered, ImBoolean outHeld, @OptArg @ArgValue(staticCast = "ImGuiButtonFlags") int imGuiButtonFlags); + + @BindingMethod + public static native boolean SplitterBehavior(ImRect bb, int id, @ArgValue(staticCast = "ImGuiAxis") int axis, ImFloat size1, ImFloat size2, float minSize1, float minSize2, @OptArg float hoverExtend, @OptArg float hoverVisibilityDelay, @OptArg int bgCol); + } diff --git a/imgui-binding/src/main/java/imgui/internal/flag/ImGuiButtonFlags.java b/imgui-binding/src/main/java/imgui/internal/flag/ImGuiButtonFlags.java new file mode 100644 index 00000000..095370bc --- /dev/null +++ b/imgui-binding/src/main/java/imgui/internal/flag/ImGuiButtonFlags.java @@ -0,0 +1,16 @@ +package imgui.internal.flag; + +import imgui.binding.annotation.BindingAstEnum; +import imgui.binding.annotation.BindingSource; + +@BindingSource +public final class ImGuiButtonFlags { + private ImGuiButtonFlags() { + } + + @BindingAstEnum(file = "ast-imgui.json", qualType = "ImGuiButtonFlags_") + public Void __; + + @BindingAstEnum(file = "ast-imgui_internal.json", qualType = "ImGuiButtonFlagsPrivate_", sanitizeName = "ImGuiButtonFlags_") + public Void ___; +} diff --git a/imgui-binding/src/main/java/imgui/internal/flag/ImGuiSeparatorFlags.java b/imgui-binding/src/main/java/imgui/internal/flag/ImGuiSeparatorFlags.java new file mode 100644 index 00000000..78329783 --- /dev/null +++ b/imgui-binding/src/main/java/imgui/internal/flag/ImGuiSeparatorFlags.java @@ -0,0 +1,11 @@ +package imgui.internal.flag; + +import imgui.binding.annotation.BindingAstEnum; +import imgui.binding.annotation.BindingSource; + +@BindingSource +public class ImGuiSeparatorFlags { + + @BindingAstEnum(file = "ast-imgui_internal.json", qualType = "ImGuiSeparatorFlags_") + public Void __; +} diff --git a/imgui-binding/src/main/java/imgui/internal/flag/ImGuiTextFlags.java b/imgui-binding/src/main/java/imgui/internal/flag/ImGuiTextFlags.java new file mode 100644 index 00000000..b07e68d8 --- /dev/null +++ b/imgui-binding/src/main/java/imgui/internal/flag/ImGuiTextFlags.java @@ -0,0 +1,11 @@ +package imgui.internal.flag; + +import imgui.binding.annotation.BindingAstEnum; +import imgui.binding.annotation.BindingSource; + +@BindingSource +public class ImGuiTextFlags { + + @BindingAstEnum(file = "ast-imgui_internal.json", qualType = "ImGuiTextFlags_") + public Void __; +}