aboutsummaryrefslogtreecommitdiffstats
path: root/make/glx-x11.cfg
blob: f9a69c0b3d3b2021d1cb808cb30b7f55f8dbb468 (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
# This .cfg file is used to generate the interface to the GLX routines
# used internally by the X11GLContext implementation.
Package net.java.games.jogl.impl.x11
JavaClass GLX
Style allstatic
Include gl-common-x11.cfg

CustomCCode #include <inttypes.h>
CustomCCode #include <X11/Xlib.h>
CustomCCode #include <X11/Xutil.h>
CustomCCode #include <GL/glx.h>

# Pick up XVisualInfo from jogl
Ignore XVisualInfo

ArgumentIsString XOpenDisplay 0

# Need to expose DefaultScreen and RootWindow macros to Java
CustomJavaCode GLX public static native int  DefaultScreen(long display);
CustomJavaCode GLX public static native long RootWindow(long display, int screen);
CustomCCode JNIEXPORT jlong JNICALL 
CustomCCode Java_net_java_games_jogl_impl_x11_GLX_DefaultScreen(JNIEnv *env, jclass _unused, jlong display) {
CustomCCode   return DefaultScreen((Display*) (intptr_t) display);
CustomCCode }
CustomCCode JNIEXPORT jlong JNICALL 
CustomCCode Java_net_java_games_jogl_impl_x11_GLX_RootWindow(JNIEnv *env, jclass _unused, jlong display, jint screen) {
CustomCCode   return RootWindow((Display*) (intptr_t) display, screen);
CustomCCode }