summaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-06-26 11:18:52 +0200
committerSven Gothel <[email protected]>2023-06-26 11:18:52 +0200
commit58712fb3a386ca6327b71218bab6e4b218da36a8 (patch)
treec94ed91c8b838d353f8c217b84e66579c00af951 /src/java
parent4d884db4e08ce9911871d3bdcf378041cde584fd (diff)
GlueGen JavaCallback: Add JavaCallback.methodSignature to JNI arg-list and pass value at invocation, allowing to find the jmethodID of callback
Diffstat (limited to 'src/java')
-rw-r--r--src/java/com/jogamp/gluegen/JavaMethodBindingEmitter.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/java/com/jogamp/gluegen/JavaMethodBindingEmitter.java b/src/java/com/jogamp/gluegen/JavaMethodBindingEmitter.java
index e7903fe..74e18e5 100644
--- a/src/java/com/jogamp/gluegen/JavaMethodBindingEmitter.java
+++ b/src/java/com/jogamp/gluegen/JavaMethodBindingEmitter.java
@@ -410,6 +410,14 @@ public class JavaMethodBindingEmitter extends FunctionEmitter {
unit.emit(", int " + offsetArgName(i));
}
}
+ if( hasModifier(JavaMethodBindingEmitter.NATIVE) &&
+ null != cfg.bindingToJavaCallbackMap.get(binding.getName()) ) {
+ if (needComma) {
+ unit.emit(", ");
+ }
+ unit.emit("String callbackSignature");
+ ++numEmitted;
+ }
return numEmitted;
}
@@ -725,6 +733,14 @@ public class JavaMethodBindingEmitter extends FunctionEmitter {
needComma = true;
++numArgsEmitted;
}
+ final JavaConfiguration.JavaCallback jcb = cfg.bindingToJavaCallbackMap.get(binding.getName());
+ if( null != jcb ) {
+ if (needComma) {
+ unit.emit(", ");
+ }
+ unit.emit("\"" + jcb.methodSignature + "\"");
+ ++numArgsEmitted;
+ }
return numArgsEmitted;
}