Changeset 193
- Timestamp:
- Dec 7, 2010, 2:48:55 PM (15 years ago)
- Location:
- trunk/openjdk/jdk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/openjdk/jdk/make/sun/awt/Makefile
r180 r193 321 321 -lgdi32.lib -lshell32.lib -lcomdlg32.lib \ 322 322 -lversion.lib -lmpr.lib -lrasapi32.lib \ 323 -lwinmm.lib -lwinspool.lib -lvfw32.lib\323 -lwinmm.lib -lwinspool.lib \ 324 324 -lsecur32.lib -loleacc.lib -loledlg.lib \ 325 -lsensapi.lib \326 325 -lkernel32.lib -luser32.lib -lgdi32.lib -lwinspool.lib \ 327 -limm32 .lib -lole32.lib -luuid.lib $(JVMLIB) \328 -l shell32.lib326 -limm32os2.lib -lole32.lib -lguidlib.lib $(JVMLIB) \ 327 -lddraw.lib -lshell32.lib 329 328 330 329 clean:: awt.clean -
trunk/openjdk/jdk/src/windows/native/sun/java2d/windows/ddrawObject.cpp
r186 r193 263 263 lpPrimary = NULL; 264 264 d3dContext = NULL; 265 #ifdef __WIN32OS2__ 266 deviceUseD3D = FALSE; 267 #else 265 268 deviceUseD3D = useD3D; 269 #endif 266 270 this->dxObject = dxObject; 267 271 } … … 548 552 DDraw::InitD3DContext() 549 553 { 554 #ifndef __WIN32OS2__ 550 555 J2dTraceLn(J2D_TRACE_INFO, "DDraw::InitD3DContext"); 551 556 // note: the first time the context initialization fails, … … 562 567 } 563 568 } 569 #endif 564 570 } 565 571 … … 567 573 DDraw::ReleaseD3DContext() 568 574 { 575 #ifndef __WIN32OS2__ 569 576 J2dTraceLn(J2D_TRACE_INFO, "DDraw::ReleaseD3DContext"); 570 577 if (d3dContext != NULL) { 571 578 d3dContext->Release3DDevice(); 572 579 } 580 #endif 573 581 } 574 582 … … 1054 1062 1055 1063 void DDrawSurface::FlushD3DContext(BOOL bForce) { 1064 #ifndef __WIN32OS2__ 1056 1065 D3DContext *d3dContext = ddObject->GetD3dContext(); 1057 1066 if (d3dContext) { 1058 1067 d3dContext->FlushD3DQueueForTarget(bForce ? NULL : this); 1059 1068 } 1069 #endif 1060 1070 } 1061 1071 -
trunk/openjdk/jdk/src/windows/native/sun/java2d/windows/ddrawUtils.cpp
r2 r193 24 24 */ 25 25 26 #ifndef __WIN32OS2__ 26 27 #define INITGUID 28 #endif 27 29 #include "Trace.h" 28 30 #include "ddrawUtils.h" -
trunk/openjdk/jdk/src/windows/native/sun/windows/ShellFolder2.cpp
r2 r193 181 181 (CHAR*)pidl + pStrret->uOffset); 182 182 case STRRET_WSTR : 183 return env->NewString( pStrret->pOleStr,183 return env->NewString(reinterpret_cast<const jchar*>(pStrret->pOleStr), 184 184 static_cast<jsize>(wcslen(pStrret->pOleStr))); 185 185 } … … 187 187 } 188 188 // restoring the original definition 189 #define JNU_NewStringPlatform(env, x) env->NewString(x, static_cast<jsize>(_tcslen(x))) 189 #define JNU_NewStringPlatform(env, x) \ 190 env->NewString(reinterpret_cast<const jchar*>(x), \ 191 static_cast<jsize>(_tcslen(reinterpret_cast<const WCHAR*>(x)))) 190 192 191 193 /* … … 727 729 jchar* wszPath = new jchar[nLength + 1]; 728 730 const jchar* strPath = env->GetStringChars(jname, NULL); 729 wcsncpy( wszPath, strPath, nLength);731 wcsncpy(reinterpret_cast<wchar_t*>(wszPath), reinterpret_cast<const wchar_t*>(strPath), nLength); 730 732 wszPath[nLength] = 0; 731 733 HRESULT res = pIShellFolder->ParseDisplayName(NULL, NULL, 732 const_cast<jchar*>(wszPath), NULL, &pIDL, NULL);734 reinterpret_cast<WCHAR*>(wszPath), NULL, &pIDL, NULL); 733 735 if (res != S_OK) { 734 736 JNU_ThrowIOException(env, "Could not parse name"); … … 863 865 HICON hIcon = NULL; 864 866 867 #ifdef __WIN32OS2__ 868 // @todo Odin32 doesn't define IExtractIcon, use native API instead 869 #else 865 870 HRESULT hres; 866 871 if (IS_NT) { … … 911 916 } 912 917 } 918 #endif /* __WIN32OS2__ */ 913 919 return (jlong)hIcon; 914 920 } … … 1012 1018 if (libShell32 != NULL) { 1013 1019 hBitmap = (HBITMAP)LoadImage(libShell32, 1014 isVista ? TEXT("IDB_TB_SH_DEF_16") : MAKEINTRESOURCE(216),1020 isVista ? TEXT("IDB_TB_SH_DEF_16") : (LPCTSTR)MAKEINTRESOURCE(216), 1015 1021 IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION); 1016 1022 } … … 1018 1024 libComCtl32 = LoadLibrary(TEXT("comctl32.dll")); 1019 1025 if (libComCtl32 != NULL) { 1020 hBitmap = (HBITMAP)LoadImage(libComCtl32, MAKEINTRESOURCE(124),1026 hBitmap = (HBITMAP)LoadImage(libComCtl32, (LPCTSTR)MAKEINTRESOURCE(124), 1021 1027 IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION); 1022 1028 } … … 1082 1088 (JNIEnv* env, jclass cls, jint iconID) 1083 1089 { 1084 return (jlong)LoadIcon(NULL, MAKEINTRESOURCE(iconID));1090 return (jlong)LoadIcon(NULL, (LPCTSTR)MAKEINTRESOURCE(iconID)); 1085 1091 } 1086 1092 … … 1095 1101 jint cxDesired, jint cyDesired, jboolean useVGAColors) 1096 1102 { 1097 HINSTANCE libHandle = LoadLibrary( env->GetStringChars(libName, NULL));1103 HINSTANCE libHandle = LoadLibrary(reinterpret_cast<const WCHAR*>(env->GetStringChars(libName, NULL))); 1098 1104 if (libHandle != NULL) { 1099 1105 UINT fuLoad = (useVGAColors && !isXP) ? LR_VGACOLOR : 0; 1100 return ptr_to_jlong(LoadImage(libHandle, MAKEINTRESOURCE(iconID),1106 return ptr_to_jlong(LoadImage(libHandle, (LPCTSTR)MAKEINTRESOURCE(iconID), 1101 1107 IMAGE_ICON, cxDesired, cyDesired, 1102 1108 fuLoad)); … … 1195 1201 } 1196 1202 1203 #ifndef __WIN32OS2__ 1197 1204 hr = pIShellFolder->CreateViewObject(NULL, IID_IShellDetails, (void**)&pIUnknown); 1198 1205 if(SUCCEEDED (hr)) { … … 1231 1238 return columns; 1232 1239 } 1240 #endif /* !__WIN32OS2__ */ 1233 1241 1234 1242 // The folder exposes neither IShellFolder2 nor IShelDetails … … 1268 1276 } 1269 1277 1278 #ifndef __WIN32OS2__ 1279 // @todo Odin32 doesn't define IExtractIcon, use native API instead 1270 1280 hr = pIShellFolder->CreateViewObject(NULL, IID_IShellDetails, (void**)&pIUnknown); 1271 1281 if(SUCCEEDED (hr)) { … … 1279 1289 } 1280 1290 } 1291 #endif /* !__WIN32OS2__ */ 1281 1292 1282 1293 // The folder exposes neither IShellFolder2 nor IShelDetails -
trunk/openjdk/jdk/src/windows/native/sun/windows/UnicowsLoader.cpp
r2 r193 27 27 #include "alloc.h" 28 28 #include "UnicowsLoader.h" 29 30 #ifdef __WIN32OS2__ 31 #include <minivcrt.h> 32 #define _CW_DEFAULT CW_DEFAULT 33 #endif 29 34 30 35 /* -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_TrayIcon.cpp
r2 r193 734 734 } 735 735 736 tooltipStr = env->GetStringChars(jtooltip, (jboolean *)NULL);736 tooltipStr = reinterpret_cast<LPCTSTR>(env->GetStringChars(jtooltip, (jboolean *)NULL)); 737 737 trayIcon->SetToolTip(tooltipStr); 738 env->ReleaseStringChars(jtooltip, tooltipStr);738 env->ReleaseStringChars(jtooltip, reinterpret_cast<const jchar *>(tooltipStr)); 739 739 ret: 740 740 env->DeleteGlobalRef(self); … … 777 777 778 778 PDATA pData; 779 BOOL result; 779 780 JNI_CHECK_PEER_GOTO(self, ret); 780 781 trayIcon = (AwtTrayIcon *)pData; 781 782 782 BOOLresult = trayIcon->SendTrayMessage(jupdate == JNI_TRUE ? NIM_MODIFY : NIM_ADD);783 result = trayIcon->SendTrayMessage(jupdate == JNI_TRUE ? NIM_MODIFY : NIM_ADD); 783 784 // 6270114: Instructs the taskbar to behave according to the Shell version 5.0 784 785 if (result && jupdate == JNI_FALSE) { … … 856 857 trayIcon = (AwtTrayIcon *)pData; 857 858 858 captionStr = env->GetStringChars(jcaption, (jboolean *)NULL);859 textStr = env->GetStringChars(jtext, (jboolean *)NULL);860 msgTypeStr = env->GetStringChars(jmsgType, (jboolean *)NULL);859 captionStr = reinterpret_cast<LPCTSTR>(env->GetStringChars(jcaption, (jboolean *)NULL)); 860 textStr = reinterpret_cast<LPCTSTR>(env->GetStringChars(jtext, (jboolean *)NULL)); 861 msgTypeStr = reinterpret_cast<LPCTSTR>(env->GetStringChars(jmsgType, (jboolean *)NULL)); 861 862 862 863 trayIcon->DisplayMessage(captionStr, textStr, msgTypeStr); 863 864 864 env->ReleaseStringChars(jcaption, captionStr);865 env->ReleaseStringChars(jtext, textStr);866 env->ReleaseStringChars(jmsgType, msgTypeStr);865 env->ReleaseStringChars(jcaption, reinterpret_cast<const jchar *>(captionStr)); 866 env->ReleaseStringChars(jtext, reinterpret_cast<const jchar *>(textStr)); 867 env->ReleaseStringChars(jmsgType, reinterpret_cast<const jchar *>(msgTypeStr)); 867 868 ret: 868 869 env->DeleteGlobalRef(self); -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_dlls.cpp
r2 r193 26 26 #include "awt.h" 27 27 #include "awt_dlls.h" 28 29 #ifdef __WIN32OS2__ 30 #include <minivcrt.h> 31 #endif 28 32 29 33 /* … … 293 297 DWORD dwVerHnd = 0; 294 298 DWORD dwVersionInfoSize; 295 LP VOIDlpVersionInfo;299 LPBYTE lpVersionInfo; 296 300 UINT uLength = 0; 297 301 struct LANGANDCODEPAGE {
Note:
See TracChangeset
for help on using the changeset viewer.