Skip to content

Commit

Permalink
[API] Dear ImGui v1.86 (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaiR authored Dec 26, 2021
1 parent dcf0dea commit e972af8
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 29 deletions.
14 changes: 7 additions & 7 deletions imgui-binding/src/main/java/imgui/ImGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -5520,13 +5520,6 @@ public static ImGuiStorage getStateStorage() {
return (intptr_t)ImGui::GetStateStorage();
*/

/**
* Calculate coarse clipping for large list of evenly sized items. Prefer using the ImGuiListClipper higher-level helper if you can.
*/
public static native void calcListClipping(int itemCount, float itemsHeight, int[] outItemsDisplayStart, int[] outItemsDisplayEnd); /*
ImGui::CalcListClipping(itemCount, itemsHeight, &outItemsDisplayStart[0], &outItemsDisplayEnd[0]);
*/

/**
* Helper to create a child window / scrolling region that looks like a normal widget frame
*/
Expand Down Expand Up @@ -5714,6 +5707,13 @@ public final ImVec4 colorConvertU32ToFloat4(final int in) {
return ImGui::IsMouseDoubleClicked(button);
*/

/**
* Return the number of successive mouse-clicks at the time where a click happen (otherwise 0).
*/
public static native int getMouseClickedCount(int button); /*
return ImGui::GetMouseClickedCount(button);
*/

/**
* Did mouse button released (went from Down to !Down)
*/
Expand Down
14 changes: 14 additions & 0 deletions imgui-binding/src/main/java/imgui/ImGuiIO.java
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,20 @@ public ImVec2 getDisplayFramebufferScale() {
IO->ConfigDockingNoSplit = value;
*/

/**
* Enable docking with holding Shift key (reduce visual noise, allows dropping in wider space)
*/
public native boolean getConfigDockingWithShift(); /*
return IO->ConfigDockingWithShift;
*/

/**
* Enable docking with holding Shift key (reduce visual noise, allows dropping in wider space)
*/
public native void setConfigDockingWithShift(boolean value); /*
IO->ConfigDockingWithShift = value;
*/

/**
* [BETA] [FIXME: This currently creates regression with auto-sizing and general overhead]
* Make every single floating window display within a docking node.
Expand Down
1 change: 1 addition & 0 deletions imgui-binding/src/main/java/imgui/ImGuiListClipper.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* - Clipper can measure the height of the first element
* - Clipper calculate the actual range of elements to display based on the current clipping rectangle, position the cursor before the first visible element.
* - User code submit visible elements.
* - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc.
* <p>
* BINDING NOTICE:
* It's impossible to implement the same API like in the original. Method {@link #forEach(int, int, ImListClipperCallback)} could be used instead.
Expand Down
12 changes: 6 additions & 6 deletions imgui-binding/src/main/java/imgui/internal/ImGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,19 +160,19 @@ public static int dockBuilderSplitNode(int nodeId, int splitDir, float sizeRatio
// Widgets low-level behaviors

public static boolean splitterBehavior(float bbMinX, float bbMinY, float bbMaxX, float bbMaxY, int id, int imGuiAxis, ImFloat size1, ImFloat size2, float minSize1, float minSize2) {
return splitterBehavior(bbMinX, bbMinY, bbMaxX, bbMaxY, id, imGuiAxis, size1, size2, minSize1, minSize2, 0, 0);
return splitterBehavior(bbMinX, bbMinY, bbMaxX, bbMaxY, id, imGuiAxis, size1, size2, minSize1, minSize2, 0, 0, 0);
}

public static boolean splitterBehavior(float bbMinX, float bbMinY, float bbMaxX, float bbMaxY, int id, int imGuiAxis, ImFloat size1, ImFloat size2, float minSize1, float minSize2, float hoverExtend) {
return splitterBehavior(bbMinX, bbMinY, bbMaxX, bbMaxY, id, imGuiAxis, size1, size2, minSize1, minSize2, hoverExtend, 0);
return splitterBehavior(bbMinX, bbMinY, bbMaxX, bbMaxY, id, imGuiAxis, size1, size2, minSize1, minSize2, hoverExtend, 0, 0);
}

public static boolean splitterBehavior(float bbMinX, float bbMinY, float bbMaxX, float bbMaxY, int id, int imGuiAxis, ImFloat size1, ImFloat size2, float minSize1, float minSize2, float hoverExtend, float hoverVisibilityDelay) {
return nSplitterBehaviour(bbMinX, bbMinY, bbMaxX, bbMaxY, id, imGuiAxis, size1.getData(), size2.getData(), minSize1, minSize2, hoverExtend, hoverVisibilityDelay);
public static boolean splitterBehavior(float bbMinX, float bbMinY, float bbMaxX, float bbMaxY, int id, int imGuiAxis, ImFloat size1, ImFloat size2, float minSize1, float minSize2, float hoverExtend, float hoverVisibilityDelay, int bgCol) {
return nSplitterBehaviour(bbMinX, bbMinY, bbMaxX, bbMaxY, id, imGuiAxis, size1.getData(), size2.getData(), minSize1, minSize2, hoverExtend, hoverVisibilityDelay, bgCol);
}

private static native boolean nSplitterBehaviour(float bbMinX, float bbMinY, float bbMaxX, float bbMaxY, int id, int imGuiAxis, float[] size1, float[] size2, float minSize1, float minSize2, float hoverExtend, float hoverVisibilityDelay); /*
return ImGui::SplitterBehavior(ImRect(bbMinX, bbMinY, bbMaxX, bbMaxY), id, (ImGuiAxis)imGuiAxis, &size1[0], &size2[0], minSize1, minSize2, hoverExtend, hoverVisibilityDelay);
private static native boolean nSplitterBehaviour(float bbMinX, float bbMinY, float bbMaxX, float bbMaxY, int id, int imGuiAxis, float[] size1, float[] size2, float minSize1, float minSize2, float hoverExtend, float hoverVisibilityDelay, int bgCol); /*
return ImGui::SplitterBehavior(ImRect(bbMinX, bbMinY, bbMaxX, bbMaxY), id, (ImGuiAxis)imGuiAxis, &size1[0], &size2[0], minSize1, minSize2, hoverExtend, hoverVisibilityDelay, bgCol);
*/

public static ImGuiWindow getCurrentWindow() {
Expand Down
14 changes: 0 additions & 14 deletions imgui-binding/src/main/java/imgui/internal/ImGuiDockNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -616,20 +616,6 @@ public void setOnlyNodeWithWindows(final ImGuiDockNode imGuiDockNode) {
IMGUI_DOCK_NODE->WantHiddenTabBarToggle = wantHiddenTabBarToggle;
*/

/**
* Update by DockNodeTreeUpdatePosSize() write-filtering
*/
public native boolean getMarkedForPosSizeWrite(); /*
return IMGUI_DOCK_NODE->MarkedForPosSizeWrite;
*/

/**
* Update by DockNodeTreeUpdatePosSize() write-filtering
*/
public native void setMarkedForPosSizeWrite(boolean markedForPosSizeWrite); /*
IMGUI_DOCK_NODE->MarkedForPosSizeWrite = markedForPosSizeWrite;
*/

public native boolean isRootNode(); /*
return IMGUI_DOCK_NODE->IsRootNode();
*/
Expand Down
2 changes: 1 addition & 1 deletion imgui-binding/src/main/native/imconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
//#define IMGUI_API __declspec( dllimport )

//---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to avoid using soon-to-be obsolete function/names.
//#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS

//---- Disable all of Dear ImGui or don't implement standard windows.
// It is very strongly recommended to NOT disable the demo windows during development. Please read comments in imgui_demo.cpp.
Expand Down
2 changes: 1 addition & 1 deletion include/imgui
Submodule imgui updated 44 files
+17 −38 .github/workflows/build.yml
+3 −4 backends/imgui_impl_allegro5.cpp
+1 −1 backends/imgui_impl_dx10.cpp
+1 −1 backends/imgui_impl_dx11.cpp
+1 −1 backends/imgui_impl_dx12.cpp
+1 −1 backends/imgui_impl_dx9.cpp
+2 −0 backends/imgui_impl_glfw.cpp
+0 −318 backends/imgui_impl_marmalade.cpp
+0 −28 backends/imgui_impl_marmalade.h
+1 −1 backends/imgui_impl_metal.mm
+3 −3 backends/imgui_impl_opengl2.cpp
+18 −3 backends/imgui_impl_opengl3.cpp
+5 −0 backends/imgui_impl_opengl3_loader.h
+4 −3 backends/imgui_impl_osx.h
+249 −91 backends/imgui_impl_osx.mm
+1 −0 backends/imgui_impl_sdl.cpp
+19 −9 backends/imgui_impl_sdlrenderer.cpp
+6 −3 backends/imgui_impl_sdlrenderer.h
+12 −1 backends/imgui_impl_vulkan.cpp
+4 −3 backends/imgui_impl_wgpu.cpp
+18 −4 backends/imgui_impl_win32.cpp
+6 −4 docs/BACKENDS.md
+114 −0 docs/CHANGELOG.txt
+0 −4 docs/EXAMPLES.md
+3 −2 docs/FAQ.md
+4 −4 docs/README.md
+0 −2 docs/TODO.txt
+4 −0 examples/example_apple_metal/example_apple_metal.xcodeproj/project.pbxproj
+1 −1 examples/example_apple_metal/main.mm
+4 −0 examples/example_apple_opengl2/example_apple_opengl2.xcodeproj/project.pbxproj
+2 −5 examples/example_apple_opengl2/main.mm
+5 −1 examples/example_emscripten_opengl3/README.md
+17 −3 examples/example_emscripten_wgpu/README.md
+0 −32 examples/example_marmalade/data/app.icf
+0 −125 examples/example_marmalade/main.cpp
+0 −47 examples/example_marmalade/marmalade_example.mkb
+935 −528 imgui.cpp
+41 −34 imgui.h
+222 −28 imgui_demo.cpp
+55 −35 imgui_draw.cpp
+100 −50 imgui_internal.h
+6 −8 imgui_tables.cpp
+170 −80 imgui_widgets.cpp
+6 −0 misc/freetype/imgui_freetype.cpp

0 comments on commit e972af8

Please sign in to comment.