Author: jimtabor Date: Mon May 26 20:38:01 2008 New Revision: 33723
URL: http://svn.reactos.org/svn/reactos?rev=33723&view=rev Log: Rename and add new internal functions.
Modified: trunk/reactos/subsystems/win32/win32k/include/cliprgn.h trunk/reactos/subsystems/win32/win32k/include/region.h trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c trunk/reactos/subsystems/win32/win32k/ntuser/painting.c trunk/reactos/subsystems/win32/win32k/ntuser/windc.c trunk/reactos/subsystems/win32/win32k/objects/cliprgn.c trunk/reactos/subsystems/win32/win32k/objects/dc.c trunk/reactos/subsystems/win32/win32k/objects/path.c trunk/reactos/subsystems/win32/win32k/objects/region.c
Modified: trunk/reactos/subsystems/win32/win32k/include/cliprgn.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/inc... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/cliprgn.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/cliprgn.h [iso-8859-1] Mon May 26 20:38:01 2008 @@ -4,9 +4,12 @@ #include <include/dc.h> #include <include/region.h>
-INT FASTCALL IntGdiGetClipBox(HDC hDC, LPRECT rc); -INT STDCALL IntGdiSelectVisRgn(HDC hdc, HRGN hrgn); -INT STDCALL IntGdiExtSelectClipRgn (PDC dc, HRGN hrgn, int fnMode); +INT FASTCALL IntGdiGetClipBox(PDC, LPRECT rc); +INT FASTCALL IntGdiSelectVisRgn(PDC, PROSRGNDATA); +INT FASTCALL IntGdiExtSelectClipRgn (PDC, PROSRGNDATA, int);
+INT FASTCALL GdiGetClipBox(HDC hDC, LPRECT rc); +INT FASTCALL GdiSelectVisRgn(HDC hdc, HRGN hrgn); +INT FASTCALL GdiExtSelectClipRgn (PDC dc, HRGN hrgn, int fnMode);
#endif /* not __WIN32K_CLIPRGN_H */
Modified: trunk/reactos/subsystems/win32/win32k/include/region.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/inc... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/region.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/region.h [iso-8859-1] Mon May 26 20:38:01 2008 @@ -40,6 +40,7 @@
INT FASTCALL IntGdiCombineRgn(PROSRGNDATA, PROSRGNDATA, PROSRGNDATA, INT); INT FASTCALL REGION_Complexity(PROSRGNDATA); +PROSRGNDATA FASTCALL IntGdiCreateRectRgn(INT, INT, INT, INT);
#define UnsafeIntCreateRectRgnIndirect(prc) \ NtGdiCreateRectRgn((prc)->left, (prc)->top, (prc)->right, (prc)->bottom)
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c [iso-8859-1] Mon May 26 20:38:01 2008 @@ -1,3 +1,4 @@ + /* * ReactOS W32 Subsystem * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team @@ -1365,8 +1366,7 @@ UserEnterExclusive(); DPRINT("Enter NtUserPaintDesktop\n");
- - IntGdiGetClipBox(hDC, &Rect); + GdiGetClipBox(hDC, &Rect);
hWndDesktop = IntGetDesktopWindow();
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/painting.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/painting.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/painting.c [iso-8859-1] Mon May 26 20:38:01 2008 @@ -1158,7 +1158,7 @@ RECT rcScroll, rcClip, rcSrc, rcDst; INT Result;
- IntGdiGetClipBox(hDC, &rcClip); + GdiGetClipBox(hDC, &rcClip); rcScroll = rcClip; if (prcClip) {
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/windc.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/windc.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/windc.c [iso-8859-1] Mon May 26 20:38:01 2008 @@ -341,7 +341,7 @@ }
Dce->DCXFlags &= ~DCX_DCEDIRTY; - IntGdiSelectVisRgn(Dce->hDC, hRgnVisible); + GdiSelectVisRgn(Dce->hDC, hRgnVisible);
if (Window != NULL) {
Modified: trunk/reactos/subsystems/win32/win32k/objects/cliprgn.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/cliprgn.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/cliprgn.c [iso-8859-1] Mon May 26 20:38:01 2008 @@ -16,7 +16,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id$ */
#include <w32k.h>
@@ -59,8 +58,8 @@ return NtGdiOffsetRgn(Dc->w.hGCClipRgn, -Dc->w.DCOrgX, -Dc->w.DCOrgY); }
-INT STDCALL -IntGdiSelectVisRgn(HDC hdc, HRGN hrgn) +INT FASTCALL +GdiSelectVisRgn(HDC hdc, HRGN hrgn) { int retval; DC *dc; @@ -96,9 +95,9 @@ }
-int STDCALL IntGdiExtSelectClipRgn(PDC dc, - HRGN hrgn, - int fnMode) +int FASTCALL GdiExtSelectClipRgn(PDC dc, + HRGN hrgn, + int fnMode) { int retval; // dc->DC_Flags &= ~DC_FLAG_DIRTY_RAO; @@ -151,8 +150,8 @@
int STDCALL NtGdiExtSelectClipRgn(HDC hDC, - HRGN hrgn, - int fnMode) + HRGN hrgn, + int fnMode) { int retval; DC *dc; @@ -163,14 +162,14 @@ return ERROR; }
- retval = IntGdiExtSelectClipRgn ( dc, hrgn, fnMode ); + retval = GdiExtSelectClipRgn ( dc, hrgn, fnMode );
DC_UnlockDc(dc); return retval; }
INT FASTCALL -IntGdiGetClipBox(HDC hDC, LPRECT rc) +GdiGetClipBox(HDC hDC, LPRECT rc) { PROSRGNDATA Rgn; INT retval; @@ -201,7 +200,7 @@ NTSTATUS Status = STATUS_SUCCESS; RECT Saferect;
- Ret = IntGdiGetClipBox(hDC, &Saferect); + Ret = GdiGetClipBox(hDC, &Saferect);
_SEH_TRY { @@ -434,18 +433,15 @@ { if ( pDC->DcLevel.prgnClip ) { - TempRgn = REGION_AllocRgnWithHandle(1); - + TempRgn = IntGdiCreateRectRgn(0,0,0,0); if (TempRgn) - { - REGION_SetRectRgn(TempRgn, 0, 0, 0, 0); + { Ret = IntGdiCombineRgn( TempRgn, pDC->DcLevel.prgnMeta, pDC->DcLevel.prgnClip, RGN_AND); if ( Ret ) { - REGION_UnlockRgn(TempRgn); TempRgn = GDIOBJ_ShareLockObj(TempRgn->BaseObject.hHmgr, GDI_OBJECT_TYPE_REGION);
@@ -465,8 +461,7 @@ pDC->erclClip.left = 0; pDC->erclClip.top = 0; pDC->erclClip.right = 0; - pDC->erclClip.bottom = 0; - + pDC->erclClip.bottom = 0; } else REGION_FreeRgn(TempRgn);
Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] Mon May 26 20:38:01 2008 @@ -156,7 +156,7 @@ }
hVisRgn = NtGdiCreateRectRgn(0, 0, 1, 1); - IntGdiSelectVisRgn(hNewDC, hVisRgn); + GdiSelectVisRgn(hNewDC, hVisRgn); if (Layout) NtGdiSetLayout( hNewDC, -1, Layout);
DC_InitDC(hNewDC); @@ -841,7 +841,7 @@
hVisRgn = NtGdiCreateRectRgn(0, 0, ((PGDIDEVICE)NewDC->pPDev)->GDIInfo.ulHorzRes, ((PGDIDEVICE)NewDC->pPDev)->GDIInfo.ulVertRes); - IntGdiSelectVisRgn(hNewDC, hVisRgn); + GdiSelectVisRgn(hNewDC, hVisRgn);
/* Initialize the DC state */ DC_InitDC(hNewDC); @@ -1472,7 +1472,7 @@ } DC_UnlockDc ( dc ); #else - IntGdiExtSelectClipRgn(dc, dcs->w.hClipRgn, RGN_COPY); + GdiExtSelectClipRgn(dc, dcs->w.hClipRgn, RGN_COPY); DC_UnlockDc ( dc ); #endif if(!hDC) return; // Not a MemoryDC or SaveLevel DC, return. @@ -1992,7 +1992,7 @@
hVisRgn = NtGdiCreateRectRgn(0, 0, pBmp->SurfObj.sizlBitmap.cx, pBmp->SurfObj.sizlBitmap.cy); BITMAPOBJ_UnlockBitmap(pBmp); - IntGdiSelectVisRgn(hDC, hVisRgn); + GdiSelectVisRgn(hDC, hVisRgn);
return hOrgBmp; }
Modified: trunk/reactos/subsystems/win32/win32k/objects/path.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/path.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/path.c [iso-8859-1] Mon May 26 20:38:01 2008 @@ -367,7 +367,7 @@ /* Construct a region from the path */ else if( PATH_PathToRegion( &dc->w.path, Dc_Attr->jFillMode, &hrgnPath ) ) { - success = IntGdiExtSelectClipRgn( dc, hrgnPath, Mode ) != ERROR; + success = GdiExtSelectClipRgn( dc, hrgnPath, Mode ) != ERROR; NtGdiDeleteObject( hrgnPath );
/* Empty the path */
Modified: trunk/reactos/subsystems/win32/win32k/objects/region.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/region.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/region.c [iso-8859-1] Mon May 26 20:38:01 2008 @@ -1181,6 +1181,7 @@ ASSERT(newReg->Buffer); } } + newReg->rdh.iType = RDH_RECTANGLES;
if (oldRects != &newReg->rdh.rcBound) ExFreePool(oldRects); @@ -2209,6 +2210,21 @@ Right - Left, Bottom - Top); }
+PROSRGNDATA +FASTCALL +IntGdiCreateRectRgn(INT LeftRect, INT TopRect, INT RightRect, INT BottomRect) +{ + PROSRGNDATA pRgn; + + if (!(pRgn = REGION_AllocRgnWithHandle(1))) return NULL; + + REGION_SetRectRgn(pRgn, LeftRect, TopRect, RightRect, BottomRect); + REGION_UnlockRgn(pRgn); + + return pRgn; +} + + HRGN STDCALL NtGdiCreateRectRgn(INT LeftRect, INT TopRect, INT RightRect, INT BottomRect) { @@ -2227,8 +2243,8 @@ REGION_UnlockRgn(pRgn);
return hRgn; - -} +} +
HRGN STDCALL @@ -2595,7 +2611,7 @@ { case CLIPRGN: hSrc = pDC->w.hClipRgn; -// if (dc->DcLevel.prgnClip) hSrc = ((PROSRGNDATA)dc->DcLevel.prgnClip)->BaseObject.hHmgr; +// if (pDC->DcLevel.prgnClip) hSrc = ((PROSRGNDATA)pDC->DcLevel.prgnClip)->BaseObject.hHmgr; break; case METARGN: if (pDC->DcLevel.prgnMeta) hSrc = ((PROSRGNDATA)pDC->DcLevel.prgnMeta)->BaseObject.hHmgr; @@ -2603,16 +2619,15 @@ case APIRGN: DPRINT1("hMetaRgn not implemented\n"); //hSrc = dc->hMetaClipRgn; - if (!hSrc) - { - hSrc = pDC->w.hClipRgn; - } + if (!hSrc) hSrc = pDC->w.hClipRgn; //if (!hSrc) rgn = dc->hMetaRgn; -// if (dc->prgnAPI) hSrc = ((PROSRGNDATA)dc->prgnAPI)->BaseObject.hHmgr; +// if (pDC->prgnAPI) hSrc = ((PROSRGNDATA)pDC->prgnAPI)->BaseObject.hHmgr; +// else if (pDC->DcLevel.prgnClip) hSrc = ((PROSRGNDATA)pDC->DcLevel.prgnClip)->BaseObject.hHmgr; +// else if (pDC->DcLevel.prgnMeta) hSrc = ((PROSRGNDATA)pDC->DcLevel.prgnMeta)->BaseObject.hHmgr; break; case SYSRGN: hSrc = pDC->w.hVisRgn; -// if (dc->prgnVis) hSrc = ((PROSRGNDATA)dc->prgnVis)->BaseObject.hHmgr; +// if (pDC->prgnVis) hSrc = ((PROSRGNDATA)pDC->prgnVis)->BaseObject.hHmgr; break; default: hSrc = 0; @@ -3568,17 +3583,17 @@ { HRGN hrgn; ROSRGNDATA *region; - EdgeTableEntry *pAET; /* Active Edge Table */ - INT y; /* current scanline */ - int iPts = 0; /* number of pts in buffer */ - EdgeTableEntry *pWETE; /* Winding Edge Table Entry*/ - ScanLineList *pSLL; /* current scanLineList */ - POINT *pts; /* output buffer */ - EdgeTableEntry *pPrevAET; /* ptr to previous AET */ - EdgeTable ET; /* header node for ET */ - EdgeTableEntry AET; /* header node for AET */ - EdgeTableEntry *pETEs; /* EdgeTableEntries pool */ - ScanLineListBlock SLLBlock; /* header for scanlinelist */ + EdgeTableEntry *pAET; /* Active Edge Table */ + INT y; /* current scanline */ + int iPts = 0; /* number of pts in buffer */ + EdgeTableEntry *pWETE; /* Winding Edge Table Entry*/ + ScanLineList *pSLL; /* current scanLineList */ + POINT *pts; /* output buffer */ + EdgeTableEntry *pPrevAET; /* ptr to previous AET */ + EdgeTable ET; /* header node for ET */ + EdgeTableEntry AET; /* header node for AET */ + EdgeTableEntry *pETEs; /* EdgeTableEntries pool */ + ScanLineListBlock SLLBlock; /* header for scanlinelist */ int fixWAET = FALSE; POINTBLOCK FirstPtBlock, *curPtBlock; /* PtBlock buffers */ POINTBLOCK *tmpPtBlock;