The AWT native interface allows a native C or C++ application a means by which to access native structures in AWT. This is to facilitate moving legacy C and C++ applications to Java and to target the needs of the community who, at present, wish to do their own native rendering to canvases for performance reasons. Standard extensions such as Java3D also require a means to access the underlying native data structures of AWT.
For each platform, there is a native drawing surface structure. This platform-specific structure can be found in jawt_md.h. See
JAWTX11DrawingSurfaceInfo for the Linux platform, JAWTWin32DrawingSurfaceInfo for the Windows platform and MACOSX_USE_CALAYER for the OS X
platform.
| Modifier and Type | Class and Description |
|---|---|
| public static class | JAWTFunctions.
Contains the function pointers loaded from the jawt |
| Modifier and Type | Field and Description |
|---|---|
| private static final SharedLibrary | |
| public static final int | JAWT_LOCK_BOUNDS_CHANGED
Bitmask values returned by |
| public static final int | JAWT_LOCK_CLIP_CHANGED
Bitmask values returned by |
| public static final int | JAWT_LOCK_ERROR
Bitmask values returned by |
| public static final int | JAWT_LOCK_SURFACE_CHANGED
Bitmask values returned by |
| public static final int | JAWT_MACOSX_USE_CALAYER
When calling |
| public static final int | JAWT_VERSION_1_3
JAWT versions. |
| public static final int | JAWT_VERSION_1_4
JAWT versions. |
| public static final int | JAWT_VERSION_1_7
JAWT versions. |
| public static final int | JAWT_VERSION_9
JAWT versions. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public static SharedLibrary | |
| public static java. | JAWT_CreateEmbeddedFrame(long
the native platform handle platformInfo, long the function address __functionAddress)Creates a |
| public static void | JAWT_DrawingSurface_FreeDrawingSurfaceInfo(JAWTDrawingSurfaceInfo
the dsi, long JAWTDrawingSurfaceInfo to freethe function address __functionAddress)Frees the drawing surface info. |
| public static JAWTDrawingSurfaceInfo | Returns: NULL if an error has occurred.the ds, long JAWTDrawingSurface to freethe function address __functionAddress)Returns the drawing surface info. |
| public static int | Returns: a bitmask with one or more of the following values:
the surface to lock ds, long the function address __functionAddress)Locks the surface of the target component for native rendering. |
| public static void | JAWT_DrawingSurface_Unlock(JAWTDrawingSurface
the surface to unlock ds, long the function address __functionAddress)Unlocks the drawing surface of the target component for native rendering. |
| public static void | JAWT_FreeDrawingSurface(JAWTDrawingSurface
the ds, long JAWTDrawingSurface to freethe function address __functionAddress)Frees the drawing surface allocated in |
| public static boolean | Returns: JNI_FALSE if an error occursthe target awt)JAWT structReturns the AWT native structure. |
| public static java. | JAWT_GetComponent(long
the native platform handle platformInfo, long the function address __functionAddress)Returns a reference to a |
| public static JAWTDrawingSurface | Returns: NULL if an error has occurredthe function address __functionAddress)Returns a drawing surface from a target |
| public static void | JAWT_Lock(long
the function address __functionAddress)Locks the entire AWT for synchronization purposes. |
| public static void | JAWT_SetBounds(java.
the embedded frame embeddedFrame,the x coordinate x, int the y coordinate y, int the width w, int the height h, long the function address __functionAddress)Moves and resizes the embedded frame. |
| public static void | JAWT_SynthesizeWindowActivation(java.
the embedded frame embeddedFrame,if true activates the window; otherwise, deactivates the window doActivate, long the function address __functionAddress)Synthesizes a native message to activate or deactivate an |
| public static void | JAWT_Unlock(long
the function address __functionAddress)Unlocks the entire AWT for synchronization purposes. |
| public static native java. | nJAWT_CreateEmbeddedFrame(long platformInfo, long __functionAddress)
Unsafe version of: |
| public static void | nJAWT_DrawingSurface_FreeDrawingSurfaceInfo(long dsi, long __functionAddress)
Unsafe version of: |
| public static long | nJAWT_DrawingSurface_GetDrawingSurfaceInfo(long ds, long __functionAddress)
Unsafe version of: |
| public static int | |
| public static void | nJAWT_DrawingSurface_Unlock(long ds, long __functionAddress)
Unsafe version of: |
| public static void | |
| public static native boolean | |
| public static boolean | |
| public static native java. | |
| public static native long | |
| public static native void | |
| public static native void | nJAWT_SetBounds(java.
Unsafe version of: |
| public static native void | nJAWT_SynthesizeWindowActivation(java.
Unsafe version of: |
| public static native void |
| JAWT | back to summary |
|---|---|
| private static final SharedLibrary JAWT | |
| JAWT_LOCK_BOUNDS_CHANGED | back to summary |
|---|---|
| public static final int JAWT_LOCK_BOUNDS_CHANGED Bitmask values returned by | |
| JAWT_LOCK_CLIP_CHANGED | back to summary |
|---|---|
| public static final int JAWT_LOCK_CLIP_CHANGED Bitmask values returned by | |
| JAWT_LOCK_ERROR | back to summary |
|---|---|
| public static final int JAWT_LOCK_ERROR Bitmask values returned by | |
| JAWT_LOCK_SURFACE_CHANGED | back to summary |
|---|---|
| public static final int JAWT_LOCK_SURFACE_CHANGED Bitmask values returned by | |
| JAWT_MACOSX_USE_CALAYER | back to summary |
|---|---|
| public static final int JAWT_MACOSX_USE_CALAYER When calling When the native Cocoa toolkit is in use, the pointer stored in
| |
| JAWT_VERSION_1_3 | back to summary |
|---|---|
| public static final int JAWT_VERSION_1_3 JAWT versions. | |
| JAWT_VERSION_1_4 | back to summary |
|---|---|
| public static final int JAWT_VERSION_1_4 JAWT versions. | |
| JAWT_VERSION_1_7 | back to summary |
|---|---|
| public static final int JAWT_VERSION_1_7 JAWT versions. | |
| JAWT_VERSION_9 | back to summary |
|---|---|
| public static final int JAWT_VERSION_9 JAWT versions. | |
| JAWTFunctions | back to summary |
|---|---|
| protected JAWTFunctions() | |
| getLibrary | back to summary |
|---|---|
| public static SharedLibrary getLibrary() Returns the jawt | |
| JAWT_CreateEmbeddedFrame | back to summary |
|---|---|
| public static java. Creates a
| |
| JAWT_DrawingSurface_FreeDrawingSurfaceInfo | back to summary |
|---|---|
| public static void JAWT_DrawingSurface_FreeDrawingSurfaceInfo(JAWTDrawingSurfaceInfo dsi, long __functionAddress) Frees the drawing surface info.
| |
| JAWT_DrawingSurface_GetDrawingSurfaceInfo | back to summary |
|---|---|
| public static JAWTDrawingSurfaceInfo JAWT_DrawingSurface_GetDrawingSurfaceInfo(JAWTDrawingSurface ds, long __functionAddress) Returns the drawing surface info. The value returned may be cached, but the values may change if additional calls to When finished with the returned value,
| |
| JAWT_DrawingSurface_Lock | back to summary |
|---|---|
| public static int JAWT_DrawingSurface_Lock(JAWTDrawingSurface ds, long __functionAddress) Locks the surface of the target component for native rendering. When finished drawing, the surface must be unlocked with
| |
| JAWT_DrawingSurface_Unlock | back to summary |
|---|---|
| public static void JAWT_DrawingSurface_Unlock(JAWTDrawingSurface ds, long __functionAddress) Unlocks the drawing surface of the target component for native rendering.
| |
| JAWT_FreeDrawingSurface | back to summary |
|---|---|
| public static void JAWT_FreeDrawingSurface(JAWTDrawingSurface ds, long __functionAddress) Frees the drawing surface allocated in
| |
| JAWT_GetAWT | back to summary |
|---|---|
| public static boolean JAWT_GetAWT(JAWT awt) Returns the AWT native structure.
| |
| JAWT_GetComponent | back to summary |
|---|---|
| public static java. Returns a reference to a
| |
| JAWT_GetDrawingSurface | back to summary |
|---|---|
| public static JAWTDrawingSurface JAWT_GetDrawingSurface(Object target, long __functionAddress) Returns a drawing surface from a target
| |
| JAWT_Lock | back to summary |
|---|---|
| public static void JAWT_Lock(long __functionAddress) Locks the entire AWT for synchronization purposes.
| |
| JAWT_SetBounds | back to summary |
|---|---|
| public static void JAWT_SetBounds(java. Moves and resizes the embedded frame. The new location of the top-left corner is specified by x and y parameters relative to the native parent component. The new size is specified by width and height. The embedded frame should be created by
Using usual
| |
| JAWT_SynthesizeWindowActivation | back to summary |
|---|---|
| public static void JAWT_SynthesizeWindowActivation(java. Synthesizes a native message to activate or deactivate an The embedded frame should be created by
| |
| JAWT_Unlock | back to summary |
|---|---|
| public static void JAWT_Unlock(long __functionAddress) Unlocks the entire AWT for synchronization purposes.
| |
| nJAWT_CreateEmbeddedFrame | back to summary |
|---|---|
| public static native java. Unsafe version of:
| |
| nJAWT_DrawingSurface_FreeDrawingSurfaceInfo | back to summary |
|---|---|
| public static void nJAWT_DrawingSurface_FreeDrawingSurfaceInfo(long dsi, long __functionAddress) Unsafe version of: | |
| nJAWT_DrawingSurface_GetDrawingSurfaceInfo | back to summary |
|---|---|
| public static long nJAWT_DrawingSurface_GetDrawingSurfaceInfo(long ds, long __functionAddress) Unsafe version of: | |
| nJAWT_DrawingSurface_Lock | back to summary |
|---|---|
| public static int nJAWT_DrawingSurface_Lock(long ds, long __functionAddress) Unsafe version of: | |
| nJAWT_DrawingSurface_Unlock | back to summary |
|---|---|
| public static void nJAWT_DrawingSurface_Unlock(long ds, long __functionAddress) Unsafe version of: | |
| nJAWT_FreeDrawingSurface | back to summary |
|---|---|
| public static void nJAWT_FreeDrawingSurface(long ds, long __functionAddress) Unsafe version of: | |
| nJAWT_GetAWT | back to summary |
|---|---|
| public static native boolean nJAWT_GetAWT(long awt, long __functionAddress) Unsafe version of: | |
| nJAWT_GetAWT | back to summary |
|---|---|
| public static boolean nJAWT_GetAWT(long awt) Unsafe version of: | |
| nJAWT_GetComponent | back to summary |
|---|---|
| public static native java. Unsafe version of:
| |
| nJAWT_GetDrawingSurface | back to summary |
|---|---|
| public static native long nJAWT_GetDrawingSurface(Object target, long __functionAddress) Unsafe version of: | |
| nJAWT_Lock | back to summary |
|---|---|
| public static native void nJAWT_Lock(long __functionAddress) Unsafe version of: | |
| nJAWT_SetBounds | back to summary |
|---|---|
| public static native void nJAWT_SetBounds(java. Unsafe version of: | |
| nJAWT_SynthesizeWindowActivation | back to summary |
|---|---|
| public static native void nJAWT_SynthesizeWindowActivation(java. Unsafe version of: | |
| nJAWT_Unlock | back to summary |
|---|---|
| public static native void nJAWT_Unlock(long __functionAddress) Unsafe version of: | |
SharedLibrary.
| Modifier and Type | Field and Description |
|---|---|
| public static final long | GetAWT
Function address. |
| Access | Constructor and Description |
|---|---|
| private |
| GetAWT | back to summary |
|---|---|
| public static final long GetAWT Function address. | |
| Functions | back to summary |
|---|---|
| private Functions() | |