feat(api): Dear ImGui v1.87 + ImPlot v0.13 (#252)

* build(deps): bump Dear ImGui from 1.86 to 1.87

* build(deps): bump implot from 0.12 to 0.13

* feat(api,binding): adapt API to Dear ImGui v1.87

* feat(api,binding): adapt API to implot v0.13

* build: generate API for latest changes

* chore(binding): add missing super call for ImGuiStructDestroyable constructor

* chore: minor code style

* feat: adapt ImGuiImplGlfw to 1.87

* feat: adapt ImGuiImplGl3 to 1.87

* feat: adapt imgui-app module to 1.87

* fix: javadoc for updated imgui-binding

* fix: loosing data when setting struct field of char* type

Since we manually release chars, to store them in field we need to do a local copy.

* fix: invalid methods to check program linking in OpenGL

* chore: remove dedicated method to check GLFW version

* fix: add missing include
This commit is contained in:
SpaiR authored and GitHub committed 2024-08-16 15:35:42 +03:00
1 parent 341b0af179
commit 47d97102f7
80 files changed
+12211 -7373

No files matched your search

@@ -0,0 +1,123 @@
package imgui;
import imgui.binding.ImGuiStructDestroyable;
/**
* [Internal] Storage used by IsKeyDown(), IsKeyPressed() etc functions.
* If prior to 1.87 you used io.KeysDownDuration[] (which was marked as internal), you should use GetKeyData(key).DownDuration and not io.KeysData[key].DownDuration.
*/
public final class ImGuiKeyData extends ImGuiStructDestroyable {
public ImGuiKeyData() {
super();
}
public ImGuiKeyData(final long ptr) {
super(ptr);
}
@Override
protected long create() {
return nCreate();
}
/*JNI
#include "_common.h"
#define THIS ((ImGuiKeyData*)STRUCT_PTR)
*/
private native long nCreate(); /*
return (intptr_t)(new ImGuiKeyData());
*/
/**
* True for if key is down
*/
public boolean getDown() {
return nGetDown();
}
/**
* True for if key is down
*/
public void setDown(final boolean value) {
nSetDown(value);
}
private native boolean nGetDown(); /*
return THIS->Down;
*/
private native void nSetDown(boolean value); /*
THIS->Down = value;
*/
/**
* Duration the key has been down ({@code <}0.0f: not pressed, 0.0f: just pressed, {@code >}0.0f: time held)
*/
public float getDownDuration() {
return nGetDownDuration();
}
/**
* Duration the key has been down ({@code <}0.0f: not pressed, 0.0f: just pressed, {@code >}0.0f: time held)
*/
public void setDownDuration(final float value) {
nSetDownDuration(value);
}
private native float nGetDownDuration(); /*
return THIS->DownDuration;
*/
private native void nSetDownDuration(float value); /*
THIS->DownDuration = value;
*/
/**
* Last frame duration the key has been down
*/
public float getDownDurationPrev() {
return nGetDownDurationPrev();
}
/**
* Last frame duration the key has been down
*/
public void setDownDurationPrev(final float value) {
nSetDownDurationPrev(value);
}
private native float nGetDownDurationPrev(); /*
return THIS->DownDurationPrev;
*/
private native void nSetDownDurationPrev(float value); /*
THIS->DownDurationPrev = value;
*/
/**
* 0.0f..1.0f for gamepad values
*/
public float getAnalogValue() {
return nGetAnalogValue();
}
/**
* 0.0f..1.0f for gamepad values
*/
public void setAnalogValue(final float value) {
nSetAnalogValue(value);
}
private native float nGetAnalogValue(); /*
return THIS->AnalogValue;
*/
private native void nSetAnalogValue(float value); /*
THIS->AnalogValue = value;
*/
/*JNI
#undef THIS
*/
}