aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/gluegen/CCodeUnit.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/jogamp/gluegen/CCodeUnit.java')
-rw-r--r--src/java/com/jogamp/gluegen/CCodeUnit.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/java/com/jogamp/gluegen/CCodeUnit.java b/src/java/com/jogamp/gluegen/CCodeUnit.java
index 5c0db27..c70df79 100644
--- a/src/java/com/jogamp/gluegen/CCodeUnit.java
+++ b/src/java/com/jogamp/gluegen/CCodeUnit.java
@@ -84,6 +84,11 @@ public class CCodeUnit extends CodeUnit {
emitln( getJNIOnLoadJNIEnvCode(libraryBasename) );
}
+ /** Emits {@link #JavaCallbackGlueDataDecl}. */
+ public void emitJavaCallbackGlueDataDecl() {
+ emitln( JavaCallbackGlueDataDecl );
+ }
+
@Override
public String toString() { return "CCodeUnit[unit "+cUnitName+", file "+filename+"]"; }
@@ -108,6 +113,16 @@ public class CCodeUnit extends CodeUnit {
" return jbyteBuffer;\n"+
"}\n";
+ /** JavaCallback Glue Data typedef struct */
+ public static final String JavaCallbackGlueDataDecl =
+ "typedef struct {\n"+
+ " jobject lockObj;\n"+
+ " jobject cbFunc;\n"+
+ " jmethodID cbMethodID;\n"+
+ " jobject userParam;\n"+
+ "} T_JavaCallbackGlueData;\n"+
+ "\n";
+
/**
* Returns native JNI declarations for `JavaVM* {libraryBasename}_jvmHandle`
* and `JVMUtil_GetJNIEnv(..)`.