diff options
author | Sven Gothel <[email protected]> | 2023-06-26 03:14:59 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-06-26 03:14:59 +0200 |
commit | 93c63bd880b6bc8a85a0057112b5065b312af1db (patch) | |
tree | 6633d4ecddecc5f361f0443eebae559055af84a0 /src/java/com/jogamp/gluegen/CMethodBindingEmitter.java | |
parent | 90b86c62270c494d2422dabc2879e59e063b535c (diff) |
GlueGen JavaCallback: Use new JavaType nature 'named-class', denoting the generated callback interface mapping the callback function.
This passes the jobject for the callback function/interface and the userParam (from 'void*')
down to the native implementation.
TODO: Add specific native implementation for JavaCallback,
wrapping the jobject's into a native struct as user-param
and a universal C-function as the native callback to dispatch
the call to the java method with known arguments.
Diffstat (limited to 'src/java/com/jogamp/gluegen/CMethodBindingEmitter.java')
-rw-r--r-- | src/java/com/jogamp/gluegen/CMethodBindingEmitter.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java b/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java index be69a38..334df1b 100644 --- a/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java +++ b/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java @@ -1212,6 +1212,10 @@ public class CMethodBindingEmitter extends FunctionEmitter { if (type.isPrimitiveArray()) { getJNIMangledArg(Integer.TYPE, buf, false); } + } else if (type.isNamedClass()) { + buf.append("L"); + buf.append(type.getName().replace('.', '_')); + buf.append("_2"); } else if (type.isCompoundTypeWrapper()) { // Mangle wrappers for C structs as ByteBuffer getJNIMangledArg(java.nio.ByteBuffer.class, buf, true); |