From: Timo Kreuzer Date: Wed, 31 Mar 2010 22:43:02 +0000 (+0000) Subject: [win32k] X-Git-Tag: backups/reactos-yarotows@57446~203 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=49383c3d9731c3ee9135431b3b1fcbbe9e2ad357 [win32k] Use PREGION as type fo the DC regions instead of PVOID. svn path=/branches/reactos-yarotows/; revision=46630 --- diff --git a/subsystems/win32/win32k/include/dc.h b/subsystems/win32/win32k/include/dc.h index 030f2dbbca7..e46bb9b4c6b 100644 --- a/subsystems/win32/win32k/include/dc.h +++ b/subsystems/win32/win32k/include/dc.h @@ -8,6 +8,7 @@ typedef struct _DC *PDC; #include "bitmaps.h" #include "pdevobj.h" #include "palette.h" +#include "region.h" /* Constants ******************************************************************/ @@ -127,9 +128,9 @@ typedef struct _DC RECTL erclWindow; RECTL erclBounds; RECTL erclBoundsApp; - PVOID prgnAPI; /* PROSRGNDATA */ - PVOID prgnVis; /* Visible region (must never be 0) */ - PVOID prgnRao; + PREGION prgnAPI; /* PROSRGNDATA */ + PREGION prgnVis; /* Visible region (must never be 0) */ + PREGION prgnRao; POINTL ptlFillOrigin; EBRUSHOBJ eboFill; EBRUSHOBJ eboLine; diff --git a/subsystems/win32/win32k/include/region.h b/subsystems/win32/win32k/include/region.h index d29b1b04fdf..5ad6e2cb52f 100644 --- a/subsystems/win32/win32k/include/region.h +++ b/subsystems/win32/win32k/include/region.h @@ -14,7 +14,7 @@ typedef struct _ROSRGNDATA RGNDATAHEADER rdh; RECTL *Buffer; -} ROSRGNDATA, *PROSRGNDATA, *LPROSRGNDATA; +} ROSRGNDATA, *PROSRGNDATA, *LPROSRGNDATA, REGION, *PREGION; /* Functions ******************************************************************/ diff --git a/subsystems/win32/win32k/objects/dclife.c b/subsystems/win32/win32k/objects/dclife.c index 0dd4950d6e4..0487f60e2d7 100644 --- a/subsystems/win32/win32k/objects/dclife.c +++ b/subsystems/win32/win32k/objects/dclife.c @@ -365,7 +365,7 @@ DC_Cleanup(PVOID ObjectBody) if (pdc->rosdc.hClipRgn) GreDeleteObject(pdc->rosdc.hClipRgn); if (pdc->prgnVis) - REGION_FreeRgnByHandle(((PROSRGNDATA)pdc->prgnVis)->BaseObject.hHmgr); + REGION_FreeRgnByHandle(pdc->prgnVis->BaseObject.hHmgr); ASSERT(pdc->rosdc.hGCClipRgn); if (pdc->rosdc.hGCClipRgn) GreDeleteObject(pdc->rosdc.hGCClipRgn); @@ -419,12 +419,12 @@ DC_SetOwnership(HDC hDC, PEPROCESS Owner) } if (pDC->prgnVis) { // FIXME! HAX!!! - Index = GDI_HANDLE_GET_INDEX(((PROSRGNDATA)pDC->prgnVis)->BaseObject.hHmgr); + Index = GDI_HANDLE_GET_INDEX(pDC->prgnVis->BaseObject.hHmgr); Entry = &GdiHandleTable->Entries[Index]; if (Entry->UserData) FreeObjectAttr(Entry->UserData); Entry->UserData = NULL; // - if (!GDIOBJ_SetOwnership(((PROSRGNDATA)pDC->prgnVis)->BaseObject.hHmgr, Owner)) goto leave; + if (!GDIOBJ_SetOwnership(pDC->prgnVis->BaseObject.hHmgr, Owner)) goto leave; } if (pDC->rosdc.hGCClipRgn) { // FIXME! HAX!!!