blob: 394dd230a908c6b86a07ddd14716a4bb06d3339c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# This .cfg file is used to generate the interface to the GLX routines
# used internally by the X11GLContext implementation.
Package com.jogamp.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
# Manually implement XOpenDisplay, XCloseDisplay, catching XIOError
ManuallyImplement XCloseDisplay
ManuallyImplement XOpenDisplay
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; }
|