From bb411ff5490b0cc23e5e9111394972f0621a373d Mon Sep 17 00:00:00 2001 From: SpaiR Date: Thu, 30 Jan 2025 09:11:24 +0200 Subject: [PATCH] chore(api): tweak ImGuiListClipper API --- .../src/generated/java/imgui/ImGuiListClipper.java | 12 ++++++------ .../src/main/java/imgui/ImGuiListClipper.java | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/imgui-binding/src/generated/java/imgui/ImGuiListClipper.java b/imgui-binding/src/generated/java/imgui/ImGuiListClipper.java index e0f7c2d..f2aa07c 100644 --- a/imgui-binding/src/generated/java/imgui/ImGuiListClipper.java +++ b/imgui-binding/src/generated/java/imgui/ImGuiListClipper.java @@ -214,11 +214,9 @@ public final class ImGuiListClipper extends ImGuiStructDestroyable { * @param itemsCount Use -1 to ignore (you can call Begin later). * Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step). * @param callback action to do in iterations - * @deprecated Use approach from the native example or {@link #forEach(Consumer)} method. */ - @Deprecated public static void forEach(final int itemsCount, final ImListClipperCallback callback) { - forEach(itemsCount, -1, callback); + nForEach(itemsCount, -1, callback); } /** @@ -227,10 +225,12 @@ public final class ImGuiListClipper extends ImGuiStructDestroyable { * @param itemsHeight Use -1.0f to be calculated automatically on first step. * Otherwise, pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing(). * @param callback action to do in iterations - * @deprecated Use approach from the native example or {@link #forEach(Consumer)} method. */ - @Deprecated - public static native void forEach(int itemsCount, int itemsHeight, ImListClipperCallback callback); /* + public static void forEach(final int itemsCount, final int itemsHeight, final ImListClipperCallback callback) { + nForEach(itemsCount, itemsHeight, callback); + } + + private static native void nForEach(int itemsCount, int itemsHeight, ImListClipperCallback callback); /* ImGuiListClipper clipper; clipper.Begin(itemsCount, itemsHeight); while (clipper.Step()) { diff --git a/imgui-binding/src/main/java/imgui/ImGuiListClipper.java b/imgui-binding/src/main/java/imgui/ImGuiListClipper.java index fe0ae24..1fcb644 100644 --- a/imgui-binding/src/main/java/imgui/ImGuiListClipper.java +++ b/imgui-binding/src/main/java/imgui/ImGuiListClipper.java @@ -127,11 +127,9 @@ public final class ImGuiListClipper extends ImGuiStructDestroyable { * @param itemsCount Use -1 to ignore (you can call Begin later). * Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step). * @param callback action to do in iterations - * @deprecated Use approach from the native example or {@link #forEach(Consumer)} method. */ - @Deprecated public static void forEach(final int itemsCount, final ImListClipperCallback callback) { - forEach(itemsCount, -1, callback); + nForEach(itemsCount, -1, callback); } /** @@ -140,10 +138,12 @@ public final class ImGuiListClipper extends ImGuiStructDestroyable { * @param itemsHeight Use -1.0f to be calculated automatically on first step. * Otherwise, pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing(). * @param callback action to do in iterations - * @deprecated Use approach from the native example or {@link #forEach(Consumer)} method. */ - @Deprecated - public static native void forEach(int itemsCount, int itemsHeight, ImListClipperCallback callback); /* + public static void forEach(final int itemsCount, final int itemsHeight, final ImListClipperCallback callback) { + nForEach(itemsCount, itemsHeight, callback); + } + + private static native void nForEach(int itemsCount, int itemsHeight, ImListClipperCallback callback); /* ImGuiListClipper clipper; clipper.Begin(itemsCount, itemsHeight); while (clipper.Step()) {