diff options
author | Dmitri Trembovetski <[email protected]> | 2009-04-10 19:27:58 +0000 |
---|---|---|
committer | Dmitri Trembovetski <[email protected]> | 2009-04-10 19:27:58 +0000 |
commit | da57c2c820d1cad4365a6a24018a90f46eb29a5f (patch) | |
tree | af54e2035fb768c37e4feb4038be7cb9df08acbb /src | |
parent | 16767ef62eec3e843c80b7b546a0b38860190fb7 (diff) |
Newt fixes for Windows implementation: implemented undecorated window style
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1900 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src')
-rwxr-xr-x | src/newt/classes/com/sun/javafx/newt/windows/WindowsWindow.java | 3 | ||||
-rwxr-xr-x | src/newt/native/WindowsWindow.c | 12 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/newt/classes/com/sun/javafx/newt/windows/WindowsWindow.java b/src/newt/classes/com/sun/javafx/newt/windows/WindowsWindow.java index d3f42d13e..2073c5d1b 100755 --- a/src/newt/classes/com/sun/javafx/newt/windows/WindowsWindow.java +++ b/src/newt/classes/com/sun/javafx/newt/windows/WindowsWindow.java @@ -70,7 +70,7 @@ public class WindowsWindow extends Window { // pixel format selection here chosenCaps = (Capabilities) caps.clone(); // FIXME: visualID := f1(caps); caps := f2(visualID) config = null; // n/a - windowHandle = CreateWindow(WINDOW_CLASS_NAME, getHInstance(), 0, x, y, width, height); + windowHandle = CreateWindow(WINDOW_CLASS_NAME, getHInstance(), 0, undecorated, x, y, width, height); if (windowHandle == 0) { throw new NativeWindowException("Error creating window"); } @@ -177,6 +177,7 @@ public class WindowsWindow extends Window { private static native long LoadLibraryW(String libraryName); private static native long RegisterWindowClass(String windowClassName, long hInstance); private native long CreateWindow(String windowClassName, long hInstance, long visualID, + boolean isUndecorated, int x, int y, int width, int height); private native void DestroyWindow(long windowHandle); private native long GetDC(long windowHandle); diff --git a/src/newt/native/WindowsWindow.c b/src/newt/native/WindowsWindow.c index 5fa5cf9ba..a742f5acf 100755 --- a/src/newt/native/WindowsWindow.c +++ b/src/newt/native/WindowsWindow.c @@ -161,7 +161,6 @@ static LRESULT CALLBACK wndProc(HWND wnd, UINT message, (*env)->CallVoidMethod(env, window, sizeChangedID, (jint) rc.right, (jint) rc.bottom); break; - // FIXME: define constants for the mouse buttons and modifiers case WM_LBUTTONDOWN: (*env)->CallVoidMethod(env, window, sendMouseEventID, (jint) EVENT_MOUSE_PRESSED, ConvertModifiers(wParam), (jint) LOWORD(lParam), (jint) HIWORD(lParam), (jint) 1); @@ -303,11 +302,12 @@ JNIEXPORT jlong JNICALL Java_com_sun_javafx_newt_windows_WindowsWindow_RegisterW /* * Class: com_sun_javafx_newt_windows_WindowsWindow * Method: CreateWindow - * Signature: (Ljava/lang/String;JJIIII)J + * Signature: (Ljava/lang/String;JJZIIII)J */ JNIEXPORT jlong JNICALL Java_com_sun_javafx_newt_windows_WindowsWindow_CreateWindow (JNIEnv *env, jobject obj, jstring windowClassName, jlong hInstance, jlong visualID, - jint jx, jint jy, jint defaultWidth, jint defaultHeight) + jboolean bIsUndecorated, + jint jx, jint jy, jint defaultWidth, jint defaultHeight) { const TCHAR* wndClassName = NULL; DWORD windowStyle = WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_VISIBLE; @@ -331,7 +331,11 @@ JNIEXPORT jlong JNICALL Java_com_sun_javafx_newt_windows_WindowsWindow_CreateWin #else x = CW_USEDEFAULT; y = 0; - windowStyle |= WS_OVERLAPPEDWINDOW; + if (bIsUndecorated) { + windowStyle |= WS_POPUP | WS_SYSMENU | WS_MAXIMIZEBOX | WS_MINIMIZEBOX; + } else { + windowStyle |= WS_OVERLAPPEDWINDOW; + } #endif (void) visualID; // FIXME: use the visualID .. |