Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Heidrich2006-12-13 18:11:56 -0500
committerFelipe Heidrich2006-12-13 18:11:56 -0500
commita635ae695a388c1d014060dae5b2e19cde744f31 (patch)
tree6c116d82d5850650b71e22ffd3d5a9f08e1890cf
parent6fe18155b5624253dc0b86434f7748ab24f21fe1 (diff)
downloadeclipse.platform.swt-a635ae695a388c1d014060dae5b2e19cde744f31.tar.gz
eclipse.platform.swt-a635ae695a388c1d014060dae5b2e19cde744f31.tar.xz
eclipse.platform.swt-a635ae695a388c1d014060dae5b2e19cde744f31.zip
bug 164493 - StyledText doesn't support advanced text services for Korean IME
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c72
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.c12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.h8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.c146
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.h36
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OSVERSIONINFOEX.java20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OSVERSIONINFOEXA.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OSVERSIONINFOEXW.java16
9 files changed, 330 insertions, 16 deletions
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 558eea8793..cc363dd60e 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
@@ -5267,34 +5267,66 @@ JNIEXPORT jint JNICALL OS_NATIVE(GetUpdateRgn)
}
#endif
-#ifndef NO_GetVersionExA
-JNIEXPORT jboolean JNICALL OS_NATIVE(GetVersionExA)
+#ifndef NO_GetVersionExA__Lorg_eclipse_swt_internal_win32_OSVERSIONINFOA_2
+JNIEXPORT jboolean JNICALL OS_NATIVE(GetVersionExA__Lorg_eclipse_swt_internal_win32_OSVERSIONINFOA_2)
(JNIEnv *env, jclass that, jobject arg0)
{
OSVERSIONINFOA _arg0, *lparg0=NULL;
jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, GetVersionExA_FUNC);
+ OS_NATIVE_ENTER(env, that, GetVersionExA__Lorg_eclipse_swt_internal_win32_OSVERSIONINFOA_2_FUNC);
if (arg0) if ((lparg0 = getOSVERSIONINFOAFields(env, arg0, &_arg0)) == NULL) goto fail;
rc = (jboolean)GetVersionExA(lparg0);
fail:
if (arg0 && lparg0) setOSVERSIONINFOAFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, GetVersionExA_FUNC);
+ OS_NATIVE_EXIT(env, that, GetVersionExA__Lorg_eclipse_swt_internal_win32_OSVERSIONINFOA_2_FUNC);
return rc;
}
#endif
-#ifndef NO_GetVersionExW
-JNIEXPORT jboolean JNICALL OS_NATIVE(GetVersionExW)
+#ifndef NO_GetVersionExA__Lorg_eclipse_swt_internal_win32_OSVERSIONINFOEXA_2
+JNIEXPORT jboolean JNICALL OS_NATIVE(GetVersionExA__Lorg_eclipse_swt_internal_win32_OSVERSIONINFOEXA_2)
+ (JNIEnv *env, jclass that, jobject arg0)
+{
+ OSVERSIONINFOEXA _arg0, *lparg0=NULL;
+ jboolean rc = 0;
+ OS_NATIVE_ENTER(env, that, GetVersionExA__Lorg_eclipse_swt_internal_win32_OSVERSIONINFOEXA_2_FUNC);
+ if (arg0) if ((lparg0 = getOSVERSIONINFOEXAFields(env, arg0, &_arg0)) == NULL) goto fail;
+ rc = (jboolean)GetVersionExA((LPOSVERSIONINFOA)lparg0);
+fail:
+ if (arg0 && lparg0) setOSVERSIONINFOEXAFields(env, arg0, lparg0);
+ OS_NATIVE_EXIT(env, that, GetVersionExA__Lorg_eclipse_swt_internal_win32_OSVERSIONINFOEXA_2_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_GetVersionExW__Lorg_eclipse_swt_internal_win32_OSVERSIONINFOEXW_2
+JNIEXPORT jboolean JNICALL OS_NATIVE(GetVersionExW__Lorg_eclipse_swt_internal_win32_OSVERSIONINFOEXW_2)
+ (JNIEnv *env, jclass that, jobject arg0)
+{
+ OSVERSIONINFOEXW _arg0, *lparg0=NULL;
+ jboolean rc = 0;
+ OS_NATIVE_ENTER(env, that, GetVersionExW__Lorg_eclipse_swt_internal_win32_OSVERSIONINFOEXW_2_FUNC);
+ if (arg0) if ((lparg0 = getOSVERSIONINFOEXWFields(env, arg0, &_arg0)) == NULL) goto fail;
+ rc = (jboolean)GetVersionExW((LPOSVERSIONINFOW)lparg0);
+fail:
+ if (arg0 && lparg0) setOSVERSIONINFOEXWFields(env, arg0, lparg0);
+ OS_NATIVE_EXIT(env, that, GetVersionExW__Lorg_eclipse_swt_internal_win32_OSVERSIONINFOEXW_2_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_GetVersionExW__Lorg_eclipse_swt_internal_win32_OSVERSIONINFOW_2
+JNIEXPORT jboolean JNICALL OS_NATIVE(GetVersionExW__Lorg_eclipse_swt_internal_win32_OSVERSIONINFOW_2)
(JNIEnv *env, jclass that, jobject arg0)
{
OSVERSIONINFOW _arg0, *lparg0=NULL;
jboolean rc = 0;
- OS_NATIVE_ENTER(env, that, GetVersionExW_FUNC);
+ OS_NATIVE_ENTER(env, that, GetVersionExW__Lorg_eclipse_swt_internal_win32_OSVERSIONINFOW_2_FUNC);
if (arg0) if ((lparg0 = getOSVERSIONINFOWFields(env, arg0, &_arg0)) == NULL) goto fail;
rc = (jboolean)GetVersionExW(lparg0);
fail:
if (arg0 && lparg0) setOSVERSIONINFOWFields(env, arg0, lparg0);
- OS_NATIVE_EXIT(env, that, GetVersionExW_FUNC);
+ OS_NATIVE_EXIT(env, that, GetVersionExW__Lorg_eclipse_swt_internal_win32_OSVERSIONINFOW_2_FUNC);
return rc;
}
#endif
@@ -9028,6 +9060,30 @@ JNIEXPORT jint JNICALL OS_NATIVE(OSVERSIONINFOA_1sizeof)
}
#endif
+#ifndef NO_OSVERSIONINFOEXA_1sizeof
+JNIEXPORT jint JNICALL OS_NATIVE(OSVERSIONINFOEXA_1sizeof)
+ (JNIEnv *env, jclass that)
+{
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, OSVERSIONINFOEXA_1sizeof_FUNC);
+ rc = (jint)OSVERSIONINFOEXA_sizeof();
+ OS_NATIVE_EXIT(env, that, OSVERSIONINFOEXA_1sizeof_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_OSVERSIONINFOEXW_1sizeof
+JNIEXPORT jint JNICALL OS_NATIVE(OSVERSIONINFOEXW_1sizeof)
+ (JNIEnv *env, jclass that)
+{
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, OSVERSIONINFOEXW_1sizeof_FUNC);
+ rc = (jint)OSVERSIONINFOEXW_sizeof();
+ OS_NATIVE_EXIT(env, that, OSVERSIONINFOEXW_1sizeof_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_OSVERSIONINFOW_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(OSVERSIONINFOW_1sizeof)
(JNIEnv *env, jclass that)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.c
index f51736520e..887ac15e9d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.c
@@ -14,8 +14,8 @@
#ifdef NATIVE_STATS
-int OS_nativeFunctionCount = 850;
-int OS_nativeFunctionCallCount[850];
+int OS_nativeFunctionCount = 854;
+int OS_nativeFunctionCallCount[854];
char * OS_nativeFunctionNames[] = {
"ACCEL_1sizeof",
"ACTCTX_1sizeof",
@@ -324,8 +324,10 @@ char * OS_nativeFunctionNames[] = {
"GetTimeFormatW",
"GetUpdateRect",
"GetUpdateRgn",
- "GetVersionExA",
- "GetVersionExW",
+ "GetVersionExA__Lorg_eclipse_swt_internal_win32_OSVERSIONINFOA_2",
+ "GetVersionExA__Lorg_eclipse_swt_internal_win32_OSVERSIONINFOEXA_2",
+ "GetVersionExW__Lorg_eclipse_swt_internal_win32_OSVERSIONINFOEXW_2",
+ "GetVersionExW__Lorg_eclipse_swt_internal_win32_OSVERSIONINFOW_2",
"GetWindow",
"GetWindowDC",
"GetWindowLongA",
@@ -577,6 +579,8 @@ char * OS_nativeFunctionNames[] = {
"OFNOTIFY_1sizeof",
"OPENFILENAME_1sizeof",
"OSVERSIONINFOA_1sizeof",
+ "OSVERSIONINFOEXA_1sizeof",
+ "OSVERSIONINFOEXW_1sizeof",
"OSVERSIONINFOW_1sizeof",
"OffsetRect",
"OffsetRgn",
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.h
index 15c3fde6e6..06de73adcc 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.h
@@ -328,8 +328,10 @@ typedef enum {
GetTimeFormatW_FUNC,
GetUpdateRect_FUNC,
GetUpdateRgn_FUNC,
- GetVersionExA_FUNC,
- GetVersionExW_FUNC,
+ GetVersionExA__Lorg_eclipse_swt_internal_win32_OSVERSIONINFOA_2_FUNC,
+ GetVersionExA__Lorg_eclipse_swt_internal_win32_OSVERSIONINFOEXA_2_FUNC,
+ GetVersionExW__Lorg_eclipse_swt_internal_win32_OSVERSIONINFOEXW_2_FUNC,
+ GetVersionExW__Lorg_eclipse_swt_internal_win32_OSVERSIONINFOW_2_FUNC,
GetWindow_FUNC,
GetWindowDC_FUNC,
GetWindowLongA_FUNC,
@@ -581,6 +583,8 @@ typedef enum {
OFNOTIFY_1sizeof_FUNC,
OPENFILENAME_1sizeof_FUNC,
OSVERSIONINFOA_1sizeof_FUNC,
+ OSVERSIONINFOEXA_1sizeof_FUNC,
+ OSVERSIONINFOEXW_1sizeof_FUNC,
OSVERSIONINFOW_1sizeof_FUNC,
OffsetRect_FUNC,
OffsetRgn_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.c b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.c
index 5cc2ecb585..d5550f6a11 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.c
@@ -4395,6 +4395,152 @@ void setOSVERSIONINFOAFields(JNIEnv *env, jobject lpObject, OSVERSIONINFOA *lpSt
}
#endif
+#ifndef NO_OSVERSIONINFOEX
+typedef struct OSVERSIONINFOEX_FID_CACHE {
+ int cached;
+ jclass clazz;
+ jfieldID wServicePackMajor, wServicePackMinor, wSuiteMask, wProductType, wReserved;
+} OSVERSIONINFOEX_FID_CACHE;
+
+OSVERSIONINFOEX_FID_CACHE OSVERSIONINFOEXFc;
+
+void cacheOSVERSIONINFOEXFields(JNIEnv *env, jobject lpObject)
+{
+ if (OSVERSIONINFOEXFc.cached) return;
+ cacheOSVERSIONINFOFields(env, lpObject);
+ OSVERSIONINFOEXFc.clazz = (*env)->GetObjectClass(env, lpObject);
+ OSVERSIONINFOEXFc.wServicePackMajor = (*env)->GetFieldID(env, OSVERSIONINFOEXFc.clazz, "wServicePackMajor", "S");
+ OSVERSIONINFOEXFc.wServicePackMinor = (*env)->GetFieldID(env, OSVERSIONINFOEXFc.clazz, "wServicePackMinor", "S");
+ OSVERSIONINFOEXFc.wSuiteMask = (*env)->GetFieldID(env, OSVERSIONINFOEXFc.clazz, "wSuiteMask", "S");
+ OSVERSIONINFOEXFc.wProductType = (*env)->GetFieldID(env, OSVERSIONINFOEXFc.clazz, "wProductType", "B");
+ OSVERSIONINFOEXFc.wReserved = (*env)->GetFieldID(env, OSVERSIONINFOEXFc.clazz, "wReserved", "B");
+ OSVERSIONINFOEXFc.cached = 1;
+}
+
+OSVERSIONINFOEX *getOSVERSIONINFOEXFields(JNIEnv *env, jobject lpObject, OSVERSIONINFOEX *lpStruct)
+{
+ if (!OSVERSIONINFOEXFc.cached) cacheOSVERSIONINFOEXFields(env, lpObject);
+ getOSVERSIONINFOFields(env, lpObject, (OSVERSIONINFO *)lpStruct);
+ lpStruct->wServicePackMajor = (*env)->GetShortField(env, lpObject, OSVERSIONINFOEXFc.wServicePackMajor);
+ lpStruct->wServicePackMinor = (*env)->GetShortField(env, lpObject, OSVERSIONINFOEXFc.wServicePackMinor);
+ lpStruct->wSuiteMask = (*env)->GetShortField(env, lpObject, OSVERSIONINFOEXFc.wSuiteMask);
+ lpStruct->wProductType = (*env)->GetByteField(env, lpObject, OSVERSIONINFOEXFc.wProductType);
+ lpStruct->wReserved = (*env)->GetByteField(env, lpObject, OSVERSIONINFOEXFc.wReserved);
+ return lpStruct;
+}
+
+void setOSVERSIONINFOEXFields(JNIEnv *env, jobject lpObject, OSVERSIONINFOEX *lpStruct)
+{
+ if (!OSVERSIONINFOEXFc.cached) cacheOSVERSIONINFOEXFields(env, lpObject);
+ setOSVERSIONINFOFields(env, lpObject, (OSVERSIONINFO *)lpStruct);
+ (*env)->SetShortField(env, lpObject, OSVERSIONINFOEXFc.wServicePackMajor, (jshort)lpStruct->wServicePackMajor);
+ (*env)->SetShortField(env, lpObject, OSVERSIONINFOEXFc.wServicePackMinor, (jshort)lpStruct->wServicePackMinor);
+ (*env)->SetShortField(env, lpObject, OSVERSIONINFOEXFc.wSuiteMask, (jshort)lpStruct->wSuiteMask);
+ (*env)->SetByteField(env, lpObject, OSVERSIONINFOEXFc.wProductType, (jbyte)lpStruct->wProductType);
+ (*env)->SetByteField(env, lpObject, OSVERSIONINFOEXFc.wReserved, (jbyte)lpStruct->wReserved);
+}
+#endif
+
+#ifndef NO_OSVERSIONINFOEXA
+typedef struct OSVERSIONINFOEXA_FID_CACHE {
+ int cached;
+ jclass clazz;
+ jfieldID szCSDVersion;
+} OSVERSIONINFOEXA_FID_CACHE;
+
+OSVERSIONINFOEXA_FID_CACHE OSVERSIONINFOEXAFc;
+
+void cacheOSVERSIONINFOEXAFields(JNIEnv *env, jobject lpObject)
+{
+ if (OSVERSIONINFOEXAFc.cached) return;
+ cacheOSVERSIONINFOEXFields(env, lpObject);
+ OSVERSIONINFOEXAFc.clazz = (*env)->GetObjectClass(env, lpObject);
+ OSVERSIONINFOEXAFc.szCSDVersion = (*env)->GetFieldID(env, OSVERSIONINFOEXAFc.clazz, "szCSDVersion", "[B");
+ OSVERSIONINFOEXAFc.cached = 1;
+}
+
+OSVERSIONINFOEXA *getOSVERSIONINFOEXAFields(JNIEnv *env, jobject lpObject, OSVERSIONINFOEXA *lpStruct)
+{
+ if (!OSVERSIONINFOEXAFc.cached) cacheOSVERSIONINFOEXAFields(env, lpObject);
+ getOSVERSIONINFOFields(env, lpObject, (OSVERSIONINFO *)lpStruct);
+ lpStruct->wServicePackMajor = (*env)->GetShortField(env, lpObject, OSVERSIONINFOEXFc.wServicePackMajor);
+ lpStruct->wServicePackMinor = (*env)->GetShortField(env, lpObject, OSVERSIONINFOEXFc.wServicePackMinor);
+ lpStruct->wSuiteMask = (*env)->GetShortField(env, lpObject, OSVERSIONINFOEXFc.wSuiteMask);
+ lpStruct->wProductType = (*env)->GetByteField(env, lpObject, OSVERSIONINFOEXFc.wProductType);
+ lpStruct->wReserved = (*env)->GetByteField(env, lpObject, OSVERSIONINFOEXFc.wReserved);
+ {
+ jbyteArray lpObject1 = (jbyteArray)(*env)->GetObjectField(env, lpObject, OSVERSIONINFOEXAFc.szCSDVersion);
+ (*env)->GetByteArrayRegion(env, lpObject1, 0, sizeof(lpStruct->szCSDVersion), (jbyte *)lpStruct->szCSDVersion);
+ }
+ return lpStruct;
+}
+
+void setOSVERSIONINFOEXAFields(JNIEnv *env, jobject lpObject, OSVERSIONINFOEXA *lpStruct)
+{
+ if (!OSVERSIONINFOEXAFc.cached) cacheOSVERSIONINFOEXAFields(env, lpObject);
+ setOSVERSIONINFOFields(env, lpObject, (OSVERSIONINFO *)lpStruct);
+ (*env)->SetShortField(env, lpObject, OSVERSIONINFOEXFc.wServicePackMajor, (jshort)lpStruct->wServicePackMajor);
+ (*env)->SetShortField(env, lpObject, OSVERSIONINFOEXFc.wServicePackMinor, (jshort)lpStruct->wServicePackMinor);
+ (*env)->SetShortField(env, lpObject, OSVERSIONINFOEXFc.wSuiteMask, (jshort)lpStruct->wSuiteMask);
+ (*env)->SetByteField(env, lpObject, OSVERSIONINFOEXFc.wProductType, (jbyte)lpStruct->wProductType);
+ (*env)->SetByteField(env, lpObject, OSVERSIONINFOEXFc.wReserved, (jbyte)lpStruct->wReserved);
+ {
+ jbyteArray lpObject1 = (jbyteArray)(*env)->GetObjectField(env, lpObject, OSVERSIONINFOEXAFc.szCSDVersion);
+ (*env)->SetByteArrayRegion(env, lpObject1, 0, sizeof(lpStruct->szCSDVersion), (jbyte *)lpStruct->szCSDVersion);
+ }
+}
+#endif
+
+#ifndef NO_OSVERSIONINFOEXW
+typedef struct OSVERSIONINFOEXW_FID_CACHE {
+ int cached;
+ jclass clazz;
+ jfieldID szCSDVersion;
+} OSVERSIONINFOEXW_FID_CACHE;
+
+OSVERSIONINFOEXW_FID_CACHE OSVERSIONINFOEXWFc;
+
+void cacheOSVERSIONINFOEXWFields(JNIEnv *env, jobject lpObject)
+{
+ if (OSVERSIONINFOEXWFc.cached) return;
+ cacheOSVERSIONINFOEXFields(env, lpObject);
+ OSVERSIONINFOEXWFc.clazz = (*env)->GetObjectClass(env, lpObject);
+ OSVERSIONINFOEXWFc.szCSDVersion = (*env)->GetFieldID(env, OSVERSIONINFOEXWFc.clazz, "szCSDVersion", "[C");
+ OSVERSIONINFOEXWFc.cached = 1;
+}
+
+OSVERSIONINFOEXW *getOSVERSIONINFOEXWFields(JNIEnv *env, jobject lpObject, OSVERSIONINFOEXW *lpStruct)
+{
+ if (!OSVERSIONINFOEXWFc.cached) cacheOSVERSIONINFOEXWFields(env, lpObject);
+ getOSVERSIONINFOFields(env, lpObject, (OSVERSIONINFO *)lpStruct);
+ lpStruct->wServicePackMajor = (*env)->GetShortField(env, lpObject, OSVERSIONINFOEXFc.wServicePackMajor);
+ lpStruct->wServicePackMinor = (*env)->GetShortField(env, lpObject, OSVERSIONINFOEXFc.wServicePackMinor);
+ lpStruct->wSuiteMask = (*env)->GetShortField(env, lpObject, OSVERSIONINFOEXFc.wSuiteMask);
+ lpStruct->wProductType = (*env)->GetByteField(env, lpObject, OSVERSIONINFOEXFc.wProductType);
+ lpStruct->wReserved = (*env)->GetByteField(env, lpObject, OSVERSIONINFOEXFc.wReserved);
+ {
+ jcharArray lpObject1 = (jcharArray)(*env)->GetObjectField(env, lpObject, OSVERSIONINFOEXWFc.szCSDVersion);
+ (*env)->GetCharArrayRegion(env, lpObject1, 0, sizeof(lpStruct->szCSDVersion) / 2, (jchar *)lpStruct->szCSDVersion);
+ }
+ return lpStruct;
+}
+
+void setOSVERSIONINFOEXWFields(JNIEnv *env, jobject lpObject, OSVERSIONINFOEXW *lpStruct)
+{
+ if (!OSVERSIONINFOEXWFc.cached) cacheOSVERSIONINFOEXWFields(env, lpObject);
+ setOSVERSIONINFOFields(env, lpObject, (OSVERSIONINFO *)lpStruct);
+ (*env)->SetShortField(env, lpObject, OSVERSIONINFOEXFc.wServicePackMajor, (jshort)lpStruct->wServicePackMajor);
+ (*env)->SetShortField(env, lpObject, OSVERSIONINFOEXFc.wServicePackMinor, (jshort)lpStruct->wServicePackMinor);
+ (*env)->SetShortField(env, lpObject, OSVERSIONINFOEXFc.wSuiteMask, (jshort)lpStruct->wSuiteMask);
+ (*env)->SetByteField(env, lpObject, OSVERSIONINFOEXFc.wProductType, (jbyte)lpStruct->wProductType);
+ (*env)->SetByteField(env, lpObject, OSVERSIONINFOEXFc.wReserved, (jbyte)lpStruct->wReserved);
+ {
+ jcharArray lpObject1 = (jcharArray)(*env)->GetObjectField(env, lpObject, OSVERSIONINFOEXWFc.szCSDVersion);
+ (*env)->SetCharArrayRegion(env, lpObject1, 0, sizeof(lpStruct->szCSDVersion) / 2, (jchar *)lpStruct->szCSDVersion);
+ }
+}
+#endif
+
#ifndef NO_OSVERSIONINFOW
typedef struct OSVERSIONINFOW_FID_CACHE {
int cached;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.h b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.h
index cce2b214a2..002e97ebca 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.h
@@ -959,6 +959,42 @@ void setOSVERSIONINFOAFields(JNIEnv *env, jobject lpObject, OSVERSIONINFOA *lpSt
#define OSVERSIONINFOA_sizeof() 0
#endif
+#ifndef NO_OSVERSIONINFOEX
+void cacheOSVERSIONINFOEXFields(JNIEnv *env, jobject lpObject);
+OSVERSIONINFOEX *getOSVERSIONINFOEXFields(JNIEnv *env, jobject lpObject, OSVERSIONINFOEX *lpStruct);
+void setOSVERSIONINFOEXFields(JNIEnv *env, jobject lpObject, OSVERSIONINFOEX *lpStruct);
+#define OSVERSIONINFOEX_sizeof() sizeof(OSVERSIONINFOEX)
+#else
+#define cacheOSVERSIONINFOEXFields(a,b)
+#define getOSVERSIONINFOEXFields(a,b,c) NULL
+#define setOSVERSIONINFOEXFields(a,b,c)
+#define OSVERSIONINFOEX_sizeof() 0
+#endif
+
+#ifndef NO_OSVERSIONINFOEXA
+void cacheOSVERSIONINFOEXAFields(JNIEnv *env, jobject lpObject);
+OSVERSIONINFOEXA *getOSVERSIONINFOEXAFields(JNIEnv *env, jobject lpObject, OSVERSIONINFOEXA *lpStruct);
+void setOSVERSIONINFOEXAFields(JNIEnv *env, jobject lpObject, OSVERSIONINFOEXA *lpStruct);
+#define OSVERSIONINFOEXA_sizeof() sizeof(OSVERSIONINFOEXA)
+#else
+#define cacheOSVERSIONINFOEXAFields(a,b)
+#define getOSVERSIONINFOEXAFields(a,b,c) NULL
+#define setOSVERSIONINFOEXAFields(a,b,c)
+#define OSVERSIONINFOEXA_sizeof() 0
+#endif
+
+#ifndef NO_OSVERSIONINFOEXW
+void cacheOSVERSIONINFOEXWFields(JNIEnv *env, jobject lpObject);
+OSVERSIONINFOEXW *getOSVERSIONINFOEXWFields(JNIEnv *env, jobject lpObject, OSVERSIONINFOEXW *lpStruct);
+void setOSVERSIONINFOEXWFields(JNIEnv *env, jobject lpObject, OSVERSIONINFOEXW *lpStruct);
+#define OSVERSIONINFOEXW_sizeof() sizeof(OSVERSIONINFOEXW)
+#else
+#define cacheOSVERSIONINFOEXWFields(a,b)
+#define getOSVERSIONINFOEXWFields(a,b,c) NULL
+#define setOSVERSIONINFOEXWFields(a,b,c)
+#define OSVERSIONINFOEXW_sizeof() 0
+#endif
+
#ifndef NO_OSVERSIONINFOW
void cacheOSVERSIONINFOWFields(JNIEnv *env, jobject lpObject);
OSVERSIONINFOW *getOSVERSIONINFOWFields(JNIEnv *env, jobject lpObject, OSVERSIONINFOW *lpStruct);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java
index 1f600662fb..c83397c3da 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java
@@ -127,12 +127,19 @@ public class OS extends Platform {
* to move the composition window outside of the client
* area, Windows crashes. The fix is to disable legacy
* support.
+ *
+ * Note: The bug is fixed in Service Pack 2.
*/
- if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (5, 1)) {
+ if (!OS.IsWinCE && OS.WIN32_VERSION == OS.VERSION (5, 1)) {
short langID = OS.GetSystemDefaultUILanguage ();
short primaryLang = OS.PRIMARYLANGID (langID);
if (primaryLang == OS.LANG_KOREAN) {
- OS.ImmDisableTextFrameService (0);
+ OSVERSIONINFOEX infoex = IsUnicode ? (OSVERSIONINFOEX)new OSVERSIONINFOEXW () : (OSVERSIONINFOEX)new OSVERSIONINFOEXA ();
+ infoex.dwOSVersionInfoSize = OSVERSIONINFOEX.sizeof;
+ GetVersionEx (infoex);
+ if (infoex.wServicePackMajor < 2) {
+ OS.ImmDisableTextFrameService (0);
+ }
}
}
}
@@ -2033,6 +2040,8 @@ public static final native int OFNOTIFY_sizeof ();
public static final native int OPENFILENAME_sizeof ();
public static final native int OSVERSIONINFOA_sizeof ();
public static final native int OSVERSIONINFOW_sizeof ();
+public static final native int OSVERSIONINFOEXA_sizeof ();
+public static final native int OSVERSIONINFOEXW_sizeof ();
public static final native int PAINTSTRUCT_sizeof ();
public static final native int POINT_sizeof ();
public static final native int PRINTDLG_sizeof ();
@@ -2473,6 +2482,11 @@ public static final boolean GetVersionEx (OSVERSIONINFO lpVersionInfo) {
return GetVersionExA ((OSVERSIONINFOA)lpVersionInfo);
}
+public static final boolean GetVersionEx (OSVERSIONINFOEX lpVersionInfo) {
+ if (IsUnicode) return GetVersionExW ((OSVERSIONINFOEXW)lpVersionInfo);
+ return GetVersionExA ((OSVERSIONINFOEXA)lpVersionInfo);
+}
+
public static final int GetWindowLong (int /*long*/ hWnd, int nIndex) {
if (IsUnicode) return GetWindowLongW (hWnd, nIndex);
return GetWindowLongA (hWnd, nIndex);
@@ -3297,6 +3311,8 @@ public static final native int GetTimeFormatW(int Locale, int dwFlags, SYSTEMTIM
public static final native int GetTimeFormatA(int Locale, int dwFlags, SYSTEMTIME lpTime, byte [] lpFormat, byte [] lpTimeStr, int cchTime);
public static final native boolean GetUpdateRect (int /*long*/ hWnd, RECT lpRect, boolean bErase);
public static final native int GetUpdateRgn (int /*long*/ hWnd, int /*long*/ hRgn, boolean bErase);
+public static final native boolean GetVersionExW (OSVERSIONINFOEXW lpVersionInfo);
+public static final native boolean GetVersionExA (OSVERSIONINFOEXA lpVersionInfo);
public static final native boolean GetVersionExW (OSVERSIONINFOW lpVersionInfo);
public static final native boolean GetVersionExA (OSVERSIONINFOA lpVersionInfo);
public static final native int /*long*/ GetWindow (int /*long*/ hWnd, int uCmd);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OSVERSIONINFOEX.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OSVERSIONINFOEX.java
new file mode 100644
index 0000000000..5d5e2e17c6
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OSVERSIONINFOEX.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.win32;
+
+public abstract class OSVERSIONINFOEX extends OSVERSIONINFO {
+ public short wServicePackMajor;
+ public short wServicePackMinor;
+ public short wSuiteMask;
+ public byte wProductType;
+ public byte wReserved;
+ public static /*final*/ int sizeof = OS.IsUnicode ? OS.OSVERSIONINFOEXW_sizeof () : OS.OSVERSIONINFOEXA_sizeof ();
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OSVERSIONINFOEXA.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OSVERSIONINFOEXA.java
new file mode 100644
index 0000000000..ef2e66778c
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OSVERSIONINFOEXA.java
@@ -0,0 +1,16 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.win32;
+
+public class OSVERSIONINFOEXA extends OSVERSIONINFOEX {
+ public byte[] szCSDVersion = new byte[128];
+ public static final int sizeof = OS.OSVERSIONINFOEXA_sizeof ();
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OSVERSIONINFOEXW.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OSVERSIONINFOEXW.java
new file mode 100644
index 0000000000..43ae5d848f
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OSVERSIONINFOEXW.java
@@ -0,0 +1,16 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.win32;
+
+public class OSVERSIONINFOEXW extends OSVERSIONINFOEX {
+ public char[] szCSDVersion = new char[128];
+ public static final int sizeof = OS.OSVERSIONINFOEXW_sizeof ();
+}

Back to the top