Linux: Moved some JNI functions
This commit is contained in:
parent
61bfceaaed
commit
b3fd19cf01
|
@ -445,3 +445,28 @@ void setGammaRamp(JNIEnv *env, jobject gamma_ramp_buffer, int screen) {
|
||||||
setGamma(env, disp, screen, gamma_ramp_buffer, true);
|
setGamma(env, disp, screen, gamma_ramp_buffer, true);
|
||||||
XCloseDisplay(disp);
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,12 +47,7 @@
|
||||||
|
|
||||||
extern int getScreenModeWidth(void);
|
extern int getScreenModeWidth(void);
|
||||||
extern int getScreenModeHeight(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 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);
|
extern void temporaryRestoreMode(JNIEnv *env, int screen, jint extension, jobject gamma_ramp);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -459,30 +459,6 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nUpdate
|
||||||
handleMessages(env, extension, window_mode, saved_gamma, current_gamma);
|
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) {
|
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);
|
X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle);
|
||||||
GLXFBConfig *fb_config = NULL;
|
GLXFBConfig *fb_config = NULL;
|
||||||
|
|
Loading…
Reference in New Issue