|
From: Elias N. <eli...@us...> - 2005-11-21 18:25:38
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv954/src/native/linux Modified Files: display.c display.h org_lwjgl_opengl_Display.c Log Message: Linux: Moved some JNI functions Index: display.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/display.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- display.h 21 Nov 2005 16:50:11 -0000 1.10 +++ display.h 21 Nov 2005 18:25:30 -0000 1.11 @@ -47,12 +47,7 @@ extern int getScreenModeWidth(void); extern int getScreenModeHeight(void); -extern jobject initDisplay(JNIEnv *env, int screen, jint extension); -extern void switchDisplayMode(JNIEnv * env, jobject mode, int screen, jint extension); extern void resetDisplayMode(JNIEnv *env, int screen, jint extension, jobject gamma_ramp, bool temporary); -extern jobjectArray getAvailableDisplayModes(JNIEnv * env, Display *disp, int screen, jint extension); -extern int getGammaRampLengthOfDisplay(JNIEnv *env, Display *disp, int screen); -extern void setGammaRamp(JNIEnv *env, jobject gamma_ramp_buffer, int screen); extern void temporaryRestoreMode(JNIEnv *env, int screen, jint extension, jobject gamma_ramp); #endif Index: display.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/display.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- display.c 21 Nov 2005 16:50:11 -0000 1.17 +++ display.c 21 Nov 2005 18:25:30 -0000 1.18 @@ -445,3 +445,28 @@ setGamma(env, disp, screen, gamma_ramp_buffer, true); XCloseDisplay(disp); } + +JNIEXPORT jobjectArray JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetAvailableDisplayModes(JNIEnv *env, jclass clazz, jint extension) { + return getAvailableDisplayModes(env, getDisplay(), getCurrentScreen(), extension); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSwitchDisplayMode(JNIEnv *env, jclass clazz, jint extension, jobject mode) { + switchDisplayMode(env, mode, getCurrentScreen(), extension); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nResetDisplayMode(JNIEnv *env, jclass clazz, jint extension, jobject gamma_ramp) { + resetDisplayMode(env, getCurrentScreen(), extension, gamma_ramp, false); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetGammaRampLength(JNIEnv *env, jclass clazz) { + return (jint)getGammaRampLengthOfDisplay(env, getDisplay(), getCurrentScreen()); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetGammaRamp(JNIEnv *env, jclass clazz, jobject gamma_buffer) { + setGammaRamp(env, gamma_buffer, getCurrentScreen()); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nInit(JNIEnv *env, jclass clazz, jint extension) { + return initDisplay(env, getCurrentScreen(), extension); +} + Index: org_lwjgl_opengl_Display.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- org_lwjgl_opengl_Display.c 21 Nov 2005 16:50:11 -0000 1.36 +++ org_lwjgl_opengl_Display.c 21 Nov 2005 18:25:30 -0000 1.37 @@ -459,30 +459,6 @@ handleMessages(env, extension, window_mode, saved_gamma, current_gamma); } -JNIEXPORT jobjectArray JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetAvailableDisplayModes(JNIEnv *env, jclass clazz, jint extension) { - return getAvailableDisplayModes(env, getDisplay(), getCurrentScreen(), extension); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSwitchDisplayMode(JNIEnv *env, jclass clazz, jint extension, jobject mode) { - switchDisplayMode(env, mode, getCurrentScreen(), extension); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nResetDisplayMode(JNIEnv *env, jclass clazz, jint extension, jobject gamma_ramp) { - resetDisplayMode(env, getCurrentScreen(), extension, gamma_ramp, false); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetGammaRampLength(JNIEnv *env, jclass clazz) { - return (jint)getGammaRampLengthOfDisplay(env, getDisplay(), getCurrentScreen()); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetGammaRamp(JNIEnv *env, jclass clazz, jobject gamma_buffer) { - setGammaRamp(env, gamma_buffer, getCurrentScreen()); -} - -JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nInit(JNIEnv *env, jclass clazz, jint extension) { - return initDisplay(env, getCurrentScreen(), extension); -} - JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nCreateWindow(JNIEnv *env, jclass clazz, jobject peer_info_handle, jobject mode, jint window_mode, jint x, jint y) { X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle); GLXFBConfig *fb_config = NULL; |