diff options
author | Sven Gothel <[email protected]> | 2023-07-04 11:36:29 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-07-04 11:36:29 +0200 |
commit | a599b852a041ba3d80b43981589ac1390979dac2 (patch) | |
tree | 038c5e3a6a03dae16ae83893ae2a91e76357daa7 /www | |
parent | 6d53b4b1dd07006e7af0e540b2c2e6ee6e1746d5 (diff) |
GlueGen JavaCallback: Revised: Static Java callback dispatcher, dropping native heap, support Struct UserParam ...
Implementation now generates a static Java callback dispatcher for each defined SetCallbackFunction, which gets invoked by the generated native static counterpart with all arguments required.
The static callback utilizes its own synchronization for thread-safety and fetches the required data set stored at SetCallbackFunction to dispatch the call to the users' CallbackFunction.
In case the callback has been removed already, the static callback simply bails out quietly.
The native code does not create, release or manage heap memory and therefore is considered safe.
+++
Further Struct Type UserParam are now supported including Heterogeneous UserParam mapping (read GlueGen_Mapping.*).
+++
Cleaned up code by extracting all JavaCallback emitter code into JavaCallbackEmitter class in one place,
leaving JavaMethodbindingEmitter and CMethodbindingEmitter mostly in their original stage (non-convoluted).
In this regard, I had to refactor a few function, i.e. moving CMethodbindingEmitter.getJNIMangledArg(..)
into JavaType.appendDescriptor(..) and JavaType.appendJNIDescriptor(..) while reusing the toJNIMethodDescriptor(..) conversion.
Test4JavaCallback covers and passes all cases.
Diffstat (limited to 'www')
-rw-r--r-- | www/index.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/www/index.html b/www/index.html index 812d3b3..b424ec5 100644 --- a/www/index.html +++ b/www/index.html @@ -73,7 +73,7 @@ potential calls to <a href="../doc/GlueGen_Mapping.html#struct-function-pointer-support">embedded function pointer</a>. </p> <p> - GlueGen supports <a href="../doc/GlueGen_Mapping.html#java-callback-from-native-c-api-support">registering Java™ callback methods</a> + GlueGen supports <a href="../doc/GlueGen_Mapping.html#java-callback">registering Java™ callback methods</a> to receive asynchronous and off-thread native toolkit events, where a generated native callback function dispatches the events to Java™. </p> |