diff options
Diffstat (limited to 'make/config/nwi/x11-lib.cfg')
-rw-r--r-- | make/config/nwi/x11-lib.cfg | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/make/config/nwi/x11-lib.cfg b/make/config/nwi/x11-lib.cfg new file mode 100644 index 000000000..1448e7783 --- /dev/null +++ b/make/config/nwi/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.nwi.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 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 RootWindow(long display, int screen); + +# Get returned array's capacity from XGetVisualInfo to be correct +TemporaryCVariableDeclaration XGetVisualInfo int count; +TemporaryCVariableAssignment XGetVisualInfo count = _ptr3[0]; +ReturnValueCapacity XGetVisualInfo count * sizeof(XVisualInfo) + +# 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]; } +ReturnedArrayLength XGetVisualInfo getFirstElement({3}) + |