Package com.jogamp.common.os
Interface DynamicLibraryBundleInfo
-
public interface DynamicLibraryBundleInfo
-
-
Field Summary
Fields Modifier and Type Field Description static booleanDEBUG
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<String>getGlueLibNames()If aSecurityManageris installed, user needs link permissions for the named libraries.RunnableExecutorgetLibLoaderExecutor()Returns a suitableRunnableExecutorimplementation, which is being used to load thetoolandgluenative libraries.List<String>getSymbolForToolLibPath()Returns optional list of optional symbol names pergetToolLibNames()in same order for an OS which requires the symbol's address to retrieve the path of the containing library.List<String>getToolGetProcAddressFuncNameList()May return the native librariesList<List<String>>getToolLibNames()If aSecurityManageris installed, user needs link permissions for the named libraries.booleansearchToolLibInSystemPath()Returnstrueif tool libraries shall be searched in the system path (default), otherwisefalse.booleansearchToolLibSystemPathFirst()Returnstrueif system path shall be searched first (default), rather than searching it last.booleanshallLinkGlobal()booleanshallLookupGlobal()If method returnstrueand if aSecurityManageris installed, user needs link permissions for all libraries, i.e.longtoolGetProcAddress(long toolGetProcAddressHandle, String funcName)May implement the lookup function using the Tools facility.
The actual function pointer is provided to allow proper bootstrapping of the ProcAddressTable, using one of the provided function names bygetToolGetProcAddressFuncNameList().booleanuseToolGetProcAdressFirst(String funcName)
-
-
-
Method Detail
-
searchToolLibInSystemPath
boolean searchToolLibInSystemPath()
Returnstrueif tool libraries shall be searched in the system path (default), otherwisefalse.- Since:
- 2.4.0
-
searchToolLibSystemPathFirst
boolean searchToolLibSystemPathFirst()
Returnstrueif system path shall be searched first (default), rather than searching it last.If
searchToolLibInSystemPath()isfalsethe return value is ignored.- Since:
- 2.4.0
-
getToolLibNames
List<List<String>> getToolLibNames()
If aSecurityManageris installed, user needs link permissions for the named libraries.- Returns:
- a list of Tool library names or alternative library name lists.
- GL/GLU example Unix: [ [ "libGL.so.1", "libGL.so", "GL" ], [ "libGLU.so", "GLU" ] ]
- GL/GLU example Windows: [ "OpenGL32", "GLU32" ]
- Cg/CgGL example: [ [ "libCg.so", "Cg" ], [ "libCgGL.so", "CgGL" ] ]
-
getSymbolForToolLibPath
List<String> getSymbolForToolLibPath()
Returns optional list of optional symbol names pergetToolLibNames()in same order for an OS which requires the symbol's address to retrieve the path of the containing library.
-
getGlueLibNames
List<String> getGlueLibNames()
If aSecurityManageris installed, user needs link permissions for the named libraries.- Returns:
- a list of Glue library names.
- GL: [ "nativewindow_x11", "jogl_gl2es12", "jogl_desktop" ]
- NEWT: [ "nativewindow_x11", "newt" ]
- Cg: [ "nativewindow_x11", "jogl_cg" ]
Only the last entry is crucial, ie all other are optional preload dependencies and may generate errors, which are ignored.
-
getToolGetProcAddressFuncNameList
List<String> getToolGetProcAddressFuncNameList()
May return the native librariesGetProcAddressFunc
names, the first found function is being used.
This could be eg:glXGetProcAddressARB, glXGetProcAddressARB
.
If your Tool does not has this facility, just return null.- See Also:
toolGetProcAddress(long, String)
-
toolGetProcAddress
long toolGetProcAddress(long toolGetProcAddressHandle, String funcName)May implement the lookup function using the Tools facility.
The actual function pointer is provided to allow proper bootstrapping of the ProcAddressTable, using one of the provided function names bygetToolGetProcAddressFuncNameList().
-
useToolGetProcAdressFirst
boolean useToolGetProcAdressFirst(String funcName)
- Parameters:
funcName-- Returns:
- true if
toolGetProcAddress(long, String)shall be tried before the system loader for the given function lookup. Otherwise false. Default is true.
-
shallLinkGlobal
boolean shallLinkGlobal()
- Returns:
- true if the native library symbols shall be made available for symbol resolution of subsequently loaded libraries.
-
shallLookupGlobal
boolean shallLookupGlobal()
If method returnstrueand if aSecurityManageris installed, user needs link permissions for all libraries, i.e. fornew RuntimePermission("loadLibrary.*");!- Returns:
- true if the dynamic symbol lookup shall happen system wide, over all loaded libraries. Otherwise only the loaded native libraries are used for lookup, which shall be the default.
-
getLibLoaderExecutor
RunnableExecutor getLibLoaderExecutor()
Returns a suitableRunnableExecutorimplementation, which is being used to load thetoolandgluenative libraries.This allows the generic
DynamicLibraryBundleimplementation to load the native libraries on a designated thread.An implementation may return
DynamicLibraryBundle.getDefaultRunnableExecutor().
-
-