|
From: <eli...@us...> - 2008-04-30 15:29:42
|
Revision: 3056
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3056&view=rev
Author: elias_naur
Date: 2008-04-30 08:29:39 -0700 (Wed, 30 Apr 2008)
Log Message:
-----------
Windows: Moved child window style selection to java
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java
trunk/LWJGL/src/native/windows/context.c
trunk/LWJGL/src/native/windows/context.h
trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Display.c
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2008-04-30 14:58:47 UTC (rev 3055)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2008-04-30 15:29:39 UTC (rev 3056)
@@ -154,7 +154,7 @@
this.parent = parent;
long parent_hwnd = parent != null ? getHwnd(parent) : 0;
boolean isUndecorated = isUndecorated();
- nCreateWindow(mode, fullscreen, x, y, isUndecorated, parent_hwnd);
+ nCreateWindow(mode, fullscreen, x, y, isUndecorated, parent != null, parent_hwnd);
peer_info.initDC();
showWindow(getHwnd(), SW_SHOWDEFAULT);
if (parent == null) {
@@ -162,7 +162,7 @@
setFocus(getHwnd());
}
}
- private native void nCreateWindow(DisplayMode mode, boolean fullscreen, int x, int y, boolean undecorated, long parent_hwnd) throws LWJGLException;
+ private native void nCreateWindow(DisplayMode mode, boolean fullscreen, int x, int y, boolean undecorated, boolean child_window, long parent_hwnd) throws LWJGLException;
private static boolean isUndecorated() {
return Display.getPrivilegedBoolean("org.lwjgl.opengl.Window.undecorated");
Modified: trunk/LWJGL/src/native/windows/context.c
===================================================================
--- trunk/LWJGL/src/native/windows/context.c 2008-04-30 14:58:47 UTC (rev 3055)
+++ trunk/LWJGL/src/native/windows/context.c 2008-04-30 15:29:39 UTC (rev 3056)
@@ -139,13 +139,13 @@
*
* Returns true for success, or false for failure
*/
-HWND createWindow(LPCTSTR window_class_name, int x, int y, int width, int height, bool fullscreen, bool undecorated, HWND parent)
+HWND createWindow(LPCTSTR window_class_name, int x, int y, int width, int height, bool fullscreen, bool undecorated, bool child_window, HWND parent)
{
RECT clientSize;
DWORD exstyle, windowflags;
HWND new_hwnd;
- getWindowFlags(&windowflags, &exstyle, fullscreen, undecorated, parent != NULL);
+ getWindowFlags(&windowflags, &exstyle, fullscreen, undecorated, child_window);
// If we're not a fullscreen window, adjust the height to account for the
// height of the title bar (unless undecorated)
@@ -468,5 +468,5 @@
HWND createDummyWindow(int origin_x, int origin_y) {
if (!registerDummyWindow())
return NULL;
- return createWindow(_CONTEXT_PRIVATE_CLASS_NAME, origin_x, origin_y, 1, 1, false, false, NULL);
+ return createWindow(_CONTEXT_PRIVATE_CLASS_NAME, origin_x, origin_y, 1, 1, false, false, false, NULL);
}
Modified: trunk/LWJGL/src/native/windows/context.h
===================================================================
--- trunk/LWJGL/src/native/windows/context.h 2008-04-30 14:58:47 UTC (rev 3055)
+++ trunk/LWJGL/src/native/windows/context.h 2008-04-30 15:29:39 UTC (rev 3056)
@@ -89,7 +89,7 @@
*
* Returns true for success, or false for failure
*/
-extern HWND createWindow(LPCTSTR window_class_name, int x, int y, int width, int height, bool fullscreen, bool undecorated, HWND parent);
+extern HWND createWindow(LPCTSTR window_class_name, int x, int y, int width, int height, bool fullscreen, bool undecorated, bool child_window, HWND parent);
extern int findPixelFormatOnDC(JNIEnv *env, HDC hdc, int origin_x, int origin_y, jobject pixel_format, jobject pixelFormatCaps, bool use_hdc_bpp, bool window, bool pbuffer, bool double_buffer, bool floating_point);
Modified: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Display.c
===================================================================
--- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Display.c 2008-04-30 14:58:47 UTC (rev 3055)
+++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Display.c 2008-04-30 15:29:39 UTC (rev 3056)
@@ -193,7 +193,7 @@
freeSmallIcon();
}
-JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nCreateWindow(JNIEnv *env, jobject self, jobject mode, jboolean fullscreen, jint x, jint y, jboolean undecorated, jlong parent_hwnd) {
+JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nCreateWindow(JNIEnv *env, jobject self, jobject mode, jboolean fullscreen, jint x, jint y, jboolean undecorated, jboolean child_window, jlong parent_hwnd) {
jclass cls_displayMode = (*env)->GetObjectClass(env, mode);
jfieldID fid_width = (*env)->GetFieldID(env, cls_displayMode, "width", "I");
jfieldID fid_height = (*env)->GetFieldID(env, cls_displayMode, "height", "I");
@@ -208,7 +208,7 @@
oneShotInitialised = true;
}
- display_hwnd = createWindow(WINDOWCLASSNAME, x, y, width, height, fullscreen, undecorated, (HWND)parent_hwnd);
+ display_hwnd = createWindow(WINDOWCLASSNAME, x, y, width, height, fullscreen, undecorated, child_window, (HWND)parent_hwnd);
if (display_hwnd == NULL) {
throwException(env, "Failed to create the window.");
return;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|