aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-03-31 21:12:09 +0200
committerMichael Bien <[email protected]>2010-03-31 21:12:09 +0200
commit22262166e07de99ae0d4557e4f87e3bd1c5cd6dd (patch)
tree1fd14a422efe1aac215e65faaa89b7e4d7bd1ff1
parentc5068e42758aeecbd0a3fbf4c2e2b755661e950e (diff)
introduced com.jogamp.common.{nio,os} packages and moved some classes.
-rwxr-xr-xmake/dynlink-macosx.cfg2
-rwxr-xr-xmake/dynlink-unix.cfg2
-rwxr-xr-xmake/dynlink-windows.cfg2
-rwxr-xr-xsrc/java/com/jogamp/common/nio/Buffers.java (renamed from src/java/com/jogamp/gluegen/runtime/Buffers.java)3
-rw-r--r--src/java/com/jogamp/common/nio/Int64Buffer.java (renamed from src/java/com/jogamp/gluegen/runtime/Int64Buffer.java)3
-rwxr-xr-xsrc/java/com/jogamp/common/nio/Int64BufferME_CDC_FP.java (renamed from src/java/com/jogamp/gluegen/runtime/Int64BufferME_CDC_FP.java)3
-rwxr-xr-xsrc/java/com/jogamp/common/nio/Int64BufferSE.java (renamed from src/java/com/jogamp/gluegen/runtime/Int64BufferSE.java)2
-rw-r--r--src/java/com/jogamp/common/nio/NativeBuffer.java (renamed from src/java/com/jogamp/gluegen/runtime/NativeBuffer.java)3
-rw-r--r--src/java/com/jogamp/common/nio/PointerBuffer.java (renamed from src/java/com/jogamp/gluegen/runtime/PointerBuffer.java)4
-rwxr-xr-xsrc/java/com/jogamp/common/nio/PointerBufferME_CDC_FP.java (renamed from src/java/com/jogamp/gluegen/runtime/PointerBufferME_CDC_FP.java)3
-rwxr-xr-xsrc/java/com/jogamp/common/nio/PointerBufferSE.java (renamed from src/java/com/jogamp/gluegen/runtime/PointerBufferSE.java)3
-rw-r--r--src/java/com/jogamp/common/nio/StructAccessor.java (renamed from src/java/com/jogamp/gluegen/runtime/StructAccessor.java)3
-rwxr-xr-xsrc/java/com/jogamp/common/os/DynamicLinker.java (renamed from src/java/com/jogamp/gluegen/runtime/DynamicLinker.java)2
-rwxr-xr-xsrc/java/com/jogamp/common/os/DynamicLookupHelper.java (renamed from src/java/com/jogamp/gluegen/runtime/DynamicLookupHelper.java)2
-rwxr-xr-xsrc/java/com/jogamp/common/os/MacOSXDynamicLinkerImpl.java (renamed from src/java/com/jogamp/gluegen/runtime/MacOSXDynamicLinkerImpl.java)6
-rwxr-xr-xsrc/java/com/jogamp/common/os/NativeLibrary.java (renamed from src/java/com/jogamp/gluegen/runtime/NativeLibrary.java)5
-rw-r--r--src/java/com/jogamp/common/os/Platform.java (renamed from src/java/com/jogamp/gluegen/runtime/Platform.java)3
-rwxr-xr-xsrc/java/com/jogamp/common/os/UnixDynamicLinkerImpl.java (renamed from src/java/com/jogamp/gluegen/runtime/UnixDynamicLinkerImpl.java)6
-rwxr-xr-xsrc/java/com/jogamp/common/os/WindowsDynamicLinkerImpl.java (renamed from src/java/com/jogamp/gluegen/runtime/WindowsDynamicLinkerImpl.java)6
-rw-r--r--src/java/com/jogamp/gluegen/runtime/ProcAddressHelper.java1
-rw-r--r--src/java/com/jogamp/gluegen/runtime/opengl/GLProcAddressHelper.java1
-rw-r--r--src/java/com/sun/gluegen/JavaEmitter.java4
-rw-r--r--src/java/com/sun/gluegen/JavaType.java12
-rw-r--r--src/java/com/sun/gluegen/test/TestPointerBufferEndian.java4
-rw-r--r--src/java/com/sun/gluegen/test/TestStructAccessorEndian.java4
-rw-r--r--src/junit/com/jogamp/gluegen/test/junit/BaseTest1.java8
-rw-r--r--src/junit/com/jogamp/gluegen/test/junit/Test1p1JavaEmitter.java4
-rw-r--r--src/junit/com/jogamp/gluegen/test/junit/Test1p2ProcAddressEmitter.java8
-rw-r--r--src/junit/com/jogamp/gluegen/test/junit/test1-common.cfg3
-rw-r--r--src/junit/com/jogamp/gluegen/test/junit/test1p2-gluegen.cfg1
-rw-r--r--src/native/common/Platform.c2
-rw-r--r--src/native/common/PointerBuffer.c2
-rwxr-xr-xsrc/native/macosx/MacOSXDynamicLinkerImpl_JNI.c16
-rwxr-xr-xsrc/native/unix/UnixDynamicLinkerImpl_JNI.c16
-rwxr-xr-xsrc/native/windows/WindowsDynamicLinkerImpl_JNI.c16
-rw-r--r--test/junit/com/sun/gluegen/BasicTest.java4
-rw-r--r--test/junit/com/sun/gluegen/test.cfg2
37 files changed, 93 insertions, 78 deletions
diff --git a/make/dynlink-macosx.cfg b/make/dynlink-macosx.cfg
index cdeb556..6079eb8 100755
--- a/make/dynlink-macosx.cfg
+++ b/make/dynlink-macosx.cfg
@@ -1,6 +1,6 @@
Style AllStatic
JavaClass MacOSXDynamicLinkerImpl
-Package com.jogamp.gluegen.runtime
+Package com.jogamp.common.os
Implements MacOSXDynamicLinkerImpl DynamicLinker
JavaOutputDir ../src/java
NativeOutputDir ../src/native/macosx
diff --git a/make/dynlink-unix.cfg b/make/dynlink-unix.cfg
index c93e701..a8be5b7 100755
--- a/make/dynlink-unix.cfg
+++ b/make/dynlink-unix.cfg
@@ -1,6 +1,6 @@
Style AllStatic
JavaClass UnixDynamicLinkerImpl
-Package com.jogamp.gluegen.runtime
+Package com.jogamp.common.os
Implements UnixDynamicLinkerImpl DynamicLinker
JavaOutputDir ../src/java
NativeOutputDir ../src/native/unix
diff --git a/make/dynlink-windows.cfg b/make/dynlink-windows.cfg
index 8626039..db6f766 100755
--- a/make/dynlink-windows.cfg
+++ b/make/dynlink-windows.cfg
@@ -1,6 +1,6 @@
Style AllStatic
JavaClass WindowsDynamicLinkerImpl
-Package com.jogamp.gluegen.runtime
+Package com.jogamp.common.os
Implements WindowsDynamicLinkerImpl DynamicLinker
JavaOutputDir ../src/java
NativeOutputDir ../src/native/windows
diff --git a/src/java/com/jogamp/gluegen/runtime/Buffers.java b/src/java/com/jogamp/common/nio/Buffers.java
index 49f6e8b..e3bea17 100755
--- a/src/java/com/jogamp/gluegen/runtime/Buffers.java
+++ b/src/java/com/jogamp/common/nio/Buffers.java
@@ -36,8 +36,9 @@
* Sun gratefully acknowledges that this software was originally authored
* and developed by Kenneth Bradley Russell and Christopher John Kline.
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.nio;
+import com.jogamp.common.os.Platform;
import java.nio.*;
/**
diff --git a/src/java/com/jogamp/gluegen/runtime/Int64Buffer.java b/src/java/com/jogamp/common/nio/Int64Buffer.java
index c110310..d1fafb6 100644
--- a/src/java/com/jogamp/gluegen/runtime/Int64Buffer.java
+++ b/src/java/com/jogamp/common/nio/Int64Buffer.java
@@ -25,8 +25,9 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.nio;
+import com.jogamp.common.os.Platform;
import java.nio.ByteBuffer;
/**
diff --git a/src/java/com/jogamp/gluegen/runtime/Int64BufferME_CDC_FP.java b/src/java/com/jogamp/common/nio/Int64BufferME_CDC_FP.java
index cedb737..5cad3ef 100755
--- a/src/java/com/jogamp/gluegen/runtime/Int64BufferME_CDC_FP.java
+++ b/src/java/com/jogamp/common/nio/Int64BufferME_CDC_FP.java
@@ -33,8 +33,9 @@
* in the design, construction, operation or maintenance of any nuclear
* facility.
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.nio;
+import com.jogamp.common.os.Platform;
import java.nio.*;
/**
diff --git a/src/java/com/jogamp/gluegen/runtime/Int64BufferSE.java b/src/java/com/jogamp/common/nio/Int64BufferSE.java
index 166d0c6..7387320 100755
--- a/src/java/com/jogamp/gluegen/runtime/Int64BufferSE.java
+++ b/src/java/com/jogamp/common/nio/Int64BufferSE.java
@@ -33,7 +33,7 @@
* in the design, construction, operation or maintenance of any nuclear
* facility.
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.nio;
import java.nio.*;
diff --git a/src/java/com/jogamp/gluegen/runtime/NativeBuffer.java b/src/java/com/jogamp/common/nio/NativeBuffer.java
index d3587e3..170297a 100644
--- a/src/java/com/jogamp/gluegen/runtime/NativeBuffer.java
+++ b/src/java/com/jogamp/common/nio/NativeBuffer.java
@@ -1,8 +1,7 @@
-
/*
* Created on Tuesday, March 30 2010 18:22
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.nio;
import java.nio.ByteBuffer;
diff --git a/src/java/com/jogamp/gluegen/runtime/PointerBuffer.java b/src/java/com/jogamp/common/nio/PointerBuffer.java
index e68fd72..9b7232f 100644
--- a/src/java/com/jogamp/gluegen/runtime/PointerBuffer.java
+++ b/src/java/com/jogamp/common/nio/PointerBuffer.java
@@ -28,8 +28,10 @@
/*
* Created on Saturday, March 27 2010 11:55
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.nio;
+import com.jogamp.common.os.NativeLibrary;
+import com.jogamp.common.os.Platform;
import java.nio.ByteBuffer;
import java.nio.Buffer;
import java.util.HashMap;
diff --git a/src/java/com/jogamp/gluegen/runtime/PointerBufferME_CDC_FP.java b/src/java/com/jogamp/common/nio/PointerBufferME_CDC_FP.java
index 1134ee7..74c049b 100755
--- a/src/java/com/jogamp/gluegen/runtime/PointerBufferME_CDC_FP.java
+++ b/src/java/com/jogamp/common/nio/PointerBufferME_CDC_FP.java
@@ -33,8 +33,9 @@
* in the design, construction, operation or maintenance of any nuclear
* facility.
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.nio;
+import com.jogamp.common.os.Platform;
import java.nio.*;
/**
diff --git a/src/java/com/jogamp/gluegen/runtime/PointerBufferSE.java b/src/java/com/jogamp/common/nio/PointerBufferSE.java
index 6f131a9..f750430 100755
--- a/src/java/com/jogamp/gluegen/runtime/PointerBufferSE.java
+++ b/src/java/com/jogamp/common/nio/PointerBufferSE.java
@@ -33,8 +33,9 @@
* in the design, construction, operation or maintenance of any nuclear
* facility.
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.nio;
+import com.jogamp.common.os.Platform;
import java.nio.*;
/**
diff --git a/src/java/com/jogamp/gluegen/runtime/StructAccessor.java b/src/java/com/jogamp/common/nio/StructAccessor.java
index 6f3ad7d..117e8de 100644
--- a/src/java/com/jogamp/gluegen/runtime/StructAccessor.java
+++ b/src/java/com/jogamp/common/nio/StructAccessor.java
@@ -36,8 +36,9 @@
* Sun gratefully acknowledges that this software was originally authored
* and developed by Kenneth Bradley Russell and Christopher John Kline.
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.nio;
+import com.jogamp.common.os.Platform;
import java.nio.*;
/**
diff --git a/src/java/com/jogamp/gluegen/runtime/DynamicLinker.java b/src/java/com/jogamp/common/os/DynamicLinker.java
index f3cfcfd..ef5d5dc 100755
--- a/src/java/com/jogamp/gluegen/runtime/DynamicLinker.java
+++ b/src/java/com/jogamp/common/os/DynamicLinker.java
@@ -37,7 +37,7 @@
* and developed by Kenneth Bradley Russell and Christopher John Kline.
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.os;
/** Provides an abstract interface to the OS's low-level dynamic
linking functionality. */
diff --git a/src/java/com/jogamp/gluegen/runtime/DynamicLookupHelper.java b/src/java/com/jogamp/common/os/DynamicLookupHelper.java
index bc29732..a4f74a4 100755
--- a/src/java/com/jogamp/gluegen/runtime/DynamicLookupHelper.java
+++ b/src/java/com/jogamp/common/os/DynamicLookupHelper.java
@@ -37,7 +37,7 @@
* and developed by Kenneth Bradley Russell and Christopher John Kline.
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.os;
/** Interface callers may use to use the ProcAddressHelper's {@link
ProcAddressHelper#resetProcAddressTable resetProcAddressTable}
diff --git a/src/java/com/jogamp/gluegen/runtime/MacOSXDynamicLinkerImpl.java b/src/java/com/jogamp/common/os/MacOSXDynamicLinkerImpl.java
index 8abbd4e..531bc5c 100755
--- a/src/java/com/jogamp/gluegen/runtime/MacOSXDynamicLinkerImpl.java
+++ b/src/java/com/jogamp/common/os/MacOSXDynamicLinkerImpl.java
@@ -1,11 +1,9 @@
/* !---- DO NOT EDIT: This file autogenerated by com\sun\gluegen\JavaEmitter.java on Mon Jul 31 16:27:00 PDT 2006 ----! */
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.os;
-import com.jogamp.gluegen.runtime.*;
-public class MacOSXDynamicLinkerImpl implements DynamicLinker
-{
+public class MacOSXDynamicLinkerImpl implements DynamicLinker {
public static final int RTLD_LAZY = 0x1;
public static final int RTLD_NOW = 0x2;
diff --git a/src/java/com/jogamp/gluegen/runtime/NativeLibrary.java b/src/java/com/jogamp/common/os/NativeLibrary.java
index 7de75a3..2de8bc9 100755
--- a/src/java/com/jogamp/gluegen/runtime/NativeLibrary.java
+++ b/src/java/com/jogamp/common/os/NativeLibrary.java
@@ -37,8 +37,9 @@
* and developed by Kenneth Bradley Russell and Christopher John Kline.
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.os;
+import com.jogamp.gluegen.runtime.NativeLibLoader;
import java.io.*;
import java.lang.reflect.*;
import java.security.*;
@@ -412,7 +413,7 @@ public class NativeLibrary implements DynamicLookupHelper {
}
private static volatile boolean loadedDynLinkNativeLib;
- static void ensureNativeLibLoaded() {
+ public static void ensureNativeLibLoaded() {
if (!loadedDynLinkNativeLib) {
synchronized (NativeLibrary.class) {
if (!loadedDynLinkNativeLib) {
diff --git a/src/java/com/jogamp/gluegen/runtime/Platform.java b/src/java/com/jogamp/common/os/Platform.java
index a621279..169af13 100644
--- a/src/java/com/jogamp/gluegen/runtime/Platform.java
+++ b/src/java/com/jogamp/common/os/Platform.java
@@ -28,8 +28,9 @@
/*
* Created on Sunday, March 28 2010 14:43
*/
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.os;
+import com.jogamp.common.nio.Buffers;
import java.nio.ByteBuffer;
import java.nio.IntBuffer;
import java.nio.ShortBuffer;
diff --git a/src/java/com/jogamp/gluegen/runtime/UnixDynamicLinkerImpl.java b/src/java/com/jogamp/common/os/UnixDynamicLinkerImpl.java
index 018f31b..02bc828 100755
--- a/src/java/com/jogamp/gluegen/runtime/UnixDynamicLinkerImpl.java
+++ b/src/java/com/jogamp/common/os/UnixDynamicLinkerImpl.java
@@ -1,11 +1,9 @@
/* !---- DO NOT EDIT: This file autogenerated by com\sun\gluegen\JavaEmitter.java on Mon Jul 31 16:26:59 PDT 2006 ----! */
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.os;
-import com.jogamp.gluegen.runtime.*;
-public class UnixDynamicLinkerImpl implements DynamicLinker
-{
+public class UnixDynamicLinkerImpl implements DynamicLinker {
public static final int RTLD_LAZY = 0x00001;
public static final int RTLD_NOW = 0x00002;
diff --git a/src/java/com/jogamp/gluegen/runtime/WindowsDynamicLinkerImpl.java b/src/java/com/jogamp/common/os/WindowsDynamicLinkerImpl.java
index 87b9a37..f5a3312 100755
--- a/src/java/com/jogamp/gluegen/runtime/WindowsDynamicLinkerImpl.java
+++ b/src/java/com/jogamp/common/os/WindowsDynamicLinkerImpl.java
@@ -1,11 +1,9 @@
/* !---- DO NOT EDIT: This file autogenerated by com\sun\gluegen\JavaEmitter.java on Tue May 27 02:37:55 PDT 2008 ----! */
-package com.jogamp.gluegen.runtime;
+package com.jogamp.common.os;
-import com.jogamp.gluegen.runtime.*;
-public class WindowsDynamicLinkerImpl implements DynamicLinker
-{
+public class WindowsDynamicLinkerImpl implements DynamicLinker {
/** Interface to C language function: <br> <code> BOOL FreeLibrary(HANDLE hLibModule); </code> */
diff --git a/src/java/com/jogamp/gluegen/runtime/ProcAddressHelper.java b/src/java/com/jogamp/gluegen/runtime/ProcAddressHelper.java
index 1b7f9d6..787eab5 100644
--- a/src/java/com/jogamp/gluegen/runtime/ProcAddressHelper.java
+++ b/src/java/com/jogamp/gluegen/runtime/ProcAddressHelper.java
@@ -39,6 +39,7 @@
package com.jogamp.gluegen.runtime;
+import com.jogamp.common.os.DynamicLookupHelper;
import java.security.*;
// Debugging only
diff --git a/src/java/com/jogamp/gluegen/runtime/opengl/GLProcAddressHelper.java b/src/java/com/jogamp/gluegen/runtime/opengl/GLProcAddressHelper.java
index 7470c46..2031d9e 100644
--- a/src/java/com/jogamp/gluegen/runtime/opengl/GLProcAddressHelper.java
+++ b/src/java/com/jogamp/gluegen/runtime/opengl/GLProcAddressHelper.java
@@ -36,6 +36,7 @@
package com.jogamp.gluegen.runtime.opengl;
+import com.jogamp.common.os.DynamicLookupHelper;
import com.jogamp.gluegen.runtime.*;
// Debugging only
diff --git a/src/java/com/sun/gluegen/JavaEmitter.java b/src/java/com/sun/gluegen/JavaEmitter.java
index 0703f76..fc8ab34 100644
--- a/src/java/com/sun/gluegen/JavaEmitter.java
+++ b/src/java/com/sun/gluegen/JavaEmitter.java
@@ -39,6 +39,8 @@
package com.sun.gluegen;
+import com.jogamp.common.nio.Buffers;
+import com.jogamp.common.os.DynamicLookupHelper;
import java.io.*;
import java.util.*;
import java.text.MessageFormat;
@@ -869,6 +871,8 @@ public class JavaEmitter implements GlueEmitter {
writer.println("import java.nio.*;");
writer.println();
writer.println("import " + cfg.gluegenRuntimePackage() + ".*;");
+ writer.println("import " + DynamicLookupHelper.class.getPackage().getName() + ".*;");
+ writer.println("import " + Buffers.class.getPackage().getName() + ".*;");
writer.println();
List<String> imports = cfg.imports();
for (String str : imports) {
diff --git a/src/java/com/sun/gluegen/JavaType.java b/src/java/com/sun/gluegen/JavaType.java
index 23f48b2..c3cce38 100644
--- a/src/java/com/sun/gluegen/JavaType.java
+++ b/src/java/com/sun/gluegen/JavaType.java
@@ -197,13 +197,13 @@ public class JavaType {
public static JavaType forNIOInt64BufferClass() {
if(nioInt64BufferType == null)
- nioInt64BufferType = createForClass(com.jogamp.gluegen.runtime.Int64Buffer.class);
+ nioInt64BufferType = createForClass(com.jogamp.common.nio.Int64Buffer.class);
return nioInt64BufferType;
}
public static JavaType forNIOPointerBufferClass() {
if(nioPointerBufferType == null)
- nioPointerBufferType = createForClass(com.jogamp.gluegen.runtime.PointerBuffer.class);
+ nioPointerBufferType = createForClass(com.jogamp.common.nio.PointerBuffer.class);
return nioPointerBufferType;
}
@@ -340,8 +340,8 @@ public class JavaType {
public boolean isNIOBuffer() {
return clazz != null && ( (java.nio.Buffer.class).isAssignableFrom(clazz) ||
- (com.jogamp.gluegen.runtime.PointerBuffer.class).isAssignableFrom(clazz) ||
- (com.jogamp.gluegen.runtime.Int64Buffer.class).isAssignableFrom(clazz) ) ;
+ (com.jogamp.common.nio.PointerBuffer.class).isAssignableFrom(clazz) ||
+ (com.jogamp.common.nio.Int64Buffer.class).isAssignableFrom(clazz) ) ;
}
public boolean isNIOByteBuffer() {
@@ -362,11 +362,11 @@ public class JavaType {
}
public boolean isNIOInt64Buffer() {
- return (clazz == com.jogamp.gluegen.runtime.Int64Buffer.class);
+ return (clazz == com.jogamp.common.nio.Int64Buffer.class);
}
public boolean isNIOPointerBuffer() {
- return (clazz == com.jogamp.gluegen.runtime.PointerBuffer.class);
+ return (clazz == com.jogamp.common.nio.PointerBuffer.class);
}
public boolean isString() {
diff --git a/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java b/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java
index 96e4e87..e64de92 100644
--- a/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java
+++ b/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java
@@ -1,8 +1,8 @@
package com.sun.gluegen.test;
-import com.jogamp.gluegen.runtime.*;
-import java.nio.*;
+import com.jogamp.common.os.Platform;
+import com.jogamp.common.nio.PointerBuffer;
public class TestPointerBufferEndian {
public static void main (String[] args) {
diff --git a/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java b/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java
index 7202056..4fe4008 100644
--- a/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java
+++ b/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java
@@ -1,7 +1,9 @@
package com.sun.gluegen.test;
-import com.jogamp.gluegen.runtime.*;
+import com.jogamp.common.os.Platform;
+import com.jogamp.common.nio.Buffers;
+import com.jogamp.common.nio.StructAccessor;
import java.nio.*;
public class TestStructAccessorEndian {
diff --git a/src/junit/com/jogamp/gluegen/test/junit/BaseTest1.java b/src/junit/com/jogamp/gluegen/test/junit/BaseTest1.java
index f144a26..b4f8536 100644
--- a/src/junit/com/jogamp/gluegen/test/junit/BaseTest1.java
+++ b/src/junit/com/jogamp/gluegen/test/junit/BaseTest1.java
@@ -32,10 +32,10 @@
package com.jogamp.gluegen.test.junit;
-import com.jogamp.gluegen.runtime.Buffers;
-import com.jogamp.gluegen.runtime.PointerBuffer;
-import com.jogamp.gluegen.runtime.Int64Buffer;
-import com.jogamp.gluegen.runtime.Platform;
+import com.jogamp.common.nio.Buffers;
+import com.jogamp.common.nio.PointerBuffer;
+import com.jogamp.common.nio.Int64Buffer;
+import com.jogamp.common.os.Platform;
import java.nio.*;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
diff --git a/src/junit/com/jogamp/gluegen/test/junit/Test1p1JavaEmitter.java b/src/junit/com/jogamp/gluegen/test/junit/Test1p1JavaEmitter.java
index 54d82f9..c5ef4ad 100644
--- a/src/junit/com/jogamp/gluegen/test/junit/Test1p1JavaEmitter.java
+++ b/src/junit/com/jogamp/gluegen/test/junit/Test1p1JavaEmitter.java
@@ -34,8 +34,8 @@ package com.jogamp.gluegen.test.junit;
import com.jogamp.gluegen.test.junit.impl.BindingTest1p1Impl;
-import com.jogamp.gluegen.runtime.Buffers;
-import com.jogamp.gluegen.runtime.PointerBuffer;
+import com.jogamp.common.nio.Buffers;
+import com.jogamp.common.nio.PointerBuffer;
import java.nio.*;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
diff --git a/src/junit/com/jogamp/gluegen/test/junit/Test1p2ProcAddressEmitter.java b/src/junit/com/jogamp/gluegen/test/junit/Test1p2ProcAddressEmitter.java
index 3bf90e9..9096eca 100644
--- a/src/junit/com/jogamp/gluegen/test/junit/Test1p2ProcAddressEmitter.java
+++ b/src/junit/com/jogamp/gluegen/test/junit/Test1p2ProcAddressEmitter.java
@@ -34,10 +34,10 @@ package com.jogamp.gluegen.test.junit;
import com.jogamp.gluegen.test.junit.impl.BindingTest1p2Impl;
-import com.jogamp.gluegen.runtime.Buffers;
-import com.jogamp.gluegen.runtime.PointerBuffer;
-import com.jogamp.gluegen.runtime.NativeLibrary;
-import com.jogamp.gluegen.runtime.DynamicLookupHelper;
+import com.jogamp.common.nio.Buffers;
+import com.jogamp.common.nio.PointerBuffer;
+import com.jogamp.common.os.NativeLibrary;
+import com.jogamp.common.os.DynamicLookupHelper;
import java.nio.*;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
diff --git a/src/junit/com/jogamp/gluegen/test/junit/test1-common.cfg b/src/junit/com/jogamp/gluegen/test/junit/test1-common.cfg
index 2709e80..6ba4b78 100644
--- a/src/junit/com/jogamp/gluegen/test/junit/test1-common.cfg
+++ b/src/junit/com/jogamp/gluegen/test/junit/test1-common.cfg
@@ -28,6 +28,9 @@ CustomCCode #include "test1.h"
# Imports needed by all glue code
Import java.nio.*
Import java.util.*
+Import com.jogamp.common.util.*
+Import com.jogamp.common.os.*
+Import com.jogamp.common.nio.*
diff --git a/src/junit/com/jogamp/gluegen/test/junit/test1p2-gluegen.cfg b/src/junit/com/jogamp/gluegen/test/junit/test1p2-gluegen.cfg
index 1ec1b6d..651c93c 100644
--- a/src/junit/com/jogamp/gluegen/test/junit/test1p2-gluegen.cfg
+++ b/src/junit/com/jogamp/gluegen/test/junit/test1p2-gluegen.cfg
@@ -26,7 +26,6 @@ Include ../../../../../../../make/config/intptr.cfg
Import com.jogamp.gluegen.test.junit.BindingTest1
Import com.jogamp.gluegen.test.junit.BindingTest1p2
-Import com.jogamp.gluegen.runtime.*
CustomJavaCode BindingTest1p2Impl private static BindingTest1p2ProcAddressTable _table = new BindingTest1p2ProcAddressTable();
CustomJavaCode BindingTest1p2Impl public static void resetProcAddressTable(DynamicLookupHelper lookup) {
diff --git a/src/native/common/Platform.c b/src/native/common/Platform.c
index 0cc7adc..f0e4e11 100644
--- a/src/native/common/Platform.c
+++ b/src/native/common/Platform.c
@@ -4,7 +4,7 @@
#include <assert.h>
JNIEXPORT jint JNICALL
-Java_com_jogamp_gluegen_runtime_Platform_getPointerSizeInBitsImpl(JNIEnv *env, jclass _unused) {
+Java_com_jogamp_common_os_Platform_getPointerSizeInBitsImpl(JNIEnv *env, jclass _unused) {
return sizeof(void *) * 8;
}
diff --git a/src/native/common/PointerBuffer.c b/src/native/common/PointerBuffer.c
index 9736edc..05e003b 100644
--- a/src/native/common/PointerBuffer.c
+++ b/src/native/common/PointerBuffer.c
@@ -4,7 +4,7 @@
#include <assert.h>
JNIEXPORT jlong JNICALL
-Java_com_jogamp_gluegen_runtime_PointerBuffer_getDirectBufferAddressImpl(JNIEnv *env, jclass _unused, jobject directBuffer) {
+Java_com_jogamp_common_nio_PointerBuffer_getDirectBufferAddressImpl(JNIEnv *env, jclass _unused, jobject directBuffer) {
return ( NULL != directBuffer ) ? ( jlong) (*env)->GetDirectBufferAddress(env, directBuffer) : 0L ;
}
diff --git a/src/native/macosx/MacOSXDynamicLinkerImpl_JNI.c b/src/native/macosx/MacOSXDynamicLinkerImpl_JNI.c
index e6017d7..02f2b5c 100755
--- a/src/native/macosx/MacOSXDynamicLinkerImpl_JNI.c
+++ b/src/native/macosx/MacOSXDynamicLinkerImpl_JNI.c
@@ -8,12 +8,12 @@
#include </usr/include/machine/types.h>
/* Java->C glue code:
- * Java package: com.jogamp.gluegen.runtime.MacOSXDynamicLinkerImpl
+ * Java package: com.jogamp.common.os.MacOSXDynamicLinkerImpl
* Java method: int dlclose(long __handle)
* C function: int dlclose(void * __handle);
*/
JNIEXPORT jint JNICALL
-Java_com_jogamp_gluegen_runtime_MacOSXDynamicLinkerImpl_dlclose__J(JNIEnv *env, jclass _unused, jlong __handle) {
+Java_com_jogamp_common_os_MacOSXDynamicLinkerImpl_dlclose__J(JNIEnv *env, jclass _unused, jlong __handle) {
int _res;
_res = dlclose((void *) (intptr_t) __handle);
return _res;
@@ -21,12 +21,12 @@ Java_com_jogamp_gluegen_runtime_MacOSXDynamicLinkerImpl_dlclose__J(JNIEnv *env,
/* Java->C glue code:
- * Java package: com.jogamp.gluegen.runtime.MacOSXDynamicLinkerImpl
+ * Java package: com.jogamp.common.os.MacOSXDynamicLinkerImpl
* Java method: java.lang.String dlerror()
* C function: char * dlerror(void);
*/
JNIEXPORT jstring JNICALL
-Java_com_jogamp_gluegen_runtime_MacOSXDynamicLinkerImpl_dlerror__(JNIEnv *env, jclass _unused) {
+Java_com_jogamp_common_os_MacOSXDynamicLinkerImpl_dlerror__(JNIEnv *env, jclass _unused) {
char * _res;
_res = dlerror();
if (_res == NULL) return NULL; return (*env)->NewStringUTF(env, _res);
@@ -34,12 +34,12 @@ Java_com_jogamp_gluegen_runtime_MacOSXDynamicLinkerImpl_dlerror__(JNIEnv *env, j
/* Java->C glue code:
- * Java package: com.jogamp.gluegen.runtime.MacOSXDynamicLinkerImpl
+ * Java package: com.jogamp.common.os.MacOSXDynamicLinkerImpl
* Java method: long dlopen(java.lang.String __path, int __mode)
* C function: void * dlopen(const char * __path, int __mode);
*/
JNIEXPORT jlong JNICALL
-Java_com_jogamp_gluegen_runtime_MacOSXDynamicLinkerImpl_dlopen__Ljava_lang_String_2I(JNIEnv *env, jclass _unused, jstring __path, jint __mode) {
+Java_com_jogamp_common_os_MacOSXDynamicLinkerImpl_dlopen__Ljava_lang_String_2I(JNIEnv *env, jclass _unused, jstring __path, jint __mode) {
const char* _UTF8__path = NULL;
void * _res;
if (__path != NULL) {
@@ -61,12 +61,12 @@ Java_com_jogamp_gluegen_runtime_MacOSXDynamicLinkerImpl_dlopen__Ljava_lang_Strin
/* Java->C glue code:
- * Java package: com.jogamp.gluegen.runtime.MacOSXDynamicLinkerImpl
+ * Java package: com.jogamp.common.os.MacOSXDynamicLinkerImpl
* Java method: long dlsym(long __handle, java.lang.String __symbol)
* C function: void * dlsym(void * __handle, const char * __symbol);
*/
JNIEXPORT jlong JNICALL
-Java_com_jogamp_gluegen_runtime_MacOSXDynamicLinkerImpl_dlsym__JLjava_lang_String_2(JNIEnv *env, jclass _unused, jlong __handle, jstring __symbol) {
+Java_com_jogamp_common_os_MacOSXDynamicLinkerImpl_dlsym__JLjava_lang_String_2(JNIEnv *env, jclass _unused, jlong __handle, jstring __symbol) {
const char* _UTF8__symbol = NULL;
void * _res;
if (__symbol != NULL) {
diff --git a/src/native/unix/UnixDynamicLinkerImpl_JNI.c b/src/native/unix/UnixDynamicLinkerImpl_JNI.c
index 937c71c..2ea863e 100755
--- a/src/native/unix/UnixDynamicLinkerImpl_JNI.c
+++ b/src/native/unix/UnixDynamicLinkerImpl_JNI.c
@@ -8,12 +8,12 @@
#include <inttypes.h>
/* Java->C glue code:
- * Java package: com.jogamp.gluegen.runtime.UnixDynamicLinkerImpl
+ * Java package: com.jogamp.common.os.UnixDynamicLinkerImpl
* Java method: int dlclose(long arg0)
* C function: int dlclose(void * );
*/
JNIEXPORT jint JNICALL
-Java_com_jogamp_gluegen_runtime_UnixDynamicLinkerImpl_dlclose__J(JNIEnv *env, jclass _unused, jlong arg0) {
+Java_com_jogamp_common_os_UnixDynamicLinkerImpl_dlclose__J(JNIEnv *env, jclass _unused, jlong arg0) {
int _res;
_res = dlclose((void *) (intptr_t) arg0);
return _res;
@@ -21,12 +21,12 @@ Java_com_jogamp_gluegen_runtime_UnixDynamicLinkerImpl_dlclose__J(JNIEnv *env, jc
/* Java->C glue code:
- * Java package: com.jogamp.gluegen.runtime.UnixDynamicLinkerImpl
+ * Java package: com.jogamp.common.os.UnixDynamicLinkerImpl
* Java method: java.lang.String dlerror()
* C function: char * dlerror(void);
*/
JNIEXPORT jstring JNICALL
-Java_com_jogamp_gluegen_runtime_UnixDynamicLinkerImpl_dlerror__(JNIEnv *env, jclass _unused) {
+Java_com_jogamp_common_os_UnixDynamicLinkerImpl_dlerror__(JNIEnv *env, jclass _unused) {
char * _res;
_res = dlerror();
if (_res == NULL) return NULL; return (*env)->NewStringUTF(env, _res);
@@ -34,12 +34,12 @@ Java_com_jogamp_gluegen_runtime_UnixDynamicLinkerImpl_dlerror__(JNIEnv *env, jcl
/* Java->C glue code:
- * Java package: com.jogamp.gluegen.runtime.UnixDynamicLinkerImpl
+ * Java package: com.jogamp.common.os.UnixDynamicLinkerImpl
* Java method: long dlopen(java.lang.String arg0, int arg1)
* C function: void * dlopen(const char * , int);
*/
JNIEXPORT jlong JNICALL
-Java_com_jogamp_gluegen_runtime_UnixDynamicLinkerImpl_dlopen__Ljava_lang_String_2I(JNIEnv *env, jclass _unused, jstring arg0, jint arg1) {
+Java_com_jogamp_common_os_UnixDynamicLinkerImpl_dlopen__Ljava_lang_String_2I(JNIEnv *env, jclass _unused, jstring arg0, jint arg1) {
const char* _UTF8arg0 = NULL;
void * _res;
if (arg0 != NULL) {
@@ -61,12 +61,12 @@ Java_com_jogamp_gluegen_runtime_UnixDynamicLinkerImpl_dlopen__Ljava_lang_String_
/* Java->C glue code:
- * Java package: com.jogamp.gluegen.runtime.UnixDynamicLinkerImpl
+ * Java package: com.jogamp.common.os.UnixDynamicLinkerImpl
* Java method: long dlsym(long arg0, java.lang.String arg1)
* C function: void * dlsym(void * , const char * );
*/
JNIEXPORT jlong JNICALL
-Java_com_jogamp_gluegen_runtime_UnixDynamicLinkerImpl_dlsym__JLjava_lang_String_2(JNIEnv *env, jclass _unused, jlong arg0, jstring arg1) {
+Java_com_jogamp_common_os_UnixDynamicLinkerImpl_dlsym__JLjava_lang_String_2(JNIEnv *env, jclass _unused, jlong arg0, jstring arg1) {
const char* _UTF8arg1 = NULL;
void * _res;
if (arg1 != NULL) {
diff --git a/src/native/windows/WindowsDynamicLinkerImpl_JNI.c b/src/native/windows/WindowsDynamicLinkerImpl_JNI.c
index 35ea742..5d30a30 100755
--- a/src/native/windows/WindowsDynamicLinkerImpl_JNI.c
+++ b/src/native/windows/WindowsDynamicLinkerImpl_JNI.c
@@ -17,12 +17,12 @@
#endif
/* Java->C glue code:
- * Java package: com.jogamp.gluegen.runtime.WindowsDynamicLinkerImpl
+ * Java package: com.jogamp.common.os.WindowsDynamicLinkerImpl
* Java method: int FreeLibrary(long hLibModule)
* C function: BOOL FreeLibrary(HANDLE hLibModule);
*/
JNIEXPORT jint JNICALL
-Java_com_jogamp_gluegen_runtime_WindowsDynamicLinkerImpl_FreeLibrary__J(JNIEnv *env, jclass _unused, jlong hLibModule) {
+Java_com_jogamp_common_os_WindowsDynamicLinkerImpl_FreeLibrary__J(JNIEnv *env, jclass _unused, jlong hLibModule) {
BOOL _res;
_res = FreeLibrary((HANDLE) (intptr_t) hLibModule);
return _res;
@@ -30,12 +30,12 @@ Java_com_jogamp_gluegen_runtime_WindowsDynamicLinkerImpl_FreeLibrary__J(JNIEnv *
/* Java->C glue code:
- * Java package: com.jogamp.gluegen.runtime.WindowsDynamicLinkerImpl
+ * Java package: com.jogamp.common.os.WindowsDynamicLinkerImpl
* Java method: int GetLastError()
* C function: DWORD GetLastError(void);
*/
JNIEXPORT jint JNICALL
-Java_com_jogamp_gluegen_runtime_WindowsDynamicLinkerImpl_GetLastError__(JNIEnv *env, jclass _unused) {
+Java_com_jogamp_common_os_WindowsDynamicLinkerImpl_GetLastError__(JNIEnv *env, jclass _unused) {
DWORD _res;
_res = GetLastError();
return _res;
@@ -43,12 +43,12 @@ Java_com_jogamp_gluegen_runtime_WindowsDynamicLinkerImpl_GetLastError__(JNIEnv *
/* Java->C glue code:
- * Java package: com.jogamp.gluegen.runtime.WindowsDynamicLinkerImpl
+ * Java package: com.jogamp.common.os.WindowsDynamicLinkerImpl
* Java method: long GetProcAddressA(long hModule, java.lang.String lpProcName)
* C function: PROC GetProcAddressA(HANDLE hModule, LPCSTR lpProcName);
*/
JNIEXPORT jlong JNICALL
-Java_com_jogamp_gluegen_runtime_WindowsDynamicLinkerImpl_GetProcAddressA__JLjava_lang_String_2(JNIEnv *env, jclass _unused, jlong hModule, jstring lpProcName) {
+Java_com_jogamp_common_os_WindowsDynamicLinkerImpl_GetProcAddressA__JLjava_lang_String_2(JNIEnv *env, jclass _unused, jlong hModule, jstring lpProcName) {
const char* _strchars_lpProcName = NULL;
PROC _res;
if (lpProcName != NULL) {
@@ -68,12 +68,12 @@ Java_com_jogamp_gluegen_runtime_WindowsDynamicLinkerImpl_GetProcAddressA__JLjava
/* Java->C glue code:
- * Java package: com.jogamp.gluegen.runtime.WindowsDynamicLinkerImpl
+ * Java package: com.jogamp.common.os.WindowsDynamicLinkerImpl
* Java method: long LoadLibraryW(java.lang.String lpLibFileName)
* C function: HANDLE LoadLibraryW(LPCWSTR lpLibFileName);
*/
JNIEXPORT jlong JNICALL
-Java_com_jogamp_gluegen_runtime_WindowsDynamicLinkerImpl_LoadLibraryW__Ljava_lang_String_2(JNIEnv *env, jclass _unused, jstring lpLibFileName) {
+Java_com_jogamp_common_os_WindowsDynamicLinkerImpl_LoadLibraryW__Ljava_lang_String_2(JNIEnv *env, jclass _unused, jstring lpLibFileName) {
jchar* _strchars_lpLibFileName = NULL;
HANDLE _res;
if (lpLibFileName != NULL) {
diff --git a/test/junit/com/sun/gluegen/BasicTest.java b/test/junit/com/sun/gluegen/BasicTest.java
index a12cc76..b186c53 100644
--- a/test/junit/com/sun/gluegen/BasicTest.java
+++ b/test/junit/com/sun/gluegen/BasicTest.java
@@ -1,7 +1,7 @@
package com.sun.gluegen;
-import com.jogamp.gluegen.runtime.Buffers;
-import com.jogamp.gluegen.runtime.PointerBuffer;
+import com.jogamp.common.nio.Buffers;
+import com.jogamp.common.nio.PointerBuffer;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.nio.ByteBuffer;
diff --git a/test/junit/com/sun/gluegen/test.cfg b/test/junit/com/sun/gluegen/test.cfg
index a709897..a2ac567 100644
--- a/test/junit/com/sun/gluegen/test.cfg
+++ b/test/junit/com/sun/gluegen/test.cfg
@@ -5,3 +5,5 @@ JavaOutputDir java
NativeOutputDir native
CustomCCode #include "test.h"
+
+Import com.jogamp.common.nio.* \ No newline at end of file