Changeset 190
- Timestamp:
- Dec 3, 2010, 9:26:07 PM (15 years ago)
- Location:
- trunk/openjdk/jdk/src/windows/native/sun/windows
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_CustomPaletteDef.h
r2 r190 272 272 }; 273 273 274 #endif _AWT_CUSTOMPALETTEDEF_H274 #endif // _AWT_CUSTOMPALETTEDEF_H -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_DataTransferer.cpp
r187 r190 36 36 #include "locale_str.h" 37 37 38 #ifndef max 39 #define max(a,b) ( (a>b) ? a : b ) 40 #endif 41 #ifndef min 42 #define min(a,b) ( (a<b) ? a : b ) 38 #ifdef __WIN32OS2__ 39 #include <minivcrt.h> 43 40 #endif 44 41 -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_DesktopProperties.cpp
r187 r190 36 36 #include "shellapi.h" 37 37 38 #ifndef max 39 #define max(a,b) ( (a>b) ? a : b ) 40 #endif 41 #ifndef min 42 #define min(a,b) ( (a<b) ? a : b ) 38 #ifdef __WIN32OS2__ 39 #include <minivcrt.h> 43 40 #endif 44 41 -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_DnDDS.cpp
r2 r190 704 704 LPMETAFILEPICT lpMfpOld = (LPMETAFILEPICT)lpbMfpBuffer; 705 705 706 HMETAFILEPICT hmfp = ::GlobalAlloc(GALLOCFLG, sizeof(METAFILEPICT));706 HMETAFILEPICT hmfp = (HMETAFILEPICT)::GlobalAlloc(GALLOCFLG, sizeof(METAFILEPICT)); 707 707 if (hmfp == NULL) { 708 708 VERIFY(::DeleteMetaFile(hmf)); -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_FileDialog.cpp
r187 r190 151 151 case WM_NOTIFY: { 152 152 #ifdef __WIN32OS2__ 153 OFNOTIFY *notifyEx = (OFNOTIFY *)lParam; 153 OFNOTIFY *notify = (OFNOTIFY *)lParam; 154 if (notify) { 155 jobject peer = (jobject)(::GetProp(parent, ModalDialogPeerProp)); 156 if (notify->hdr.code == CDN_FILEOK) { 157 // This notification is sent when user selects some file and presses 158 // OK button; it is not sent when no file is selected. So it's time 159 // to unblock all the windows blocked by this dialog as it will 160 // be closed soon 161 env->CallVoidMethod(peer, AwtFileDialog::setHWndMID, (jlong)0); 162 } 163 } 154 164 #else 155 165 OFNOTIFYEX *notifyEx = (OFNOTIFYEX *)lParam; 156 #endif157 166 if (notifyEx) { 158 167 jobject peer = (jobject)(::GetProp(parent, ModalDialogPeerProp)); … … 178 187 } 179 188 } 189 #endif 180 190 break; 181 191 } -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Font.cpp
r2 r190 38 38 #include "awt_Component.h" 39 39 #include "Disposer.h" 40 41 #ifdef __WIN32OS2__ 42 #include <minivcrt.h> 43 #include <wctype.h> 44 #endif 40 45 41 46 /* IMPORTANT! Read the README.JNI file for notes on JNI converted AWT code. -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Frame.cpp
r2 r190 1257 1257 1258 1258 PDATA pData; 1259 HWND hwnd; 1259 1260 JNI_CHECK_PEER_GOTO(self, ret); 1260 1261 f = (AwtFrame *)pData; 1261 HWNDhwnd = f->GetHWnd();1262 hwnd = f->GetHWnd(); 1262 1263 if (::IsWindow(hwnd)) 1263 1264 { -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_InputTextInfor.cpp
r2 r190 188 188 if (env == NULL || lpStrW == NULL || cStrW == 0) return NULL; 189 189 190 return env->NewString( lpStrW, cStrW);190 return env->NewString((jchar*)lpStrW, cStrW); 191 191 } 192 192 -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_List.cpp
r2 r190 198 198 AwtComponent::Reshape(x, y, w, h); 199 199 200 /* 200 #if 0 201 201 HWND hList = GetListHandle(); 202 202 if (hList != NULL) { … … 204 204 /* 205 205 * Fix for bug 4046446. 206 * 206 */ 207 207 SetWindowPos(hList, 0, 0, 0, w, h, flags); 208 208 } 209 */ 209 #endif 210 210 } 211 211 … … 1093 1093 ses->index = index; 1094 1094 1095 return (jboolean) AwtToolkit::GetInstance().SyncCall(1095 return (jboolean)(bool)AwtToolkit::GetInstance().SyncCall( 1096 1096 (void *(*)(void *))AwtList::_IsSelected, ses); 1097 1097 // global ref and ses are deleted in _IsSelected -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_MenuItem.cpp
r2 r190 33 33 #include <tchar.h> 34 34 #include <imm.h> 35 #ifndef __WIN32OS2__ 35 36 #include <ime.h> 37 #else 38 #include <minivcrt.h> 39 #endif 36 40 // End -- Win32 SDK include files 37 41 … … 302 306 */ 303 307 AwtMenu* menu = GetMenuContainer(); 304 DASSERT(menu != NULL && GetID() >= 0);308 DASSERT(menu != NULL /*&& GetID() >= 0*/); 305 309 306 310 //Check whether the MenuItem is disabled. … … 615 619 */ 616 620 if (menu == NULL) return; 617 DASSERT(menu != NULL && GetID() >= 0);621 DASSERT(menu != NULL /*&& GetID() >= 0*/); 618 622 619 623 /* … … 662 666 if (menu == NULL) return; 663 667 isEnabled = isEnabled && !menu->IsDisabledAndPopup(); 664 DASSERT(menu != NULL && GetID() >= 0);668 DASSERT(menu != NULL /*&& GetID() >= 0*/); 665 669 VERIFY(::EnableMenuItem(menu->GetHMenu(), GetID(), 666 670 MF_BYCOMMAND | (isEnabled ? MF_ENABLED : MF_GRAYED)) … … 680 684 */ 681 685 if (menu == NULL) return; 682 DASSERT(menu != NULL && GetID() >= 0);686 DASSERT(menu != NULL /*&& GetID() >= 0*/); 683 687 VERIFY(::CheckMenuItem(menu->GetHMenu(), GetID(), 684 688 MF_BYCOMMAND | (isChecked ? MF_CHECKED : MF_UNCHECKED)) -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Panel.cpp
r2 r190 39 39 static char* AWTPANEL_RESTACK_MSG_3 = "Native resources unavailable"; 40 40 static char* AWTPANEL_RESTACK_MSG_4 = "Child peer is null"; 41 static char* AWTPANEL_RESTACK_MSG_5 = "Allocation error"; 41 42 42 43 void* AwtPanel::Restack(void * param) { … … 95 96 env->DeleteLocalRef(self); 96 97 97 CATCH_BAD_ALLOC_RET( "Allocation error");98 CATCH_BAD_ALLOC_RET(AWTPANEL_RESTACK_MSG_5); 98 99 return NULL; 99 100 } -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_PrintControl.cpp
r2 r190 31 31 #include <float.h> 32 32 #include <math.h> 33 34 #ifdef __WIN32OS2__ 35 #include <minivcrt.h> 36 #endif 33 37 34 38 #define ROUNDTOINT(x) ((int)((x)+0.5)) … … 947 951 DEVNAMES *devnames = (DEVNAMES*)::GlobalLock(pd.hDevNames); 948 952 DASSERT(!IsBadReadPtr(devnames, sizeof(DEVNAMES))); 949 LP TSTR lpcNames = (LPTSTR)devnames;950 LP TSTR pbuf = (_tcslen(lpcNames + devnames->wDeviceOffset) == 0 ?951 TEXT("") : lpcNames + devnames->wDeviceOffset);953 LPCTSTR lpcNames = (LPTSTR)devnames; 954 LPCTSTR pbuf = (_tcslen(lpcNames + devnames->wDeviceOffset) == 0 ? 955 TEXT("") : lpcNames + devnames->wDeviceOffset); 952 956 if (pbuf != NULL) { 953 957 jstring jstr = JNU_NewStringPlatform(env, pbuf); -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_PrintJob.cpp
r2 r190 45 45 #include <float.h> 46 46 47 #ifdef __WIN32OS2__ 48 #include <minivcrt.h> 49 #endif 50 47 51 #define DEBUG_PRINTING 0 48 52 … … 60 64 * WPrintJob native methods 61 65 */ 66 67 jfieldID AwtPrintDialog::pageID; 62 68 63 69 extern "C" { … … 208 214 */ 209 215 static const double POINTS_TO_LOMETRIC = (254.0 / 72.0); 210 211 jfieldID AwtPrintDialog::pageID;212 216 213 217 … … 2281 2285 JNIEXPORT void JNICALL Java_sun_awt_windows_WPrinterJob_textOut 2282 2286 (JNIEnv *env, jobject self, jlong printDC, jstring text, jint strLen, 2283 boolean glyphCodes, jfloat x, jfloat y, jfloatArray positions)2287 jboolean glyphCodes, jfloat x, jfloat y, jfloatArray positions) 2284 2288 { 2285 2289 -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Robot.cpp
r2 r190 229 229 // CAPTUREBLT flag is required to capture WS_EX_LAYERED windows' contents 230 230 // correctly on Win2K/XP 231 #ifdef __WIN32OS2__ 232 #define CAPTUREBLT 0 233 #endif 231 234 VERIFY(::BitBlt(hdcMem, 0, 0, width, height, hdcScreen, x, y, 232 235 SRCCOPY|CAPTUREBLT) != 0); -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_TextArea.cpp
r2 r190 33 33 #include "awt_Window.h" 34 34 35 #ifdef __WIN32OS2__ 36 #include <minivcrt.h> 37 #endif 38 35 39 /* IMPORTANT! Read the README.JNI file for notes on JNI converted AWT code. 36 40 */ … … 191 195 VERIFY(::RevokeDragDrop(c->GetHWnd()) != DRAGDROP_E_INVALIDHWND); 192 196 197 #ifndef __WIN32OS2__ 193 198 /* To enforce CF_TEXT format for paste operations. */ 194 199 VERIFY(c->SendMessage(EM_SETOLECALLBACK, 0, 195 200 (LPARAM)&GetOleCallback())); 201 #endif 196 202 197 203 c->SendMessage(EM_SETEVENTMASK, 0, ENM_CHANGE); … … 245 251 size_t length = env->GetStringLength(jStr) + 1; 246 252 WCHAR *string = new WCHAR[length]; 247 env->GetStringRegion(jStr, 0, static_cast<jsize>(length - 1), string); 253 env->GetStringRegion(jStr, 0, static_cast<jsize>(length - 1), 254 reinterpret_cast<jchar*>(string)); 248 255 string[length-1] = '\0'; 249 256 for (size_t i = 0; i < maxlen && i < length - 1; i++) { … … 988 995 // WCHAR* buffer = TO_WSTRING(text); 989 996 WCHAR *buffer = new WCHAR[length]; 990 env->GetStringRegion(text, 0, length-1, buffer);997 env->GetStringRegion(text, 0, length-1, reinterpret_cast<jchar*>(buffer)); 991 998 buffer[length-1] = '\0'; 992 999 … … 1108 1115 1109 1116 1117 #ifndef __WIN32OS2__ 1110 1118 AwtTextArea::OleCallback AwtTextArea::sm_oleCallback; 1111 1119 … … 1239 1247 return E_NOTIMPL; 1240 1248 } 1249 #endif 1250 -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_TextArea.h
r2 r190 34 34 #include <ole2.h> 35 35 #include <richedit.h> 36 #ifndef __WIN32OS2__ 36 37 #include <richole.h> 38 #endif 37 39 38 40 /************************************************************************ … … 42 44 class AwtTextArea : public AwtTextComponent { 43 45 46 #ifndef __WIN32OS2__ 44 47 // inner classes 45 48 class OleCallback; 49 #endif 46 50 47 51 public: … … 92 96 93 97 protected: 98 #ifndef __WIN32OS2__ 94 99 INLINE static OleCallback& GetOleCallback() { return sm_oleCallback; } 100 #endif 95 101 void EditSetSel(CHARRANGE &cr); 96 102 void EditGetSel(CHARRANGE &cr); … … 119 125 120 126 127 #ifndef __WIN32OS2__ 121 128 static OleCallback sm_oleCallback; 122 129 … … 125 132 */ 126 133 127 class AwtTextArea::OleCallback : public IRichEditOleCallback {134 class OleCallback : public IRichEditOleCallback { 128 135 public: 129 136 OleCallback(); … … 151 158 ULONG m_refs; // Reference count 152 159 }; 153 160 #endif 154 161 }; 155 162 -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_TextComponent.cpp
r2 r190 327 327 c->GetText(buf, len + 1); 328 328 c->RemoveCR(buf); 329 result = env->NewString(buf, static_cast<jsize>(wcslen(buf))); 329 result = env->NewString(reinterpret_cast<jchar*>(buf), 330 static_cast<jsize>(wcslen(buf))); 330 331 delete [] buf; 331 332 } … … 363 364 int length = env->GetStringLength(text); 364 365 WCHAR* buffer = new WCHAR[length + 1]; 365 env->GetStringRegion(text, 0, length, buffer);366 env->GetStringRegion(text, 0, length, reinterpret_cast<jchar*>(buffer)); 366 367 buffer[length] = 0; 367 368 c->CheckLineSeparator(buffer); -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_TextField.cpp
r2 r190 31 31 #include "awt_Canvas.h" 32 32 33 #ifdef __WIN32OS2__ 34 #include <minivcrt.h> 35 #endif 36 33 37 /* IMPORTANT! Read the README.JNI file for notes on JNI converted AWT code. 34 38 */ -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_TextField.h
r2 r190 34 34 #include <ole2.h> 35 35 #include <richedit.h> 36 #ifndef __WIN32OS2__ 36 37 #include <richole.h> 38 #endif 37 39 38 40 /************************************************************************ -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp
r2 r190 66 66 #include <java_awt_peer_ComponentPeer.h> 67 67 68 #ifdef __WIN32OS2__ 69 #include <minivcrt.h> 70 #endif 71 68 72 extern void initScreens(JNIEnv *env); 69 73 extern "C" void awt_dnd_initialize(); … … 268 272 DTrace_DisableMutex(); 269 273 DMem_DisableMutex(); 270 #endif DEBUG274 #endif // DEBUG 271 275 // Release any resources that have not yet been released 272 276 // Note that releasing DirectX objects is necessary for some -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Unicode.cpp
r2 r190 36 36 int len = env->GetStringLength(jstr); 37 37 38 env->GetStringRegion(jstr, 0, len, lpwstr);38 env->GetStringRegion(jstr, 0, len, reinterpret_cast<jchar*>(lpwstr)); 39 39 lpwstr[len] = '\0'; 40 40 -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Win32GraphicsEnv.cpp
r2 r190 33 33 #include "WindowsFlags.h" 34 34 #include "dxInit.h" 35 36 #ifdef __WIN32OS2__ 37 #include <minivcrt.h> 38 #endif 35 39 36 40 void initScreens(JNIEnv *env) { -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Window.cpp
r2 r190 44 44 #include "sun_awt_windows_WCanvasPeer.h" 45 45 46 #if !defined(__int3264) 46 #if !defined(__int3264) && !defined(__WIN32OS2__) 47 47 typedef __int32 LONG_PTR; 48 48 #endif // __int3264 … … 58 58 jint windowTYPES[TYPES_COUNT]; 59 59 60 #ifdef __WIN32OS2__ 61 #include <minivcrt.h> 62 #endif 60 63 61 64 /* IMPORTANT! Read the README.JNI file for notes on JNI converted AWT code. … … 1500 1503 1501 1504 void AwtWindow::FlashWindowEx(HWND hWnd, UINT count, DWORD timeout, DWORD flags) { 1505 #ifndef __WIN32OS2__ 1502 1506 FLASHWINFO fi; 1503 1507 fi.cbSize = sizeof(fi); … … 1507 1511 fi.dwTimeout = timeout; 1508 1512 ::FlashWindowEx(&fi); 1513 #endif 1509 1514 } 1510 1515 … … 1672 1677 int length = env->GetStringLength(title); 1673 1678 WCHAR *buffer = new WCHAR[length + 1]; 1674 env->GetStringRegion(title, 0, length, buffer);1679 env->GetStringRegion(title, 0, length, reinterpret_cast<jchar*>(buffer)); 1675 1680 buffer[length] = L'\0'; 1676 1681 VERIFY(::SetWindowTextW(w->GetHWnd(), buffer)); … … 2043 2048 AwtWindow *window = NULL; 2044 2049 HWND windowHWnd = 0; 2050 PDATA pData; 2045 2051 2046 2052 JNI_CHECK_NULL_GOTO(self, "peer", ret); 2047 PDATApData = JNI_GET_PDATA(self);2053 pData = JNI_GET_PDATA(self); 2048 2054 if (pData == NULL) { 2049 2055 env->DeleteGlobalRef(self); … … 2072 2078 AwtWindow *window = NULL; 2073 2079 HWND windowHWnd = 0; 2080 PDATA pData; 2074 2081 2075 2082 JNI_CHECK_NULL_GOTO(self, "peer", ret); 2076 PDATApData = JNI_GET_PDATA(self);2083 pData = JNI_GET_PDATA(self); 2077 2084 if (pData == NULL) { 2078 2085 env->DeleteGlobalRef(self);
Note:
See TracChangeset
for help on using the changeset viewer.