From 944bef5e70e0e8fe85a147fa7304c35f18d1957b Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 27 May 2010 14:25:37 +0200 Subject: Fix NativeWindow JAWT Code Generation and Bounds Access - Restructure: JAWT gluegen, use common jawt-common.cfg - Fix: Use proper capacity for GetDrawingSurface and GetDrawingSurfaceInfo - Fix: JAWTWindow maintains AWT bounds - Fix: JAWTWindow locking/unlocking decoupled with abstract implementation, which allows clear code and simpler unlock code. --- make/config/nativewindow/jawt-common.cfg | 26 ++++++++++++++++++++++++++ make/config/nativewindow/jawt-macosx.cfg | 18 +----------------- make/config/nativewindow/jawt-win32.cfg | 17 +---------------- make/config/nativewindow/jawt-x11.cfg | 17 +---------------- 4 files changed, 29 insertions(+), 49 deletions(-) create mode 100644 make/config/nativewindow/jawt-common.cfg (limited to 'make/config') diff --git a/make/config/nativewindow/jawt-common.cfg b/make/config/nativewindow/jawt-common.cfg new file mode 100644 index 000000000..4ed0a88f1 --- /dev/null +++ b/make/config/nativewindow/jawt-common.cfg @@ -0,0 +1,26 @@ +# Common JAWT config file +Style AllStatic +Package com.jogamp.nativewindow.impl.jawt +JavaClass JAWTFactory +JavaOutputDir gensrc/classes +#NativeOutputDir gensrc/native/ + +HierarchicalNativeOutput false + +Opaque boolean jboolean +Opaque long struct jawt_DrawingSurface* + +ReturnValueCapacity GetDrawingSurface sizeof(JAWT_DrawingSurface) +ReturnValueCapacity GetDrawingSurfaceInfo sizeof(JAWT_DrawingSurfaceInfo) + +IgnoreField JAWT GetComponent +IgnoreField JAWT_DrawingSurfaceInfo platformInfo + +IncludeAs CustomJavaCode JAWT jawt-CustomJavaCode.java + +CustomCCode #include + +import java.security.* +import com.jogamp.nativewindow.impl.jawt.* + +IncludeAs CustomJavaCode JAWT_DrawingSurfaceInfo jawt-DrawingSurfaceInfo-CustomJavaCode.java diff --git a/make/config/nativewindow/jawt-macosx.cfg b/make/config/nativewindow/jawt-macosx.cfg index dea1a27b7..e018af0dc 100644 --- a/make/config/nativewindow/jawt-macosx.cfg +++ b/make/config/nativewindow/jawt-macosx.cfg @@ -1,30 +1,14 @@ # This .cfg file is used to generate the interface to the JAWT, which # is used by the MacOSXOnscreenGLContext. -Style AllStatic -Package com.jogamp.nativewindow.impl.jawt -JavaClass JAWTFactory -JavaOutputDir gensrc/classes +Include jawt-common.cfg NativeOutputDir gensrc/native/MacOSX -HierarchicalNativeOutput false - -Opaque boolean jboolean Opaque long void * Opaque long NSView * -IgnoreField JAWT GetComponent -IgnoreField JAWT_DrawingSurfaceInfo platformInfo - -IncludeAs CustomJavaCode JAWT jawt-CustomJavaCode.java - CustomCCode #include -CustomCCode #include CustomCCode #include -import java.security.* -import com.jogamp.nativewindow.impl.jawt.* StructPackage JAWT_MacOSXDrawingSurfaceInfo com.jogamp.nativewindow.impl.jawt.macosx EmitStruct JAWT_MacOSXDrawingSurfaceInfo Implements JAWT_MacOSXDrawingSurfaceInfo JAWT_PlatformInfo - -IncludeAs CustomJavaCode JAWT_DrawingSurfaceInfo jawt-DrawingSurfaceInfo-CustomJavaCode.java diff --git a/make/config/nativewindow/jawt-win32.cfg b/make/config/nativewindow/jawt-win32.cfg index af0c7ce29..00b3a3322 100644 --- a/make/config/nativewindow/jawt-win32.cfg +++ b/make/config/nativewindow/jawt-win32.cfg @@ -1,30 +1,15 @@ # This .cfg file is used to generate the interface to the JAWT, which # is used by the WindowsOnscreenGLContext. -Style AllStatic -Package com.jogamp.nativewindow.impl.jawt -JavaClass JAWTFactory -JavaOutputDir gensrc/classes +Include jawt-common.cfg NativeOutputDir gensrc/native/Windows -HierarchicalNativeOutput false - -Opaque boolean jboolean Opaque long HDC -IgnoreField JAWT GetComponent -IgnoreField JAWT_DrawingSurfaceInfo platformInfo IgnoreField JAWT_Win32DrawingSurfaceInfo null IgnoreField JAWT_Win32DrawingSurfaceInfo hpalette -IncludeAs CustomJavaCode JAWT jawt-CustomJavaCode.java - -CustomCCode #include Include ../intptr.cfg -import java.security.* -import com.jogamp.nativewindow.impl.jawt.* StructPackage JAWT_Win32DrawingSurfaceInfo com.jogamp.nativewindow.impl.jawt.windows EmitStruct JAWT_Win32DrawingSurfaceInfo Implements JAWT_Win32DrawingSurfaceInfo JAWT_PlatformInfo - -IncludeAs CustomJavaCode JAWT_DrawingSurfaceInfo jawt-DrawingSurfaceInfo-CustomJavaCode.java diff --git a/make/config/nativewindow/jawt-x11.cfg b/make/config/nativewindow/jawt-x11.cfg index ccfe009dd..4e7ed267b 100644 --- a/make/config/nativewindow/jawt-x11.cfg +++ b/make/config/nativewindow/jawt-x11.cfg @@ -1,30 +1,15 @@ # This .cfg file is used to generate the interface to the JAWT, which # is used by the X11OnscreenGLContext. -Style AllStatic -Package com.jogamp.nativewindow.impl.jawt -JavaClass JAWTFactory -JavaOutputDir gensrc/classes +Include jawt-common.cfg NativeOutputDir gensrc/native/X11 -HierarchicalNativeOutput false - -Opaque boolean jboolean Opaque long Drawable Opaque long Display * -IgnoreField JAWT GetComponent -IgnoreField JAWT_DrawingSurfaceInfo platformInfo IgnoreField JAWT_X11DrawingSurfaceInfo GetAWTColor -IncludeAs CustomJavaCode JAWT jawt-CustomJavaCode.java - CustomCCode #include -CustomCCode #include -import java.security.* -import com.jogamp.nativewindow.impl.jawt.* StructPackage JAWT_X11DrawingSurfaceInfo com.jogamp.nativewindow.impl.jawt.x11 EmitStruct JAWT_X11DrawingSurfaceInfo Implements JAWT_X11DrawingSurfaceInfo JAWT_PlatformInfo - -IncludeAs CustomJavaCode JAWT_DrawingSurfaceInfo jawt-DrawingSurfaceInfo-CustomJavaCode.java -- cgit v1.2.3