Changeset 3722 for trunk/src


Ignore:
Timestamp:
Jun 17, 2000, 11:45:02 AM (25 years ago)
Author:
sandervl
Message:

region fixes for RedrawWindow

Location:
trunk/src/user32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/dc.cpp

    r3708 r3722  
    1 /* $Id: dc.cpp,v 1.61 2000-06-14 14:25:56 sandervl Exp $ */
     1/* $Id: dc.cpp,v 1.62 2000-06-17 09:45:00 sandervl Exp $ */
    22
    33/*
     
    885885   {
    886886      ULONG BytesNeeded;
    887       PRGNDATA_W RgnData;
     887      PRGNDATA RgnData;
    888888      PRECT pr;
    889889      int i;
     
    10531053   {
    10541054      ULONG BytesNeeded;
    1055       PRGNDATA_W RgnData;
     1055      PRGNDATA RgnData;
    10561056      PRECTL pr;
    10571057      int i;
     
    10661066         goto error;
    10671067
    1068       BytesNeeded = O32_GetRegionData (hrgn, 0, NULL);
    1069       RgnData = (PRGNDATA_W)_alloca (BytesNeeded);
     1068      BytesNeeded = GetRegionData (hrgn, 0, NULL);
     1069      RgnData = (PRGNDATA)_alloca (BytesNeeded);
    10701070      if (RgnData == NULL)
    10711071          goto error;
    1072       O32_GetRegionData (hrgn, BytesNeeded, RgnData);
     1072      GetRegionData (hrgn, BytesNeeded, RgnData);
    10731073
    10741074      pr = (PRECTL)(RgnData->Buffer);
     
    11071107            success = WinInvalidateRect (hwnd, NULL, IncludeChildren);
    11081108        else
    1109         if (hrgn)
     1109        if (hrgn) {
    11101110            success = WinInvalidateRegion (hwnd, hrgnTemp, IncludeChildren);
     1111        }
    11111112        else
    11121113            success = WinInvalidateRect (hwnd, &rectl, IncludeChildren);
     
    11241125                success = WinValidateRect (hwnd, NULL, IncludeChildren);
    11251126            else
    1126             if (hrgn)
     1127            if (hrgn) {
    11271128                success = WinValidateRegion (hwnd, hrgnTemp, IncludeChildren);
     1129            }
    11281130            else
    11291131                success = WinValidateRect (hwnd, &rectl, IncludeChildren);
     
    12371239         rc = GpiQueryRegionRects (hps, hrgnPM, NULL, &rgnRect, Rcls);
    12381240
    1239          rc = O32_SetRectRgn (hrgnWin, pRcl->xLeft,
    1240                                         pRcl->xRight,
    1241                                         height - pRcl->yTop,
    1242                                         height - pRcl->yBottom);
     1241         rc = SetRectRgn(hrgnWin, pRcl->xLeft,
     1242                         pRcl->xRight,
     1243                         height - pRcl->yTop,
     1244                         height - pRcl->yBottom);
    12431245
    12441246         if (rgnRect.crcReturned > 1)
     
    12461248            int i;
    12471249            HRGN temp;
    1248             temp = O32_CreateRectRgn (0, 0, 1, 1);
     1250            temp = CreateRectRgn (0, 0, 1, 1);
    12491251
    12501252            for (i = 1, pRcl++; rc && (i < rgnRect.crcReturned); i++, pRcl++)
    12511253            {
    1252               rc = O32_SetRectRgn (temp, pRcl->xLeft,
    1253                                           pRcl->xRight,
    1254                                           height - pRcl->yTop,
    1255                                           height - pRcl->yBottom);
    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);
    12571259            }
    1258             O32_DeleteObject (temp);
     1260            DeleteObject (temp);
    12591261         }
    12601262         delete[] Rcls;
     
    12671269   else
    12681270   {
    1269       rc = O32_SetRectRgn (hrgnWin, 0, 0, 0, 0);
     1271      rc = SetRectRgn (hrgnWin, 0, 0, 0, 0);
    12701272   }
    12711273
  • trunk/src/user32/dc.h

    r3679 r3722  
    1 /* $Id: dc.h,v 1.14 2000-06-08 18:10:09 sandervl Exp $ */
     1/* $Id: dc.h,v 1.15 2000-06-17 09:45:02 sandervl Exp $ */
    22/*
    33 * public dc functions
     
    111111#define RDW_FRAME_W            0x0400
    112112#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 
    128113/* Xform FLAGS */
    129114#define MWT_IDENTITY_W        1
     
    257242}
    258243
    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 }
    271244
    272245BOOL    OPEN32API _O32_DeleteObject (LHANDLE hgdiobj);
     
    304277    _O32_SetLastError(a);
    305278    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;
    345279}
    346280
Note: See TracChangeset for help on using the changeset viewer.