- Timestamp:
- Jun 17, 2000, 11:45:02 AM (25 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/dc.cpp
r3708 r3722 1 /* $Id: dc.cpp,v 1.6 1 2000-06-14 14:25:56sandervl Exp $ */1 /* $Id: dc.cpp,v 1.62 2000-06-17 09:45:00 sandervl Exp $ */ 2 2 3 3 /* … … 885 885 { 886 886 ULONG BytesNeeded; 887 PRGNDATA _WRgnData;887 PRGNDATA RgnData; 888 888 PRECT pr; 889 889 int i; … … 1053 1053 { 1054 1054 ULONG BytesNeeded; 1055 PRGNDATA _WRgnData;1055 PRGNDATA RgnData; 1056 1056 PRECTL pr; 1057 1057 int i; … … 1066 1066 goto error; 1067 1067 1068 BytesNeeded = O32_GetRegionData (hrgn, 0, NULL);1069 RgnData = (PRGNDATA _W)_alloca (BytesNeeded);1068 BytesNeeded = GetRegionData (hrgn, 0, NULL); 1069 RgnData = (PRGNDATA)_alloca (BytesNeeded); 1070 1070 if (RgnData == NULL) 1071 1071 goto error; 1072 O32_GetRegionData (hrgn, BytesNeeded, RgnData);1072 GetRegionData (hrgn, BytesNeeded, RgnData); 1073 1073 1074 1074 pr = (PRECTL)(RgnData->Buffer); … … 1107 1107 success = WinInvalidateRect (hwnd, NULL, IncludeChildren); 1108 1108 else 1109 if (hrgn) 1109 if (hrgn) { 1110 1110 success = WinInvalidateRegion (hwnd, hrgnTemp, IncludeChildren); 1111 } 1111 1112 else 1112 1113 success = WinInvalidateRect (hwnd, &rectl, IncludeChildren); … … 1124 1125 success = WinValidateRect (hwnd, NULL, IncludeChildren); 1125 1126 else 1126 if (hrgn) 1127 if (hrgn) { 1127 1128 success = WinValidateRegion (hwnd, hrgnTemp, IncludeChildren); 1129 } 1128 1130 else 1129 1131 success = WinValidateRect (hwnd, &rectl, IncludeChildren); … … 1237 1239 rc = GpiQueryRegionRects (hps, hrgnPM, NULL, &rgnRect, Rcls); 1238 1240 1239 rc = O32_SetRectRgn(hrgnWin, pRcl->xLeft,1240 1241 1242 1241 rc = SetRectRgn(hrgnWin, pRcl->xLeft, 1242 pRcl->xRight, 1243 height - pRcl->yTop, 1244 height - pRcl->yBottom); 1243 1245 1244 1246 if (rgnRect.crcReturned > 1) … … 1246 1248 int i; 1247 1249 HRGN temp; 1248 temp = O32_CreateRectRgn (0, 0, 1, 1);1250 temp = CreateRectRgn (0, 0, 1, 1); 1249 1251 1250 1252 for (i = 1, pRcl++; rc && (i < rgnRect.crcReturned); i++, pRcl++) 1251 1253 { 1252 rc = O32_SetRectRgn (temp, pRcl->xLeft,1253 1254 1255 1256 rc &= O32_CombineRgn (hrgnWin, hrgnWin, temp, RGN_OR_W);1254 rc = SetRectRgn (temp, pRcl->xLeft, 1255 pRcl->xRight, 1256 height - pRcl->yTop, 1257 height - pRcl->yBottom); 1258 rc &= CombineRgn (hrgnWin, hrgnWin, temp, RGN_OR_W); 1257 1259 } 1258 O32_DeleteObject (temp);1260 DeleteObject (temp); 1259 1261 } 1260 1262 delete[] Rcls; … … 1267 1269 else 1268 1270 { 1269 rc = O32_SetRectRgn (hrgnWin, 0, 0, 0, 0);1271 rc = SetRectRgn (hrgnWin, 0, 0, 0, 0); 1270 1272 } 1271 1273 -
trunk/src/user32/dc.h
r3679 r3722 1 /* $Id: dc.h,v 1.1 4 2000-06-08 18:10:09sandervl Exp $ */1 /* $Id: dc.h,v 1.15 2000-06-17 09:45:02 sandervl Exp $ */ 2 2 /* 3 3 * public dc functions … … 111 111 #define RDW_FRAME_W 0x0400 112 112 #define RDW_NOFRAME_W 0x0800 113 114 typedef struct _RGNDATAHEADER_W {115 DWORD dwSize;116 DWORD iType;117 DWORD nCount;118 DWORD nRgnSize;119 RECT rcBound;120 } RGNDATAHEADER_W, *LPRGNDATAHEADER_W;121 122 typedef struct _RGNDATA_W {123 RGNDATAHEADER_W rdh;124 char Buffer[1];125 } RGNDATA_W , *PRGNDATA_W , *LPRGNDATA_W ;126 127 128 113 /* Xform FLAGS */ 129 114 #define MWT_IDENTITY_W 1 … … 257 242 } 258 243 259 ULONG OPEN32API _O32_GetRegionData (HRGN hrgn, ULONG count, PRGNDATA_W pData);260 261 inline DWORD O32_GetRegionData(HRGN a, DWORD b, PRGNDATA_W c)262 {263 DWORD yyrc;264 USHORT sel = RestoreOS2FS();265 266 yyrc = _O32_GetRegionData(a, b, c);267 SetFS(sel);268 269 return yyrc;270 }271 244 272 245 BOOL OPEN32API _O32_DeleteObject (LHANDLE hgdiobj); … … 304 277 _O32_SetLastError(a); 305 278 SetFS(sel); 306 }307 308 BOOL OPEN32API _O32_SetRectRgn (HRGN dest, int left, int top, int right, int bottom);309 310 inline BOOL O32_SetRectRgn(HRGN a, int b, int c, int d, int e)311 {312 BOOL yyrc;313 USHORT sel = RestoreOS2FS();314 315 yyrc = _O32_SetRectRgn(a, b, c, d, e);316 SetFS(sel);317 318 return yyrc;319 }320 321 int OPEN32API _O32_CombineRgn (HRGN dest, HRGN src1, HRGN src2, int mode);322 323 inline int O32_CombineRgn(HRGN a, HRGN b, HRGN c, int d)324 {325 int yyrc;326 USHORT sel = RestoreOS2FS();327 328 yyrc = _O32_CombineRgn(a, b, c, d);329 SetFS(sel);330 331 return yyrc;332 }333 334 HRGN OPEN32API _O32_CreateRectRgn (int left, int top, int right, int bottom);335 336 inline HRGN O32_CreateRectRgn(int a, int b, int c, int d)337 {338 HRGN yyrc;339 USHORT sel = RestoreOS2FS();340 341 yyrc = _O32_CreateRectRgn(a, b, c, d);342 SetFS(sel);343 344 return yyrc;345 279 } 346 280
Note:
See TracChangeset
for help on using the changeset viewer.