diff options
author | Kenneth Russel <[email protected]> | 2008-05-30 07:39:06 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2008-05-30 07:39:06 +0000 |
commit | b5aed7df3ac9ebd87498247882d0c874891c0ce9 (patch) | |
tree | e2389c6a3688f76c3f2d330c0e7b84e8e132483e /src/native/jogl/WindowsWindow.c | |
parent | 10052f96bb3c29f2fb38787e71caa63825c18be2 (diff) |
Changes to WindowsWindow.c to compile on Windows CE. Slight changes to
config selection to match C code -- no semantic difference, however.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1649 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/native/jogl/WindowsWindow.c')
-rwxr-xr-x | src/native/jogl/WindowsWindow.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/native/jogl/WindowsWindow.c b/src/native/jogl/WindowsWindow.c index 157615950..151666ab3 100755 --- a/src/native/jogl/WindowsWindow.c +++ b/src/native/jogl/WindowsWindow.c @@ -33,9 +33,13 @@ #include <windows.h> #include <stdlib.h> +#ifdef UNDER_CE +#include "aygshell.h" +#endif -/* This typedef is apparently needed for Microsoft compilers before VC8 */ -#if _MSC_VER < 1400 +/* This typedef is apparently needed for Microsoft compilers before VC8, + and on Windows CE */ +#if (_MSC_VER < 1400) || defined(UNDER_CE) #ifdef _WIN64 typedef long long intptr_t; #else @@ -72,7 +76,11 @@ static LRESULT CALLBACK wndProc(HWND wnd, UINT message, int useDefWindowProc = 0; jobject window = NULL; +#ifdef UNDER_CE + window = (jobject) GetWindowLong(wnd, GWL_USERDATA); +#else window = (jobject) GetWindowLongPtr(wnd, GWLP_USERDATA); +#endif if (window == NULL || env == NULL) { // Shouldn't happen return DefWindowProc(wnd, message, wParam, lParam); @@ -212,7 +220,11 @@ JNIEXPORT jlong JNICALL Java_com_sun_javafx_newt_windows_WindowsWindow_CreateWin (HINSTANCE) hInstance, NULL); if (window != NULL) { +#ifdef UNDER_CE + SetWindowLong(window, GWL_USERDATA, (intptr_t) (*env)->NewGlobalRef(env, obj)); +#else SetWindowLongPtr(window, GWLP_USERDATA, (intptr_t) (*env)->NewGlobalRef(env, obj)); +#endif ShowWindow(window, SW_SHOWNORMAL); } return (jlong) (intptr_t) window; |