- Timestamp:
- Jan 15, 2000, 4:05:37 PM (26 years ago)
- Location:
- trunk/src/user32/new
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/dc.cpp
r2437 r2445 1 /* $Id: dc.cpp,v 1.1 3 2000-01-14 14:45:15sandervl Exp $ */1 /* $Id: dc.cpp,v 1.14 2000-01-15 15:05:36 sandervl Exp $ */ 2 2 3 3 /* … … 69 69 LONG clientHeight(Win32BaseWindow *wnd, HWND hwnd, pDCData pHps); 70 70 71 //****************************************************************************** 72 //****************************************************************************** 71 73 void TestWideLine (pDCData pHps) 72 74 { … … 91 93 } 92 94 } 93 95 //****************************************************************************** 96 //****************************************************************************** 94 97 void Calculate1PixelDelta(pDCData pHps) 95 98 { … … 100 103 pHps->worldXDeltaFor1Pixel = (int)(aptl[1].x - aptl[0].x); // 171182 101 104 } 102 103 //****************************************************************************** 104 105 //****************************************************************************** 106 //****************************************************************************** 105 107 int setMapMode(Win32BaseWindow *wnd, pDCData pHps, int mode) 106 108 { … … 181 183 return prevMode; 182 184 } 183 185 //****************************************************************************** 186 //****************************************************************************** 184 187 BOOL setPageXForm(Win32BaseWindow *wnd, pDCData pHps) 185 188 { … … 233 236 return rc; 234 237 } 235 238 //****************************************************************************** 239 //****************************************************************************** 236 240 BOOL changePageXForm(Win32BaseWindow *wnd, pDCData pHps, PPOINTL pValue, int x, int y, PPOINTL pPrev) 237 241 { … … 293 297 return (result); 294 298 } 295 299 //****************************************************************************** 300 //****************************************************************************** 296 301 LONG clientHeight(Win32BaseWindow *wnd, HWND hwnd, pDCData pHps) 297 302 { … … 323 328 } 324 329 } 325 330 //****************************************************************************** 331 //****************************************************************************** 326 332 BOOL isYup (pDCData pHps) 327 333 { … … 340 346 return FALSE; 341 347 } 342 348 //****************************************************************************** 349 //****************************************************************************** 343 350 INT revertDy (Win32BaseWindow *wnd, INT dy) 344 351 { … … 359 366 return (dy); 360 367 } 361 368 //****************************************************************************** 369 //****************************************************************************** 362 370 HDC sendEraseBkgnd (Win32BaseWindow *wnd) 363 371 { … … 400 408 return erased; 401 409 } 402 410 //****************************************************************************** 411 //****************************************************************************** 403 412 void releaseOwnDC (HDC hps) 404 413 { … … 420 429 } 421 430 } 422 431 //****************************************************************************** 432 //****************************************************************************** 423 433 HDC WIN32API BeginPaint (HWND hWnd, PPAINTSTRUCT_W lpps) 424 434 { … … 496 506 return (HDC)pHps->hps; 497 507 } 498 508 //****************************************************************************** 509 //****************************************************************************** 499 510 BOOL WIN32API EndPaint (HWND hwnd, const PAINTSTRUCT_W *pPaint) 500 511 { … … 528 539 return TRUE; 529 540 } 530 541 //****************************************************************************** 542 //****************************************************************************** 531 543 BOOL WIN32API GetUpdateRect (HWND hwnd, LPRECT pRect, BOOL erase) 532 544 { … … 589 601 return updateRegionExists; 590 602 } 591 603 //****************************************************************************** 592 604 //functions for WM_NCPAINT 593 605 //****************************************************************************** 594 606 INT SYSTEM GetOS2UpdateRgn(HWND hwnd,HRGN hrgn) 595 607 { 596 608 return O32_GetUpdateRgn(hwnd,hrgn,FALSE); 597 609 } 598 610 //****************************************************************************** 611 //****************************************************************************** 599 612 BOOL SYSTEM GetOS2UpdateRect(HWND hwnd,LPRECT pRect) 600 613 { … … 615 628 return updateRegionExists; 616 629 } 617 630 //****************************************************************************** 631 //****************************************************************************** 618 632 int WIN32API GetUpdateRgn (HWND hwnd, HRGN hrgn, BOOL erase) 619 633 { … … 633 647 return Complexity; 634 648 } 635 649 //****************************************************************************** 636 650 // This implementation of GetDCEx supports 637 651 // DCX_WINDOW … … 639 653 // DCX_EXCLUDERGN (complex regions allowed) 640 654 // DCX_INTERSECTRGN (complex regions allowed) 641 655 //****************************************************************************** 642 656 HDC WIN32API GetDCEx (HWND hwnd, HRGN hrgn, ULONG flags) 643 657 { … … 793 807 return NULL; 794 808 } 795 809 //****************************************************************************** 810 //****************************************************************************** 796 811 HDC WIN32API GetDC (HWND hwnd) 797 812 { 798 813 return GetDCEx (hwnd, NULL, 0); 799 814 } 800 815 //****************************************************************************** 816 //****************************************************************************** 801 817 HDC WIN32API GetWindowDC (HWND hwnd) 802 818 { 803 819 return GetDCEx (hwnd, NULL, DCX_WINDOW_W); 804 820 } 805 821 //****************************************************************************** 822 //****************************************************************************** 806 823 int WIN32API ReleaseDC (HWND hwnd, HDC hdc) 807 824 { … … 824 841 return (rc); 825 842 } 826 843 //****************************************************************************** 844 //****************************************************************************** 827 845 BOOL WIN32API UpdateWindow (HWND hwnd) 828 846 { … … 843 861 return (TRUE); 844 862 } 845 863 //****************************************************************************** 846 864 // This implementation of RedrawWindow supports 847 865 // RDW_ERASE … … 853 871 // RDW_ERASENOW 854 872 // RDW_UPDATENOW 855 873 //****************************************************************************** 856 874 BOOL WIN32API RedrawWindow(HWND hwnd, const RECT* pRect, HRGN hrgn, DWORD redraw) 857 875 { … … 913 931 // else if (redraw & RDW_ERASENOW_W) 914 932 // wnd->setSuppressErase (FALSE); 915 #if 0916 else917 {918 QMSG qmsg;919 BOOL erase;920 921 erase = (WinPeekMsg (HABX, &qmsg, hwnd, WM_PAINT, WM_PAINT, PM_REMOVE)922 && (redraw & RDW_NOERASE_W) == 0);923 924 wnd->setSuppressErase (!erase);925 }926 927 if (redraw & (RDW_NOINTERNALPAINT_W | RDW_INTERNALPAINT_W))928 {929 QMSG qmsg;930 931 WinPeekMsg( (HAB)0, &qmsg, hwnd, WM_VIRTUAL_INTERNALPAINT,932 WM_VIRTUAL_INTERNALPAINT, PM_REMOVE );933 }934 #endif935 933 936 934 if (hrgn) … … 1033 1031 return (success); 1034 1032 } 1035 1033 //****************************************************************************** 1034 //****************************************************************************** 1036 1035 BOOL WIN32API InvalidateRect (HWND hwnd, const RECT *pRect, BOOL erase) 1037 1036 { 1038 // Win32BaseWindow *wnd = Win32BaseWindow::GetWindowFromHandle (hwnd);1039 1037 BOOL result; 1040 1041 // todo !! 1042 // if ( isFrame without client ) 1043 // erase = TRUE; 1044 1038 1045 1039 result = RedrawWindow (hwnd, pRect, NULLHANDLE, 1046 1040 RDW_ALLCHILDREN_W | RDW_INVALIDATE_W | … … 1049 1043 return (result); 1050 1044 } 1051 1045 //****************************************************************************** 1046 //****************************************************************************** 1052 1047 BOOL WIN32API InvalidateRgn (HWND hwnd, HRGN hrgn, BOOL erase) 1053 1048 { 1054 // Win32BaseWindow *wnd = Win32BaseWindow::GetWindowFromHandle (hwnd);1055 1049 BOOL result; 1056 1057 // todo !!1058 // if ( isFrame without client )1059 // erase = TRUE;1060 1050 1061 1051 result = RedrawWindow (hwnd, NULL, hrgn, … … 1065 1055 return (result); 1066 1056 } 1067 1057 //****************************************************************************** 1058 //****************************************************************************** 1068 1059 BOOL setPMRgnIntoWinRgn (HRGN hrgnPM, HRGN hrgnWin, LONG height) 1069 1060 { … … 1123 1114 return (rc); 1124 1115 } 1125 1116 //****************************************************************************** 1117 //****************************************************************************** 1126 1118 BOOL WIN32API ScrollDC (HDC hDC, int dx, int dy, const RECT *pScroll, 1127 1119 const RECT *pClip, HRGN hrgnUpdate, LPRECT pRectUpdate) … … 1246 1238 return (rc); 1247 1239 } 1248 1249 //****************************************************************************** 1250 //****************************************************************************** 1240 //****************************************************************************** 1241 //****************************************************************************** 1242 #if 1 1243 BOOL WIN32API ScrollWindow(HWND hwnd, int dx, int dy, const RECT *pScroll, const RECT *pClip) 1244 { 1245 Win32BaseWindow *window; 1246 APIRET rc; 1247 RECTL clientRect; 1248 RECTL scrollRect; 1249 RECTL clipRect; 1250 PRECT pClientRect; 1251 PRECTL pScrollRect = NULL; 1252 PRECTL pClipRect = NULL; 1253 ULONG scrollFlags = SW_INVALIDATERGN; 1254 1255 window = Win32BaseWindow::GetWindowFromHandle(hwnd); 1256 if(!window) { 1257 dprintf(("ScrollWindow, window %x not found", hwnd)); 1258 return 0; 1259 } 1260 dprintf(("ScrollWindow %x %d %d %x %x", hwnd, dx, dy, pScroll, pClip)); 1261 pClientRect = window->getClientRectPtr(); 1262 clientRect.xLeft = 0; 1263 clientRect.yBottom = 0; 1264 clientRect.xRight = pClientRect->right - pClientRect->left; 1265 clientRect.yTop = pClientRect->bottom - pClientRect->top; 1266 if(pScroll) { 1267 mapWin32ToOS2Rect(window,(RECT *)pScroll, (PRECTLOS2)&scrollRect); 1268 pScrollRect = &scrollRect; 1269 1270 //Scroll rectangle relative to client area 1271 WinIntersectRect ((HAB) 0, pScrollRect, pScrollRect, &clientRect); 1272 } 1273 else scrollFlags |= SW_SCROLLCHILDREN; 1274 1275 if(pClip) { 1276 mapWin32ToOS2Rect(window,(RECT *)pClip, (PRECTLOS2)&clipRect); 1277 pClipRect = &clipRect; 1278 1279 //Clip rectangle relative to client area 1280 WinIntersectRect ((HAB) 0, pClipRect, pClipRect, &clientRect); 1281 } 1282 1283 dy = revertDy (window, dy); 1284 1285 rc = WinScrollWindow(window->getOS2WindowHandle(), dx, dy, 1286 pScrollRect, pClipRect, NULLHANDLE, 1287 NULL, scrollFlags); 1288 1289 return (rc != RGN_ERROR); 1290 } 1291 #else 1251 1292 BOOL WIN32API ScrollWindow(HWND hwnd, int dx, int dy, const RECT *pScroll, const RECT *pClip) 1252 1293 { … … 1311 1352 return (rc != RGN_ERROR); 1312 1353 } 1354 #endif 1313 1355 //****************************************************************************** 1314 1356 //****************************************************************************** … … 1356 1398 if (lComplexity == RGN_ERROR) 1357 1399 { 1358 return (0);1400 return ERROR_W; 1359 1401 } 1360 1402 … … 1376 1418 ((lComplexity == RGN_RECT) || (lComplexity == RGN_COMPLEX))) 1377 1419 { 1378 rc = InvalidateRect (hwnd, &winRectUpdate, scrollFlag & SW_ERASE_W);1420 rc = InvalidateRect (hwnd, &winRectUpdate, (scrollFlag & SW_ERASE_W) ? 1 : 0); 1379 1421 if (rc == FALSE) 1380 1422 { -
trunk/src/user32/new/oslibmsg.cpp
r2406 r2445 1 /* $Id: oslibmsg.cpp,v 1.1 3 2000-01-11 13:06:25sandervl Exp $ */1 /* $Id: oslibmsg.cpp,v 1.14 2000-01-15 15:05:37 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 248 248 } 249 249 //****************************************************************************** 250 //PeekMessage retrieves only messages associated with the window identified by the 251 //hwnd parameter or any of its children as specified by the IsChild function, and within 252 //the range of message values given by the uMsgFilterMin and uMsgFilterMax 253 //parameters. If hwnd is NULL, PeekMessage retrieves messages for any window that 254 //belongs to the current thread making the call. (PeekMessage does not retrieve 255 //messages for windows that belong to other threads.) If hwnd is -1, PeekMessage only 256 //returns messages with a hwnd value of NULL, as posted by the PostAppMessage 257 //function. If uMsgFilterMin and uMsgFilterMax are both zero, PeekMessage returns all 258 //available messages (no range filtering is performed). 259 //TODO: Not working as specified right now! 250 260 //****************************************************************************** 251 261 BOOL OSLibWinPeekMsg(LPMSG pMsg, HWND hwnd, UINT uMsgFilterMin, UINT uMsgFilterMax, -
trunk/src/user32/new/pmwindow.cpp
r2437 r2445 1 /* $Id: pmwindow.cpp,v 1.4 2 2000-01-14 14:45:16sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.43 2000-01-15 15:05:37 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 397 397 398 398 case WM_PAINT: 399 dprintf(("OS2: WM_PAINT")); 399 400 win32wnd->DispatchMsgA(pWinMsg); 400 401 goto RunDefWndProc; -
trunk/src/user32/new/win32wbasenonclient.cpp
r2444 r2445 1 /* $Id: win32wbasenonclient.cpp,v 1. 8 2000-01-15 14:18:18 cbratschiExp $ */1 /* $Id: win32wbasenonclient.cpp,v 1.9 2000-01-15 15:05:37 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 (non-client methods) … … 194 194 if ((wParam & 0x0f) != HTHSCROLL) return; 195 195 scrollbar = SB_HORZ; 196 } else /* SC_VSCROLL */ 196 } 197 else /* SC_VSCROLL */ 197 198 { 198 199 if ((wParam & 0x0f) != HTVSCROLL) return; … … 203 204 pt.y -= rectWindow.top; 204 205 SCROLL_HandleScrollEvent(Win32Hwnd,0,MAKELONG(pt.x,pt.y),scrollbar,WM_LBUTTONDOWN); 205 if (GetCapture() != Win32Hwnd) return;206 if (GetCapture() != getWindowHandle()) return; 206 207 do 207 208 { 208 GetMessageA(&msg,Win32Hwnd,0,0); 209 switch(msg.message) 210 { 211 case WM_LBUTTONUP: 212 case WM_MOUSEMOVE: 213 pt.x = msg.pt.x-rectWindow.left; 214 pt.y = msg.pt.y-rectWindow.top; 215 msg.lParam = MAKELONG(pt.x,pt.y); 216 case WM_SYSTIMER: 217 SCROLL_HandleScrollEvent(Win32Hwnd,msg.wParam,msg.lParam,scrollbar,msg.message); 218 break; 219 220 default: 209 GetMessageA(&msg, 0, 0, 0); 210 if(msg.hwnd == getWindowHandle()) 211 { 212 switch(msg.message) 213 { 214 case WM_LBUTTONUP: 215 case WM_MOUSEMOVE: 216 pt.x = msg.pt.x-rectWindow.left; 217 pt.y = msg.pt.y-rectWindow.top; 218 msg.lParam = MAKELONG(pt.x,pt.y); 219 220 case WM_SYSTIMER: 221 SCROLL_HandleScrollEvent(Win32Hwnd,msg.wParam,msg.lParam,scrollbar,msg.message); 222 break; 223 224 default: 225 TranslateMessage(&msg); 226 DispatchMessageA(&msg); 227 break; 228 } 229 } 230 else { 221 231 TranslateMessage(&msg); 222 232 DispatchMessageA(&msg); 223 break;224 233 } 225 234 if (!IsWindow()) … … 228 237 break; 229 238 } 230 } while (msg.message != WM_LBUTTONUP); 239 } 240 while (msg.message != WM_LBUTTONUP); 231 241 } 232 242 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.