fix: use real UTF-8 for jstring -> native conversion
CI / Build Java (push) Has been cancelled
CI / Build Native (macos-latest - macos) (push) Has been cancelled
CI / Build Native (ubuntu-latest - linux) (push) Has been cancelled
CI / Build Native (ubuntu-latest - windows) (push) Has been cancelled
CI / Archive Natives (push) Has been cancelled
CI / Update Binaries (push) Has been cancelled
CI / Release (push) Has been cancelled
CI / Build Java (push) Has been cancelled
CI / Build Native (macos-latest - macos) (push) Has been cancelled
CI / Build Native (ubuntu-latest - linux) (push) Has been cancelled
CI / Build Native (ubuntu-latest - windows) (push) Has been cancelled
CI / Archive Natives (push) Has been cancelled
CI / Update Binaries (push) Has been cancelled
CI / Release (push) Has been cancelled
JNI's GetStringUTFChars emits MUTF-8, which encodes codepoints above U+FFFF as a surrogate-pair of two 3-byte sequences. ImGui's UTF-8 decoder rejects those, so SMP emoji (U+1F000+) never reach the glyph atlas even when the glyph is registered. Add Jni::ToTrueUtf8 / Jni::FreeTrueUtf8 helpers in jni_common that decode via GetStringChars (UTF-16) and emit proper 1/2/3/4-byte UTF-8, then route every generator- and manually-written JNI call site through them (1921 occurrences across the generated tree and 3 hand-written files, plus the jni_content.kt generator template so future regenerations stay consistent).
This commit is contained in:
1 parent
34c40304f6
commit
d9aa2c811b
20 files changed
+3897
-3846
No files matched your search
@@ -350,8 +350,8 @@ private fun convertManualJni(mOrig: CtMethod<*>, method: CtMethod<*>): CtMethod<
|
||||
}
|
||||
|
||||
if (p.isType("String")) {
|
||||
getLines += "auto ${p.simpleName} = obj_${p.simpleName} == NULL ? NULL : (char*)env->GetStringUTFChars(obj_${p.simpleName}, JNI_FALSE)"
|
||||
releaseLines += "if (${p.simpleName} != NULL) env->ReleaseStringUTFChars(obj_${p.simpleName}, ${p.simpleName})"
|
||||
getLines += "auto ${p.simpleName} = Jni::ToTrueUtf8(env, obj_${p.simpleName})"
|
||||
releaseLines += "Jni::FreeTrueUtf8(${p.simpleName})"
|
||||
isConverted = true
|
||||
}
|
||||
|
||||
@@ -361,14 +361,12 @@ private fun convertManualJni(mOrig: CtMethod<*>, method: CtMethod<*>): CtMethod<
|
||||
const char* ${p.simpleName}[$countParam];
|
||||
for (int i = 0; i < ${p.simpleName}$PARAM_ARR_LEN_POSTFIX; i++) {
|
||||
const jstring str = (jstring)env->GetObjectArrayElement(obj_${p.simpleName}, i);
|
||||
auto rawStr = (char*)env->GetStringUTFChars(str, JNI_FALSE);
|
||||
${p.simpleName}[i] = rawStr;
|
||||
${p.simpleName}[i] = Jni::ToTrueUtf8(env, str);
|
||||
}
|
||||
""".trimIndent()
|
||||
releaseLines += """
|
||||
for (int i = 0; i < $countParam; i++) {
|
||||
const jstring str = (jstring)env->GetObjectArrayElement(obj_${p.simpleName}, i);
|
||||
env->ReleaseStringUTFChars(str, ${p.simpleName}[i]);
|
||||
Jni::FreeTrueUtf8((char*)${p.simpleName}[i]);
|
||||
}
|
||||
""".trimIndent()
|
||||
isConverted = true
|
||||
|
||||
@@ -734,19 +734,19 @@ public final class ImDrawList extends ImGuiStruct {
|
||||
}
|
||||
|
||||
private native void nAddText(float posX, float posY, int col, String textBegin); /*MANUAL
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textBegin, JNI_FALSE);
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||
ImVec2 pos = ImVec2(posX, posY);
|
||||
THIS->AddText(pos, col, textBegin);
|
||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
||||
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||
*/
|
||||
|
||||
private native void nAddText(float posX, float posY, int col, String textBegin, String textEnd); /*MANUAL
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textBegin, JNI_FALSE);
|
||||
auto textEnd = obj_textEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textEnd, JNI_FALSE);
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||
auto textEnd = obj_textEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textEnd);
|
||||
ImVec2 pos = ImVec2(posX, posY);
|
||||
THIS->AddText(pos, col, textBegin, textEnd);
|
||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
||||
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
|
||||
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||
if (textEnd != NULL) Jni::FreeTrueUtf8(textEnd);
|
||||
*/
|
||||
|
||||
public void addText(final ImFont font, final int fontSize, final ImVec2 pos, final int col, final String textBegin) {
|
||||
@@ -806,64 +806,64 @@ public final class ImDrawList extends ImGuiStruct {
|
||||
}
|
||||
|
||||
private native void nAddText(long font, int fontSize, float posX, float posY, int col, String textBegin); /*MANUAL
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textBegin, JNI_FALSE);
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||
ImVec2 pos = ImVec2(posX, posY);
|
||||
THIS->AddText(reinterpret_cast<ImFont*>(font), fontSize, pos, col, textBegin);
|
||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
||||
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||
*/
|
||||
|
||||
private native void nAddText(long font, int fontSize, float posX, float posY, int col, String textBegin, String textEnd); /*MANUAL
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textBegin, JNI_FALSE);
|
||||
auto textEnd = obj_textEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textEnd, JNI_FALSE);
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||
auto textEnd = obj_textEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textEnd);
|
||||
ImVec2 pos = ImVec2(posX, posY);
|
||||
THIS->AddText(reinterpret_cast<ImFont*>(font), fontSize, pos, col, textBegin, textEnd);
|
||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
||||
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
|
||||
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||
if (textEnd != NULL) Jni::FreeTrueUtf8(textEnd);
|
||||
*/
|
||||
|
||||
private native void nAddText(long font, int fontSize, float posX, float posY, int col, String textBegin, String textEnd, float wrapWidth); /*MANUAL
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textBegin, JNI_FALSE);
|
||||
auto textEnd = obj_textEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textEnd, JNI_FALSE);
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||
auto textEnd = obj_textEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textEnd);
|
||||
ImVec2 pos = ImVec2(posX, posY);
|
||||
THIS->AddText(reinterpret_cast<ImFont*>(font), fontSize, pos, col, textBegin, textEnd, wrapWidth);
|
||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
||||
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
|
||||
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||
if (textEnd != NULL) Jni::FreeTrueUtf8(textEnd);
|
||||
*/
|
||||
|
||||
private native void nAddText(long font, int fontSize, float posX, float posY, int col, String textBegin, String textEnd, float wrapWidth, float cpuFineClipRectX, float cpuFineClipRectY, float cpuFineClipRectZ, float cpuFineClipRectW); /*MANUAL
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textBegin, JNI_FALSE);
|
||||
auto textEnd = obj_textEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textEnd, JNI_FALSE);
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||
auto textEnd = obj_textEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textEnd);
|
||||
ImVec2 pos = ImVec2(posX, posY);
|
||||
ImVec4 cpuFineClipRect = ImVec4(cpuFineClipRectX, cpuFineClipRectY, cpuFineClipRectZ, cpuFineClipRectW);
|
||||
THIS->AddText(reinterpret_cast<ImFont*>(font), fontSize, pos, col, textBegin, textEnd, wrapWidth, &cpuFineClipRect);
|
||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
||||
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
|
||||
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||
if (textEnd != NULL) Jni::FreeTrueUtf8(textEnd);
|
||||
*/
|
||||
|
||||
private native void nAddText(long font, int fontSize, float posX, float posY, int col, String textBegin, float wrapWidth, float cpuFineClipRectX, float cpuFineClipRectY, float cpuFineClipRectZ, float cpuFineClipRectW); /*MANUAL
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textBegin, JNI_FALSE);
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||
ImVec2 pos = ImVec2(posX, posY);
|
||||
ImVec4 cpuFineClipRect = ImVec4(cpuFineClipRectX, cpuFineClipRectY, cpuFineClipRectZ, cpuFineClipRectW);
|
||||
THIS->AddText(reinterpret_cast<ImFont*>(font), fontSize, pos, col, textBegin, NULL, wrapWidth, &cpuFineClipRect);
|
||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
||||
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||
*/
|
||||
|
||||
private native void nAddText(long font, int fontSize, float posX, float posY, int col, String textBegin, float cpuFineClipRectX, float cpuFineClipRectY, float cpuFineClipRectZ, float cpuFineClipRectW); /*MANUAL
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textBegin, JNI_FALSE);
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||
ImVec2 pos = ImVec2(posX, posY);
|
||||
ImVec4 cpuFineClipRect = ImVec4(cpuFineClipRectX, cpuFineClipRectY, cpuFineClipRectZ, cpuFineClipRectW);
|
||||
THIS->AddText(reinterpret_cast<ImFont*>(font), fontSize, pos, col, textBegin, NULL, 0.0f, &cpuFineClipRect);
|
||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
||||
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||
*/
|
||||
|
||||
private native void nAddText(long font, int fontSize, float posX, float posY, int col, String textBegin, String textEnd, float cpuFineClipRectX, float cpuFineClipRectY, float cpuFineClipRectZ, float cpuFineClipRectW); /*MANUAL
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textBegin, JNI_FALSE);
|
||||
auto textEnd = obj_textEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textEnd, JNI_FALSE);
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||
auto textEnd = obj_textEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textEnd);
|
||||
ImVec2 pos = ImVec2(posX, posY);
|
||||
ImVec4 cpuFineClipRect = ImVec4(cpuFineClipRectX, cpuFineClipRectY, cpuFineClipRectZ, cpuFineClipRectW);
|
||||
THIS->AddText(reinterpret_cast<ImFont*>(font), fontSize, pos, col, textBegin, textEnd, 0.0f, &cpuFineClipRect);
|
||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
||||
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
|
||||
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||
if (textEnd != NULL) Jni::FreeTrueUtf8(textEnd);
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -407,48 +407,48 @@ public final class ImFont extends ImGuiStructDestroyable {
|
||||
}
|
||||
|
||||
private native void nCalcTextSizeA(ImVec2 dst, float size, float maxWidth, float wrapWidth, String textBegin); /*MANUAL
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textBegin, JNI_FALSE);
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||
Jni::ImVec2Cpy(env, THIS->CalcTextSizeA(size, maxWidth, wrapWidth, textBegin), dst);
|
||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
||||
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||
*/
|
||||
|
||||
private native float nCalcTextSizeAX(float size, float maxWidth, float wrapWidth, String obj_textBegin); /*MANUAL
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textBegin, JNI_FALSE);
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||
auto _result = THIS->CalcTextSizeA(size, maxWidth, wrapWidth, textBegin).x;
|
||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
||||
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private native float nCalcTextSizeAY(float size, float maxWidth, float wrapWidth, String obj_textBegin); /*MANUAL
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textBegin, JNI_FALSE);
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||
auto _result = THIS->CalcTextSizeA(size, maxWidth, wrapWidth, textBegin).y;
|
||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
||||
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private native void nCalcTextSizeA(ImVec2 dst, float size, float maxWidth, float wrapWidth, String textBegin, String textEnd); /*MANUAL
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textBegin, JNI_FALSE);
|
||||
auto textEnd = obj_textEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textEnd, JNI_FALSE);
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||
auto textEnd = obj_textEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textEnd);
|
||||
Jni::ImVec2Cpy(env, THIS->CalcTextSizeA(size, maxWidth, wrapWidth, textBegin, textEnd), dst);
|
||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
||||
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
|
||||
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||
if (textEnd != NULL) Jni::FreeTrueUtf8(textEnd);
|
||||
*/
|
||||
|
||||
private native float nCalcTextSizeAX(float size, float maxWidth, float wrapWidth, String obj_textBegin, String obj_textEnd); /*MANUAL
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textBegin, JNI_FALSE);
|
||||
auto textEnd = obj_textEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textEnd, JNI_FALSE);
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||
auto textEnd = obj_textEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textEnd);
|
||||
auto _result = THIS->CalcTextSizeA(size, maxWidth, wrapWidth, textBegin, textEnd).x;
|
||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
||||
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
|
||||
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||
if (textEnd != NULL) Jni::FreeTrueUtf8(textEnd);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private native float nCalcTextSizeAY(float size, float maxWidth, float wrapWidth, String obj_textBegin, String obj_textEnd); /*MANUAL
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textBegin, JNI_FALSE);
|
||||
auto textEnd = obj_textEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textEnd, JNI_FALSE);
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||
auto textEnd = obj_textEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textEnd);
|
||||
auto _result = THIS->CalcTextSizeA(size, maxWidth, wrapWidth, textBegin, textEnd).y;
|
||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
||||
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
|
||||
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||
if (textEnd != NULL) Jni::FreeTrueUtf8(textEnd);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
@@ -457,11 +457,11 @@ public final class ImFont extends ImGuiStructDestroyable {
|
||||
}
|
||||
|
||||
private native String nCalcWordWrapPositionA(float scale, String obj_text, String obj_textEnd, float wrapWidth); /*MANUAL
|
||||
auto text = obj_text == NULL ? NULL : (char*)env->GetStringUTFChars(obj_text, JNI_FALSE);
|
||||
auto textEnd = obj_textEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textEnd, JNI_FALSE);
|
||||
auto text = obj_text == NULL ? NULL : Jni::ToTrueUtf8(env, obj_text);
|
||||
auto textEnd = obj_textEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textEnd);
|
||||
auto _result = env->NewStringUTF(THIS->CalcWordWrapPositionA(scale, text, textEnd, wrapWidth));
|
||||
if (text != NULL) env->ReleaseStringUTFChars(obj_text, text);
|
||||
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
|
||||
if (text != NULL) Jni::FreeTrueUtf8(text);
|
||||
if (textEnd != NULL) Jni::FreeTrueUtf8(textEnd);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
@@ -511,43 +511,43 @@ public final class ImFont extends ImGuiStructDestroyable {
|
||||
}
|
||||
|
||||
private native void nRenderText(long drawList, float size, float posX, float posY, int col, float clipRectX, float clipRectY, float clipRectZ, float clipRectW, String textBegin, String textEnd); /*MANUAL
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textBegin, JNI_FALSE);
|
||||
auto textEnd = obj_textEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textEnd, JNI_FALSE);
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||
auto textEnd = obj_textEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textEnd);
|
||||
ImVec2 pos = ImVec2(posX, posY);
|
||||
ImVec4 clipRect = ImVec4(clipRectX, clipRectY, clipRectZ, clipRectW);
|
||||
THIS->RenderText(reinterpret_cast<ImDrawList*>(drawList), size, pos, col, clipRect, textBegin, textEnd);
|
||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
||||
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
|
||||
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||
if (textEnd != NULL) Jni::FreeTrueUtf8(textEnd);
|
||||
*/
|
||||
|
||||
private native void nRenderText(long drawList, float size, float posX, float posY, int col, float clipRectX, float clipRectY, float clipRectZ, float clipRectW, String textBegin, String textEnd, float wrapWidth); /*MANUAL
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textBegin, JNI_FALSE);
|
||||
auto textEnd = obj_textEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textEnd, JNI_FALSE);
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||
auto textEnd = obj_textEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textEnd);
|
||||
ImVec2 pos = ImVec2(posX, posY);
|
||||
ImVec4 clipRect = ImVec4(clipRectX, clipRectY, clipRectZ, clipRectW);
|
||||
THIS->RenderText(reinterpret_cast<ImDrawList*>(drawList), size, pos, col, clipRect, textBegin, textEnd, wrapWidth);
|
||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
||||
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
|
||||
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||
if (textEnd != NULL) Jni::FreeTrueUtf8(textEnd);
|
||||
*/
|
||||
|
||||
private native void nRenderText(long drawList, float size, float posX, float posY, int col, float clipRectX, float clipRectY, float clipRectZ, float clipRectW, String textBegin, String textEnd, float wrapWidth, boolean cpuFineClip); /*MANUAL
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textBegin, JNI_FALSE);
|
||||
auto textEnd = obj_textEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textEnd, JNI_FALSE);
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||
auto textEnd = obj_textEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textEnd);
|
||||
ImVec2 pos = ImVec2(posX, posY);
|
||||
ImVec4 clipRect = ImVec4(clipRectX, clipRectY, clipRectZ, clipRectW);
|
||||
THIS->RenderText(reinterpret_cast<ImDrawList*>(drawList), size, pos, col, clipRect, textBegin, textEnd, wrapWidth, cpuFineClip);
|
||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
||||
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
|
||||
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||
if (textEnd != NULL) Jni::FreeTrueUtf8(textEnd);
|
||||
*/
|
||||
|
||||
private native void nRenderText(long drawList, float size, float posX, float posY, int col, float clipRectX, float clipRectY, float clipRectZ, float clipRectW, String textBegin, String textEnd, boolean cpuFineClip); /*MANUAL
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textBegin, JNI_FALSE);
|
||||
auto textEnd = obj_textEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textEnd, JNI_FALSE);
|
||||
auto textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||
auto textEnd = obj_textEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textEnd);
|
||||
ImVec2 pos = ImVec2(posX, posY);
|
||||
ImVec4 clipRect = ImVec4(clipRectX, clipRectY, clipRectZ, clipRectW);
|
||||
THIS->RenderText(reinterpret_cast<ImDrawList*>(drawList), size, pos, col, clipRect, textBegin, textEnd, 0.0f, cpuFineClip);
|
||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
||||
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
|
||||
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||
if (textEnd != NULL) Jni::FreeTrueUtf8(textEnd);
|
||||
*/
|
||||
|
||||
/*JNI
|
||||
|
||||
@@ -101,33 +101,33 @@ public final class ImFontAtlas extends ImGuiStructDestroyable {
|
||||
}
|
||||
|
||||
private native long nAddFontFromFileTTF(String obj_filename, float sizePixels); /*MANUAL
|
||||
auto filename = obj_filename == NULL ? NULL : (char*)env->GetStringUTFChars(obj_filename, JNI_FALSE);
|
||||
auto filename = obj_filename == NULL ? NULL : Jni::ToTrueUtf8(env, obj_filename);
|
||||
auto _result = (uintptr_t)THIS->AddFontFromFileTTF(filename, sizePixels);
|
||||
if (filename != NULL) env->ReleaseStringUTFChars(obj_filename, filename);
|
||||
if (filename != NULL) Jni::FreeTrueUtf8(filename);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private native long nAddFontFromFileTTF(String obj_filename, float sizePixels, long fontConfig); /*MANUAL
|
||||
auto filename = obj_filename == NULL ? NULL : (char*)env->GetStringUTFChars(obj_filename, JNI_FALSE);
|
||||
auto filename = obj_filename == NULL ? NULL : Jni::ToTrueUtf8(env, obj_filename);
|
||||
auto _result = (uintptr_t)THIS->AddFontFromFileTTF(filename, sizePixels, reinterpret_cast<ImFontConfig*>(fontConfig));
|
||||
if (filename != NULL) env->ReleaseStringUTFChars(obj_filename, filename);
|
||||
if (filename != NULL) Jni::FreeTrueUtf8(filename);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private native long nAddFontFromFileTTF(String obj_filename, float sizePixels, long fontConfig, short[] obj_glyphRanges); /*MANUAL
|
||||
auto filename = obj_filename == NULL ? NULL : (char*)env->GetStringUTFChars(obj_filename, JNI_FALSE);
|
||||
auto filename = obj_filename == NULL ? NULL : Jni::ToTrueUtf8(env, obj_filename);
|
||||
auto glyphRanges = obj_glyphRanges == NULL ? NULL : (short*)env->GetPrimitiveArrayCritical(obj_glyphRanges, JNI_FALSE);
|
||||
auto _result = (uintptr_t)THIS->AddFontFromFileTTF(filename, sizePixels, reinterpret_cast<ImFontConfig*>(fontConfig), (ImWchar*)&glyphRanges[0]);
|
||||
if (filename != NULL) env->ReleaseStringUTFChars(obj_filename, filename);
|
||||
if (filename != NULL) Jni::FreeTrueUtf8(filename);
|
||||
if (glyphRanges != NULL) env->ReleasePrimitiveArrayCritical(obj_glyphRanges, glyphRanges, JNI_FALSE);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private native long nAddFontFromFileTTF(String obj_filename, float sizePixels, short[] obj_glyphRanges); /*MANUAL
|
||||
auto filename = obj_filename == NULL ? NULL : (char*)env->GetStringUTFChars(obj_filename, JNI_FALSE);
|
||||
auto filename = obj_filename == NULL ? NULL : Jni::ToTrueUtf8(env, obj_filename);
|
||||
auto glyphRanges = obj_glyphRanges == NULL ? NULL : (short*)env->GetPrimitiveArrayCritical(obj_glyphRanges, JNI_FALSE);
|
||||
auto _result = (uintptr_t)THIS->AddFontFromFileTTF(filename, sizePixels, NULL, (ImWchar*)&glyphRanges[0]);
|
||||
if (filename != NULL) env->ReleaseStringUTFChars(obj_filename, filename);
|
||||
if (filename != NULL) Jni::FreeTrueUtf8(filename);
|
||||
if (glyphRanges != NULL) env->ReleasePrimitiveArrayCritical(obj_glyphRanges, glyphRanges, JNI_FALSE);
|
||||
return _result;
|
||||
*/
|
||||
@@ -395,17 +395,17 @@ public final class ImFontAtlas extends ImGuiStructDestroyable {
|
||||
}
|
||||
|
||||
private native long nAddFontFromMemoryCompressedBase85TTF(String obj_compressedFontDataBase85, float sizePixels, long fontConfig); /*MANUAL
|
||||
auto compressedFontDataBase85 = obj_compressedFontDataBase85 == NULL ? NULL : (char*)env->GetStringUTFChars(obj_compressedFontDataBase85, JNI_FALSE);
|
||||
auto compressedFontDataBase85 = obj_compressedFontDataBase85 == NULL ? NULL : Jni::ToTrueUtf8(env, obj_compressedFontDataBase85);
|
||||
auto _result = (uintptr_t)THIS->AddFontFromMemoryCompressedBase85TTF(compressedFontDataBase85, sizePixels, reinterpret_cast<ImFontConfig*>(fontConfig));
|
||||
if (compressedFontDataBase85 != NULL) env->ReleaseStringUTFChars(obj_compressedFontDataBase85, compressedFontDataBase85);
|
||||
if (compressedFontDataBase85 != NULL) Jni::FreeTrueUtf8(compressedFontDataBase85);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private native long nAddFontFromMemoryCompressedBase85TTF(String obj_compressedFontDataBase85, float sizePixels, long fontConfig, short[] obj_glyphRanges); /*MANUAL
|
||||
auto compressedFontDataBase85 = obj_compressedFontDataBase85 == NULL ? NULL : (char*)env->GetStringUTFChars(obj_compressedFontDataBase85, JNI_FALSE);
|
||||
auto compressedFontDataBase85 = obj_compressedFontDataBase85 == NULL ? NULL : Jni::ToTrueUtf8(env, obj_compressedFontDataBase85);
|
||||
auto glyphRanges = obj_glyphRanges == NULL ? NULL : (short*)env->GetPrimitiveArrayCritical(obj_glyphRanges, JNI_FALSE);
|
||||
auto _result = (uintptr_t)THIS->AddFontFromMemoryCompressedBase85TTF(compressedFontDataBase85, sizePixels, reinterpret_cast<ImFontConfig*>(fontConfig), (ImWchar*)&glyphRanges[0]);
|
||||
if (compressedFontDataBase85 != NULL) env->ReleaseStringUTFChars(obj_compressedFontDataBase85, compressedFontDataBase85);
|
||||
if (compressedFontDataBase85 != NULL) Jni::FreeTrueUtf8(compressedFontDataBase85);
|
||||
if (glyphRanges != NULL) env->ReleasePrimitiveArrayCritical(obj_glyphRanges, glyphRanges, JNI_FALSE);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -233,9 +233,9 @@ public final class ImGuiIO extends ImGuiStruct {
|
||||
*/
|
||||
|
||||
private native void nSetIniFilename(String value); /*MANUAL
|
||||
auto value = obj_value == NULL ? NULL : (char*)env->GetStringUTFChars(obj_value, JNI_FALSE);
|
||||
auto value = obj_value == NULL ? NULL : Jni::ToTrueUtf8(env, obj_value);
|
||||
SET_STRING_FIELD(THIS->IniFilename, value);
|
||||
if (value != NULL) env->ReleaseStringUTFChars(obj_value, value);
|
||||
if (value != NULL) Jni::FreeTrueUtf8(value);
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -257,9 +257,9 @@ public final class ImGuiIO extends ImGuiStruct {
|
||||
*/
|
||||
|
||||
private native void nSetLogFilename(String value); /*MANUAL
|
||||
auto value = obj_value == NULL ? NULL : (char*)env->GetStringUTFChars(obj_value, JNI_FALSE);
|
||||
auto value = obj_value == NULL ? NULL : Jni::ToTrueUtf8(env, obj_value);
|
||||
SET_STRING_FIELD(THIS->LogFilename, value);
|
||||
if (value != NULL) env->ReleaseStringUTFChars(obj_value, value);
|
||||
if (value != NULL) Jni::FreeTrueUtf8(value);
|
||||
*/
|
||||
|
||||
private static final ImFontAtlas _GETFONTS_1 = new ImFontAtlas(0);
|
||||
@@ -1075,9 +1075,9 @@ public final class ImGuiIO extends ImGuiStruct {
|
||||
*/
|
||||
|
||||
private native void nSetBackendPlatformName(String value); /*MANUAL
|
||||
auto value = obj_value == NULL ? NULL : (char*)env->GetStringUTFChars(obj_value, JNI_FALSE);
|
||||
auto value = obj_value == NULL ? NULL : Jni::ToTrueUtf8(env, obj_value);
|
||||
SET_STRING_FIELD(THIS->BackendPlatformName, value);
|
||||
if (value != NULL) env->ReleaseStringUTFChars(obj_value, value);
|
||||
if (value != NULL) Jni::FreeTrueUtf8(value);
|
||||
*/
|
||||
|
||||
public String getBackendRendererName() {
|
||||
@@ -1093,9 +1093,9 @@ public final class ImGuiIO extends ImGuiStruct {
|
||||
*/
|
||||
|
||||
private native void nSetBackendRendererName(String value); /*MANUAL
|
||||
auto value = obj_value == NULL ? NULL : (char*)env->GetStringUTFChars(obj_value, JNI_FALSE);
|
||||
auto value = obj_value == NULL ? NULL : Jni::ToTrueUtf8(env, obj_value);
|
||||
SET_STRING_FIELD(THIS->BackendRendererName, value);
|
||||
if (value != NULL) env->ReleaseStringUTFChars(obj_value, value);
|
||||
if (value != NULL) Jni::FreeTrueUtf8(value);
|
||||
*/
|
||||
|
||||
// Optional: Access OS clipboard
|
||||
@@ -1112,7 +1112,7 @@ public final class ImGuiIO extends ImGuiStruct {
|
||||
const char* getClipboardTextStub(void* user_data) {
|
||||
JNIEnv* env = Jni::GetEnv();
|
||||
jstring jstr = Jni::CallImStrSupplier(env, _getClipboardTextCallback);
|
||||
return env->GetStringUTFChars(jstr, 0);
|
||||
return Jni::ToTrueUtf8(env, jstr);
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -1280,9 +1280,9 @@ public final class ImGuiIO extends ImGuiStruct {
|
||||
}
|
||||
|
||||
private native void nAddInputCharactersUTF8(String str); /*MANUAL
|
||||
auto str = obj_str == NULL ? NULL : (char*)env->GetStringUTFChars(obj_str, JNI_FALSE);
|
||||
auto str = obj_str == NULL ? NULL : Jni::ToTrueUtf8(env, obj_str);
|
||||
THIS->AddInputCharactersUTF8(str);
|
||||
if (str != NULL) env->ReleaseStringUTFChars(obj_str, str);
|
||||
if (str != NULL) Jni::FreeTrueUtf8(str);
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -141,9 +141,9 @@ public class ImGuiInputTextCallbackData extends ImGuiStruct {
|
||||
*/
|
||||
|
||||
private native void nSetBuf(String value); /*MANUAL
|
||||
auto value = obj_value == NULL ? NULL : (char*)env->GetStringUTFChars(obj_value, JNI_FALSE);
|
||||
auto value = obj_value == NULL ? NULL : Jni::ToTrueUtf8(env, obj_value);
|
||||
SET_STRING_FIELD(THIS->Buf, value);
|
||||
if (value != NULL) env->ReleaseStringUTFChars(obj_value, value);
|
||||
if (value != NULL) Jni::FreeTrueUtf8(value);
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -285,9 +285,9 @@ public class ImGuiInputTextCallbackData extends ImGuiStruct {
|
||||
}
|
||||
|
||||
private native void nInsertChars(int pos, String str); /*MANUAL
|
||||
auto str = obj_str == NULL ? NULL : (char*)env->GetStringUTFChars(obj_str, JNI_FALSE);
|
||||
auto str = obj_str == NULL ? NULL : Jni::ToTrueUtf8(env, obj_str);
|
||||
THIS->InsertChars(pos, str);
|
||||
if (str != NULL) env->ReleaseStringUTFChars(obj_str, str);
|
||||
if (str != NULL) Jni::FreeTrueUtf8(str);
|
||||
*/
|
||||
|
||||
public void selectAll() {
|
||||
|
||||
@@ -53,16 +53,16 @@ public final class ImGuiTextFilter extends ImGuiStructDestroyable {
|
||||
*/
|
||||
|
||||
private native boolean nDraw(String obj_label); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto _result = THIS->Draw(label);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private native boolean nDraw(String obj_label, float width); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto _result = THIS->Draw(label, width);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
@@ -75,9 +75,9 @@ public final class ImGuiTextFilter extends ImGuiStructDestroyable {
|
||||
}
|
||||
|
||||
private native boolean nPassFilter(String obj_text); /*MANUAL
|
||||
auto text = obj_text == NULL ? NULL : (char*)env->GetStringUTFChars(obj_text, JNI_FALSE);
|
||||
auto text = obj_text == NULL ? NULL : Jni::ToTrueUtf8(env, obj_text);
|
||||
auto _result = THIS->PassFilter(text, NULL);
|
||||
if (text != NULL) env->ReleaseStringUTFChars(obj_text, text);
|
||||
if (text != NULL) Jni::FreeTrueUtf8(text);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
|
||||
@@ -352,164 +352,164 @@ public final class ImGuiKnobs {
|
||||
}
|
||||
|
||||
private static native boolean nKnob(String obj_label, float[] obj_pValue, float vMin, float vMax); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (float*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto _result = ImGuiKnobs::Knob(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, float[] obj_pValue, float vMin, float vMax, float speed); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (float*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto _result = ImGuiKnobs::Knob(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, speed);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, float[] obj_pValue, float vMin, float vMax, float speed, String obj_format); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (float*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : Jni::ToTrueUtf8(env, obj_format);
|
||||
auto _result = ImGuiKnobs::Knob(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, speed, format);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
if (format != NULL) env->ReleaseStringUTFChars(obj_format, format);
|
||||
if (format != NULL) Jni::FreeTrueUtf8(format);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, float[] obj_pValue, float vMin, float vMax, float speed, String obj_format, int variant); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (float*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : Jni::ToTrueUtf8(env, obj_format);
|
||||
auto _result = ImGuiKnobs::Knob(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, speed, format, variant);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
if (format != NULL) env->ReleaseStringUTFChars(obj_format, format);
|
||||
if (format != NULL) Jni::FreeTrueUtf8(format);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, float[] obj_pValue, float vMin, float vMax, float speed, String obj_format, int variant, float size); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (float*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : Jni::ToTrueUtf8(env, obj_format);
|
||||
auto _result = ImGuiKnobs::Knob(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, speed, format, variant, size);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
if (format != NULL) env->ReleaseStringUTFChars(obj_format, format);
|
||||
if (format != NULL) Jni::FreeTrueUtf8(format);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, float[] obj_pValue, float vMin, float vMax, float speed, String obj_format, int variant, float size, int flags); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (float*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : Jni::ToTrueUtf8(env, obj_format);
|
||||
auto _result = ImGuiKnobs::Knob(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, speed, format, variant, size, flags);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
if (format != NULL) env->ReleaseStringUTFChars(obj_format, format);
|
||||
if (format != NULL) Jni::FreeTrueUtf8(format);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, float[] obj_pValue, float vMin, float vMax, float speed, String obj_format, int variant, float size, int flags, int steps); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (float*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : Jni::ToTrueUtf8(env, obj_format);
|
||||
auto _result = ImGuiKnobs::Knob(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, speed, format, variant, size, flags, steps);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
if (format != NULL) env->ReleaseStringUTFChars(obj_format, format);
|
||||
if (format != NULL) Jni::FreeTrueUtf8(format);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, float[] obj_pValue, float vMin, float vMax, String obj_format, int variant, float size, int flags, int steps); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (float*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : Jni::ToTrueUtf8(env, obj_format);
|
||||
auto _result = ImGuiKnobs::Knob(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, 0, format, variant, size, flags, steps);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
if (format != NULL) env->ReleaseStringUTFChars(obj_format, format);
|
||||
if (format != NULL) Jni::FreeTrueUtf8(format);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, float[] obj_pValue, float vMin, float vMax, int variant, float size, int flags, int steps); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (float*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto _result = ImGuiKnobs::Knob(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, 0, NULL, variant, size, flags, steps);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, float[] obj_pValue, float vMin, float vMax, float speed, int variant, float size, int flags, int steps); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (float*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto _result = ImGuiKnobs::Knob(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, speed, NULL, variant, size, flags, steps);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, float[] obj_pValue, float vMin, float vMax, float speed, float size, int flags, int steps); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (float*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto _result = ImGuiKnobs::Knob(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, speed, NULL, ImGuiKnobVariant_Tick, size, flags, steps);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, float[] obj_pValue, float vMin, float vMax, float speed, int flags, int steps); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (float*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto _result = ImGuiKnobs::Knob(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, speed, NULL, ImGuiKnobVariant_Tick, 0, flags, steps);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, float[] obj_pValue, float vMin, float vMax, float speed, int steps); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (float*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto _result = ImGuiKnobs::Knob(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, speed, NULL, ImGuiKnobVariant_Tick, 0, 0, steps);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, float[] obj_pValue, float vMin, float vMax, float speed, String obj_format, float size, int flags, int steps); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (float*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : Jni::ToTrueUtf8(env, obj_format);
|
||||
auto _result = ImGuiKnobs::Knob(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, speed, format, ImGuiKnobVariant_Tick, size, flags, steps);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
if (format != NULL) env->ReleaseStringUTFChars(obj_format, format);
|
||||
if (format != NULL) Jni::FreeTrueUtf8(format);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, float[] obj_pValue, float vMin, float vMax, float speed, String obj_format, int variant, int flags, int steps); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (float*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : Jni::ToTrueUtf8(env, obj_format);
|
||||
auto _result = ImGuiKnobs::Knob(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, speed, format, variant, 0, flags, steps);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
if (format != NULL) env->ReleaseStringUTFChars(obj_format, format);
|
||||
if (format != NULL) Jni::FreeTrueUtf8(format);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, float[] obj_pValue, float vMin, float vMax, float speed, String obj_format, int variant, int steps); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (float*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : Jni::ToTrueUtf8(env, obj_format);
|
||||
auto _result = ImGuiKnobs::Knob(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, speed, format, variant, 0, 0, steps);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
if (format != NULL) env->ReleaseStringUTFChars(obj_format, format);
|
||||
if (format != NULL) Jni::FreeTrueUtf8(format);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
@@ -850,164 +850,164 @@ public final class ImGuiKnobs {
|
||||
}
|
||||
|
||||
private static native boolean nKnob(String obj_label, int[] obj_pValue, int vMin, int vMax); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (int*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto _result = ImGuiKnobs::KnobInt(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, int[] obj_pValue, int vMin, int vMax, float speed); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (int*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto _result = ImGuiKnobs::KnobInt(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, speed);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, int[] obj_pValue, int vMin, int vMax, float speed, String obj_format); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (int*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : Jni::ToTrueUtf8(env, obj_format);
|
||||
auto _result = ImGuiKnobs::KnobInt(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, speed, format);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
if (format != NULL) env->ReleaseStringUTFChars(obj_format, format);
|
||||
if (format != NULL) Jni::FreeTrueUtf8(format);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, int[] obj_pValue, int vMin, int vMax, float speed, String obj_format, int variant); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (int*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : Jni::ToTrueUtf8(env, obj_format);
|
||||
auto _result = ImGuiKnobs::KnobInt(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, speed, format, variant);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
if (format != NULL) env->ReleaseStringUTFChars(obj_format, format);
|
||||
if (format != NULL) Jni::FreeTrueUtf8(format);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, int[] obj_pValue, int vMin, int vMax, float speed, String obj_format, int variant, float size); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (int*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : Jni::ToTrueUtf8(env, obj_format);
|
||||
auto _result = ImGuiKnobs::KnobInt(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, speed, format, variant, size);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
if (format != NULL) env->ReleaseStringUTFChars(obj_format, format);
|
||||
if (format != NULL) Jni::FreeTrueUtf8(format);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, int[] obj_pValue, int vMin, int vMax, float speed, String obj_format, int variant, float size, int flags); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (int*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : Jni::ToTrueUtf8(env, obj_format);
|
||||
auto _result = ImGuiKnobs::KnobInt(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, speed, format, variant, size, flags);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
if (format != NULL) env->ReleaseStringUTFChars(obj_format, format);
|
||||
if (format != NULL) Jni::FreeTrueUtf8(format);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, int[] obj_pValue, int vMin, int vMax, float speed, String obj_format, int variant, float size, int flags, int steps); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (int*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : Jni::ToTrueUtf8(env, obj_format);
|
||||
auto _result = ImGuiKnobs::KnobInt(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, speed, format, variant, size, flags, steps);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
if (format != NULL) env->ReleaseStringUTFChars(obj_format, format);
|
||||
if (format != NULL) Jni::FreeTrueUtf8(format);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, int[] obj_pValue, int vMin, int vMax, String obj_format, int variant, float size, int flags, int steps); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (int*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : Jni::ToTrueUtf8(env, obj_format);
|
||||
auto _result = ImGuiKnobs::KnobInt(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, 0, format, variant, size, flags, steps);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
if (format != NULL) env->ReleaseStringUTFChars(obj_format, format);
|
||||
if (format != NULL) Jni::FreeTrueUtf8(format);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, int[] obj_pValue, int vMin, int vMax, int variant, float size, int flags, int steps); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (int*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto _result = ImGuiKnobs::KnobInt(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, 0, NULL, variant, size, flags, steps);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, int[] obj_pValue, int vMin, int vMax, float speed, int variant, float size, int flags, int steps); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (int*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto _result = ImGuiKnobs::KnobInt(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, speed, NULL, variant, size, flags, steps);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, int[] obj_pValue, int vMin, int vMax, float speed, float size, int flags, int steps); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (int*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto _result = ImGuiKnobs::KnobInt(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, speed, NULL, ImGuiKnobVariant_Tick, size, flags, steps);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, int[] obj_pValue, int vMin, int vMax, float speed, int flags, int steps); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (int*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto _result = ImGuiKnobs::KnobInt(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, speed, NULL, ImGuiKnobVariant_Tick, 0, flags, steps);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, int[] obj_pValue, int vMin, int vMax, float speed, int steps); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (int*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto _result = ImGuiKnobs::KnobInt(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, speed, NULL, ImGuiKnobVariant_Tick, 0, 0, steps);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, int[] obj_pValue, int vMin, int vMax, float speed, String obj_format, float size, int flags, int steps); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (int*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : Jni::ToTrueUtf8(env, obj_format);
|
||||
auto _result = ImGuiKnobs::KnobInt(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, speed, format, ImGuiKnobVariant_Tick, size, flags, steps);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
if (format != NULL) env->ReleaseStringUTFChars(obj_format, format);
|
||||
if (format != NULL) Jni::FreeTrueUtf8(format);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, int[] obj_pValue, int vMin, int vMax, float speed, String obj_format, int variant, int flags, int steps); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (int*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : Jni::ToTrueUtf8(env, obj_format);
|
||||
auto _result = ImGuiKnobs::KnobInt(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, speed, format, variant, 0, flags, steps);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
if (format != NULL) env->ReleaseStringUTFChars(obj_format, format);
|
||||
if (format != NULL) Jni::FreeTrueUtf8(format);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nKnob(String obj_label, int[] obj_pValue, int vMin, int vMax, float speed, String obj_format, int variant, int steps); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto pValue = obj_pValue == NULL ? NULL : (int*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE);
|
||||
auto format = obj_format == NULL ? NULL : Jni::ToTrueUtf8(env, obj_format);
|
||||
auto _result = ImGuiKnobs::KnobInt(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax, speed, format, variant, 0, 0, steps);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||
if (format != NULL) env->ReleaseStringUTFChars(obj_format, format);
|
||||
if (format != NULL) Jni::FreeTrueUtf8(format);
|
||||
return _result;
|
||||
*/
|
||||
}
|
||||
@@ -1123,9 +1123,9 @@ public final class ImNodes {
|
||||
}
|
||||
|
||||
private static native void nLoadCurrentEditorStateFromIniString(String data, int dataSize); /*MANUAL
|
||||
auto data = obj_data == NULL ? NULL : (char*)env->GetStringUTFChars(obj_data, JNI_FALSE);
|
||||
auto data = obj_data == NULL ? NULL : Jni::ToTrueUtf8(env, obj_data);
|
||||
ImNodes::LoadCurrentEditorStateFromIniString(data, dataSize);
|
||||
if (data != NULL) env->ReleaseStringUTFChars(obj_data, data);
|
||||
if (data != NULL) Jni::FreeTrueUtf8(data);
|
||||
*/
|
||||
|
||||
public static void loadEditorStateFromIniString(final ImNodesEditorContext editor, final String data, final int dataSize) {
|
||||
@@ -1133,9 +1133,9 @@ public final class ImNodes {
|
||||
}
|
||||
|
||||
private static native void nLoadEditorStateFromIniString(long editor, String data, int dataSize); /*MANUAL
|
||||
auto data = obj_data == NULL ? NULL : (char*)env->GetStringUTFChars(obj_data, JNI_FALSE);
|
||||
auto data = obj_data == NULL ? NULL : Jni::ToTrueUtf8(env, obj_data);
|
||||
ImNodes::LoadEditorStateFromIniString(reinterpret_cast<ImNodesEditorContext*>(editor), data, dataSize);
|
||||
if (data != NULL) env->ReleaseStringUTFChars(obj_data, data);
|
||||
if (data != NULL) Jni::FreeTrueUtf8(data);
|
||||
*/
|
||||
|
||||
public static void saveCurrentEditorStateToIniFile(final String fileName) {
|
||||
@@ -1143,9 +1143,9 @@ public final class ImNodes {
|
||||
}
|
||||
|
||||
private static native void nSaveCurrentEditorStateToIniFile(String fileName); /*MANUAL
|
||||
auto fileName = obj_fileName == NULL ? NULL : (char*)env->GetStringUTFChars(obj_fileName, JNI_FALSE);
|
||||
auto fileName = obj_fileName == NULL ? NULL : Jni::ToTrueUtf8(env, obj_fileName);
|
||||
ImNodes::SaveCurrentEditorStateToIniFile(fileName);
|
||||
if (fileName != NULL) env->ReleaseStringUTFChars(obj_fileName, fileName);
|
||||
if (fileName != NULL) Jni::FreeTrueUtf8(fileName);
|
||||
*/
|
||||
|
||||
public static void saveEditorStateToIniFile(final ImNodesEditorContext editor, final String fileName) {
|
||||
@@ -1153,9 +1153,9 @@ public final class ImNodes {
|
||||
}
|
||||
|
||||
private static native void nSaveEditorStateToIniFile(long editor, String fileName); /*MANUAL
|
||||
auto fileName = obj_fileName == NULL ? NULL : (char*)env->GetStringUTFChars(obj_fileName, JNI_FALSE);
|
||||
auto fileName = obj_fileName == NULL ? NULL : Jni::ToTrueUtf8(env, obj_fileName);
|
||||
ImNodes::SaveEditorStateToIniFile(reinterpret_cast<ImNodesEditorContext*>(editor), fileName);
|
||||
if (fileName != NULL) env->ReleaseStringUTFChars(obj_fileName, fileName);
|
||||
if (fileName != NULL) Jni::FreeTrueUtf8(fileName);
|
||||
*/
|
||||
|
||||
public static void loadCurrentEditorStateFromIniFile(final String fileName) {
|
||||
@@ -1163,9 +1163,9 @@ public final class ImNodes {
|
||||
}
|
||||
|
||||
private static native void nLoadCurrentEditorStateFromIniFile(String fileName); /*MANUAL
|
||||
auto fileName = obj_fileName == NULL ? NULL : (char*)env->GetStringUTFChars(obj_fileName, JNI_FALSE);
|
||||
auto fileName = obj_fileName == NULL ? NULL : Jni::ToTrueUtf8(env, obj_fileName);
|
||||
ImNodes::LoadCurrentEditorStateFromIniFile(fileName);
|
||||
if (fileName != NULL) env->ReleaseStringUTFChars(obj_fileName, fileName);
|
||||
if (fileName != NULL) Jni::FreeTrueUtf8(fileName);
|
||||
*/
|
||||
|
||||
public static void loadEditorStateFromIniFile(final ImNodesEditorContext editor, final String fileName) {
|
||||
@@ -1173,8 +1173,8 @@ public final class ImNodes {
|
||||
}
|
||||
|
||||
private static native void nLoadEditorStateFromIniFile(long editor, String fileName); /*MANUAL
|
||||
auto fileName = obj_fileName == NULL ? NULL : (char*)env->GetStringUTFChars(obj_fileName, JNI_FALSE);
|
||||
auto fileName = obj_fileName == NULL ? NULL : Jni::ToTrueUtf8(env, obj_fileName);
|
||||
ImNodes::LoadEditorStateFromIniFile(reinterpret_cast<ImNodesEditorContext*>(editor), fileName);
|
||||
if (fileName != NULL) env->ReleaseStringUTFChars(obj_fileName, fileName);
|
||||
if (fileName != NULL) Jni::FreeTrueUtf8(fileName);
|
||||
*/
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -263,15 +263,15 @@ public final class MemoryEditor extends ImGuiStructDestroyable {
|
||||
}
|
||||
|
||||
private native void nDrawWindow(String title, long memData, long memSize); /*MANUAL
|
||||
auto title = obj_title == NULL ? NULL : (char*)env->GetStringUTFChars(obj_title, JNI_FALSE);
|
||||
auto title = obj_title == NULL ? NULL : Jni::ToTrueUtf8(env, obj_title);
|
||||
THIS->DrawWindow(title, reinterpret_cast<void*>(memData), memSize);
|
||||
if (title != NULL) env->ReleaseStringUTFChars(obj_title, title);
|
||||
if (title != NULL) Jni::FreeTrueUtf8(title);
|
||||
*/
|
||||
|
||||
private native void nDrawWindow(String title, long memData, long memSize, long baseDisplayAddr); /*MANUAL
|
||||
auto title = obj_title == NULL ? NULL : (char*)env->GetStringUTFChars(obj_title, JNI_FALSE);
|
||||
auto title = obj_title == NULL ? NULL : Jni::ToTrueUtf8(env, obj_title);
|
||||
THIS->DrawWindow(title, reinterpret_cast<void*>(memData), memSize, baseDisplayAddr);
|
||||
if (title != NULL) env->ReleaseStringUTFChars(obj_title, title);
|
||||
if (title != NULL) Jni::FreeTrueUtf8(title);
|
||||
*/
|
||||
|
||||
public void drawContents(final long memData, final long memSize) {
|
||||
|
||||
@@ -183,16 +183,16 @@ public final class NodeEditor {
|
||||
}
|
||||
|
||||
private static native void nBegin(String id); /*MANUAL
|
||||
auto id = obj_id == NULL ? NULL : (char*)env->GetStringUTFChars(obj_id, JNI_FALSE);
|
||||
auto id = obj_id == NULL ? NULL : Jni::ToTrueUtf8(env, obj_id);
|
||||
ax::NodeEditor::Begin(id);
|
||||
if (id != NULL) env->ReleaseStringUTFChars(obj_id, id);
|
||||
if (id != NULL) Jni::FreeTrueUtf8(id);
|
||||
*/
|
||||
|
||||
private static native void nBegin(String id, float sizeX, float sizeY); /*MANUAL
|
||||
auto id = obj_id == NULL ? NULL : (char*)env->GetStringUTFChars(obj_id, JNI_FALSE);
|
||||
auto id = obj_id == NULL ? NULL : Jni::ToTrueUtf8(env, obj_id);
|
||||
ImVec2 size = ImVec2(sizeX, sizeY);
|
||||
ax::NodeEditor::Begin(id, size);
|
||||
if (id != NULL) env->ReleaseStringUTFChars(obj_id, id);
|
||||
if (id != NULL) Jni::FreeTrueUtf8(id);
|
||||
*/
|
||||
|
||||
public static void end() {
|
||||
|
||||
@@ -30,9 +30,9 @@ public final class NodeEditorConfig extends ImGuiStructDestroyable {
|
||||
*/
|
||||
|
||||
private native void nSetSettingsFile(String value); /*MANUAL
|
||||
auto value = obj_value == NULL ? NULL : (char*)env->GetStringUTFChars(obj_value, JNI_FALSE);
|
||||
auto value = obj_value == NULL ? NULL : Jni::ToTrueUtf8(env, obj_value);
|
||||
SET_STRING_FIELD(THIS->SettingsFile, value);
|
||||
if (value != NULL) env->ReleaseStringUTFChars(obj_value, value);
|
||||
if (value != NULL) Jni::FreeTrueUtf8(value);
|
||||
*/
|
||||
|
||||
public int getCanvasSizeMode() {
|
||||
|
||||
@@ -62,9 +62,9 @@ public final class ImGui extends imgui.ImGui {
|
||||
}
|
||||
|
||||
private static native long nFindWindowByName(String obj_name); /*MANUAL
|
||||
auto name = obj_name == NULL ? NULL : (char*)env->GetStringUTFChars(obj_name, JNI_FALSE);
|
||||
auto name = obj_name == NULL ? NULL : Jni::ToTrueUtf8(env, obj_name);
|
||||
auto _result = (uintptr_t)ImGui::FindWindowByName(name);
|
||||
if (name != NULL) env->ReleaseStringUTFChars(obj_name, name);
|
||||
if (name != NULL) Jni::FreeTrueUtf8(name);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
@@ -723,11 +723,11 @@ public final class ImGui extends imgui.ImGui {
|
||||
}
|
||||
|
||||
private static native int nGetIDWithSeed(String obj_strIdBegin, String obj_strIdEnd, int seed); /*MANUAL
|
||||
auto strIdBegin = obj_strIdBegin == NULL ? NULL : (char*)env->GetStringUTFChars(obj_strIdBegin, JNI_FALSE);
|
||||
auto strIdEnd = obj_strIdEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_strIdEnd, JNI_FALSE);
|
||||
auto strIdBegin = obj_strIdBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_strIdBegin);
|
||||
auto strIdEnd = obj_strIdEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_strIdEnd);
|
||||
auto _result = ImGui::GetIDWithSeed(strIdBegin, strIdEnd, seed);
|
||||
if (strIdBegin != NULL) env->ReleaseStringUTFChars(obj_strIdBegin, strIdBegin);
|
||||
if (strIdEnd != NULL) env->ReleaseStringUTFChars(obj_strIdEnd, strIdEnd);
|
||||
if (strIdBegin != NULL) Jni::FreeTrueUtf8(strIdBegin);
|
||||
if (strIdEnd != NULL) Jni::FreeTrueUtf8(strIdEnd);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
@@ -969,9 +969,9 @@ public final class ImGui extends imgui.ImGui {
|
||||
}
|
||||
|
||||
private static native void nDockBuilderDockWindow(String windowName, int nodeId); /*MANUAL
|
||||
auto windowName = obj_windowName == NULL ? NULL : (char*)env->GetStringUTFChars(obj_windowName, JNI_FALSE);
|
||||
auto windowName = obj_windowName == NULL ? NULL : Jni::ToTrueUtf8(env, obj_windowName);
|
||||
ImGui::DockBuilderDockWindow(windowName, nodeId);
|
||||
if (windowName != NULL) env->ReleaseStringUTFChars(obj_windowName, windowName);
|
||||
if (windowName != NULL) Jni::FreeTrueUtf8(windowName);
|
||||
*/
|
||||
|
||||
public static ImGuiDockNode dockBuilderGetNode(final int nodeId) {
|
||||
@@ -1101,11 +1101,11 @@ public final class ImGui extends imgui.ImGui {
|
||||
}
|
||||
|
||||
private static native void nDockBuilderCopyWindowSettings(String srcName, String dstName); /*MANUAL
|
||||
auto srcName = obj_srcName == NULL ? NULL : (char*)env->GetStringUTFChars(obj_srcName, JNI_FALSE);
|
||||
auto dstName = obj_dstName == NULL ? NULL : (char*)env->GetStringUTFChars(obj_dstName, JNI_FALSE);
|
||||
auto srcName = obj_srcName == NULL ? NULL : Jni::ToTrueUtf8(env, obj_srcName);
|
||||
auto dstName = obj_dstName == NULL ? NULL : Jni::ToTrueUtf8(env, obj_dstName);
|
||||
ImGui::DockBuilderCopyWindowSettings(srcName, dstName);
|
||||
if (srcName != NULL) env->ReleaseStringUTFChars(obj_srcName, srcName);
|
||||
if (dstName != NULL) env->ReleaseStringUTFChars(obj_dstName, dstName);
|
||||
if (srcName != NULL) Jni::FreeTrueUtf8(srcName);
|
||||
if (dstName != NULL) Jni::FreeTrueUtf8(dstName);
|
||||
*/
|
||||
|
||||
public static void dockBuilderFinish(final int nodeId) {
|
||||
@@ -1212,25 +1212,25 @@ public final class ImGui extends imgui.ImGui {
|
||||
}
|
||||
|
||||
private static native void nTextEx(String beginText); /*MANUAL
|
||||
auto beginText = obj_beginText == NULL ? NULL : (char*)env->GetStringUTFChars(obj_beginText, JNI_FALSE);
|
||||
auto beginText = obj_beginText == NULL ? NULL : Jni::ToTrueUtf8(env, obj_beginText);
|
||||
ImGui::TextEx(beginText);
|
||||
if (beginText != NULL) env->ReleaseStringUTFChars(obj_beginText, beginText);
|
||||
if (beginText != NULL) Jni::FreeTrueUtf8(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);
|
||||
auto beginText = obj_beginText == NULL ? NULL : Jni::ToTrueUtf8(env, obj_beginText);
|
||||
auto endText = obj_endText == NULL ? NULL : Jni::ToTrueUtf8(env, obj_endText);
|
||||
ImGui::TextEx(beginText, endText);
|
||||
if (beginText != NULL) env->ReleaseStringUTFChars(obj_beginText, beginText);
|
||||
if (endText != NULL) env->ReleaseStringUTFChars(obj_endText, endText);
|
||||
if (beginText != NULL) Jni::FreeTrueUtf8(beginText);
|
||||
if (endText != NULL) Jni::FreeTrueUtf8(endText);
|
||||
*/
|
||||
|
||||
private static native void nTextEx(String beginText, String endText, int flags); /*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);
|
||||
auto beginText = obj_beginText == NULL ? NULL : Jni::ToTrueUtf8(env, obj_beginText);
|
||||
auto endText = obj_endText == NULL ? NULL : Jni::ToTrueUtf8(env, obj_endText);
|
||||
ImGui::TextEx(beginText, endText, static_cast<ImGuiTextFlags>(flags));
|
||||
if (beginText != NULL) env->ReleaseStringUTFChars(obj_beginText, beginText);
|
||||
if (endText != NULL) env->ReleaseStringUTFChars(obj_endText, endText);
|
||||
if (beginText != NULL) Jni::FreeTrueUtf8(beginText);
|
||||
if (endText != NULL) Jni::FreeTrueUtf8(endText);
|
||||
*/
|
||||
|
||||
public static boolean buttonEx(final String label) {
|
||||
@@ -1258,32 +1258,32 @@ public final class ImGui extends imgui.ImGui {
|
||||
}
|
||||
|
||||
private static native boolean nButtonEx(String obj_label); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto _result = ImGui::ButtonEx(label);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(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);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
ImVec2 size = ImVec2(sizeX, sizeY);
|
||||
auto _result = ImGui::ButtonEx(label, size);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nButtonEx(String obj_label, float sizeX, float sizeY, int flags); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
ImVec2 size = ImVec2(sizeX, sizeY);
|
||||
auto _result = ImGui::ButtonEx(label, size, static_cast<ImGuiButtonFlags>(flags));
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nButtonEx(String obj_label, int flags); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto _result = ImGui::ButtonEx(label, ImVec2(0,0), static_cast<ImGuiButtonFlags>(flags));
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
@@ -1304,18 +1304,18 @@ public final class ImGui extends imgui.ImGui {
|
||||
}
|
||||
|
||||
private static native boolean nArrowButtonEx(String obj_strId, int dir, float sizeX, float sizeY); /*MANUAL
|
||||
auto strId = obj_strId == NULL ? NULL : (char*)env->GetStringUTFChars(obj_strId, JNI_FALSE);
|
||||
auto strId = obj_strId == NULL ? NULL : Jni::ToTrueUtf8(env, obj_strId);
|
||||
ImVec2 size = ImVec2(sizeX, sizeY);
|
||||
auto _result = ImGui::ArrowButtonEx(strId, static_cast<ImGuiDir>(dir), size);
|
||||
if (strId != NULL) env->ReleaseStringUTFChars(obj_strId, strId);
|
||||
if (strId != NULL) Jni::FreeTrueUtf8(strId);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
private static native boolean nArrowButtonEx(String obj_strId, int dir, float sizeX, float sizeY, int flags); /*MANUAL
|
||||
auto strId = obj_strId == NULL ? NULL : (char*)env->GetStringUTFChars(obj_strId, JNI_FALSE);
|
||||
auto strId = obj_strId == NULL ? NULL : Jni::ToTrueUtf8(env, obj_strId);
|
||||
ImVec2 size = ImVec2(sizeX, sizeY);
|
||||
auto _result = ImGui::ArrowButtonEx(strId, static_cast<ImGuiDir>(dir), size, static_cast<ImGuiButtonFlags>(flags));
|
||||
if (strId != NULL) env->ReleaseStringUTFChars(obj_strId, strId);
|
||||
if (strId != NULL) Jni::FreeTrueUtf8(strId);
|
||||
return _result;
|
||||
*/
|
||||
|
||||
@@ -1358,11 +1358,11 @@ public final class ImGui extends imgui.ImGui {
|
||||
}
|
||||
|
||||
private static native void nSeparatorTextEx(int id, String label, String labelEnd, float extraWidth); /*MANUAL
|
||||
auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE);
|
||||
auto labelEnd = obj_labelEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_labelEnd, JNI_FALSE);
|
||||
auto label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||
auto labelEnd = obj_labelEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_labelEnd);
|
||||
ImGui::SeparatorTextEx((ImGuiID)id, label, labelEnd, extraWidth);
|
||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
||||
if (labelEnd != NULL) env->ReleaseStringUTFChars(obj_labelEnd, labelEnd);
|
||||
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||
if (labelEnd != NULL) Jni::FreeTrueUtf8(labelEnd);
|
||||
*/
|
||||
|
||||
// Widgets: Window Decorations
|
||||
|
||||
@@ -322,7 +322,7 @@ public final class ImGuiIO extends ImGuiStruct {
|
||||
const char* getClipboardTextStub(void* user_data) {
|
||||
JNIEnv* env = Jni::GetEnv();
|
||||
jstring jstr = Jni::CallImStrSupplier(env, _getClipboardTextCallback);
|
||||
return env->GetStringUTFChars(jstr, 0);
|
||||
return Jni::ToTrueUtf8(env, jstr);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
@@ -78,9 +78,9 @@ public final class TextEditor extends ImGuiStructDestroyable {
|
||||
for (int i = 0; i < keysLen; i++) {
|
||||
int key = keys[i];
|
||||
jstring string = (jstring)env->GetObjectArrayElement(values, i);
|
||||
const char* value = env->GetStringUTFChars(string, JNI_FALSE);
|
||||
const char* value = Jni::ToTrueUtf8(env, string);
|
||||
markers.emplace(std::pair<int, std::string>(key, std::string(value)));
|
||||
env->ReleaseStringUTFChars(string, value);
|
||||
Jni::FreeTrueUtf8(value);
|
||||
}
|
||||
THIS->SetErrorMarkers(markers);
|
||||
*/
|
||||
@@ -116,9 +116,9 @@ public final class TextEditor extends ImGuiStructDestroyable {
|
||||
vec.reserve(length);
|
||||
for (int i = 0; i < length; i++) {
|
||||
jstring string = (jstring)env->GetObjectArrayElement(lines, i);
|
||||
const char* raw = env->GetStringUTFChars(string, JNI_FALSE);
|
||||
const char* raw = Jni::ToTrueUtf8(env, string);
|
||||
vec.emplace_back(std::string(raw));
|
||||
env->ReleaseStringUTFChars(string, raw);
|
||||
Jni::FreeTrueUtf8(raw);
|
||||
}
|
||||
THIS->SetTextLines(vec);
|
||||
*/
|
||||
|
||||
+12
-12
@@ -49,9 +49,9 @@ public final class TextEditorLanguageDefinition extends ImGuiStructDestroyable {
|
||||
std::unordered_set<std::string> set;
|
||||
for (int i = 0; i < length; i++) {
|
||||
jstring string = (jstring)env->GetObjectArrayElement(keywords, i);
|
||||
const char* raw = env->GetStringUTFChars(string, JNI_FALSE);
|
||||
const char* raw = Jni::ToTrueUtf8(env, string);
|
||||
set.emplace(std::string(raw));
|
||||
env->ReleaseStringUTFChars(string, raw);
|
||||
Jni::FreeTrueUtf8(raw);
|
||||
}
|
||||
THIS->mKeywords = set;
|
||||
*/
|
||||
@@ -67,13 +67,13 @@ public final class TextEditorLanguageDefinition extends ImGuiStructDestroyable {
|
||||
for (int i = 0; i < keysLen; i++) {
|
||||
jstring string1 = (jstring)env->GetObjectArrayElement(keys, i);
|
||||
jstring string2 = (jstring)env->GetObjectArrayElement(decl, i);
|
||||
const char* key = env->GetStringUTFChars(string1, JNI_FALSE);
|
||||
const char* value = env->GetStringUTFChars(string2, JNI_FALSE);
|
||||
const char* key = Jni::ToTrueUtf8(env, string1);
|
||||
const char* value = Jni::ToTrueUtf8(env, string2);
|
||||
TextEditor::Identifier id;
|
||||
id.mDeclaration = std::string(value);
|
||||
identifiers.insert(std::pair<std::string, TextEditor::Identifier>(std::string(key), id));
|
||||
env->ReleaseStringUTFChars(string1, key);
|
||||
env->ReleaseStringUTFChars(string2, value);
|
||||
Jni::FreeTrueUtf8(key);
|
||||
Jni::FreeTrueUtf8(value);
|
||||
}
|
||||
THIS->mIdentifiers = identifiers;
|
||||
*/
|
||||
@@ -89,13 +89,13 @@ public final class TextEditorLanguageDefinition extends ImGuiStructDestroyable {
|
||||
for (int i = 0; i < keysLen; i++) {
|
||||
jstring string1 = (jstring)env->GetObjectArrayElement(keys, i);
|
||||
jstring string2 = (jstring)env->GetObjectArrayElement(decl, i);
|
||||
const char* key = env->GetStringUTFChars(string1, JNI_FALSE);
|
||||
const char* value = env->GetStringUTFChars(string2, JNI_FALSE);
|
||||
const char* key = Jni::ToTrueUtf8(env, string1);
|
||||
const char* value = Jni::ToTrueUtf8(env, string2);
|
||||
TextEditor::Identifier id;
|
||||
id.mDeclaration = std::string(value);
|
||||
preprocIdentifiers.insert(std::pair<std::string, TextEditor::Identifier>(std::string(key), id));
|
||||
env->ReleaseStringUTFChars(string1, key);
|
||||
env->ReleaseStringUTFChars(string2, value);
|
||||
Jni::FreeTrueUtf8(key);
|
||||
Jni::FreeTrueUtf8(value);
|
||||
}
|
||||
THIS->mPreprocIdentifiers = preprocIdentifiers;
|
||||
*/
|
||||
@@ -131,7 +131,7 @@ public final class TextEditorLanguageDefinition extends ImGuiStructDestroyable {
|
||||
std::vector<std::pair<std::string, TextEditor::PaletteIndex>> tokenRegexStrings;
|
||||
for (int i = 0; i < keysLen; i++) {
|
||||
jstring string = (jstring)env->GetObjectArrayElement(keys, i);
|
||||
const char* key = env->GetStringUTFChars(string, JNI_FALSE);
|
||||
const char* key = Jni::ToTrueUtf8(env, string);
|
||||
int value = paletteIndexes[i];
|
||||
tokenRegexStrings.emplace_back(
|
||||
std::pair<std::string, TextEditor::PaletteIndex>(
|
||||
@@ -139,7 +139,7 @@ public final class TextEditorLanguageDefinition extends ImGuiStructDestroyable {
|
||||
static_cast<TextEditor::PaletteIndex>(value)
|
||||
)
|
||||
);
|
||||
env->ReleaseStringUTFChars(string, key);
|
||||
Jni::FreeTrueUtf8(key);
|
||||
}
|
||||
THIS->mTokenRegexStrings = tokenRegexStrings;
|
||||
*/
|
||||
|
||||
@@ -119,4 +119,49 @@ namespace Jni
|
||||
env->DeleteLocalRef(value);
|
||||
}
|
||||
}
|
||||
|
||||
char* ToTrueUtf8(JNIEnv* env, jstring s) {
|
||||
if (s == nullptr) return nullptr;
|
||||
const jchar* chars = env->GetStringChars(s, nullptr);
|
||||
jsize len = env->GetStringLength(s);
|
||||
// Worst case: one codepoint → 4 UTF-8 bytes, plus null terminator.
|
||||
char* buf = (char*)malloc((size_t)len * 4 + 1);
|
||||
if (buf == nullptr) {
|
||||
env->ReleaseStringChars(s, chars);
|
||||
return nullptr;
|
||||
}
|
||||
char* out = buf;
|
||||
for (jsize i = 0; i < len; i++) {
|
||||
uint32_t cp = (uint32_t)chars[i];
|
||||
if (cp >= 0xD800 && cp <= 0xDBFF && i + 1 < len) {
|
||||
uint32_t low = (uint32_t)chars[i + 1];
|
||||
if (low >= 0xDC00 && low <= 0xDFFF) {
|
||||
cp = 0x10000 + ((cp - 0xD800) << 10) + (low - 0xDC00);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
if (cp < 0x80) {
|
||||
*out++ = (char)cp;
|
||||
} else if (cp < 0x800) {
|
||||
*out++ = (char)(0xC0 | (cp >> 6));
|
||||
*out++ = (char)(0x80 | (cp & 0x3F));
|
||||
} else if (cp < 0x10000) {
|
||||
*out++ = (char)(0xE0 | (cp >> 12));
|
||||
*out++ = (char)(0x80 | ((cp >> 6) & 0x3F));
|
||||
*out++ = (char)(0x80 | (cp & 0x3F));
|
||||
} else {
|
||||
*out++ = (char)(0xF0 | (cp >> 18));
|
||||
*out++ = (char)(0x80 | ((cp >> 12) & 0x3F));
|
||||
*out++ = (char)(0x80 | ((cp >> 6) & 0x3F));
|
||||
*out++ = (char)(0x80 | (cp & 0x3F));
|
||||
}
|
||||
}
|
||||
*out = 0;
|
||||
env->ReleaseStringChars(s, chars);
|
||||
return buf;
|
||||
}
|
||||
|
||||
void FreeTrueUtf8(char* p) {
|
||||
if (p != nullptr) free(p);
|
||||
}
|
||||
}
|
||||
@@ -47,4 +47,12 @@ namespace Jni
|
||||
|
||||
jobjectArray NewImGuiKeyDataArray(JNIEnv* env, const ImGuiKeyData* src, int size);
|
||||
void ImGuiKeyDataArrayCpy(JNIEnv* env, jobjectArray src, ImGuiKeyData* dst, int size);
|
||||
|
||||
// Converts a jstring to a freshly-malloc'd C string in real UTF-8 (not JNI's MUTF-8).
|
||||
// JNI's GetStringUTFChars encodes codepoints above U+FFFF as a surrogate pair of two
|
||||
// 3-byte sequences, which ImGui's UTF-8 decoder rejects — so SMP emoji never reach
|
||||
// the glyph atlas even when the glyph is registered. Caller must release with
|
||||
// FreeTrueUtf8(). Returns nullptr iff the input jstring is null.
|
||||
char* ToTrueUtf8(JNIEnv* env, jstring s);
|
||||
void FreeTrueUtf8(char* p);
|
||||
}
|
||||
Reference in new issue
Block a user