Compare commits
15
Commits
36b69acba8
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c755c9a86b | ||
|
|
30b731de54 | ||
|
|
fcfec0506f | ||
|
|
d9aa2c811b | ||
|
|
34c40304f6 | ||
|
|
2fcd517b3e | ||
|
|
fa5daaf21f | ||
|
|
aefb1be537 | ||
|
|
cbb7b26916 | ||
|
|
65275bb47b | ||
|
|
64b2fbe01b | ||
|
|
93c790fa6d | ||
|
|
c80552861d | ||
|
|
7b8f06a37b | ||
|
|
4b274163ec |
No files matched your search
+15
-15
@@ -16,12 +16,12 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
distribution: liberica
|
distribution: liberica
|
||||||
java-version: |
|
java-version: |
|
||||||
@@ -29,7 +29,7 @@ jobs:
|
|||||||
17
|
17
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v4
|
uses: gradle/actions/setup-gradle@v5
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: ./gradlew buildAll
|
run: ./gradlew buildAll
|
||||||
@@ -43,7 +43,7 @@ jobs:
|
|||||||
cp imgui-lwjgl3/build/libs/*.jar tmp/
|
cp imgui-lwjgl3/build/libs/*.jar tmp/
|
||||||
|
|
||||||
- name: Upload Artifacts
|
- name: Upload Artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: java-libraries
|
name: java-libraries
|
||||||
path: tmp/*.jar
|
path: tmp/*.jar
|
||||||
@@ -64,13 +64,13 @@ jobs:
|
|||||||
runs-on: ${{ matrix.target.os }}
|
runs-on: ${{ matrix.target.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository and Submodules
|
- name: Checkout Repository and Submodules
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
distribution: liberica
|
distribution: liberica
|
||||||
java-version: |
|
java-version: |
|
||||||
@@ -78,7 +78,7 @@ jobs:
|
|||||||
17
|
17
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v4
|
uses: gradle/actions/setup-gradle@v5
|
||||||
|
|
||||||
- name: Install Dependencies (for Windows build)
|
- name: Install Dependencies (for Windows build)
|
||||||
if: matrix.target.type == 'windows'
|
if: matrix.target.type == 'windows'
|
||||||
@@ -90,7 +90,7 @@ jobs:
|
|||||||
buildSrc/scripts/build.sh ${{ matrix.target.type }}
|
buildSrc/scripts/build.sh ${{ matrix.target.type }}
|
||||||
|
|
||||||
- name: Upload Artifacts
|
- name: Upload Artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: native-library-${{ matrix.target.type }}
|
name: native-library-${{ matrix.target.type }}
|
||||||
path: /tmp/imgui/dst/
|
path: /tmp/imgui/dst/
|
||||||
@@ -102,7 +102,7 @@ jobs:
|
|||||||
needs: build-natives
|
needs: build-natives
|
||||||
steps:
|
steps:
|
||||||
- name: Merge Artifacts
|
- name: Merge Artifacts
|
||||||
uses: actions/upload-artifact/merge@v4
|
uses: actions/upload-artifact/merge@v5
|
||||||
with:
|
with:
|
||||||
name: native-libraries
|
name: native-libraries
|
||||||
pattern: native-library-*
|
pattern: native-library-*
|
||||||
@@ -114,10 +114,10 @@ jobs:
|
|||||||
needs: archive-natives
|
needs: archive-natives
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Download Artifacts
|
- name: Download Artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v6
|
||||||
with:
|
with:
|
||||||
path: /tmp/artifacts
|
path: /tmp/artifacts
|
||||||
|
|
||||||
@@ -154,12 +154,12 @@ jobs:
|
|||||||
needs: [ build-java, archive-natives ]
|
needs: [ build-java, archive-natives ]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
distribution: liberica
|
distribution: liberica
|
||||||
java-version: |
|
java-version: |
|
||||||
@@ -167,10 +167,10 @@ jobs:
|
|||||||
17
|
17
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v4
|
uses: gradle/actions/setup-gradle@v5
|
||||||
|
|
||||||
- name: Download Artifacts
|
- name: Download Artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v6
|
||||||
with:
|
with:
|
||||||
path: out/artifacts
|
path: out/artifacts
|
||||||
|
|
||||||
|
|||||||
+230
@@ -0,0 +1,230 @@
|
|||||||
|
# Building imgui-java WCHAR32 Fork
|
||||||
|
|
||||||
|
This fork adds `IMGUI_USE_WCHAR32=1` support so that ImGui can handle Unicode codepoints above U+FFFF (emoji, CJK extensions, etc.). Published as `org.nnstd.imgui:imgui-java-*:1.90.0-wchar32+mrlokopN`.
|
||||||
|
|
||||||
|
## Repository
|
||||||
|
|
||||||
|
- **Maven**: `https://mvn.mrlokop.dev/releases`
|
||||||
|
- **Git**: `https://git.mrlokop.dev/shlepa/imgui-java`
|
||||||
|
|
||||||
|
## Coordinates
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<repository>
|
||||||
|
<id>mrlokop</id>
|
||||||
|
<url>https://mvn.mrlokop.dev/releases</url>
|
||||||
|
</repository>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.nnstd.imgui</groupId>
|
||||||
|
<artifactId>imgui-java-binding</artifactId>
|
||||||
|
<version>1.90.0-wchar32+mrlokop2</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.nnstd.imgui</groupId>
|
||||||
|
<artifactId>imgui-java-lwjgl3</artifactId>
|
||||||
|
<version>1.90.0-wchar32+mrlokop2</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- Pick one natives artifact for your platform: -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.nnstd.imgui</groupId>
|
||||||
|
<artifactId>imgui-java-natives-macos</artifactId>
|
||||||
|
<version>1.90.0-wchar32+mrlokop2</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.nnstd.imgui</groupId>
|
||||||
|
<artifactId>imgui-java-natives-linux</artifactId>
|
||||||
|
<version>1.90.0-wchar32+mrlokop2</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.nnstd.imgui</groupId>
|
||||||
|
<artifactId>imgui-java-natives-windows</artifactId>
|
||||||
|
<version>1.90.0-wchar32+mrlokop2</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- Or use the fat jar (includes all natives + LWJGL3): -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.nnstd.imgui</groupId>
|
||||||
|
<artifactId>imgui-java-app</artifactId>
|
||||||
|
<version>1.90.0-wchar32+mrlokop2</version>
|
||||||
|
</dependency>
|
||||||
|
```
|
||||||
|
|
||||||
|
For Gradle (Kotlin DSL):
|
||||||
|
|
||||||
|
```kotlin
|
||||||
|
repositories {
|
||||||
|
maven("https://mvn.mrlokop.dev/releases")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation("org.nnstd.imgui:imgui-java-binding:1.90.0-wchar32+mrlokop2")
|
||||||
|
implementation("org.nnstd.imgui:imgui-java-lwjgl3:1.90.0-wchar32+mrlokop2")
|
||||||
|
runtimeOnly("org.nnstd.imgui:imgui-java-natives-linux:1.90.0-wchar32+mrlokop2")
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Version History
|
||||||
|
|
||||||
|
| Version | Linux toolchain | Notes |
|
||||||
|
|---------|-----------------|-------|
|
||||||
|
| `+mrlokop1` | musl (`x86_64-unknown-linux-musl`) | No glibc dependency; static stdlib |
|
||||||
|
| `+mrlokop2` | glibc (`x86_64-unknown-linux-gnu`) | Standard Linux distros; links libc.so.6 |
|
||||||
|
|
||||||
|
## Prerequisites (macOS build host)
|
||||||
|
|
||||||
|
All cross-compilation is done from a macOS machine.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Java 17 (build toolchain)
|
||||||
|
sdk install java 17.0.18.1-sem # via SDKMAN
|
||||||
|
|
||||||
|
# Native build tools
|
||||||
|
brew install ant
|
||||||
|
brew install mingw-w64 # Windows cross-compiler
|
||||||
|
|
||||||
|
# Linux glibc cross-compiler (for +mrlokop2 / recommended)
|
||||||
|
brew tap messense/macos-cross-toolchains
|
||||||
|
brew install x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
|
# Linux musl cross-compiler (for +mrlokop1 / no-glibc builds)
|
||||||
|
brew install x86_64-unknown-linux-musl
|
||||||
|
```
|
||||||
|
|
||||||
|
## Build Steps
|
||||||
|
|
||||||
|
### 1. Clone and initialise submodules
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://git.mrlokop.dev/shlepa/imgui-java
|
||||||
|
cd imgui-java
|
||||||
|
git submodule update --init --recursive
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Build vendored FreeType for each platform
|
||||||
|
|
||||||
|
FreeType must be cross-compiled before the JNI natives.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
buildSrc/scripts/vendor_freetype.sh macos
|
||||||
|
buildSrc/scripts/vendor_freetype.sh linux
|
||||||
|
buildSrc/scripts/vendor_freetype.sh windows
|
||||||
|
```
|
||||||
|
|
||||||
|
Each invocation drops a static `libfreetype.a` into `build/vendor/freetype/lib/`. The macOS build uses `lipo` to create a universal (arm64 + x86_64) library automatically.
|
||||||
|
|
||||||
|
### 3. Build JNI natives
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export JAVA_HOME=/path/to/java17
|
||||||
|
|
||||||
|
# macOS universal (arm64 + x86_64)
|
||||||
|
JAVA_HOME=$JAVA_HOME buildSrc/scripts/build.sh macos
|
||||||
|
|
||||||
|
# Linux x86_64 (glibc)
|
||||||
|
JAVA_HOME=$JAVA_HOME buildSrc/scripts/build.sh linux
|
||||||
|
|
||||||
|
# Windows x86_64 (mingw)
|
||||||
|
JAVA_HOME=$JAVA_HOME buildSrc/scripts/build.sh windows
|
||||||
|
```
|
||||||
|
|
||||||
|
Compiled natives land in:
|
||||||
|
- `bin/macos64/libimgui-java64.dylib`
|
||||||
|
- `bin/macosarm64/libimgui-java64.dylib`
|
||||||
|
- `bin/linux64/libimgui-java64.so`
|
||||||
|
- `bin/windows64/imgui-java64.dll`
|
||||||
|
|
||||||
|
### 4. Bump the version (when releasing a new patch)
|
||||||
|
|
||||||
|
Edit `build.gradle` (root), increment the `+mrlokopN` suffix:
|
||||||
|
|
||||||
|
```groovy
|
||||||
|
version = '1.90.0-wchar32+mrlokop3' // was +mrlokop2
|
||||||
|
```
|
||||||
|
|
||||||
|
### 5. Publish to Maven
|
||||||
|
|
||||||
|
Publish each platform's natives separately because the artifact classifier differs. Run all four publish commands:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
JH=/path/to/java17
|
||||||
|
GW="JAVA_HOME=$JH ./gradlew"
|
||||||
|
|
||||||
|
# Binding + LWJGL3 (platform-independent JARs)
|
||||||
|
$GW imgui-binding:publishImguiPublicationToMrLokopRepository \
|
||||||
|
imgui-lwjgl3:publishImguiPublicationToMrLokopRepository
|
||||||
|
|
||||||
|
# Native artifacts (one per platform)
|
||||||
|
$GW imgui-binding-natives:publishImguiPublicationToMrLokopRepository -PdeployType=macos
|
||||||
|
$GW imgui-binding-natives:publishImguiPublicationToMrLokopRepository -PdeployType=linux
|
||||||
|
$GW imgui-binding-natives:publishImguiPublicationToMrLokopRepository -PdeployType=windows
|
||||||
|
|
||||||
|
# Fat app JAR (all natives bundled)
|
||||||
|
$GW imgui-app:publishImguiPublicationToMrLokopRepository
|
||||||
|
```
|
||||||
|
|
||||||
|
## Switching Linux Toolchain (musl vs glibc)
|
||||||
|
|
||||||
|
**glibc** (default, `+mrlokop2`) — standard Linux distributions:
|
||||||
|
|
||||||
|
In `buildSrc/src/main/groovy/tool/generator/GenerateLibs.groovy`:
|
||||||
|
```groovy
|
||||||
|
linux64.compilerPrefix = 'x86_64-unknown-linux-gnu-'
|
||||||
|
```
|
||||||
|
|
||||||
|
In `buildSrc/scripts/vendor_freetype.sh`:
|
||||||
|
```bash
|
||||||
|
linux) build_freetype "-fPIC" "--host=x86_64-unknown-linux-gnu" "lib/libfreetype.a" "x86_64-unknown-linux-gnu-gcc" ;;
|
||||||
|
```
|
||||||
|
|
||||||
|
**musl** (`+mrlokop1`) — no glibc dependency, portable:
|
||||||
|
|
||||||
|
In `GenerateLibs.groovy`:
|
||||||
|
```groovy
|
||||||
|
linux64.compilerPrefix = 'x86_64-unknown-linux-musl-'
|
||||||
|
linux64.linkerFlags = linux64.linkerFlags.replace('-Wl,-wrap,memcpy', '')
|
||||||
|
// After AntScriptGenerator.generate(), neutralise memcpy_wrap.c:
|
||||||
|
def memcpyWrap = new File("$jniDir/memcpy_wrap.c")
|
||||||
|
if (memcpyWrap.exists()) {
|
||||||
|
memcpyWrap.text = '/* disabled for musl */'
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
In `vendor_freetype.sh`:
|
||||||
|
```bash
|
||||||
|
linux) build_freetype "-fPIC" "--host=x86_64-unknown-linux-musl" "lib/libfreetype.a" "x86_64-unknown-linux-musl-gcc" ;;
|
||||||
|
```
|
||||||
|
|
||||||
|
## Key Changes vs Upstream
|
||||||
|
|
||||||
|
| File | Change |
|
||||||
|
|------|--------|
|
||||||
|
| `imgui-binding/src/main/native/imconfig.h` | Uncommented `#define IMGUI_USE_WCHAR32` |
|
||||||
|
| `ImFontGlyphRangesBuilder.java` | `UNICODE_CODEPOINT_MAX=0x10FFFF`; `addChar(int)`; 32-bit LE encoding in `addRanges`/`buildRanges` |
|
||||||
|
| `ImFontConfig.java` | Added `setGlyphRanges(int[])` overload |
|
||||||
|
| `ImFontAtlas.java` | `RETURN_GLYPH_2_SHORT` macro uses `sizeof(ImWchar)/sizeof(jshort)` multiplier |
|
||||||
|
| `build.gradle` | Version hardcoded to `1.90.0-wchar32+mrlokopN` |
|
||||||
|
| `publish.gradle` | `groupId=org.nnstd.imgui`, repo=`https://mvn.mrlokop.dev/releases` |
|
||||||
|
| `GenerateLibs.groovy` | Linux uses `x86_64-unknown-linux-gnu-` prefix |
|
||||||
|
| `vendor_freetype.sh` | `--host=` flags for all platforms; macOS universal via `lipo` |
|
||||||
|
|
||||||
|
## 32-bit Glyph Range Encoding
|
||||||
|
|
||||||
|
With `IMGUI_USE_WCHAR32`, `ImWchar` is `uint32_t` (4 bytes). The Java binding stores glyph ranges as `short[]` where each 32-bit codepoint is packed as two little-endian `jshort`s:
|
||||||
|
|
||||||
|
```
|
||||||
|
ranges = [lo_lo, lo_hi, hi_lo, hi_hi, ..., 0, 0]
|
||||||
|
^--- pair 1 ---^ ^--- pair 2+ ---^ terminator
|
||||||
|
```
|
||||||
|
|
||||||
|
Use `ImFontGlyphRangesBuilder.buildRanges()` or `ImFontConfig.setGlyphRanges(int[])` to handle this automatically:
|
||||||
|
|
||||||
|
```java
|
||||||
|
// int[] variant (simplest)
|
||||||
|
fontConfig.setGlyphRanges(new int[]{ 0x1F000, 0x1F9FF, 0 });
|
||||||
|
|
||||||
|
// Builder variant
|
||||||
|
ImFontGlyphRangesBuilder builder = new ImFontGlyphRangesBuilder();
|
||||||
|
builder.addText("Hello 🌍");
|
||||||
|
short[] ranges = builder.buildRanges();
|
||||||
|
fontConfig.setGlyphRanges(ranges);
|
||||||
|
```
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
-1
@@ -8,7 +8,7 @@ ext {
|
|||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
group = 'imgui-java'
|
group = 'imgui-java'
|
||||||
version = 'git describe --tags --always'.execute().text.trim().substring(1)
|
version = '1.90.0-wchar32+mrlokop4'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|||||||
@@ -16,6 +16,6 @@ dependencies {
|
|||||||
implementation("com.lordcodes.turtle:turtle:0.6.0")
|
implementation("com.lordcodes.turtle:turtle:0.6.0")
|
||||||
implementation("fr.inria.gforge.spoon:spoon-core:10.3.0")
|
implementation("fr.inria.gforge.spoon:spoon-core:10.3.0")
|
||||||
|
|
||||||
implementation("com.fasterxml.jackson.core:jackson-core:2.18.0")
|
implementation("com.fasterxml.jackson.core:jackson-core:2.20.0")
|
||||||
implementation("com.fasterxml.jackson.core:jackson-databind:2.18.0")
|
implementation("com.fasterxml.jackson.core:jackson-databind:2.20.0")
|
||||||
}
|
}
|
||||||
@@ -42,4 +42,7 @@ publish_natives "windows"
|
|||||||
publish_natives "linux"
|
publish_natives "linux"
|
||||||
publish_natives "macos"
|
publish_natives "macos"
|
||||||
|
|
||||||
|
echo "> Nexus manual upload..."
|
||||||
|
curl -D - -X POST -u "${NEXUS_UPD_ID}:${NEXUS_UPD_PASS}" "https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/io.github.spair"
|
||||||
|
|
||||||
echo "All modules and natives published successfully."
|
echo "All modules and natives published successfully."
|
||||||
@@ -35,16 +35,23 @@ echo "FreeType unzipped to $LIBDIR"
|
|||||||
COMMON_FLAGS="--enable-static --disable-shared --without-zlib --without-bzip2 --without-png --without-harfbuzz --without-brotli"
|
COMMON_FLAGS="--enable-static --disable-shared --without-zlib --without-bzip2 --without-png --without-harfbuzz --without-brotli"
|
||||||
|
|
||||||
# Function to configure and build FreeType
|
# Function to configure and build FreeType
|
||||||
|
# Args: cflags prefix output_dir [cc]
|
||||||
build_freetype() {
|
build_freetype() {
|
||||||
cflags=$1
|
cflags=$1
|
||||||
prefix=$2
|
prefix=$2
|
||||||
output_dir=$3
|
output_dir=$3
|
||||||
|
cc=${4:-}
|
||||||
|
|
||||||
echo "Cleaning previous builds..."
|
echo "Cleaning previous builds..."
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
|
if [ -n "$cc" ]; then
|
||||||
|
echo "Configuring FreeType with CC='$cc' CFLAGS='$cflags' and PREFIX='$prefix'..."
|
||||||
|
./configure CC="$cc" CFLAGS="$cflags" $COMMON_FLAGS $prefix
|
||||||
|
else
|
||||||
echo "Configuring FreeType with CFLAGS='$cflags' and PREFIX='$prefix'..."
|
echo "Configuring FreeType with CFLAGS='$cflags' and PREFIX='$prefix'..."
|
||||||
./configure CFLAGS="$cflags" $COMMON_FLAGS $prefix
|
./configure CFLAGS="$cflags" $COMMON_FLAGS $prefix
|
||||||
|
fi
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Failed to configure FreeType"
|
echo "Failed to configure FreeType"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -82,13 +89,13 @@ case "$VTYPE" in
|
|||||||
build_freetype "" "--host=x86_64-w64-mingw32 --prefix=/usr/x86_64-w64-mingw32" "lib/libfreetype.a"
|
build_freetype "" "--host=x86_64-w64-mingw32 --prefix=/usr/x86_64-w64-mingw32" "lib/libfreetype.a"
|
||||||
;;
|
;;
|
||||||
linux)
|
linux)
|
||||||
build_freetype "-fPIC" "" "lib/libfreetype.a"
|
build_freetype "-fPIC" "--host=x86_64-unknown-linux-gnu" "lib/libfreetype.a" "x86_64-unknown-linux-gnu-gcc"
|
||||||
;;
|
;;
|
||||||
macos)
|
macos)
|
||||||
MACOS_VERSION=10.15
|
MACOS_VERSION=10.15
|
||||||
|
|
||||||
build_freetype "-arch x86_64 -mmacosx-version-min=$MACOS_VERSION" "" "tmp/libfreetype-x86_64.a"
|
build_freetype "-arch x86_64 -mmacosx-version-min=$MACOS_VERSION" "--host=x86_64-apple-darwin" "tmp/libfreetype-x86_64.a"
|
||||||
build_freetype "-arch arm64 -mmacosx-version-min=$MACOS_VERSION" "" "tmp/libfreetype-arm64.a"
|
build_freetype "-arch arm64 -mmacosx-version-min=$MACOS_VERSION" "--host=aarch64-apple-darwin" "tmp/libfreetype-arm64.a"
|
||||||
|
|
||||||
echo "Creating universal library using lipo..."
|
echo "Creating universal library using lipo..."
|
||||||
lipo -create -output lib/libfreetype.a tmp/libfreetype-x86_64.a tmp/libfreetype-arm64.a
|
lipo -create -output lib/libfreetype.a tmp/libfreetype-x86_64.a tmp/libfreetype-arm64.a
|
||||||
|
|||||||
@@ -108,12 +108,14 @@ class GenerateLibs extends DefaultTask {
|
|||||||
|
|
||||||
if (forWindows) {
|
if (forWindows) {
|
||||||
def win64 = BuildTarget.newDefaultTarget(Os.Windows, Architecture.Bitness._64)
|
def win64 = BuildTarget.newDefaultTarget(Os.Windows, Architecture.Bitness._64)
|
||||||
|
win64.compilerPrefix = 'x86_64-w64-mingw32-'
|
||||||
addFreeTypeIfEnabled(win64)
|
addFreeTypeIfEnabled(win64)
|
||||||
buildTargets += win64
|
buildTargets += win64
|
||||||
}
|
}
|
||||||
|
|
||||||
if (forLinux) {
|
if (forLinux) {
|
||||||
def linux64 = BuildTarget.newDefaultTarget(Os.Linux, Architecture.Bitness._64)
|
def linux64 = BuildTarget.newDefaultTarget(Os.Linux, Architecture.Bitness._64)
|
||||||
|
linux64.compilerPrefix = 'x86_64-unknown-linux-gnu-'
|
||||||
addFreeTypeIfEnabled(linux64)
|
addFreeTypeIfEnabled(linux64)
|
||||||
buildTargets += linux64
|
buildTargets += linux64
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -350,8 +350,8 @@ private fun convertManualJni(mOrig: CtMethod<*>, method: CtMethod<*>): CtMethod<
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (p.isType("String")) {
|
if (p.isType("String")) {
|
||||||
getLines += "auto ${p.simpleName} = obj_${p.simpleName} == NULL ? NULL : (char*)env->GetStringUTFChars(obj_${p.simpleName}, JNI_FALSE)"
|
getLines += "auto ${p.simpleName} = Jni::ToTrueUtf8(env, obj_${p.simpleName})"
|
||||||
releaseLines += "if (${p.simpleName} != NULL) env->ReleaseStringUTFChars(obj_${p.simpleName}, ${p.simpleName})"
|
releaseLines += "Jni::FreeTrueUtf8(${p.simpleName})"
|
||||||
isConverted = true
|
isConverted = true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -361,14 +361,12 @@ private fun convertManualJni(mOrig: CtMethod<*>, method: CtMethod<*>): CtMethod<
|
|||||||
const char* ${p.simpleName}[$countParam];
|
const char* ${p.simpleName}[$countParam];
|
||||||
for (int i = 0; i < ${p.simpleName}$PARAM_ARR_LEN_POSTFIX; i++) {
|
for (int i = 0; i < ${p.simpleName}$PARAM_ARR_LEN_POSTFIX; i++) {
|
||||||
const jstring str = (jstring)env->GetObjectArrayElement(obj_${p.simpleName}, i);
|
const jstring str = (jstring)env->GetObjectArrayElement(obj_${p.simpleName}, i);
|
||||||
auto rawStr = (char*)env->GetStringUTFChars(str, JNI_FALSE);
|
${p.simpleName}[i] = Jni::ToTrueUtf8(env, str);
|
||||||
${p.simpleName}[i] = rawStr;
|
|
||||||
}
|
}
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
releaseLines += """
|
releaseLines += """
|
||||||
for (int i = 0; i < $countParam; i++) {
|
for (int i = 0; i < $countParam; i++) {
|
||||||
const jstring str = (jstring)env->GetObjectArrayElement(obj_${p.simpleName}, i);
|
Jni::FreeTrueUtf8((char*)${p.simpleName}[i]);
|
||||||
env->ReleaseStringUTFChars(str, ${p.simpleName}[i]);
|
|
||||||
}
|
}
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
isConverted = true
|
isConverted = true
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
org.gradle.caching=true
|
org.gradle.caching=true
|
||||||
org.gradle.jvmargs=-Xms2G -Xmx4G
|
org.gradle.jvmargs=-Xms2G -Xmx4G
|
||||||
|
org.gradle.java.installations.paths=/Users/user/.sdkman/candidates/java/8.0.472-amzn,/Users/user/.sdkman/candidates/java/17.0.18.1-sem,/Users/user/.sdkman/candidates/java/25-amzn
|
||||||
@@ -734,19 +734,19 @@ public final class ImDrawList extends ImGuiStruct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private native void nAddText(float posX, float posY, int col, String textBegin); /*MANUAL
|
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);
|
ImVec2 pos = ImVec2(posX, posY);
|
||||||
THIS->AddText(pos, col, textBegin);
|
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
|
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 textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||||
auto textEnd = obj_textEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textEnd, JNI_FALSE);
|
auto textEnd = obj_textEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textEnd);
|
||||||
ImVec2 pos = ImVec2(posX, posY);
|
ImVec2 pos = ImVec2(posX, posY);
|
||||||
THIS->AddText(pos, col, textBegin, textEnd);
|
THIS->AddText(pos, col, textBegin, textEnd);
|
||||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||||
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
|
if (textEnd != NULL) Jni::FreeTrueUtf8(textEnd);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void addText(final ImFont font, final int fontSize, final ImVec2 pos, final int col, final String textBegin) {
|
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
|
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);
|
ImVec2 pos = ImVec2(posX, posY);
|
||||||
THIS->AddText(reinterpret_cast<ImFont*>(font), fontSize, pos, col, textBegin);
|
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
|
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 textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||||
auto textEnd = obj_textEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textEnd, JNI_FALSE);
|
auto textEnd = obj_textEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textEnd);
|
||||||
ImVec2 pos = ImVec2(posX, posY);
|
ImVec2 pos = ImVec2(posX, posY);
|
||||||
THIS->AddText(reinterpret_cast<ImFont*>(font), fontSize, pos, col, textBegin, textEnd);
|
THIS->AddText(reinterpret_cast<ImFont*>(font), fontSize, pos, col, textBegin, textEnd);
|
||||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||||
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
|
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
|
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 textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||||
auto textEnd = obj_textEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textEnd, JNI_FALSE);
|
auto textEnd = obj_textEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textEnd);
|
||||||
ImVec2 pos = ImVec2(posX, posY);
|
ImVec2 pos = ImVec2(posX, posY);
|
||||||
THIS->AddText(reinterpret_cast<ImFont*>(font), fontSize, pos, col, textBegin, textEnd, wrapWidth);
|
THIS->AddText(reinterpret_cast<ImFont*>(font), fontSize, pos, col, textBegin, textEnd, wrapWidth);
|
||||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||||
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
|
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
|
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 textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||||
auto textEnd = obj_textEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textEnd, JNI_FALSE);
|
auto textEnd = obj_textEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textEnd);
|
||||||
ImVec2 pos = ImVec2(posX, posY);
|
ImVec2 pos = ImVec2(posX, posY);
|
||||||
ImVec4 cpuFineClipRect = ImVec4(cpuFineClipRectX, cpuFineClipRectY, cpuFineClipRectZ, cpuFineClipRectW);
|
ImVec4 cpuFineClipRect = ImVec4(cpuFineClipRectX, cpuFineClipRectY, cpuFineClipRectZ, cpuFineClipRectW);
|
||||||
THIS->AddText(reinterpret_cast<ImFont*>(font), fontSize, pos, col, textBegin, textEnd, wrapWidth, &cpuFineClipRect);
|
THIS->AddText(reinterpret_cast<ImFont*>(font), fontSize, pos, col, textBegin, textEnd, wrapWidth, &cpuFineClipRect);
|
||||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||||
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
|
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
|
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);
|
ImVec2 pos = ImVec2(posX, posY);
|
||||||
ImVec4 cpuFineClipRect = ImVec4(cpuFineClipRectX, cpuFineClipRectY, cpuFineClipRectZ, cpuFineClipRectW);
|
ImVec4 cpuFineClipRect = ImVec4(cpuFineClipRectX, cpuFineClipRectY, cpuFineClipRectZ, cpuFineClipRectW);
|
||||||
THIS->AddText(reinterpret_cast<ImFont*>(font), fontSize, pos, col, textBegin, NULL, wrapWidth, &cpuFineClipRect);
|
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
|
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);
|
ImVec2 pos = ImVec2(posX, posY);
|
||||||
ImVec4 cpuFineClipRect = ImVec4(cpuFineClipRectX, cpuFineClipRectY, cpuFineClipRectZ, cpuFineClipRectW);
|
ImVec4 cpuFineClipRect = ImVec4(cpuFineClipRectX, cpuFineClipRectY, cpuFineClipRectZ, cpuFineClipRectW);
|
||||||
THIS->AddText(reinterpret_cast<ImFont*>(font), fontSize, pos, col, textBegin, NULL, 0.0f, &cpuFineClipRect);
|
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
|
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 textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||||
auto textEnd = obj_textEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textEnd, JNI_FALSE);
|
auto textEnd = obj_textEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textEnd);
|
||||||
ImVec2 pos = ImVec2(posX, posY);
|
ImVec2 pos = ImVec2(posX, posY);
|
||||||
ImVec4 cpuFineClipRect = ImVec4(cpuFineClipRectX, cpuFineClipRectY, cpuFineClipRectZ, cpuFineClipRectW);
|
ImVec4 cpuFineClipRect = ImVec4(cpuFineClipRectX, cpuFineClipRectY, cpuFineClipRectZ, cpuFineClipRectW);
|
||||||
THIS->AddText(reinterpret_cast<ImFont*>(font), fontSize, pos, col, textBegin, textEnd, 0.0f, &cpuFineClipRect);
|
THIS->AddText(reinterpret_cast<ImFont*>(font), fontSize, pos, col, textBegin, textEnd, 0.0f, &cpuFineClipRect);
|
||||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||||
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
|
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
|
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);
|
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
|
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;
|
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;
|
return _result;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private native float nCalcTextSizeAY(float size, float maxWidth, float wrapWidth, String obj_textBegin); /*MANUAL
|
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;
|
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;
|
return _result;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private native void nCalcTextSizeA(ImVec2 dst, float size, float maxWidth, float wrapWidth, String textBegin, String textEnd); /*MANUAL
|
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 textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||||
auto textEnd = obj_textEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textEnd, JNI_FALSE);
|
auto textEnd = obj_textEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textEnd);
|
||||||
Jni::ImVec2Cpy(env, THIS->CalcTextSizeA(size, maxWidth, wrapWidth, textBegin, textEnd), dst);
|
Jni::ImVec2Cpy(env, THIS->CalcTextSizeA(size, maxWidth, wrapWidth, textBegin, textEnd), dst);
|
||||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||||
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
|
if (textEnd != NULL) Jni::FreeTrueUtf8(textEnd);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private native float nCalcTextSizeAX(float size, float maxWidth, float wrapWidth, String obj_textBegin, String obj_textEnd); /*MANUAL
|
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 textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||||
auto textEnd = obj_textEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textEnd, JNI_FALSE);
|
auto textEnd = obj_textEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textEnd);
|
||||||
auto _result = THIS->CalcTextSizeA(size, maxWidth, wrapWidth, textBegin, textEnd).x;
|
auto _result = THIS->CalcTextSizeA(size, maxWidth, wrapWidth, textBegin, textEnd).x;
|
||||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||||
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
|
if (textEnd != NULL) Jni::FreeTrueUtf8(textEnd);
|
||||||
return _result;
|
return _result;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private native float nCalcTextSizeAY(float size, float maxWidth, float wrapWidth, String obj_textBegin, String obj_textEnd); /*MANUAL
|
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 textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||||
auto textEnd = obj_textEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textEnd, JNI_FALSE);
|
auto textEnd = obj_textEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textEnd);
|
||||||
auto _result = THIS->CalcTextSizeA(size, maxWidth, wrapWidth, textBegin, textEnd).y;
|
auto _result = THIS->CalcTextSizeA(size, maxWidth, wrapWidth, textBegin, textEnd).y;
|
||||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||||
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
|
if (textEnd != NULL) Jni::FreeTrueUtf8(textEnd);
|
||||||
return _result;
|
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
|
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 text = obj_text == NULL ? NULL : Jni::ToTrueUtf8(env, obj_text);
|
||||||
auto textEnd = obj_textEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textEnd, JNI_FALSE);
|
auto textEnd = obj_textEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textEnd);
|
||||||
auto _result = env->NewStringUTF(THIS->CalcWordWrapPositionA(scale, text, textEnd, wrapWidth));
|
auto _result = env->NewStringUTF(THIS->CalcWordWrapPositionA(scale, text, textEnd, wrapWidth));
|
||||||
if (text != NULL) env->ReleaseStringUTFChars(obj_text, text);
|
if (text != NULL) Jni::FreeTrueUtf8(text);
|
||||||
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
|
if (textEnd != NULL) Jni::FreeTrueUtf8(textEnd);
|
||||||
return _result;
|
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
|
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 textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||||
auto textEnd = obj_textEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textEnd, JNI_FALSE);
|
auto textEnd = obj_textEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textEnd);
|
||||||
ImVec2 pos = ImVec2(posX, posY);
|
ImVec2 pos = ImVec2(posX, posY);
|
||||||
ImVec4 clipRect = ImVec4(clipRectX, clipRectY, clipRectZ, clipRectW);
|
ImVec4 clipRect = ImVec4(clipRectX, clipRectY, clipRectZ, clipRectW);
|
||||||
THIS->RenderText(reinterpret_cast<ImDrawList*>(drawList), size, pos, col, clipRect, textBegin, textEnd);
|
THIS->RenderText(reinterpret_cast<ImDrawList*>(drawList), size, pos, col, clipRect, textBegin, textEnd);
|
||||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||||
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
|
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
|
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 textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||||
auto textEnd = obj_textEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textEnd, JNI_FALSE);
|
auto textEnd = obj_textEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textEnd);
|
||||||
ImVec2 pos = ImVec2(posX, posY);
|
ImVec2 pos = ImVec2(posX, posY);
|
||||||
ImVec4 clipRect = ImVec4(clipRectX, clipRectY, clipRectZ, clipRectW);
|
ImVec4 clipRect = ImVec4(clipRectX, clipRectY, clipRectZ, clipRectW);
|
||||||
THIS->RenderText(reinterpret_cast<ImDrawList*>(drawList), size, pos, col, clipRect, textBegin, textEnd, wrapWidth);
|
THIS->RenderText(reinterpret_cast<ImDrawList*>(drawList), size, pos, col, clipRect, textBegin, textEnd, wrapWidth);
|
||||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||||
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
|
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
|
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 textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||||
auto textEnd = obj_textEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textEnd, JNI_FALSE);
|
auto textEnd = obj_textEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textEnd);
|
||||||
ImVec2 pos = ImVec2(posX, posY);
|
ImVec2 pos = ImVec2(posX, posY);
|
||||||
ImVec4 clipRect = ImVec4(clipRectX, clipRectY, clipRectZ, clipRectW);
|
ImVec4 clipRect = ImVec4(clipRectX, clipRectY, clipRectZ, clipRectW);
|
||||||
THIS->RenderText(reinterpret_cast<ImDrawList*>(drawList), size, pos, col, clipRect, textBegin, textEnd, wrapWidth, cpuFineClip);
|
THIS->RenderText(reinterpret_cast<ImDrawList*>(drawList), size, pos, col, clipRect, textBegin, textEnd, wrapWidth, cpuFineClip);
|
||||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||||
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
|
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
|
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 textBegin = obj_textBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textBegin);
|
||||||
auto textEnd = obj_textEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_textEnd, JNI_FALSE);
|
auto textEnd = obj_textEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_textEnd);
|
||||||
ImVec2 pos = ImVec2(posX, posY);
|
ImVec2 pos = ImVec2(posX, posY);
|
||||||
ImVec4 clipRect = ImVec4(clipRectX, clipRectY, clipRectZ, clipRectW);
|
ImVec4 clipRect = ImVec4(clipRectX, clipRectY, clipRectZ, clipRectW);
|
||||||
THIS->RenderText(reinterpret_cast<ImDrawList*>(drawList), size, pos, col, clipRect, textBegin, textEnd, 0.0f, cpuFineClip);
|
THIS->RenderText(reinterpret_cast<ImDrawList*>(drawList), size, pos, col, clipRect, textBegin, textEnd, 0.0f, cpuFineClip);
|
||||||
if (textBegin != NULL) env->ReleaseStringUTFChars(obj_textBegin, textBegin);
|
if (textBegin != NULL) Jni::FreeTrueUtf8(textBegin);
|
||||||
if (textEnd != NULL) env->ReleaseStringUTFChars(obj_textEnd, textEnd);
|
if (textEnd != NULL) Jni::FreeTrueUtf8(textEnd);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*JNI
|
/*JNI
|
||||||
|
|||||||
@@ -101,33 +101,33 @@ public final class ImFontAtlas extends ImGuiStructDestroyable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private native long nAddFontFromFileTTF(String obj_filename, float sizePixels); /*MANUAL
|
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);
|
auto _result = (uintptr_t)THIS->AddFontFromFileTTF(filename, sizePixels);
|
||||||
if (filename != NULL) env->ReleaseStringUTFChars(obj_filename, filename);
|
if (filename != NULL) Jni::FreeTrueUtf8(filename);
|
||||||
return _result;
|
return _result;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private native long nAddFontFromFileTTF(String obj_filename, float sizePixels, long fontConfig); /*MANUAL
|
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));
|
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;
|
return _result;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private native long nAddFontFromFileTTF(String obj_filename, float sizePixels, long fontConfig, short[] obj_glyphRanges); /*MANUAL
|
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 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]);
|
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);
|
if (glyphRanges != NULL) env->ReleasePrimitiveArrayCritical(obj_glyphRanges, glyphRanges, JNI_FALSE);
|
||||||
return _result;
|
return _result;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private native long nAddFontFromFileTTF(String obj_filename, float sizePixels, short[] obj_glyphRanges); /*MANUAL
|
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 glyphRanges = obj_glyphRanges == NULL ? NULL : (short*)env->GetPrimitiveArrayCritical(obj_glyphRanges, JNI_FALSE);
|
||||||
auto _result = (uintptr_t)THIS->AddFontFromFileTTF(filename, sizePixels, NULL, (ImWchar*)&glyphRanges[0]);
|
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);
|
if (glyphRanges != NULL) env->ReleasePrimitiveArrayCritical(obj_glyphRanges, glyphRanges, JNI_FALSE);
|
||||||
return _result;
|
return _result;
|
||||||
*/
|
*/
|
||||||
@@ -395,17 +395,17 @@ public final class ImFontAtlas extends ImGuiStructDestroyable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private native long nAddFontFromMemoryCompressedBase85TTF(String obj_compressedFontDataBase85, float sizePixels, long fontConfig); /*MANUAL
|
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));
|
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;
|
return _result;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private native long nAddFontFromMemoryCompressedBase85TTF(String obj_compressedFontDataBase85, float sizePixels, long fontConfig, short[] obj_glyphRanges); /*MANUAL
|
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 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]);
|
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);
|
if (glyphRanges != NULL) env->ReleasePrimitiveArrayCritical(obj_glyphRanges, glyphRanges, JNI_FALSE);
|
||||||
return _result;
|
return _result;
|
||||||
*/
|
*/
|
||||||
@@ -594,9 +594,11 @@ public final class ImFontAtlas extends ImGuiStructDestroyable {
|
|||||||
/*JNI
|
/*JNI
|
||||||
#define RETURN_GLYPH_2_SHORT(glyphs) \
|
#define RETURN_GLYPH_2_SHORT(glyphs) \
|
||||||
const ImWchar* ranges = glyphs; \
|
const ImWchar* ranges = glyphs; \
|
||||||
int size = 0; \
|
int pairCount = 0; \
|
||||||
for (; ranges[0]; ranges += 2) \
|
for (; ranges[0]; ranges += 2) \
|
||||||
size += 2; \
|
pairCount++; \
|
||||||
|
int shortsPerImWchar = (int)(sizeof(ImWchar) / sizeof(jshort)); \
|
||||||
|
int size = pairCount * 2 * shortsPerImWchar + shortsPerImWchar; \
|
||||||
jshortArray jShorts = env->NewShortArray(size); \
|
jshortArray jShorts = env->NewShortArray(size); \
|
||||||
env->SetShortArrayRegion(jShorts, 0, size, (jshort*)glyphs); \
|
env->SetShortArrayRegion(jShorts, 0, size, (jshort*)glyphs); \
|
||||||
return jShorts;
|
return jShorts;
|
||||||
|
|||||||
@@ -347,6 +347,33 @@ public final class ImFontConfig extends ImGuiStructDestroyable {
|
|||||||
nSetGlyphRanges(glyphRanges);
|
nSetGlyphRanges(glyphRanges);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convenience overload: encodes int[] codepoint pairs into WCHAR32 short[] layout and calls setGlyphRanges.
|
||||||
|
* Expects int[] pairs [ lo, hi, lo, hi, ..., 0 ] (zero-terminated).
|
||||||
|
* THE ARRAY DATA NEEDS TO PERSIST AS LONG AS THE FONT IS ALIVE.
|
||||||
|
*/
|
||||||
|
public void setGlyphRanges(final int[] codepoints) {
|
||||||
|
// count pairs
|
||||||
|
int pairCount = 0;
|
||||||
|
for (int i = 0; i + 1 < codepoints.length; i += 2) {
|
||||||
|
if (codepoints[i] == 0) break;
|
||||||
|
pairCount++;
|
||||||
|
}
|
||||||
|
// each pair = 4 shorts (2 per endpoint), plus 2 terminator shorts
|
||||||
|
final short[] encoded = new short[pairCount * 4 + 2];
|
||||||
|
int out = 0;
|
||||||
|
for (int i = 0; i < pairCount; i++) {
|
||||||
|
final int lo = codepoints[i * 2];
|
||||||
|
final int hi = codepoints[i * 2 + 1];
|
||||||
|
encoded[out++] = (short) (lo & 0xFFFF);
|
||||||
|
encoded[out++] = (short) ((lo >> 16) & 0xFFFF);
|
||||||
|
encoded[out++] = (short) (hi & 0xFFFF);
|
||||||
|
encoded[out++] = (short) ((hi >> 16) & 0xFFFF);
|
||||||
|
}
|
||||||
|
// terminator already zero from array initialisation
|
||||||
|
setGlyphRanges(encoded);
|
||||||
|
}
|
||||||
|
|
||||||
private native void nSetGlyphRanges(short[] glyphRanges); /*
|
private native void nSetGlyphRanges(short[] glyphRanges); /*
|
||||||
THIS->GlyphRanges = glyphRanges != NULL ? (ImWchar*)&glyphRanges[0] : NULL;
|
THIS->GlyphRanges = glyphRanges != NULL ? (ImWchar*)&glyphRanges[0] : NULL;
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -10,12 +10,14 @@ import java.util.List;
|
|||||||
* You can use the ImFontGlyphRangesBuilder helper to create glyph ranges based on text input. For example: for a game where your script is known,
|
* You can use the ImFontGlyphRangesBuilder helper to create glyph ranges based on text input. For example: for a game where your script is known,
|
||||||
* if you can feed your entire script to it and only build the characters the game needs.
|
* if you can feed your entire script to it and only build the characters the game needs.
|
||||||
* <p>
|
* <p>
|
||||||
* Direct reimplementation of native ImFontGlyphRangesBuilder in java
|
* Direct reimplementation of native ImFontGlyphRangesBuilder in java.
|
||||||
|
* Built with IMGUI_USE_WCHAR32=1: supports full Unicode range U+0000..U+10FFFF.
|
||||||
|
* buildRanges() emits each range endpoint as two little-endian shorts (32-bit ImWchar layout).
|
||||||
*/
|
*/
|
||||||
public final class ImFontGlyphRangesBuilder {
|
public final class ImFontGlyphRangesBuilder {
|
||||||
private static final int UNICODE_CODEPOINT_MAX = 0xFFFF;
|
private static final int UNICODE_CODEPOINT_MAX = 0x10FFFF;
|
||||||
|
|
||||||
// have to use type long because values are unsigned integers
|
// have to use type long because values are unsigned integers; sized the same way as native (divide by 8)
|
||||||
private final long[] usedChars = new long[(UNICODE_CODEPOINT_MAX + 1) / 8];
|
private final long[] usedChars = new long[(UNICODE_CODEPOINT_MAX + 1) / 8];
|
||||||
|
|
||||||
public ImFontGlyphRangesBuilder() {
|
public ImFontGlyphRangesBuilder() {
|
||||||
@@ -23,56 +25,98 @@ public final class ImFontGlyphRangesBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds single character to resulting ranges
|
* Adds single character to resulting ranges (char overload for source compatibility)
|
||||||
*/
|
*/
|
||||||
public void addChar(final char c) {
|
public void addChar(final char c) {
|
||||||
setBit(c);
|
setBit(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds all characters from the given string to resulting ranges
|
* Adds a Unicode codepoint (including SMP, U+10000..U+10FFFF) to resulting ranges
|
||||||
*/
|
*/
|
||||||
public void addText(final String text) {
|
public void addChar(final int codepoint) {
|
||||||
for (int i = 0; i < text.length(); i++) {
|
if (codepoint >= 0 && codepoint <= UNICODE_CODEPOINT_MAX) {
|
||||||
addChar(text.charAt(i));
|
setBit(codepoint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copies all given ranges to resulting ranges
|
* Adds all codepoints from the given string to resulting ranges.
|
||||||
|
* Handles supplementary characters (emoji, etc.) via codePointAt iteration.
|
||||||
|
*/
|
||||||
|
public void addText(final String text) {
|
||||||
|
int i = 0;
|
||||||
|
while (i < text.length()) {
|
||||||
|
final int cp = text.codePointAt(i);
|
||||||
|
addChar(cp);
|
||||||
|
i += Character.charCount(cp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copies all given ranges to resulting ranges.
|
||||||
|
* Expects the WCHAR32 short[] layout: each 32-bit codepoint encoded as two little-endian shorts,
|
||||||
|
* pairs of codepoints form a [lo, hi] range, terminated by two zero shorts.
|
||||||
|
* Format: [ lo_lo16, lo_hi16, hi_lo16, hi_hi16, ..., 0, 0 ]
|
||||||
*/
|
*/
|
||||||
public void addRanges(final short[] ranges) {
|
public void addRanges(final short[] ranges) {
|
||||||
for (int i = 0; i < ranges.length; i += 2) {
|
for (int i = 0; i + 3 < ranges.length; i += 4) {
|
||||||
|
final int lo = (ranges[i] & 0xFFFF) | ((ranges[i + 1] & 0xFFFF) << 16);
|
||||||
|
final int hi = (ranges[i + 2] & 0xFFFF) | ((ranges[i + 3] & 0xFFFF) << 16);
|
||||||
|
if (lo == 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
for (int k = lo; k <= hi && k <= UNICODE_CODEPOINT_MAX; k++) {
|
||||||
|
setBit(k);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copies all given ranges to resulting ranges.
|
||||||
|
* Expects int[] pairs: [ lo, hi, lo, hi, ..., 0 ] (zero-terminated).
|
||||||
|
*/
|
||||||
|
public void addRanges(final int[] ranges) {
|
||||||
|
for (int i = 0; i + 1 < ranges.length; i += 2) {
|
||||||
if (ranges[i] == 0) {
|
if (ranges[i] == 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
for (int k = ranges[i]; k <= ranges[i + 1] && k <= UNICODE_CODEPOINT_MAX; k++) {
|
||||||
for (int k = ranges[i]; k <= ranges[i + 1]; k++) {
|
setBit(k);
|
||||||
addChar((char) k);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds the final result (ordered ranges with all the unique characters submitted)
|
* Builds the final result (ordered ranges with all the unique characters submitted).
|
||||||
* Result of this function can be directly passed to ImFontAtlas
|
* Result is in WCHAR32 short[] layout: each range endpoint is two little-endian shorts,
|
||||||
|
* terminated by two zero shorts.
|
||||||
|
* Format: [ lo_lo16, lo_hi16, hi_lo16, hi_hi16, ..., 0, 0 ]
|
||||||
*/
|
*/
|
||||||
public short[] buildRanges() {
|
public short[] buildRanges() {
|
||||||
final List<Short> out = new ArrayList<>();
|
final List<Short> out = new ArrayList<>();
|
||||||
for (int n = 0; n <= UNICODE_CODEPOINT_MAX; n++) {
|
for (int n = 0; n <= UNICODE_CODEPOINT_MAX; n++) {
|
||||||
if (getBit(n)) {
|
if (getBit(n)) {
|
||||||
out.add((short) n);
|
final int lo = n;
|
||||||
while (n < UNICODE_CODEPOINT_MAX && getBit(n + 1)) {
|
while (n < UNICODE_CODEPOINT_MAX && getBit(n + 1)) {
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
out.add((short) n);
|
final int hi = n;
|
||||||
|
// emit lo as two LE shorts
|
||||||
|
out.add((short) (lo & 0xFFFF));
|
||||||
|
out.add((short) ((lo >> 16) & 0xFFFF));
|
||||||
|
// emit hi as two LE shorts
|
||||||
|
out.add((short) (hi & 0xFFFF));
|
||||||
|
out.add((short) ((hi >> 16) & 0xFFFF));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final short[] result = new short[out.size() + 1];
|
// terminator: two zero shorts (= one 32-bit zero ImWchar)
|
||||||
|
final short[] result = new short[out.size() + 2];
|
||||||
for (int i = 0; i < out.size(); i++) {
|
for (int i = 0; i < out.size(); i++) {
|
||||||
result[i] = out.get(i);
|
result[i] = out.get(i);
|
||||||
}
|
}
|
||||||
|
result[result.length - 2] = 0;
|
||||||
result[result.length - 1] = 0;
|
result[result.length - 1] = 0;
|
||||||
return result;
|
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
|
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);
|
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
|
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);
|
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);
|
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
|
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);
|
SET_STRING_FIELD(THIS->BackendPlatformName, value);
|
||||||
if (value != NULL) env->ReleaseStringUTFChars(obj_value, value);
|
if (value != NULL) Jni::FreeTrueUtf8(value);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public String getBackendRendererName() {
|
public String getBackendRendererName() {
|
||||||
@@ -1093,9 +1093,9 @@ public final class ImGuiIO extends ImGuiStruct {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
private native void nSetBackendRendererName(String value); /*MANUAL
|
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);
|
SET_STRING_FIELD(THIS->BackendRendererName, value);
|
||||||
if (value != NULL) env->ReleaseStringUTFChars(obj_value, value);
|
if (value != NULL) Jni::FreeTrueUtf8(value);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Optional: Access OS clipboard
|
// Optional: Access OS clipboard
|
||||||
@@ -1112,7 +1112,7 @@ public final class ImGuiIO extends ImGuiStruct {
|
|||||||
const char* getClipboardTextStub(void* user_data) {
|
const char* getClipboardTextStub(void* user_data) {
|
||||||
JNIEnv* env = Jni::GetEnv();
|
JNIEnv* env = Jni::GetEnv();
|
||||||
jstring jstr = Jni::CallImStrSupplier(env, _getClipboardTextCallback);
|
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
|
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);
|
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
|
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);
|
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
|
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);
|
THIS->InsertChars(pos, str);
|
||||||
if (str != NULL) env->ReleaseStringUTFChars(obj_str, str);
|
if (str != NULL) Jni::FreeTrueUtf8(str);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void selectAll() {
|
public void selectAll() {
|
||||||
|
|||||||
@@ -53,16 +53,16 @@ public final class ImGuiTextFilter extends ImGuiStructDestroyable {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
private native boolean nDraw(String obj_label); /*MANUAL
|
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);
|
auto _result = THIS->Draw(label);
|
||||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||||
return _result;
|
return _result;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private native boolean nDraw(String obj_label, float width); /*MANUAL
|
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);
|
auto _result = THIS->Draw(label, width);
|
||||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||||
return _result;
|
return _result;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -75,9 +75,9 @@ public final class ImGuiTextFilter extends ImGuiStructDestroyable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private native boolean nPassFilter(String obj_text); /*MANUAL
|
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);
|
auto _result = THIS->PassFilter(text, NULL);
|
||||||
if (text != NULL) env->ReleaseStringUTFChars(obj_text, text);
|
if (text != NULL) Jni::FreeTrueUtf8(text);
|
||||||
return _result;
|
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
|
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 pValue = obj_pValue == NULL ? NULL : (float*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||||
auto _result = ImGuiKnobs::Knob(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax);
|
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);
|
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||||
return _result;
|
return _result;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private static native boolean nKnob(String obj_label, float[] obj_pValue, float vMin, float vMax, float speed); /*MANUAL
|
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 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);
|
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);
|
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||||
return _result;
|
return _result;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private static native boolean nKnob(String obj_label, float[] obj_pValue, float vMin, float vMax, float speed, String obj_format); /*MANUAL
|
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 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);
|
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 (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;
|
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
|
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 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);
|
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 (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;
|
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
|
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 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);
|
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 (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;
|
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
|
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 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);
|
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 (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;
|
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
|
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 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);
|
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 (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;
|
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
|
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 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);
|
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 (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;
|
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
|
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 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);
|
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);
|
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||||
return _result;
|
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
|
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 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);
|
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);
|
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||||
return _result;
|
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
|
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 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);
|
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);
|
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||||
return _result;
|
return _result;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private static native boolean nKnob(String obj_label, float[] obj_pValue, float vMin, float vMax, float speed, int flags, int steps); /*MANUAL
|
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 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);
|
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);
|
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||||
return _result;
|
return _result;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private static native boolean nKnob(String obj_label, float[] obj_pValue, float vMin, float vMax, float speed, int steps); /*MANUAL
|
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 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);
|
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);
|
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||||
return _result;
|
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
|
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 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);
|
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 (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;
|
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
|
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 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);
|
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 (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;
|
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
|
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 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);
|
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 (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;
|
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
|
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 pValue = obj_pValue == NULL ? NULL : (int*)env->GetPrimitiveArrayCritical(obj_pValue, JNI_FALSE);
|
||||||
auto _result = ImGuiKnobs::KnobInt(label, (pValue != NULL ? &pValue[0] : NULL), vMin, vMax);
|
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);
|
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||||
return _result;
|
return _result;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private static native boolean nKnob(String obj_label, int[] obj_pValue, int vMin, int vMax, float speed); /*MANUAL
|
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 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);
|
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);
|
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||||
return _result;
|
return _result;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private static native boolean nKnob(String obj_label, int[] obj_pValue, int vMin, int vMax, float speed, String obj_format); /*MANUAL
|
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 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);
|
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 (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;
|
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
|
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 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);
|
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 (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;
|
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
|
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 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);
|
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 (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;
|
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
|
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 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);
|
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 (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;
|
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
|
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 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);
|
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 (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;
|
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
|
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 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);
|
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 (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;
|
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
|
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 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);
|
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);
|
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||||
return _result;
|
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
|
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 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);
|
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);
|
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||||
return _result;
|
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
|
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 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);
|
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);
|
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||||
return _result;
|
return _result;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private static native boolean nKnob(String obj_label, int[] obj_pValue, int vMin, int vMax, float speed, int flags, int steps); /*MANUAL
|
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 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);
|
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);
|
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||||
return _result;
|
return _result;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private static native boolean nKnob(String obj_label, int[] obj_pValue, int vMin, int vMax, float speed, int steps); /*MANUAL
|
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 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);
|
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);
|
if (pValue != NULL) env->ReleasePrimitiveArrayCritical(obj_pValue, pValue, JNI_FALSE);
|
||||||
return _result;
|
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
|
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 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);
|
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 (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;
|
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
|
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 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);
|
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 (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;
|
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
|
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 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);
|
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 (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;
|
return _result;
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
@@ -1123,9 +1123,9 @@ public final class ImNodes {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static native void nLoadCurrentEditorStateFromIniString(String data, int dataSize); /*MANUAL
|
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);
|
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) {
|
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
|
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);
|
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) {
|
public static void saveCurrentEditorStateToIniFile(final String fileName) {
|
||||||
@@ -1143,9 +1143,9 @@ public final class ImNodes {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static native void nSaveCurrentEditorStateToIniFile(String fileName); /*MANUAL
|
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);
|
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) {
|
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
|
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);
|
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) {
|
public static void loadCurrentEditorStateFromIniFile(final String fileName) {
|
||||||
@@ -1163,9 +1163,9 @@ public final class ImNodes {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static native void nLoadCurrentEditorStateFromIniFile(String fileName); /*MANUAL
|
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);
|
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) {
|
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
|
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);
|
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
|
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);
|
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
|
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);
|
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) {
|
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
|
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);
|
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
|
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);
|
ImVec2 size = ImVec2(sizeX, sizeY);
|
||||||
ax::NodeEditor::Begin(id, size);
|
ax::NodeEditor::Begin(id, size);
|
||||||
if (id != NULL) env->ReleaseStringUTFChars(obj_id, id);
|
if (id != NULL) Jni::FreeTrueUtf8(id);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public static void end() {
|
public static void end() {
|
||||||
|
|||||||
@@ -30,9 +30,9 @@ public final class NodeEditorConfig extends ImGuiStructDestroyable {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
private native void nSetSettingsFile(String value); /*MANUAL
|
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);
|
SET_STRING_FIELD(THIS->SettingsFile, value);
|
||||||
if (value != NULL) env->ReleaseStringUTFChars(obj_value, value);
|
if (value != NULL) Jni::FreeTrueUtf8(value);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public int getCanvasSizeMode() {
|
public int getCanvasSizeMode() {
|
||||||
|
|||||||
@@ -62,9 +62,9 @@ public final class ImGui extends imgui.ImGui {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static native long nFindWindowByName(String obj_name); /*MANUAL
|
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);
|
auto _result = (uintptr_t)ImGui::FindWindowByName(name);
|
||||||
if (name != NULL) env->ReleaseStringUTFChars(obj_name, name);
|
if (name != NULL) Jni::FreeTrueUtf8(name);
|
||||||
return _result;
|
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
|
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 strIdBegin = obj_strIdBegin == NULL ? NULL : Jni::ToTrueUtf8(env, obj_strIdBegin);
|
||||||
auto strIdEnd = obj_strIdEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_strIdEnd, JNI_FALSE);
|
auto strIdEnd = obj_strIdEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_strIdEnd);
|
||||||
auto _result = ImGui::GetIDWithSeed(strIdBegin, strIdEnd, seed);
|
auto _result = ImGui::GetIDWithSeed(strIdBegin, strIdEnd, seed);
|
||||||
if (strIdBegin != NULL) env->ReleaseStringUTFChars(obj_strIdBegin, strIdBegin);
|
if (strIdBegin != NULL) Jni::FreeTrueUtf8(strIdBegin);
|
||||||
if (strIdEnd != NULL) env->ReleaseStringUTFChars(obj_strIdEnd, strIdEnd);
|
if (strIdEnd != NULL) Jni::FreeTrueUtf8(strIdEnd);
|
||||||
return _result;
|
return _result;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -969,9 +969,9 @@ public final class ImGui extends imgui.ImGui {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static native void nDockBuilderDockWindow(String windowName, int nodeId); /*MANUAL
|
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);
|
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) {
|
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
|
private static native void nDockBuilderCopyWindowSettings(String srcName, String dstName); /*MANUAL
|
||||||
auto srcName = obj_srcName == NULL ? NULL : (char*)env->GetStringUTFChars(obj_srcName, JNI_FALSE);
|
auto srcName = obj_srcName == NULL ? NULL : Jni::ToTrueUtf8(env, obj_srcName);
|
||||||
auto dstName = obj_dstName == NULL ? NULL : (char*)env->GetStringUTFChars(obj_dstName, JNI_FALSE);
|
auto dstName = obj_dstName == NULL ? NULL : Jni::ToTrueUtf8(env, obj_dstName);
|
||||||
ImGui::DockBuilderCopyWindowSettings(srcName, dstName);
|
ImGui::DockBuilderCopyWindowSettings(srcName, dstName);
|
||||||
if (srcName != NULL) env->ReleaseStringUTFChars(obj_srcName, srcName);
|
if (srcName != NULL) Jni::FreeTrueUtf8(srcName);
|
||||||
if (dstName != NULL) env->ReleaseStringUTFChars(obj_dstName, dstName);
|
if (dstName != NULL) Jni::FreeTrueUtf8(dstName);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public static void dockBuilderFinish(final int nodeId) {
|
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
|
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);
|
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
|
private static native void nTextEx(String beginText, String endText); /*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);
|
||||||
auto endText = obj_endText == NULL ? NULL : (char*)env->GetStringUTFChars(obj_endText, JNI_FALSE);
|
auto endText = obj_endText == NULL ? NULL : Jni::ToTrueUtf8(env, obj_endText);
|
||||||
ImGui::TextEx(beginText, endText);
|
ImGui::TextEx(beginText, endText);
|
||||||
if (beginText != NULL) env->ReleaseStringUTFChars(obj_beginText, beginText);
|
if (beginText != NULL) Jni::FreeTrueUtf8(beginText);
|
||||||
if (endText != NULL) env->ReleaseStringUTFChars(obj_endText, endText);
|
if (endText != NULL) Jni::FreeTrueUtf8(endText);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private static native void nTextEx(String beginText, String endText, int flags); /*MANUAL
|
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 beginText = obj_beginText == NULL ? NULL : Jni::ToTrueUtf8(env, obj_beginText);
|
||||||
auto endText = obj_endText == NULL ? NULL : (char*)env->GetStringUTFChars(obj_endText, JNI_FALSE);
|
auto endText = obj_endText == NULL ? NULL : Jni::ToTrueUtf8(env, obj_endText);
|
||||||
ImGui::TextEx(beginText, endText, static_cast<ImGuiTextFlags>(flags));
|
ImGui::TextEx(beginText, endText, static_cast<ImGuiTextFlags>(flags));
|
||||||
if (beginText != NULL) env->ReleaseStringUTFChars(obj_beginText, beginText);
|
if (beginText != NULL) Jni::FreeTrueUtf8(beginText);
|
||||||
if (endText != NULL) env->ReleaseStringUTFChars(obj_endText, endText);
|
if (endText != NULL) Jni::FreeTrueUtf8(endText);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public static boolean buttonEx(final String label) {
|
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
|
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);
|
auto _result = ImGui::ButtonEx(label);
|
||||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||||
return _result;
|
return _result;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private static native boolean nButtonEx(String obj_label, float sizeX, float sizeY); /*MANUAL
|
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);
|
ImVec2 size = ImVec2(sizeX, sizeY);
|
||||||
auto _result = ImGui::ButtonEx(label, size);
|
auto _result = ImGui::ButtonEx(label, size);
|
||||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||||
return _result;
|
return _result;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private static native boolean nButtonEx(String obj_label, float sizeX, float sizeY, int flags); /*MANUAL
|
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);
|
ImVec2 size = ImVec2(sizeX, sizeY);
|
||||||
auto _result = ImGui::ButtonEx(label, size, static_cast<ImGuiButtonFlags>(flags));
|
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;
|
return _result;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private static native boolean nButtonEx(String obj_label, int flags); /*MANUAL
|
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));
|
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;
|
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
|
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);
|
ImVec2 size = ImVec2(sizeX, sizeY);
|
||||||
auto _result = ImGui::ArrowButtonEx(strId, static_cast<ImGuiDir>(dir), size);
|
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;
|
return _result;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private static native boolean nArrowButtonEx(String obj_strId, int dir, float sizeX, float sizeY, int flags); /*MANUAL
|
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);
|
ImVec2 size = ImVec2(sizeX, sizeY);
|
||||||
auto _result = ImGui::ArrowButtonEx(strId, static_cast<ImGuiDir>(dir), size, static_cast<ImGuiButtonFlags>(flags));
|
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;
|
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
|
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 label = obj_label == NULL ? NULL : Jni::ToTrueUtf8(env, obj_label);
|
||||||
auto labelEnd = obj_labelEnd == NULL ? NULL : (char*)env->GetStringUTFChars(obj_labelEnd, JNI_FALSE);
|
auto labelEnd = obj_labelEnd == NULL ? NULL : Jni::ToTrueUtf8(env, obj_labelEnd);
|
||||||
ImGui::SeparatorTextEx((ImGuiID)id, label, labelEnd, extraWidth);
|
ImGui::SeparatorTextEx((ImGuiID)id, label, labelEnd, extraWidth);
|
||||||
if (label != NULL) env->ReleaseStringUTFChars(obj_label, label);
|
if (label != NULL) Jni::FreeTrueUtf8(label);
|
||||||
if (labelEnd != NULL) env->ReleaseStringUTFChars(obj_labelEnd, labelEnd);
|
if (labelEnd != NULL) Jni::FreeTrueUtf8(labelEnd);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Widgets: Window Decorations
|
// Widgets: Window Decorations
|
||||||
|
|||||||
@@ -256,9 +256,11 @@ public final class ImFontAtlas extends ImGuiStructDestroyable {
|
|||||||
/*JNI
|
/*JNI
|
||||||
#define RETURN_GLYPH_2_SHORT(glyphs) \
|
#define RETURN_GLYPH_2_SHORT(glyphs) \
|
||||||
const ImWchar* ranges = glyphs; \
|
const ImWchar* ranges = glyphs; \
|
||||||
int size = 0; \
|
int pairCount = 0; \
|
||||||
for (; ranges[0]; ranges += 2) \
|
for (; ranges[0]; ranges += 2) \
|
||||||
size += 2; \
|
pairCount++; \
|
||||||
|
int shortsPerImWchar = (int)(sizeof(ImWchar) / sizeof(jshort)); \
|
||||||
|
int size = pairCount * 2 * shortsPerImWchar + shortsPerImWchar; \
|
||||||
jshortArray jShorts = env->NewShortArray(size); \
|
jshortArray jShorts = env->NewShortArray(size); \
|
||||||
env->SetShortArrayRegion(jShorts, 0, size, (jshort*)glyphs); \
|
env->SetShortArrayRegion(jShorts, 0, size, (jshort*)glyphs); \
|
||||||
return jShorts;
|
return jShorts;
|
||||||
|
|||||||
@@ -124,6 +124,33 @@ public final class ImFontConfig extends ImGuiStructDestroyable {
|
|||||||
nSetGlyphRanges(glyphRanges);
|
nSetGlyphRanges(glyphRanges);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convenience overload: encodes int[] codepoint pairs into WCHAR32 short[] layout and calls setGlyphRanges.
|
||||||
|
* Expects int[] pairs [ lo, hi, lo, hi, ..., 0 ] (zero-terminated).
|
||||||
|
* THE ARRAY DATA NEEDS TO PERSIST AS LONG AS THE FONT IS ALIVE.
|
||||||
|
*/
|
||||||
|
public void setGlyphRanges(final int[] codepoints) {
|
||||||
|
// count pairs
|
||||||
|
int pairCount = 0;
|
||||||
|
for (int i = 0; i + 1 < codepoints.length; i += 2) {
|
||||||
|
if (codepoints[i] == 0) break;
|
||||||
|
pairCount++;
|
||||||
|
}
|
||||||
|
// each pair = 4 shorts (2 per endpoint), plus 2 terminator shorts
|
||||||
|
final short[] encoded = new short[pairCount * 4 + 2];
|
||||||
|
int out = 0;
|
||||||
|
for (int i = 0; i < pairCount; i++) {
|
||||||
|
final int lo = codepoints[i * 2];
|
||||||
|
final int hi = codepoints[i * 2 + 1];
|
||||||
|
encoded[out++] = (short) (lo & 0xFFFF);
|
||||||
|
encoded[out++] = (short) ((lo >> 16) & 0xFFFF);
|
||||||
|
encoded[out++] = (short) (hi & 0xFFFF);
|
||||||
|
encoded[out++] = (short) ((hi >> 16) & 0xFFFF);
|
||||||
|
}
|
||||||
|
// terminator already zero from array initialisation
|
||||||
|
setGlyphRanges(encoded);
|
||||||
|
}
|
||||||
|
|
||||||
private native void nSetGlyphRanges(short[] glyphRanges); /*
|
private native void nSetGlyphRanges(short[] glyphRanges); /*
|
||||||
THIS->GlyphRanges = glyphRanges != NULL ? (ImWchar*)&glyphRanges[0] : NULL;
|
THIS->GlyphRanges = glyphRanges != NULL ? (ImWchar*)&glyphRanges[0] : NULL;
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -10,12 +10,14 @@ import java.util.List;
|
|||||||
* You can use the ImFontGlyphRangesBuilder helper to create glyph ranges based on text input. For example: for a game where your script is known,
|
* You can use the ImFontGlyphRangesBuilder helper to create glyph ranges based on text input. For example: for a game where your script is known,
|
||||||
* if you can feed your entire script to it and only build the characters the game needs.
|
* if you can feed your entire script to it and only build the characters the game needs.
|
||||||
* <p>
|
* <p>
|
||||||
* Direct reimplementation of native ImFontGlyphRangesBuilder in java
|
* Direct reimplementation of native ImFontGlyphRangesBuilder in java.
|
||||||
|
* Built with IMGUI_USE_WCHAR32=1: supports full Unicode range U+0000..U+10FFFF.
|
||||||
|
* buildRanges() emits each range endpoint as two little-endian shorts (32-bit ImWchar layout).
|
||||||
*/
|
*/
|
||||||
public final class ImFontGlyphRangesBuilder {
|
public final class ImFontGlyphRangesBuilder {
|
||||||
private static final int UNICODE_CODEPOINT_MAX = 0xFFFF;
|
private static final int UNICODE_CODEPOINT_MAX = 0x10FFFF;
|
||||||
|
|
||||||
// have to use type long because values are unsigned integers
|
// have to use type long because values are unsigned integers; sized the same way as native (divide by 8)
|
||||||
private final long[] usedChars = new long[(UNICODE_CODEPOINT_MAX + 1) / 8];
|
private final long[] usedChars = new long[(UNICODE_CODEPOINT_MAX + 1) / 8];
|
||||||
|
|
||||||
public ImFontGlyphRangesBuilder() {
|
public ImFontGlyphRangesBuilder() {
|
||||||
@@ -23,56 +25,98 @@ public final class ImFontGlyphRangesBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds single character to resulting ranges
|
* Adds single character to resulting ranges (char overload for source compatibility)
|
||||||
*/
|
*/
|
||||||
public void addChar(final char c) {
|
public void addChar(final char c) {
|
||||||
setBit(c);
|
setBit(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds all characters from the given string to resulting ranges
|
* Adds a Unicode codepoint (including SMP, U+10000..U+10FFFF) to resulting ranges
|
||||||
*/
|
*/
|
||||||
public void addText(final String text) {
|
public void addChar(final int codepoint) {
|
||||||
for (int i = 0; i < text.length(); i++) {
|
if (codepoint >= 0 && codepoint <= UNICODE_CODEPOINT_MAX) {
|
||||||
addChar(text.charAt(i));
|
setBit(codepoint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copies all given ranges to resulting ranges
|
* Adds all codepoints from the given string to resulting ranges.
|
||||||
|
* Handles supplementary characters (emoji, etc.) via codePointAt iteration.
|
||||||
|
*/
|
||||||
|
public void addText(final String text) {
|
||||||
|
int i = 0;
|
||||||
|
while (i < text.length()) {
|
||||||
|
final int cp = text.codePointAt(i);
|
||||||
|
addChar(cp);
|
||||||
|
i += Character.charCount(cp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copies all given ranges to resulting ranges.
|
||||||
|
* Expects the WCHAR32 short[] layout: each 32-bit codepoint encoded as two little-endian shorts,
|
||||||
|
* pairs of codepoints form a [lo, hi] range, terminated by two zero shorts.
|
||||||
|
* Format: [ lo_lo16, lo_hi16, hi_lo16, hi_hi16, ..., 0, 0 ]
|
||||||
*/
|
*/
|
||||||
public void addRanges(final short[] ranges) {
|
public void addRanges(final short[] ranges) {
|
||||||
for (int i = 0; i < ranges.length; i += 2) {
|
for (int i = 0; i + 3 < ranges.length; i += 4) {
|
||||||
|
final int lo = (ranges[i] & 0xFFFF) | ((ranges[i + 1] & 0xFFFF) << 16);
|
||||||
|
final int hi = (ranges[i + 2] & 0xFFFF) | ((ranges[i + 3] & 0xFFFF) << 16);
|
||||||
|
if (lo == 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
for (int k = lo; k <= hi && k <= UNICODE_CODEPOINT_MAX; k++) {
|
||||||
|
setBit(k);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copies all given ranges to resulting ranges.
|
||||||
|
* Expects int[] pairs: [ lo, hi, lo, hi, ..., 0 ] (zero-terminated).
|
||||||
|
*/
|
||||||
|
public void addRanges(final int[] ranges) {
|
||||||
|
for (int i = 0; i + 1 < ranges.length; i += 2) {
|
||||||
if (ranges[i] == 0) {
|
if (ranges[i] == 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
for (int k = ranges[i]; k <= ranges[i + 1] && k <= UNICODE_CODEPOINT_MAX; k++) {
|
||||||
for (int k = ranges[i]; k <= ranges[i + 1]; k++) {
|
setBit(k);
|
||||||
addChar((char) k);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds the final result (ordered ranges with all the unique characters submitted)
|
* Builds the final result (ordered ranges with all the unique characters submitted).
|
||||||
* Result of this function can be directly passed to ImFontAtlas
|
* Result is in WCHAR32 short[] layout: each range endpoint is two little-endian shorts,
|
||||||
|
* terminated by two zero shorts.
|
||||||
|
* Format: [ lo_lo16, lo_hi16, hi_lo16, hi_hi16, ..., 0, 0 ]
|
||||||
*/
|
*/
|
||||||
public short[] buildRanges() {
|
public short[] buildRanges() {
|
||||||
final List<Short> out = new ArrayList<>();
|
final List<Short> out = new ArrayList<>();
|
||||||
for (int n = 0; n <= UNICODE_CODEPOINT_MAX; n++) {
|
for (int n = 0; n <= UNICODE_CODEPOINT_MAX; n++) {
|
||||||
if (getBit(n)) {
|
if (getBit(n)) {
|
||||||
out.add((short) n);
|
final int lo = n;
|
||||||
while (n < UNICODE_CODEPOINT_MAX && getBit(n + 1)) {
|
while (n < UNICODE_CODEPOINT_MAX && getBit(n + 1)) {
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
out.add((short) n);
|
final int hi = n;
|
||||||
|
// emit lo as two LE shorts
|
||||||
|
out.add((short) (lo & 0xFFFF));
|
||||||
|
out.add((short) ((lo >> 16) & 0xFFFF));
|
||||||
|
// emit hi as two LE shorts
|
||||||
|
out.add((short) (hi & 0xFFFF));
|
||||||
|
out.add((short) ((hi >> 16) & 0xFFFF));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final short[] result = new short[out.size() + 1];
|
// terminator: two zero shorts (= one 32-bit zero ImWchar)
|
||||||
|
final short[] result = new short[out.size() + 2];
|
||||||
for (int i = 0; i < out.size(); i++) {
|
for (int i = 0; i < out.size(); i++) {
|
||||||
result[i] = out.get(i);
|
result[i] = out.get(i);
|
||||||
}
|
}
|
||||||
|
result[result.length - 2] = 0;
|
||||||
result[result.length - 1] = 0;
|
result[result.length - 1] = 0;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -322,7 +322,7 @@ public final class ImGuiIO extends ImGuiStruct {
|
|||||||
const char* getClipboardTextStub(void* user_data) {
|
const char* getClipboardTextStub(void* user_data) {
|
||||||
JNIEnv* env = Jni::GetEnv();
|
JNIEnv* env = Jni::GetEnv();
|
||||||
jstring jstr = Jni::CallImStrSupplier(env, _getClipboardTextCallback);
|
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++) {
|
for (int i = 0; i < keysLen; i++) {
|
||||||
int key = keys[i];
|
int key = keys[i];
|
||||||
jstring string = (jstring)env->GetObjectArrayElement(values, 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)));
|
markers.emplace(std::pair<int, std::string>(key, std::string(value)));
|
||||||
env->ReleaseStringUTFChars(string, value);
|
Jni::FreeTrueUtf8(value);
|
||||||
}
|
}
|
||||||
THIS->SetErrorMarkers(markers);
|
THIS->SetErrorMarkers(markers);
|
||||||
*/
|
*/
|
||||||
@@ -116,9 +116,9 @@ public final class TextEditor extends ImGuiStructDestroyable {
|
|||||||
vec.reserve(length);
|
vec.reserve(length);
|
||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
jstring string = (jstring)env->GetObjectArrayElement(lines, 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));
|
vec.emplace_back(std::string(raw));
|
||||||
env->ReleaseStringUTFChars(string, raw);
|
Jni::FreeTrueUtf8(raw);
|
||||||
}
|
}
|
||||||
THIS->SetTextLines(vec);
|
THIS->SetTextLines(vec);
|
||||||
*/
|
*/
|
||||||
|
|||||||
+12
-12
@@ -49,9 +49,9 @@ public final class TextEditorLanguageDefinition extends ImGuiStructDestroyable {
|
|||||||
std::unordered_set<std::string> set;
|
std::unordered_set<std::string> set;
|
||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
jstring string = (jstring)env->GetObjectArrayElement(keywords, 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));
|
set.emplace(std::string(raw));
|
||||||
env->ReleaseStringUTFChars(string, raw);
|
Jni::FreeTrueUtf8(raw);
|
||||||
}
|
}
|
||||||
THIS->mKeywords = set;
|
THIS->mKeywords = set;
|
||||||
*/
|
*/
|
||||||
@@ -67,13 +67,13 @@ public final class TextEditorLanguageDefinition extends ImGuiStructDestroyable {
|
|||||||
for (int i = 0; i < keysLen; i++) {
|
for (int i = 0; i < keysLen; i++) {
|
||||||
jstring string1 = (jstring)env->GetObjectArrayElement(keys, i);
|
jstring string1 = (jstring)env->GetObjectArrayElement(keys, i);
|
||||||
jstring string2 = (jstring)env->GetObjectArrayElement(decl, i);
|
jstring string2 = (jstring)env->GetObjectArrayElement(decl, i);
|
||||||
const char* key = env->GetStringUTFChars(string1, JNI_FALSE);
|
const char* key = Jni::ToTrueUtf8(env, string1);
|
||||||
const char* value = env->GetStringUTFChars(string2, JNI_FALSE);
|
const char* value = Jni::ToTrueUtf8(env, string2);
|
||||||
TextEditor::Identifier id;
|
TextEditor::Identifier id;
|
||||||
id.mDeclaration = std::string(value);
|
id.mDeclaration = std::string(value);
|
||||||
identifiers.insert(std::pair<std::string, TextEditor::Identifier>(std::string(key), id));
|
identifiers.insert(std::pair<std::string, TextEditor::Identifier>(std::string(key), id));
|
||||||
env->ReleaseStringUTFChars(string1, key);
|
Jni::FreeTrueUtf8(key);
|
||||||
env->ReleaseStringUTFChars(string2, value);
|
Jni::FreeTrueUtf8(value);
|
||||||
}
|
}
|
||||||
THIS->mIdentifiers = identifiers;
|
THIS->mIdentifiers = identifiers;
|
||||||
*/
|
*/
|
||||||
@@ -89,13 +89,13 @@ public final class TextEditorLanguageDefinition extends ImGuiStructDestroyable {
|
|||||||
for (int i = 0; i < keysLen; i++) {
|
for (int i = 0; i < keysLen; i++) {
|
||||||
jstring string1 = (jstring)env->GetObjectArrayElement(keys, i);
|
jstring string1 = (jstring)env->GetObjectArrayElement(keys, i);
|
||||||
jstring string2 = (jstring)env->GetObjectArrayElement(decl, i);
|
jstring string2 = (jstring)env->GetObjectArrayElement(decl, i);
|
||||||
const char* key = env->GetStringUTFChars(string1, JNI_FALSE);
|
const char* key = Jni::ToTrueUtf8(env, string1);
|
||||||
const char* value = env->GetStringUTFChars(string2, JNI_FALSE);
|
const char* value = Jni::ToTrueUtf8(env, string2);
|
||||||
TextEditor::Identifier id;
|
TextEditor::Identifier id;
|
||||||
id.mDeclaration = std::string(value);
|
id.mDeclaration = std::string(value);
|
||||||
preprocIdentifiers.insert(std::pair<std::string, TextEditor::Identifier>(std::string(key), id));
|
preprocIdentifiers.insert(std::pair<std::string, TextEditor::Identifier>(std::string(key), id));
|
||||||
env->ReleaseStringUTFChars(string1, key);
|
Jni::FreeTrueUtf8(key);
|
||||||
env->ReleaseStringUTFChars(string2, value);
|
Jni::FreeTrueUtf8(value);
|
||||||
}
|
}
|
||||||
THIS->mPreprocIdentifiers = preprocIdentifiers;
|
THIS->mPreprocIdentifiers = preprocIdentifiers;
|
||||||
*/
|
*/
|
||||||
@@ -131,7 +131,7 @@ public final class TextEditorLanguageDefinition extends ImGuiStructDestroyable {
|
|||||||
std::vector<std::pair<std::string, TextEditor::PaletteIndex>> tokenRegexStrings;
|
std::vector<std::pair<std::string, TextEditor::PaletteIndex>> tokenRegexStrings;
|
||||||
for (int i = 0; i < keysLen; i++) {
|
for (int i = 0; i < keysLen; i++) {
|
||||||
jstring string = (jstring)env->GetObjectArrayElement(keys, 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];
|
int value = paletteIndexes[i];
|
||||||
tokenRegexStrings.emplace_back(
|
tokenRegexStrings.emplace_back(
|
||||||
std::pair<std::string, TextEditor::PaletteIndex>(
|
std::pair<std::string, TextEditor::PaletteIndex>(
|
||||||
@@ -139,7 +139,7 @@ public final class TextEditorLanguageDefinition extends ImGuiStructDestroyable {
|
|||||||
static_cast<TextEditor::PaletteIndex>(value)
|
static_cast<TextEditor::PaletteIndex>(value)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
env->ReleaseStringUTFChars(string, key);
|
Jni::FreeTrueUtf8(key);
|
||||||
}
|
}
|
||||||
THIS->mTokenRegexStrings = tokenRegexStrings;
|
THIS->mTokenRegexStrings = tokenRegexStrings;
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
//#define IMGUI_USE_BGRA_PACKED_COLOR
|
//#define IMGUI_USE_BGRA_PACKED_COLOR
|
||||||
|
|
||||||
//---- Use 32-bit for ImWchar (default is 16-bit) to support unicode planes 1-16. (e.g. point beyond 0xFFFF like emoticons, dingbats, symbols, shapes, ancient languages, etc...)
|
//---- Use 32-bit for ImWchar (default is 16-bit) to support unicode planes 1-16. (e.g. point beyond 0xFFFF like emoticons, dingbats, symbols, shapes, ancient languages, etc...)
|
||||||
//#define IMGUI_USE_WCHAR32
|
#define IMGUI_USE_WCHAR32
|
||||||
|
|
||||||
//---- Avoid multiple STB libraries implementations, or redefine path/filenames to prioritize another version
|
//---- Avoid multiple STB libraries implementations, or redefine path/filenames to prioritize another version
|
||||||
// By default the embedded implementations are declared static and not available outside of Dear ImGui sources files.
|
// By default the embedded implementations are declared static and not available outside of Dear ImGui sources files.
|
||||||
|
|||||||
@@ -119,4 +119,49 @@ namespace Jni
|
|||||||
env->DeleteLocalRef(value);
|
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(const char* p) {
|
||||||
|
if (p != nullptr) free((void*)p);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -47,4 +47,12 @@ namespace Jni
|
|||||||
|
|
||||||
jobjectArray NewImGuiKeyDataArray(JNIEnv* env, const ImGuiKeyData* src, int size);
|
jobjectArray NewImGuiKeyDataArray(JNIEnv* env, const ImGuiKeyData* src, int size);
|
||||||
void ImGuiKeyDataArrayCpy(JNIEnv* env, jobjectArray src, ImGuiKeyData* dst, 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(const char* p);
|
||||||
}
|
}
|
||||||
+5
-7
@@ -12,19 +12,17 @@ ext.configurePublishing = { packageName, packageDesc, packageVersion ->
|
|||||||
publishing {
|
publishing {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
name = 'MavenCentral'
|
name = 'MrLokop'
|
||||||
def releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
|
url = 'https://mvn.mrlokop.dev/releases'
|
||||||
def snapshotsRepoUrl = 'https://oss.sonatype.org/content/repositories/snapshots'
|
|
||||||
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
|
|
||||||
credentials {
|
credentials {
|
||||||
username = System.getenv('NEXUS_UPD_ID')?.trim() ?: ''
|
username = 'AutoRobot'
|
||||||
password = System.getenv('NEXUS_UPD_PASS')?.trim() ?: ''
|
password = '8Mr3OAv4WcRNHZS3lAVDx32sWt71YS7GsBvN7TZhCGMmDeSz'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
publications {
|
publications {
|
||||||
imgui(MavenPublication) {
|
imgui(MavenPublication) {
|
||||||
groupId = 'io.github.spair'
|
groupId = 'org.nnstd.imgui'
|
||||||
artifactId = packageName
|
artifactId = packageName
|
||||||
version = packageVersion
|
version = packageVersion
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("org.gradle.toolchains.foojay-resolver-convention") version("0.10.0")
|
id("org.gradle.toolchains.foojay-resolver-convention") version("0.9.0")
|
||||||
}
|
}
|
||||||
|
|
||||||
rootProject.name = "imgui-java"
|
rootProject.name = "imgui-java"
|
||||||
|
|||||||
Reference in new issue
Block a user