aboutsummaryrefslogtreecommitdiffstats
path: root/make/config/nativewindow/x11-CustomJavaCode.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2009-06-15 22:57:38 +0000
committerKenneth Russel <[email protected]>2009-06-15 22:57:38 +0000
commita959c53b7ac91e489bf0959391e892790b9ff248 (patch)
tree4664742a4f9f6daa694364292e376ad2e6ee97d1 /make/config/nativewindow/x11-CustomJavaCode.java
parent506b634b780dcd23aa61015c2ceba3e687196abf (diff)
Copied JOGL_2_SANDBOX r1957 on to trunk; JOGL_2_SANDBOX branch is now closed
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1959 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'make/config/nativewindow/x11-CustomJavaCode.java')
-rw-r--r--make/config/nativewindow/x11-CustomJavaCode.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/make/config/nativewindow/x11-CustomJavaCode.java b/make/config/nativewindow/x11-CustomJavaCode.java
new file mode 100644
index 000000000..b1ee3a6c3
--- /dev/null
+++ b/make/config/nativewindow/x11-CustomJavaCode.java
@@ -0,0 +1,26 @@
+
+ /** Interface to C language function: <br> <code> XVisualInfo * XGetVisualInfo(Display * , long, XVisualInfo * , int * ); </code> */
+ public static XVisualInfo[] XGetVisualInfoCopied(long arg0, long arg1, XVisualInfo arg2, int[] arg3, int arg3_offset)
+ {
+ if(arg3 != null && arg3.length <= arg3_offset)
+ throw new RuntimeException("array offset argument \"arg3_offset\" (" + arg3_offset + ") equals or exceeds array length (" + arg3.length + ")");
+ java.nio.ByteBuffer _res;
+ _res = XGetVisualInfoCopied1(arg0, arg1, ((arg2 == null) ? null : arg2.getBuffer()), arg3, BufferFactory.SIZEOF_INT * arg3_offset);
+
+ if (_res == null) return null;
+ BufferFactory.nativeOrder(_res);
+ XVisualInfo[] _retarray = new XVisualInfo[getFirstElement(arg3, arg3_offset)];
+ for (int _count = 0; _count < getFirstElement(arg3, arg3_offset); _count++) {
+ _res.position(_count * XVisualInfo.size());
+ _res.limit ((1 + _count) * XVisualInfo.size());
+ java.nio.ByteBuffer _tmp = _res.slice();
+ _res.position(0);
+ _res.limit(_res.capacity());
+ _retarray[_count] = XVisualInfo.create(_tmp);
+ }
+ return _retarray;
+ }
+
+ /** Entry point to C language function: <code> XVisualInfo * XGetVisualInfo(Display * , long, XVisualInfo * , int * ); </code> */
+ private static native java.nio.ByteBuffer XGetVisualInfoCopied1(long arg0, long arg1, java.nio.ByteBuffer arg2, Object arg3, int arg3_byte_offset);
+