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:
1 parent
341b0af179
commit
47d97102f7
80 files changed
+12211
-7373
No files matched your search
@@ -1,8 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
#include "stdlib.h"
|
||||
#include "stdint.h"
|
||||
|
||||
#include "jni.h"
|
||||
#include "imgui.h"
|
||||
|
||||
#ifndef SET_STRING_FIELD
|
||||
#define SET_STRING_FIELD(field, value) \
|
||||
do { \
|
||||
static bool freeField = false; \
|
||||
if (freeField) { \
|
||||
free((void*)(field)); \
|
||||
} \
|
||||
if ((value) != NULL) { \
|
||||
size_t length = strlen(value) + 1; \
|
||||
(field) = (char*)malloc(length); \
|
||||
if ((field) != NULL) { \
|
||||
strcpy((char*)(field), value); \
|
||||
freeField = true; \
|
||||
} \
|
||||
} else { \
|
||||
(field) = NULL; \
|
||||
freeField = false; \
|
||||
} \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
namespace Jni
|
||||
{
|
||||
void InitCommon(JNIEnv* env);
|
||||
@@ -20,4 +44,7 @@ namespace Jni
|
||||
|
||||
void ImVec2ArrayCpy(JNIEnv* env, jobjectArray src, ImVec2* dst, int size);
|
||||
void ImVec4ArrayCpy(JNIEnv* env, jobjectArray src, ImVec4* dst, int size);
|
||||
|
||||
jobjectArray NewImGuiKeyDataArray(JNIEnv* env, const ImGuiKeyData* src, int size);
|
||||
void ImGuiKeyDataArrayCpy(JNIEnv* env, jobjectArray src, ImGuiKeyData* dst, int size);
|
||||
}
|
||||
Reference in new issue
Block a user