diff options
author | Steve Northover <steve> | 2006-09-25 16:00:32 +0000 |
---|---|---|
committer | Steve Northover <steve> | 2006-09-25 16:00:32 +0000 |
commit | 03e23cf4c81d13094d1e2c6633bcf96224d8fef7 (patch) | |
tree | 9f1d997a6f3d0489a4ebc960a9706d04df4c98d1 | |
parent | eae7c0853de26fee18e86e536bdda063c5abb045 (diff) | |
download | eclipse.platform.swt-03e23cf4c81d13094d1e2c6633bcf96224d8fef7.tar.gz eclipse.platform.swt-03e23cf4c81d13094d1e2c6633bcf96224d8fef7.tar.xz eclipse.platform.swt-03e23cf4c81d13094d1e2c6633bcf96224d8fef7.zip |
158472 - AnimateWindow call makes SWT unusable on NT4.
3 files changed, 18 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.win32.OS.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.win32.OS.properties index b45689e37a..b375ae7d73 100644 --- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.win32.OS.properties +++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.win32.OS.properties @@ -701,7 +701,7 @@ OS_AlphaBlend_8= OS_AlphaBlend_9= OS_AlphaBlend_10=flags=struct -OS_AnimateWindow= +OS_AnimateWindow=flags=dynamic OS_AnimateWindow_0=cast=HWND OS_AnimateWindow_1= OS_AnimateWindow_2= diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c index 1933a5ce3c..020de81313 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c @@ -125,7 +125,23 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(AnimateWindow) { jboolean rc = 0; OS_NATIVE_ENTER(env, that, AnimateWindow_FUNC); +/* rc = (jboolean)AnimateWindow((HWND)arg0, arg1, arg2); +*/ + { + static int initialized = 0; + static HMODULE hm = NULL; + static FARPROC fp = NULL; + rc = 0; + if (!initialized) { + if (!hm) hm = LoadLibrary(AnimateWindow_LIB); + if (hm) fp = GetProcAddress(hm, "AnimateWindow"); + initialized = 1; + } + if (fp) { + rc = (jboolean)fp((HWND)arg0, arg1, arg2); + } + } OS_NATIVE_EXIT(env, that, AnimateWindow_FUNC); return rc; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.h b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.h index 3b9e2b73c4..d149317333 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.h @@ -12,6 +12,7 @@ /* Libraries for dynamic loaded functions */ #define ActivateActCtx_LIB "kernel32.dll" #define AlphaBlend_LIB "msimg32.dll" +#define AnimateWindow_LIB "user32.dll" #define CloseThemeData_LIB "uxtheme.dll" #define CreateActCtxW_LIB "kernel32.dll" #define CreateActCtxA_LIB "kernel32.dll" |