From: <sp...@us...> - 2009-08-05 07:09:44
|
Revision: 3230 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3230&view=rev Author: spasi Date: 2009-08-05 07:09:36 +0000 (Wed, 05 Aug 2009) Log Message: ----------- Added missing annotations. Added Paths: ----------- trunk/LWJGL/src/java/org/lwjgl/util/generator/GLint64.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLsync.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLuint64.java Added: trunk/LWJGL/src/java/org/lwjgl/util/generator/GLint64.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/GLint64.java (rev 0) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/GLint64.java 2009-08-05 07:09:36 UTC (rev 3230) @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLint64 { +} \ No newline at end of file Added: trunk/LWJGL/src/java/org/lwjgl/util/generator/GLsync.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/GLsync.java (rev 0) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/GLsync.java 2009-08-05 07:09:36 UTC (rev 3230) @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * @author elias_naur <eli...@us...> + * @version $Revision: 2983 $ + * $Id: GLhandleARB.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLsync { +} \ No newline at end of file Added: trunk/LWJGL/src/java/org/lwjgl/util/generator/GLuint64.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/GLuint64.java (rev 0) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/GLuint64.java 2009-08-05 07:09:36 UTC (rev 3230) @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLuint64 { +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sp...@us...> - 2010-10-12 21:13:09
|
Revision: 3443 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3443&view=rev Author: spasi Date: 2010-10-12 21:13:03 +0000 (Tue, 12 Oct 2010) Log Message: ----------- Fixed Strings, seriously now. Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/util/generator/SignatureTranslator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/SignatureTranslator.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/SignatureTranslator.java 2010-10-12 20:49:29 UTC (rev 3442) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/SignatureTranslator.java 2010-10-12 21:13:03 UTC (rev 3443) @@ -94,7 +94,7 @@ signature.append("L"); signature.append(getNativeNameFromClassName(type_name)); signature.append(";"); - if ( add_position_signature && Utils.isAddressableType(type) ) + if ( add_position_signature && Utils.isAddressableType(type) && !String.class.equals(type) ) signature.append("I"); } Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java 2010-10-12 20:49:29 UTC (rev 3442) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java 2010-10-12 21:13:03 UTC (rev 3443) @@ -137,7 +137,7 @@ } private static boolean isAddressableTypeImpl(Class type) { - return Buffer.class.isAssignableFrom(type) || PointerBuffer.class.isAssignableFrom(type) || (CharSequence.class.isAssignableFrom(type) && !String.class.equals(type)); + return Buffer.class.isAssignableFrom(type) || PointerBuffer.class.isAssignableFrom(type) || CharSequence.class.isAssignableFrom(type); } public static Class getJavaType(TypeMirror type_mirror) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sp...@us...> - 2011-10-13 16:54:04
|
Revision: 3670 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3670&view=rev Author: spasi Date: 2011-10-13 16:53:53 +0000 (Thu, 13 Oct 2011) Log Message: ----------- Fixed signatures: CharSequence[] parameters and ByteBuffer returns. Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/util/generator/JNITypeTranslator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/RegisterStubsGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/SignatureTranslator.java Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/JNITypeTranslator.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/JNITypeTranslator.java 2011-10-12 22:31:12 UTC (rev 3669) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/JNITypeTranslator.java 2011-10-13 16:53:53 UTC (rev 3670) @@ -69,7 +69,7 @@ public void visitArrayType(ArrayType t) { final String className = t.getComponentType().toString(); if ( "java.lang.CharSequence".equals(className) ) - signature.append("jobject"); + signature.append("jlong"); else if ( "java.nio.ByteBuffer".equals(className) ) signature.append("jobjectArray"); else if ( "org.lwjgl.opencl.CLMem".equals(className) ) Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/RegisterStubsGenerator.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/RegisterStubsGenerator.java 2011-10-12 22:31:12 UTC (rev 3669) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/RegisterStubsGenerator.java 2011-10-13 16:53:53 UTC (rev 3670) @@ -101,10 +101,11 @@ final CachedResult cached_result_annotation = method.getAnnotation(CachedResult.class); final AutoSize auto_size_annotation = method.getAnnotation(AutoSize.class); - if ( Utils.getNIOBufferType(result_type) != null && (auto_size_annotation == null || !auto_size_annotation.isNative()) ) + final boolean isNIOBuffer = Utils.getNIOBufferType(result_type) != null; + if ( isNIOBuffer && (auto_size_annotation == null || !auto_size_annotation.isNative()) ) signature += "J"; - String result_type_signature = getTypeSignature(result_type, false); + final String result_type_signature = isNIOBuffer ? "Ljava/nio/ByteBuffer;" : getTypeSignature(result_type, false); if ( cached_result_annotation != null ) signature += result_type_signature; Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/SignatureTranslator.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/SignatureTranslator.java 2011-10-12 22:31:12 UTC (rev 3669) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/SignatureTranslator.java 2011-10-13 16:53:53 UTC (rev 3670) @@ -71,7 +71,7 @@ public void visitArrayType(ArrayType t) { final Class type = Utils.getJavaType(t.getComponentType()); if ( CharSequence.class.isAssignableFrom(type) ) - signature.append("Ljava/nio/ByteBuffer;I"); + signature.append("J"); else if ( Buffer.class.isAssignableFrom(type) ) signature.append("[Ljava/nio/ByteBuffer;"); else if ( org.lwjgl.PointerWrapper.class.isAssignableFrom(type) ) @@ -82,18 +82,16 @@ public void visitClassType(ClassType t) { Class type = NativeTypeTranslator.getClassFromType(t); - String type_name; - if ( (CharSequence.class.isAssignableFrom(type) && !String.class.equals(type)) || CharSequence[].class.isAssignableFrom(type) || PointerBuffer.class.isAssignableFrom(type) ) - type_name = ByteBuffer.class.getName(); - else if ( org.lwjgl.PointerWrapper.class.isAssignableFrom(type) ) { - signature.append("J"); - return; - } else - type_name = t.getDeclaration().getQualifiedName(); - if ( Utils.isAddressableType(type) && !String.class.equals(type) ) + if ( org.lwjgl.PointerWrapper.class.isAssignableFrom(type) || (Utils.isAddressableType(type) && !String.class.equals(type)) ) signature.append("J"); else { + String type_name; + if ( (CharSequence.class.isAssignableFrom(type) && !String.class.equals(type)) || CharSequence[].class.isAssignableFrom(type) || PointerBuffer.class.isAssignableFrom(type) ) + type_name = ByteBuffer.class.getName(); + else + type_name = t.getDeclaration().getQualifiedName(); + signature.append("L"); signature.append(getNativeNameFromClassName(type_name)); signature.append(";"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |