From bf72447cec885ab4c4450fafb8bbda8f9ed393c2 Mon Sep 17 00:00:00 2001 From: Caspian Rychlik-Prince Date: Wed, 4 Jun 2003 21:49:46 +0000 Subject: [PATCH] *** empty log message *** --- src/java/org/lwjgl/Window.java | 24 ++++++++++++++++++++-- src/native/common/org_lwjgl_Window.h | 30 +++++++++++++++++++++------- 2 files changed, 45 insertions(+), 9 deletions(-) diff --git a/src/java/org/lwjgl/Window.java b/src/java/org/lwjgl/Window.java index 06117fe5..5825f02a 100644 --- a/src/java/org/lwjgl/Window.java +++ b/src/java/org/lwjgl/Window.java @@ -54,10 +54,10 @@ public abstract class Window { private int y; /** Width of the window */ - private final int width; + private int width; /** Height of the window */ - private final int height; + private int height; /** Title of the window */ private String title; @@ -66,6 +66,9 @@ public abstract class Window { * Construct a Window. Some OSs may not support non-fullscreen windows; in * which case the window will be fullscreen regardless. * + * A fullscreen window MUST track changes to the display settings and change its + * width and height accordingly. + * * In this abstract base class, no actual window peer is constructed. This should be * done in specialised derived classes. * @@ -141,6 +144,23 @@ public abstract class Window { return minimized; } + /** + * Minimize the game and allow the operating system's default display to become + * visible. It is NOT the responsibility of LWJGL's native code to restore the display + * to its normal display settings. + * + * If the display is already minimized then this is a no-op. + */ + public final native void minimize(); + + /** + * Restore the game and hide the operating system away. It is NOT the responsibility of + * LWJGL's native code to restore the display to its game display settings. + * + * If the display is not minimized then this is a no-op/ + */ + public final native void restore(); + /** * Determine if the window's contents have been damaged by external events. * If you are writing a straightforward game rendering loop and simply paint diff --git a/src/native/common/org_lwjgl_Window.h b/src/native/common/org_lwjgl_Window.h index ef2ae53b..7725cdab 100644 --- a/src/native/common/org_lwjgl_Window.h +++ b/src/native/common/org_lwjgl_Window.h @@ -16,13 +16,29 @@ extern "C" { JNIEXPORT void JNICALL Java_org_lwjgl_Window_nSetTitle (JNIEnv *, jobject, jstring); -/* - * Class: org_lwjgl_Window - * Method: tick - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_Window_tick - (JNIEnv *, jobject); +/* + * Class: org_lwjgl_Window + * Method: tick + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_Window_tick + (JNIEnv *, jobject); + +/* + * Class: org_lwjgl_Window + * Method: minimize + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_Window_minimize + (JNIEnv *, jobject); + +/* + * Class: org_lwjgl_Window + * Method: restore + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_Window_restore + (JNIEnv *, jobject); #ifdef __cplusplus }