aboutsummaryrefslogtreecommitdiffstats
path: root/make/config/nativewindow/x11-lib.cfg
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-lib.cfg
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-lib.cfg')
-rw-r--r--make/config/nativewindow/x11-lib.cfg43
1 files changed, 43 insertions, 0 deletions
diff --git a/make/config/nativewindow/x11-lib.cfg b/make/config/nativewindow/x11-lib.cfg
new file mode 100644
index 000000000..321444725
--- /dev/null
+++ b/make/config/nativewindow/x11-lib.cfg
@@ -0,0 +1,43 @@
+# This .cfg file is used to generate the interface to the GLX routines
+# used internally by the X11GLContext implementation.
+Package com.sun.nativewindow.impl.x11
+JavaClass X11Lib
+Style allstatic
+
+HierarchicalNativeOutput false
+
+JavaOutputDir gensrc/classes
+NativeOutputDir gensrc/native/X11
+
+# Imports needed by all glue code
+Import java.nio.*
+Import java.util.*
+
+# XID needs to be treated as a long for 32/64 bit compatibility
+Opaque long XID
+
+Opaque long Display *
+Opaque boolean Bool
+Opaque long GLXFBConfig
+
+CustomJavaCode X11Lib public static native long dlopen(String name);
+CustomJavaCode X11Lib public static native long dlsym(String name);
+
+IncludeAs CustomJavaCode X11Lib x11-CustomJavaCode.java
+IncludeAs CustomCCode x11-CustomCCode.c
+
+ArgumentIsString XOpenDisplay 0
+
+# Need to expose DefaultScreen and RootWindow macros to Java
+CustomJavaCode X11Lib public static native int DefaultScreen(long display);
+CustomJavaCode X11Lib public static native long DefaultVisualID(long display, int screen);
+CustomJavaCode X11Lib public static native long RootWindow(long display, int screen);
+
+# We have Custom code for the following
+Ignore XGetVisualInfo
+
+# Helper routine to make the ReturnedArrayLength expression below work correctly
+CustomJavaCode X11Lib private static int getFirstElement(IntBuffer buf) { return buf.get(buf.position()); }
+CustomJavaCode X11Lib private static int getFirstElement(int[] arr, int offset) { return arr[offset]; }
+
+CustomJavaCode XVisualInfo public static XVisualInfo create(XVisualInfo s) { XVisualInfo d = XVisualInfo.create(); d.getBuffer().put(s.getBuffer()); d.getBuffer().rewind(); s.getBuffer().rewind(); return d; }