summaryrefslogtreecommitdiffstats
path: root/src/java
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 /src/java
parentc5068e42758aeecbd0a3fbf4c2e2b755661e950e (diff)
introduced com.jogamp.common.{nio,os} packages and moved some classes.
Diffstat (limited to 'src/java')
-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
22 files changed, 47 insertions, 36 deletions
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 {