summaryrefslogtreecommitdiffstats
path: root/make/glx-x11.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'make/glx-x11.cfg')
-rw-r--r--make/glx-x11.cfg26
1 files changed, 1 insertions, 25 deletions
diff --git a/make/glx-x11.cfg b/make/glx-x11.cfg
index fd381760e..801c035ee 100644
--- a/make/glx-x11.cfg
+++ b/make/glx-x11.cfg
@@ -15,37 +15,13 @@ CustomJavaCode GLX private static GLXProcAddressTable glxProcAddressTable = new
CustomJavaCode GLX public static GLXProcAddressTable getGLXProcAddressTable() { return glxProcAddressTable; }
CustomJavaCode GLX public static native long dlsym(String name);
-CustomCCode #include <inttypes.h>
-CustomCCode #include <X11/Xlib.h>
-CustomCCode #include <X11/Xutil.h>
-CustomCCode #include <GL/glx.h>
-CustomCCode /* Linux headers don't work properly */
-CustomCCode #define __USE_GNU
-CustomCCode #include <dlfcn.h>
-CustomCCode #undef __USE_GNU
+IncludeAs CustomCCode glx-CustomCCode.c
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_com_sun_opengl_impl_x11_GLX_DefaultScreen(JNIEnv *env, jclass _unused, jlong display) {
-CustomCCode return DefaultScreen((Display*) (intptr_t) display);
-CustomCCode }
-CustomCCode JNIEXPORT jlong JNICALL
-CustomCCode Java_com_sun_opengl_impl_x11_GLX_RootWindow(JNIEnv *env, jclass _unused, jlong display, jint screen) {
-CustomCCode return RootWindow((Display*) (intptr_t) display, screen);
-CustomCCode }
-CustomCCode JNIEXPORT jlong JNICALL
-CustomCCode Java_com_sun_opengl_impl_x11_GLX_dlsym(JNIEnv *env, jclass _unused, jstring name) {
-CustomCCode const jbyte* chars;
-CustomCCode void* res;
-CustomCCode chars = (*env)->GetStringUTFChars(env, name, NULL);
-CustomCCode res = dlsym(RTLD_DEFAULT, chars);
-CustomCCode (*env)->ReleaseStringUTFChars(env, name, chars);
-CustomCCode return (jlong) ((intptr_t) res);
-CustomCCode }
# Get returned array's capacity from XGetVisualInfo to be correct
TemporaryCVariableDeclaration XGetVisualInfo int count;