Changeset 3705 for trunk/src/user32
- Timestamp:
- Jun 14, 2000, 3:17:51 PM (25 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/USER32.DEF
r3679 r3705 1 ; $Id: USER32.DEF,v 1.3 3 2000-06-08 18:10:08sandervl Exp $1 ; $Id: USER32.DEF,v 1.34 2000-06-14 13:15:23 sandervl Exp $ 2 2 3 3 ;Created by BLAST for IBM's compiler … … 646 646 _KEYBOARD_Enable@4 @2011 647 647 648 ;SvL: Belongs in GDI32, but put in dc.cpp to group similar apis 649 _GetClipBox@8 @2014 650 _GetClipRgn@8 @2015 651 _ExtSelectClipRgn@12 @2016 652 _ExcludeClipRect@20 @2017 653 _IntersectClipRect@20 @2018 654 _OffsetClipRgn@12 @2019 655 _SelectClipRgn@8 @2020 656 648 ;SvL: Used by GDI32 649 OSLibGetScreenHeight__Fv @2013 650 OSLibGetScreenWidth__Fv @2014 -
trunk/src/user32/dcrgn.cpp
r3679 r3705 1 /* $Id: dcrgn.cpp,v 1. 1 2000-06-08 18:10:10sandervl Exp $ */1 /* $Id: dcrgn.cpp,v 1.2 2000-06-14 13:15:24 sandervl Exp $ */ 2 2 3 3 /* … … 33 33 #include "oslibmsg.h" 34 34 #include <dcdata.h> 35 #include <objhandle.h> 36 #include <wingdi32.h> 35 37 36 38 #define INCLUDED_BY_DC … … 42 44 //****************************************************************************** 43 45 //****************************************************************************** 44 int WIN32API GetClipBox( HDC hdc, PRECT lpRect) 45 { 46 pDCData pHps = (pDCData)GpiQueryDCData((HPS)hdc); 47 RECTL rectl; 48 LONG lComplexity; 49 int rc; 50 51 if(!hdc || !lpRect || !pHps) { 52 dprintf(("GDI32: GetClipBox %x %x ERROR_INVALID_PARAMETER", hdc, lpRect)); 53 SetLastError(ERROR_INVALID_PARAMETER_W); 54 return ERROR_W; 55 } 56 if(pHps->isPrinter) 57 { 58 lpRect->left = 0; 59 lpRect->top = 0; 60 lpRect->right = GetDeviceCaps( hdc, HORZRES_W); 61 lpRect->bottom = GetDeviceCaps( hdc, VERTRES_W); 62 63 rc = SIMPLEREGION_W; 64 } 65 else { 66 lComplexity = GpiQueryClipBox(pHps->hps, &rectl); 67 if(lComplexity == RGN_ERROR) 68 { 69 rc = ERROR_W; 70 } 71 else 72 if(lComplexity == RGN_NULL) 73 { 74 memset(lpRect, 0, sizeof(*lpRect)); 75 rc = NULLREGION_W; 76 } 77 else { 78 lpRect->left = rectl.xLeft; 79 lpRect->right = rectl.xRight; 80 #if 0 81 lpRect->top = pHps->height - rectl.yTop; 82 lpRect->bottom = pHps->height - rectl.yBottom; 83 #else 84 //No conversion required as GpiQueryClipBox is affected by 85 //the y-inversion of the window 86 lpRect->top = rectl.yBottom; 87 lpRect->bottom = rectl.yTop; 88 #endif 89 //Convert including/including to including/excluding 90 if(lpRect->left != lpRect->right) { 91 lpRect->right++; 92 } 93 if(lpRect->top != lpRect->bottom) { 94 lpRect->bottom++; 95 } 96 rc = (lComplexity == RGN_RECT) ? SIMPLEREGION_W : COMPLEXREGION_W; 97 } 98 } 99 dprintf(("GDI32: GetClipBox of %X returned %d\n", hdc, rc)); 100 return rc; 101 } 102 //****************************************************************************** 103 //****************************************************************************** 104 int WIN32API GetClipRgn( HDC hdc, HRGN hRgn) 105 { 106 int rc; 107 108 rc = O32_GetClipRgn(hdc, hRgn); 109 dprintf(("GDI32: GetClipRgn %x %x returned %x", hdc, hRgn, rc)); 110 return rc; 111 } 112 //****************************************************************************** 113 //****************************************************************************** 114 int WIN32API ExcludeClipRect( HDC arg1, int arg2, int arg3, int arg4, int arg5) 115 { 116 dprintf(("GDI32: ExcludeClipRect")); 117 return O32_ExcludeClipRect(arg1, arg2, arg3, arg4, arg5); 118 } 119 //****************************************************************************** 120 //****************************************************************************** 121 int WIN32API IntersectClipRect(HDC arg1, int arg2, int arg3, int arg4, int arg5) 122 { 123 int rc; 124 125 rc = O32_IntersectClipRect(arg1, arg2, arg3, arg4, arg5); 126 dprintf(("GDI32: IntersectClipRect returned %d\n", rc)); 127 return(rc); 128 } 129 //****************************************************************************** 130 //****************************************************************************** 131 int WIN32API ExtSelectClipRgn( HDC arg1, HRGN arg2, int arg3) 132 { 133 dprintf(("GDI32: ExtSelectClipRgn")); 134 return O32_ExtSelectClipRgn(arg1, arg2, arg3); 135 } 136 //****************************************************************************** 137 //****************************************************************************** 138 int WIN32API OffsetClipRgn( HDC arg1, int arg2, int arg3) 139 { 140 dprintf(("GDI32: OffsetClipRgn")); 141 return O32_OffsetClipRgn(arg1, arg2, arg3); 142 } 143 //****************************************************************************** 144 //****************************************************************************** 145 int WIN32API SelectClipRgn( HDC hdc, HRGN hRgn) 146 { 147 dprintf(("GDI32: SelectClipRgn %x %x", hdc, hRgn)); 148 return O32_SelectClipRgn(hdc, hRgn); 149 } 150 //****************************************************************************** 151 //****************************************************************************** 152 BOOL WIN32API GetUpdateRect (HWND hwnd, LPRECT pRect, BOOL erase) 46 BOOL WIN32API GetUpdateRect(HWND hwnd, LPRECT pRect, BOOL erase) 153 47 { 154 48 if (!hwnd) … … 228 122 //****************************************************************************** 229 123 //****************************************************************************** 230 int WIN32API GetUpdateRgn (HWND hwnd, HRGN hrgn, BOOL erase) 231 { 232 LONG Complexity; 233 124 int WIN32API GetUpdateRgn(HWND hwnd, HRGN hrgn, BOOL erase) 125 { 126 LONG lComplexity; 234 127 Win32BaseWindow *wnd = Win32BaseWindow::GetWindowFromHandle(hwnd); 235 128 236 if (!wnd) 237 { 238 SetLastError(ERROR_INVALID_WINDOW_HANDLE_W); 239 return ERROR_W; 240 } 241 242 Complexity = O32_GetUpdateRgn (wnd->getOS2WindowHandle(), hrgn, FALSE); 243 if (erase && (Complexity > NULLREGION_W)) sendEraseBkgnd(wnd); 244 245 return Complexity; 246 } 247 //****************************************************************************** 248 //****************************************************************************** 249 INT WIN32API ExcludeUpdateRgn( HDC hDC, HWND hWnd) 250 { 251 dprintf(("USER32: ExcludeUpdateRgn\n")); 252 hWnd = Win32BaseWindow::Win32ToOS2Handle(hWnd); 253 254 return O32_ExcludeUpdateRgn(hDC,hWnd); 129 hrgn = ObjWinToOS2Region(hrgn); 130 if(!wnd || !hrgn) 131 { 132 dprintf(("WARNING: GetUpdateRgn %x %x %d; invalid handle", hwnd, hrgn, erase)); 133 SetLastError(ERROR_INVALID_WINDOW_HANDLE_W); 134 return ERROR_W; 135 } 136 lComplexity = WinQueryUpdateRegion(wnd->getOS2WindowHandle(), hrgn); 137 if(lComplexity == RGN_ERROR) { 138 dprintf(("WARNING: GetUpdateRgn %x %x %d; RGN_ERROR", hwnd, hrgn, erase)); 139 SetLastError(ERROR_INVALID_WINDOW_HANDLE_W); 140 return ERROR_W; 141 } 142 143 if(lComplexity != RGN_NULL) 144 { 145 if(!setWinDeviceRegionFromPMDeviceRegion(hrgn, hrgn, NULL, wnd->getOS2WindowHandle())) 146 { 147 dprintf(("WARNING: GetUpdateRgn %x %x %d; setWinDeviceRegionFromPMDeviceRegion failed!", hwnd, hrgn, erase)); 148 SetLastError(ERROR_INVALID_WINDOW_HANDLE_W); 149 return ERROR_W; 150 } 151 152 if(erase) sendEraseBkgnd(wnd); 153 } 154 155 return lComplexity; 156 } 157 //****************************************************************************** 158 //TODO: Check 159 //****************************************************************************** 160 INT WIN32API ExcludeUpdateRgn(HDC hdc, HWND hwnd) 161 { 162 Win32BaseWindow *wnd = Win32BaseWindow::GetWindowFromHandle(hwnd); 163 pDCData pHps = (pDCData)GpiQueryDCData((HPS)hdc); 164 LONG lComplexity; 165 166 if(!wnd || !pHps) 167 { 168 dprintf(("WARNING: ExcludeUpdateRgn %x %x; invalid handle", hdc, hwnd)); 169 SetLastError(ERROR_INVALID_WINDOW_HANDLE_W); 170 return ERROR_W; 171 } 172 dprintf(("USER32: ExcludeUpdateRgn %x %x", hdc, hwnd)); 173 174 lComplexity = WinExcludeUpdateRegion(pHps->hps, wnd->getOS2WindowHandle()); 175 if(lComplexity == RGN_ERROR) { 176 SetLastError(ERROR_INVALID_HANDLE_W); //todo: correct error 177 } 178 else SetLastError(ERROR_SUCCESS_W); 179 return lComplexity; // windows and PM values are identical 255 180 } 256 181 /***************************************************************************** -
trunk/src/user32/oslibwin.cpp
r3662 r3705 1 /* $Id: oslibwin.cpp,v 1. 79 2000-06-07 14:51:26sandervl Exp $ */1 /* $Id: oslibwin.cpp,v 1.80 2000-06-14 13:15:24 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 812 812 //****************************************************************************** 813 813 //****************************************************************************** 814 ULONG OSLibGetScreenHeight() 815 { 816 return ScreenHeight; 817 } 818 //****************************************************************************** 819 //****************************************************************************** 820 ULONG OSLibGetScreenWidth() 821 { 822 return ScreenWidth; 823 } 824 //****************************************************************************** 825 //****************************************************************************** -
trunk/src/user32/pmwindow.cpp
r3679 r3705 1 /* $Id: pmwindow.cpp,v 1.9 3 2000-06-08 18:10:10sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.94 2000-06-14 13:15:24 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 200 200 case WM_CREATE: 201 201 { 202 RestoreOS2TIB(); 203 PMFrameWindowProc(hwnd, msg, mp1, mp2); 204 SetWin32TIB(); 202 205 203 206 if(thdb->newWindow == 0) … … 213 216 return (MRESULT)TRUE; //discontinue window creation 214 217 } 215 RestoreOS2TIB();216 PMFrameWindowProc(hwnd, msg, mp1, mp2);217 SetWin32TIB();218 218 createfail: 219 219 RestoreOS2TIB(); … … 235 235 win32wnd->MsgDestroy(); 236 236 WinSetVisibleRegionNotify(hwnd, FALSE); 237 goto RunDef WndProc;237 goto RunDefFrameProc; 238 238 239 239 case WM_ENABLE: … … 450 450 dprintf(("OS2: WM_ACTIVATE %x %x %x", hwnd, mp1, mp2)); 451 451 452 WinSetWindowUShort(hwnd,QWS_FLAGS, SHORT1FROMMP(mp1) ? (flags | FF_ACTIVE):(flags & ~FF_ACTIVE)); 452 453 if(win32wnd->IsWindowCreated()) 453 454 { 454 WinSetWindowUShort(hwnd,QWS_FLAGS,mp1 ? (flags | FF_ACTIVE):(flags & ~FF_ACTIVE));455 455 win32wnd->MsgActivate((LOWORD(pWinMsg->wParam) == WA_ACTIVE_W) ? 1 : 0, HIWORD(pWinMsg->wParam), pWinMsg->lParam, (HWND)mp2); 456 456 … … 463 463 } 464 464 } 465 466 break;465 RestoreOS2TIB(); 466 return 0; 467 467 } 468 468 … … 470 470 { 471 471 dprintf(("OS2: WM_SIZE (%d,%d) (%d,%d)", SHORT1FROMMP(mp2), SHORT2FROMMP(mp2), SHORT1FROMMP(mp1), SHORT2FROMMP(mp2))); 472 break; 473 } 474 472 goto RunDefWndProc; 473 } 475 474 476 475 case WM_MINMAXFRAME: … … 737 736 738 737 case WM_FOCUSCHANGE: 739 dprintf(("OS2: WM_FOCUSCHANGE %x ", win32wnd->getWindowHandle()));740 goto RunDef WndProc;738 dprintf(("OS2: WM_FOCUSCHANGE %x %x %x", win32wnd->getWindowHandle(), mp1, mp2)); 739 goto RunDefFrameProc; //partly responsible for activation of frame windows 741 740 742 741 case WM_QUERYTRACKINFO: -
trunk/src/user32/win32wbase.cpp
r3679 r3705 1 /* $Id: win32wbase.cpp,v 1.20 0 2000-06-08 18:10:11sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.201 2000-06-14 13:15:25 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 2053 2053 2054 2054 dprintf(("ShowWindow %x %x", getWindowHandle(), nCmdShow)); 2055 2055 if(getWindowHandle() == 0x68000030 && nCmdShow == 0) { 2056 rc = 0; 2057 } 2056 2058 wasVisible = (getStyle() & WS_VISIBLE) != 0; 2057 2059 … … 2386 2388 else DebugInt3(); 2387 2389 } 2388 2389 2390 /* Hide the window */ 2390 2391 if(IsWindowVisible())
Note:
See TracChangeset
for help on using the changeset viewer.