Bug 1258 - Add Multiple JNI/Native to Java Callback Generation Techniques
Summary: Add Multiple JNI/Native to Java Callback Generation Techniques
Status: CONFIRMED
Alias: None
Product: Gluegen
Classification: JogAmp
Component: core (show other bugs)
Version: tbd
Hardware: All all
: P4 enhancement
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2015-10-23 14:47 CEST by Sven Gothel
Modified: 2019-03-30 01:38 CET (History)
0 users

See Also:
Type: FEATURE
SCM Refs:
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2015-10-23 14:47:32 CEST
As it is for now, we used manual injected code to implement 
a callback from native code back to Java.

Use Case A)
  - Register a java callback method (Class instance or static) [T1]
    to be issued by a native toolkit callback method [T2].
    
  - The native toolkit callback method [T2] has to be registered
    to a toolkit register function [T3]
    
  - User has to mark (configure) the toolkit register function [T3]
    as well as the native toolkit callback method [T2]
    to be used for java callback.

  - User further needs to define the identity of
    the native toolkit callback method [T2]. I.e. multiple such 
    instances may need to exist for different callbacks and their
    respective registries.
    Since only callback where a caller instance is being passed
    would allow using a callback dispatch table.

  Note: This use case is currently manually utilized by JOGL's 
  OpenGL debug callbacks, see GLDebugMessageHandler

Use Case B)
  - Register a java callback method (Class instance or static) [T1]
    to be issued by another JNI API method [T4] as a 
    pre- or post-call.

    This allows an implementation to properly track events
    and/or trigger certain resource functionality.

  Note: This use case is currently manually utilized by JOGL's
  GPU side memory [re-]allocation / mapping, 
  see GLBufferObjectTracker/GLBufferStorage.