Change most DC struct members to the names they have on Windows according to gdikdx

svn path=/trunk/; revision=40111
This commit is contained in:
Timo Kreuzer 2009-03-20 01:35:49 +00:00
parent b2490d5d64
commit af62ba6188
29 changed files with 365 additions and 363 deletions

View file

@ -29,7 +29,7 @@
/* Type definitions ***********************************************************/ /* Type definitions ***********************************************************/
typedef struct _WIN_DC_INFO typedef struct _ROS_DC_INFO
{ {
HRGN hClipRgn; /* Clip region (may be 0) */ HRGN hClipRgn; /* Clip region (may be 0) */
HRGN hVisRgn; /* Should me to DC. Visible region (must never be 0) */ HRGN hVisRgn; /* Should me to DC. Visible region (must never be 0) */
@ -37,7 +37,14 @@ typedef struct _WIN_DC_INFO
HBITMAP hBitmap; HBITMAP hBitmap;
BYTE bitsPerPixel; BYTE bitsPerPixel;
} WIN_DC_INFO;
CLIPOBJ *CombinedClip;
XLATEOBJ *XlateBrush;
XLATEOBJ *XlatePen;
UNICODE_STRING DriverName;
} ROS_DC_INFO;
/* EXtended CLip and Window Region Object */ /* EXtended CLip and Window Region Object */
typedef struct _XCLIPOBJ typedef struct _XCLIPOBJ
@ -99,18 +106,18 @@ typedef struct _DC
Do not (re)move this. */ Do not (re)move this. */
BASEOBJECT BaseObject; BASEOBJECT BaseObject;
DHPDEV PDev; /* <- GDIDEVICE.hPDev DHPDEV for device. */ DHPDEV dhpdev; /* <- GDIDEVICE.hPDev DHPDEV for device. */
INT DC_Type; INT dctype;
INT DC_Flags; INT fs;
PVOID pPDev; /* PGDIDEVICE aka PDEVOBJ */ PVOID ppdev; /* PGDIDEVICE aka PDEVOBJ */
PVOID hSem; /* PERESOURCE aka HSEMAPHORE */ PVOID hsem; /* PERESOURCE aka HSEMAPHORE */
FLONG flGraphics; FLONG flGraphicsCaps;
FLONG flGraphics2; FLONG flGraphicsCaps2;
PDC_ATTR pDc_Attr; PDC_ATTR pDc_Attr;
DCLEVEL DcLevel; DCLEVEL DcLevel;
DC_ATTR Dc_Attr; DC_ATTR Dc_Attr;
HDC hNext; HDC hdcNext;
HDC hPrev; HDC hdcPrev;
RECTL erclClip; RECTL erclClip;
POINTL ptlDCOrig; POINTL ptlDCOrig;
RECTL erclWindow; RECTL erclWindow;
@ -130,19 +137,14 @@ typedef struct _DC
PVOID prfnt; /* RFONT* */ PVOID prfnt; /* RFONT* */
XCLIPOBJ co; /* CLIPOBJ */ XCLIPOBJ co; /* CLIPOBJ */
PVOID pPFFList; /* PPFF* */ PVOID pPFFList; /* PPFF* */
PVOID ClrxFormLnk; PVOID pClrxFormLnk;
INT ipfdDevMax; INT ipfdDevMax;
ULONG ulCopyCount; ULONG ulCopyCount;
PVOID pSurfInfo; PVOID pSurfInfo;
POINTL ptlDoBanding; POINTL ptlDoBanding;
/* Reactos specific members */ /* Reactos specific members */
WIN_DC_INFO w; ROS_DC_INFO rosdc;
CLIPOBJ *CombinedClip;
XLATEOBJ *XlateBrush;
XLATEOBJ *XlatePen;
UNICODE_STRING DriverName;
} DC, *PDC; } DC, *PDC;
typedef struct _GRAPHICS_DEVICE typedef struct _GRAPHICS_DEVICE

View file

@ -59,7 +59,7 @@ intEnableReactXDriver(HDC hdc)
return FALSE; return FALSE;
} }
pDev = (PGDIDEVICE)pDC->pPDev; pDev = (PGDIDEVICE)pDC->ppdev;
/* test see if drv got a dx interface or not */ /* test see if drv got a dx interface or not */
if ( ( pDev->DriverFunctions.DisableDirectDraw == NULL) || if ( ( pDev->DriverFunctions.DisableDirectDraw == NULL) ||
@ -86,7 +86,7 @@ intEnableReactXDriver(HDC hdc)
{ {
DPRINT1(" call to pfnDdEnableDirectDraw \n "); DPRINT1(" call to pfnDdEnableDirectDraw \n ");
/* Note it is the hdev struct it want, not the drv hPDev aka pdc->PDev */ /* Note it is the hdev struct it want, not the drv hPDev aka pdc->PDev */
success = pfnDdEnableDirectDraw(pDC->pPDev, TRUE); success = pfnDdEnableDirectDraw(pDC->ppdev, TRUE);
dump_edd_directdraw_global(pDev->pEDDgpl); dump_edd_directdraw_global(pDev->pEDDgpl);
dump_halinfo(&pDev->pEDDgpl->ddHalInfo); dump_halinfo(&pDev->pEDDgpl->ddHalInfo);

View file

@ -430,7 +430,7 @@ DxEngSetHdevData(HDEV hDev,
* DC states depending on what value is passed in its second parameter: * DC states depending on what value is passed in its second parameter:
* 1. If the DC is full screen * 1. If the DC is full screen
* 2. Get Complexity of visible region * 2. Get Complexity of visible region
* 3. Get Driver hdev, which is pPDev * 3. Get Driver hdev, which is ppdev
* *
* @param HDC hdc * @param HDC hdc
* The DC handle * The DC handle
@ -438,7 +438,7 @@ DxEngSetHdevData(HDEV hDev,
* @param DWORD type * @param DWORD type
* value 1 = Is DC fullscreen * value 1 = Is DC fullscreen
* value 2 = Get Complexity of visible region. * value 2 = Get Complexity of visible region.
* value 3 = Get Driver hdev, which is a pPDev. * value 3 = Get Driver hdev, which is a ppdev.
* *
* @return * @return
* Return one of the type values * Return one of the type values
@ -462,7 +462,7 @@ DxEngGetDCState(HDC hDC,
switch (type) switch (type)
{ {
case 1: case 1:
retVal = (DWORD_PTR) pDC->DC_Flags & DC_FLAG_FULLSCREEN; retVal = (DWORD_PTR) pDC->fs & DC_FLAG_FULLSCREEN;
break; break;
case 2: case 2:
UNIMPLEMENTED; UNIMPLEMENTED;
@ -470,7 +470,7 @@ DxEngGetDCState(HDC hDC,
case 3: case 3:
{ {
/* Return the HDEV of this DC. */ /* Return the HDEV of this DC. */
retVal = (DWORD_PTR) pDC->pPDev; retVal = (DWORD_PTR) pDC->ppdev;
break; break;
} }
default: default:
@ -527,14 +527,14 @@ BOOLEAN
APIENTRY APIENTRY
DxEngLockHdev(HDEV hDev) DxEngLockHdev(HDEV hDev)
{ {
PGDIDEVICE pPDev = (PGDIDEVICE)hDev; PGDIDEVICE ppdev = (PGDIDEVICE)hDev;
PERESOURCE Resource; PERESOURCE Resource;
DPRINT1("ReactX Calling : DxEngLockHdev \n"); DPRINT1("ReactX Calling : DxEngLockHdev \n");
DPRINT1("hDev : 0x%08lx\n",hDev); DPRINT1("hDev : 0x%08lx\n",hDev);
Resource = pPDev->hsemDevLock; Resource = ppdev->hsemDevLock;
if (Resource) if (Resource)
{ {
@ -564,8 +564,8 @@ BOOLEAN
APIENTRY APIENTRY
DxEngUnlockHdev(HDEV hDev) DxEngUnlockHdev(HDEV hDev)
{ {
PGDIDEVICE pPDev = (PGDIDEVICE)hDev; PGDIDEVICE ppdev = (PGDIDEVICE)hDev;
PERESOURCE Resource = pPDev->hsemDevLock; PERESOURCE Resource = ppdev->hsemDevLock;
DPRINT1("ReactX Calling : DxEngUnlockHdev \n"); DPRINT1("ReactX Calling : DxEngUnlockHdev \n");
@ -759,9 +759,9 @@ DxEngSetDCState(HDC hDC, DWORD SetType, DWORD Set)
if (SetType == 1) if (SetType == 1)
{ {
if ( Set ) if ( Set )
pDC->DC_Flags |= DC_FLAG_FULLSCREEN; pDC->fs |= DC_FLAG_FULLSCREEN;
else else
pDC->DC_Flags &= ~DC_FLAG_FULLSCREEN; pDC->fs &= ~DC_FLAG_FULLSCREEN;
Ret = TRUE; Ret = TRUE;
} }
DC_UnlockDc(pDC); DC_UnlockDc(pDC);

View file

@ -119,8 +119,8 @@ IntSetCursor(PWINSTATION_OBJECT WinSta, PCURICON_OBJECT NewCursor,
{ {
return Ret; return Ret;
} }
dcbmp = dc->w.hBitmap; dcbmp = dc->rosdc.hBitmap;
DevInfo = (PDEVINFO)&((GDIDEVICE *)dc->pPDev)->DevInfo; DevInfo = (PDEVINFO)&((GDIDEVICE *)dc->ppdev)->DevInfo;
DC_UnlockDc(dc); DC_UnlockDc(dc);
psurf = SURFACE_LockSurface(dcbmp); psurf = SURFACE_LockSurface(dcbmp);
@ -1769,7 +1769,7 @@ UserShowCursor(BOOL bShow)
return showpointer; /* No mouse */ return showpointer; /* No mouse */
} }
hbmpDc = dc->w.hBitmap; hbmpDc = dc->rosdc.hBitmap;
DC_UnlockDc(dc); DC_UnlockDc(dc);
psurfDc = SURFACE_LockSurface(hbmpDc); psurfDc = SURFACE_LockSurface(hbmpDc);

View file

@ -452,7 +452,7 @@ IntGetDesktopWorkArea(PDESKTOP Desktop, RECTL *Rect)
SURFACE *psurf; SURFACE *psurf;
dc = DC_LockDc(ScreenDeviceContext); dc = DC_LockDc(ScreenDeviceContext);
/* FIXME - Handle dc == NULL!!!! */ /* FIXME - Handle dc == NULL!!!! */
psurf = SURFACE_LockSurface(dc->w.hBitmap); psurf = SURFACE_LockSurface(dc->rosdc.hBitmap);
if(psurf) if(psurf)
{ {
Ret->right = psurf->SurfObj.sizlBitmap.cx; Ret->right = psurf->SurfObj.sizlBitmap.cx;

View file

@ -1169,7 +1169,7 @@ IntMouseInput(MOUSEINPUT *mi)
dc = DC_LockDc(hDC); dc = DC_LockDc(hDC);
if (dc) if (dc)
{ {
hBitmap = dc->w.hBitmap; hBitmap = dc->rosdc.hBitmap;
DC_UnlockDc(dc); DC_UnlockDc(dc);
psurf = SURFACE_LockSurface(hBitmap); psurf = SURFACE_LockSurface(hBitmap);

View file

@ -40,8 +40,8 @@ InitMetrics(VOID)
pScreenDC = DC_LockDc(hScreenDC); pScreenDC = DC_LockDc(hScreenDC);
if (pScreenDC) if (pScreenDC)
{ {
Width = ((PGDIDEVICE)pScreenDC->pPDev)->GDIInfo.ulHorzRes; Width = ((PGDIDEVICE)pScreenDC->ppdev)->GDIInfo.ulHorzRes;
Height = ((PGDIDEVICE)pScreenDC->pPDev)->GDIInfo.ulVertRes; Height = ((PGDIDEVICE)pScreenDC->ppdev)->GDIInfo.ulVertRes;
DC_UnlockDc(pScreenDC); DC_UnlockDc(pScreenDC);
} }
NtGdiDeleteObjectApp(hScreenDC); NtGdiDeleteObjectApp(hScreenDC);

View file

@ -494,7 +494,7 @@ NtUserEnumDisplayMonitors(
/* FIXME: setlasterror? */ /* FIXME: setlasterror? */
return -1; return -1;
} }
dcVisRgn = dc->w.hVisRgn; dcVisRgn = dc->rosdc.hVisRgn;
DC_UnlockDc(dc); DC_UnlockDc(dc);
regionType = NtGdiGetRgnBox(dcVisRgn, &dcRect); regionType = NtGdiGetRgnBox(dcVisRgn, &dcRect);

View file

@ -1180,7 +1180,7 @@ UserScrollDC(HDC hDC, INT dx, INT dy, const RECTL *prcScroll,
{ {
return FALSE; return FALSE;
} }
hrgnVisible = pDC->w.hVisRgn; // pDC->w.hGCClipRgn? hrgnVisible = pDC->rosdc.hVisRgn; // pDC->w.hGCClipRgn?
DC_UnlockDc(pDC); DC_UnlockDc(pDC);
/* Begin with the shifted and then clipped scroll rect */ /* Begin with the shifted and then clipped scroll rect */

View file

@ -782,10 +782,10 @@ DceResetActiveDCEs(PWINDOW_OBJECT Window)
dc->ptlDCOrig.x = CurrentWindow->Wnd->ClientRect.left; dc->ptlDCOrig.x = CurrentWindow->Wnd->ClientRect.left;
dc->ptlDCOrig.y = CurrentWindow->Wnd->ClientRect.top; dc->ptlDCOrig.y = CurrentWindow->Wnd->ClientRect.top;
} }
if (NULL != dc->w.hClipRgn) if (NULL != dc->rosdc.hClipRgn)
{ {
int FASTCALL CLIPPING_UpdateGCRegion(DC* Dc); int FASTCALL CLIPPING_UpdateGCRegion(DC* Dc);
NtGdiOffsetRgn(dc->w.hClipRgn, DeltaX, DeltaY); NtGdiOffsetRgn(dc->rosdc.hClipRgn, DeltaX, DeltaY);
CLIPPING_UpdateGCRegion(dc); CLIPPING_UpdateGCRegion(dc);
} }
if (NULL != pDCE->hClipRgn) if (NULL != pDCE->hClipRgn)

View file

@ -8,7 +8,7 @@
*/ */
#define PUTPIXEL(x,y,BrushInst) \ #define PUTPIXEL(x,y,BrushInst) \
ret = ret && IntEngLineTo(&psurf->SurfObj, \ ret = ret && IntEngLineTo(&psurf->SurfObj, \
dc->CombinedClip, \ dc->rosdc.CombinedClip, \
&BrushInst.BrushObject, \ &BrushInst.BrushObject, \
x, y, (x)+1, y, \ x, y, (x)+1, y, \
&RectBounds, \ &RectBounds, \
@ -16,7 +16,7 @@
#define PUTLINE(x1,y1,x2,y2,BrushInst) \ #define PUTLINE(x1,y1,x2,y2,BrushInst) \
ret = ret && IntEngLineTo(&psurf->SurfObj, \ ret = ret && IntEngLineTo(&psurf->SurfObj, \
dc->CombinedClip, \ dc->rosdc.CombinedClip, \
&BrushInst.BrushObject, \ &BrushInst.BrushObject, \
x1, y1, x2, y2, \ x1, y1, x2, y2, \
&RectBounds, \ &RectBounds, \
@ -158,7 +158,7 @@ IntArc( DC *dc,
arctype, arctype,
PenBrushObj); PenBrushObj);
psurf = SURFACE_LockSurface(dc->w.hBitmap); psurf = SURFACE_LockSurface(dc->rosdc.hBitmap);
if (NULL == psurf) if (NULL == psurf)
{ {
DPRINT1("Arc Fail 2\n"); DPRINT1("Arc Fail 2\n");
@ -167,7 +167,7 @@ IntArc( DC *dc,
return FALSE; return FALSE;
} }
IntGdiInitBrushInstance(&PenBrushInst, PenBrushObj, dc->XlatePen); IntGdiInitBrushInstance(&PenBrushInst, PenBrushObj, dc->rosdc.XlatePen);
if (arctype == GdiTypePie) if (arctype == GdiTypePie)
{ {
@ -327,7 +327,7 @@ NtGdiAngleArc(
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE; return FALSE;
} }
if (pDC->DC_Type == DC_TYPE_INFO) if (pDC->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(pDC); DC_UnlockDc(pDC);
/* Yes, Windows really returns TRUE in this case */ /* Yes, Windows really returns TRUE in this case */
@ -363,7 +363,7 @@ NtGdiArcInternal(
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE; return FALSE;
} }
if (dc->DC_Type == DC_TYPE_INFO) if (dc->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(dc); DC_UnlockDc(dc);
/* Yes, Windows really returns TRUE in this case */ /* Yes, Windows really returns TRUE in this case */

View file

@ -56,7 +56,7 @@ NtGdiAlphaBlend(
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE; return FALSE;
} }
if (DCDest->DC_Type == DC_TYPE_INFO) if (DCDest->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(DCDest); DC_UnlockDc(DCDest);
/* Yes, Windows really returns TRUE in this case */ /* Yes, Windows really returns TRUE in this case */
@ -73,7 +73,7 @@ NtGdiAlphaBlend(
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE; return FALSE;
} }
if (DCSrc->DC_Type == DC_TYPE_INFO) if (DCSrc->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(DCSrc); DC_UnlockDc(DCSrc);
DC_UnlockDc(DCDest); DC_UnlockDc(DCDest);
@ -116,7 +116,7 @@ NtGdiAlphaBlend(
} }
/* Determine surfaces to be used in the bitblt */ /* Determine surfaces to be used in the bitblt */
BitmapDest = SURFACE_LockSurface(DCDest->w.hBitmap); BitmapDest = SURFACE_LockSurface(DCDest->rosdc.hBitmap);
if (!BitmapDest) if (!BitmapDest)
{ {
if (hDCSrc != hDCDest) if (hDCSrc != hDCDest)
@ -124,11 +124,11 @@ NtGdiAlphaBlend(
DC_UnlockDc(DCDest); DC_UnlockDc(DCDest);
return FALSE; return FALSE;
} }
if (DCSrc->w.hBitmap == DCDest->w.hBitmap) if (DCSrc->rosdc.hBitmap == DCDest->rosdc.hBitmap)
BitmapSrc = BitmapDest; BitmapSrc = BitmapDest;
else else
{ {
BitmapSrc = SURFACE_LockSurface(DCSrc->w.hBitmap); BitmapSrc = SURFACE_LockSurface(DCSrc->rosdc.hBitmap);
if (!BitmapSrc) if (!BitmapSrc)
{ {
SURFACE_UnlockSurface(BitmapDest); SURFACE_UnlockSurface(BitmapDest);
@ -153,7 +153,7 @@ NtGdiAlphaBlend(
{ {
/* Perform the alpha blend operation */ /* Perform the alpha blend operation */
Status = IntEngAlphaBlend(&BitmapDest->SurfObj, &BitmapSrc->SurfObj, Status = IntEngAlphaBlend(&BitmapDest->SurfObj, &BitmapSrc->SurfObj,
DCDest->CombinedClip, XlateObj, DCDest->rosdc.CombinedClip, XlateObj,
&DestRect, &SourceRect, &BlendObj); &DestRect, &SourceRect, &BlendObj);
} }
@ -203,7 +203,7 @@ NtGdiBitBlt(
DPRINT("Invalid destination dc handle (0x%08x) passed to NtGdiBitBlt\n", hDCDest); DPRINT("Invalid destination dc handle (0x%08x) passed to NtGdiBitBlt\n", hDCDest);
return FALSE; return FALSE;
} }
if (DCDest->DC_Type == DC_TYPE_INFO) if (DCDest->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(DCDest); DC_UnlockDc(DCDest);
/* Yes, Windows really returns TRUE in this case */ /* Yes, Windows really returns TRUE in this case */
@ -221,7 +221,7 @@ NtGdiBitBlt(
DPRINT("Invalid source dc handle (0x%08x) passed to NtGdiBitBlt\n", hDCSrc); DPRINT("Invalid source dc handle (0x%08x) passed to NtGdiBitBlt\n", hDCSrc);
return FALSE; return FALSE;
} }
if (DCSrc->DC_Type == DC_TYPE_INFO) if (DCSrc->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(DCSrc); DC_UnlockDc(DCSrc);
DC_UnlockDc(DCDest); DC_UnlockDc(DCDest);
@ -268,17 +268,17 @@ NtGdiBitBlt(
BrushOrigin.y = 0; BrushOrigin.y = 0;
/* Determine surfaces to be used in the bitblt */ /* Determine surfaces to be used in the bitblt */
BitmapDest = SURFACE_LockSurface(DCDest->w.hBitmap); BitmapDest = SURFACE_LockSurface(DCDest->rosdc.hBitmap);
if (!BitmapDest) if (!BitmapDest)
goto cleanup; goto cleanup;
if (UsesSource) if (UsesSource)
{ {
if (DCSrc->w.hBitmap == DCDest->w.hBitmap) if (DCSrc->rosdc.hBitmap == DCDest->rosdc.hBitmap)
BitmapSrc = BitmapDest; BitmapSrc = BitmapDest;
else else
{ {
BitmapSrc = SURFACE_LockSurface(DCSrc->w.hBitmap); BitmapSrc = SURFACE_LockSurface(DCSrc->rosdc.hBitmap);
if (!BitmapSrc) if (!BitmapSrc)
goto cleanup; goto cleanup;
} }
@ -293,7 +293,7 @@ NtGdiBitBlt(
goto cleanup; goto cleanup;
} }
BrushOrigin = *((PPOINTL)&BrushObj->ptOrigin); BrushOrigin = *((PPOINTL)&BrushObj->ptOrigin);
IntGdiInitBrushInstance(&BrushInst, BrushObj, DCDest->XlateBrush); IntGdiInitBrushInstance(&BrushInst, BrushObj, DCDest->rosdc.XlateBrush);
} }
/* Create the XLATEOBJ. */ /* Create the XLATEOBJ. */
@ -312,7 +312,7 @@ NtGdiBitBlt(
/* Perform the bitblt operation */ /* Perform the bitblt operation */
Status = IntEngBitBlt(&BitmapDest->SurfObj, BitmapSrc ? &BitmapSrc->SurfObj : NULL, NULL, Status = IntEngBitBlt(&BitmapDest->SurfObj, BitmapSrc ? &BitmapSrc->SurfObj : NULL, NULL,
DCDest->CombinedClip, XlateObj, &DestRect, DCDest->rosdc.CombinedClip, XlateObj, &DestRect,
&SourcePoint, NULL, &SourcePoint, NULL,
BrushObj ? &BrushInst.BrushObject : NULL, BrushObj ? &BrushInst.BrushObject : NULL,
&BrushOrigin, ROP3_TO_ROP4(ROP)); &BrushOrigin, ROP3_TO_ROP4(ROP));
@ -372,7 +372,7 @@ NtGdiTransparentBlt(
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE; return FALSE;
} }
if (DCDest->DC_Type == DC_TYPE_INFO) if (DCDest->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(DCDest); DC_UnlockDc(DCDest);
/* Yes, Windows really returns TRUE in this case */ /* Yes, Windows really returns TRUE in this case */
@ -390,7 +390,7 @@ NtGdiTransparentBlt(
{ {
DCSrc = DCDest; DCSrc = DCDest;
} }
if (DCSrc->DC_Type == DC_TYPE_INFO) if (DCSrc->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(DCSrc); DC_UnlockDc(DCSrc);
if(hdcDst != hdcSrc) if(hdcDst != hdcSrc)
@ -407,13 +407,13 @@ NtGdiTransparentBlt(
xSrc += DCSrc->ptlDCOrig.x; xSrc += DCSrc->ptlDCOrig.x;
ySrc += DCSrc->ptlDCOrig.y; ySrc += DCSrc->ptlDCOrig.y;
BitmapDest = SURFACE_LockSurface(DCDest->w.hBitmap); BitmapDest = SURFACE_LockSurface(DCDest->rosdc.hBitmap);
if (!BitmapDest) if (!BitmapDest)
{ {
goto done; goto done;
} }
BitmapSrc = SURFACE_LockSurface(DCSrc->w.hBitmap); BitmapSrc = SURFACE_LockSurface(DCSrc->rosdc.hBitmap);
if (!BitmapSrc) if (!BitmapSrc)
{ {
goto done; goto done;
@ -477,7 +477,7 @@ NtGdiTransparentBlt(
} }
Ret = IntEngTransparentBlt(&BitmapDest->SurfObj, &BitmapSrc->SurfObj, Ret = IntEngTransparentBlt(&BitmapDest->SurfObj, &BitmapSrc->SurfObj,
DCDest->CombinedClip, XlateObj, &rcDest, &rcSrc, DCDest->rosdc.CombinedClip, XlateObj, &rcDest, &rcSrc,
TransparentColor, 0); TransparentColor, 0);
done: done:
@ -774,7 +774,7 @@ NtGdiStretchBlt(
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE; return FALSE;
} }
if (DCDest->DC_Type == DC_TYPE_INFO) if (DCDest->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(DCDest); DC_UnlockDc(DCDest);
/* Yes, Windows really returns TRUE in this case */ /* Yes, Windows really returns TRUE in this case */
@ -793,7 +793,7 @@ NtGdiStretchBlt(
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE; return FALSE;
} }
if (DCSrc->DC_Type == DC_TYPE_INFO) if (DCSrc->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(DCSrc); DC_UnlockDc(DCSrc);
DC_UnlockDc(DCDest); DC_UnlockDc(DCDest);
@ -841,18 +841,18 @@ NtGdiStretchBlt(
BrushOrigin.y = 0; BrushOrigin.y = 0;
/* Determine surfaces to be used in the bitblt */ /* Determine surfaces to be used in the bitblt */
BitmapDest = SURFACE_LockSurface(DCDest->w.hBitmap); BitmapDest = SURFACE_LockSurface(DCDest->rosdc.hBitmap);
if (BitmapDest == NULL) if (BitmapDest == NULL)
goto failed; goto failed;
if (UsesSource) if (UsesSource)
{ {
if (DCSrc->w.hBitmap == DCDest->w.hBitmap) if (DCSrc->rosdc.hBitmap == DCDest->rosdc.hBitmap)
{ {
BitmapSrc = BitmapDest; BitmapSrc = BitmapDest;
} }
else else
{ {
BitmapSrc = SURFACE_LockSurface(DCSrc->w.hBitmap); BitmapSrc = SURFACE_LockSurface(DCSrc->rosdc.hBitmap);
if (BitmapSrc == NULL) if (BitmapSrc == NULL)
goto failed; goto failed;
} }
@ -876,7 +876,7 @@ NtGdiStretchBlt(
goto failed; goto failed;
} }
BrushOrigin = *((PPOINTL)&BrushObj->ptOrigin); BrushOrigin = *((PPOINTL)&BrushObj->ptOrigin);
IntGdiInitBrushInstance(&BrushInst, BrushObj, DCDest->XlateBrush); IntGdiInitBrushInstance(&BrushInst, BrushObj, DCDest->rosdc.XlateBrush);
} }
/* Offset the brush */ /* Offset the brush */
@ -885,7 +885,7 @@ NtGdiStretchBlt(
/* Perform the bitblt operation */ /* Perform the bitblt operation */
Status = IntEngStretchBlt(&BitmapDest->SurfObj, &BitmapSrc->SurfObj, Status = IntEngStretchBlt(&BitmapDest->SurfObj, &BitmapSrc->SurfObj,
NULL, DCDest->CombinedClip, XlateObj, NULL, DCDest->rosdc.CombinedClip, XlateObj,
&DestRect, &SourceRect, NULL, &DestRect, &SourceRect, NULL,
BrushObj ? &BrushInst.BrushObject : NULL, BrushObj ? &BrushInst.BrushObject : NULL,
&BrushOrigin, ROP3_TO_ROP4(ROP)); &BrushOrigin, ROP3_TO_ROP4(ROP));
@ -899,7 +899,7 @@ failed:
{ {
BRUSHOBJ_UnlockBrush(BrushObj); BRUSHOBJ_UnlockBrush(BrushObj);
} }
if (BitmapSrc && DCSrc->w.hBitmap != DCDest->w.hBitmap) if (BitmapSrc && DCSrc->rosdc.hBitmap != DCDest->rosdc.hBitmap)
{ {
SURFACE_UnlockSurface(BitmapSrc); SURFACE_UnlockSurface(BitmapSrc);
} }
@ -934,7 +934,7 @@ IntPatBlt(
ASSERT(BrushObj); ASSERT(BrushObj);
psurf = SURFACE_LockSurface(dc->w.hBitmap); psurf = SURFACE_LockSurface(dc->rosdc.hBitmap);
if (psurf == NULL) if (psurf == NULL)
{ {
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
@ -970,13 +970,13 @@ IntPatBlt(
BrushOrigin.x = BrushObj->ptOrigin.x + dc->ptlDCOrig.x; BrushOrigin.x = BrushObj->ptOrigin.x + dc->ptlDCOrig.x;
BrushOrigin.y = BrushObj->ptOrigin.y + dc->ptlDCOrig.y; BrushOrigin.y = BrushObj->ptOrigin.y + dc->ptlDCOrig.y;
IntGdiInitBrushInstance(&BrushInst, BrushObj, dc->XlateBrush); IntGdiInitBrushInstance(&BrushInst, BrushObj, dc->rosdc.XlateBrush);
ret = IntEngBitBlt( ret = IntEngBitBlt(
&psurf->SurfObj, &psurf->SurfObj,
NULL, NULL,
NULL, NULL,
dc->CombinedClip, dc->rosdc.CombinedClip,
NULL, NULL,
&DestRect, &DestRect,
NULL, NULL,
@ -1011,7 +1011,7 @@ IntGdiPolyPatBlt(
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE; return FALSE;
} }
if (dc->DC_Type == DC_TYPE_INFO) if (dc->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(dc); DC_UnlockDc(dc);
/* Yes, Windows really returns TRUE in this case */ /* Yes, Windows really returns TRUE in this case */
@ -1075,7 +1075,7 @@ NtGdiPatBlt(
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE; return FALSE;
} }
if (dc->DC_Type == DC_TYPE_INFO) if (dc->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(dc); DC_UnlockDc(dc);
/* Yes, Windows really returns TRUE in this case */ /* Yes, Windows really returns TRUE in this case */

View file

@ -142,7 +142,7 @@ IntCreateCompatibleBitmap(
} }
else else
{ {
if (Dc->DC_Type != DC_TYPE_MEMORY) if (Dc->dctype != DC_TYPE_MEMORY)
{ {
Bmp = IntGdiCreateBitmap(abs(Width), Bmp = IntGdiCreateBitmap(abs(Width),
abs(Height), abs(Height),
@ -154,7 +154,7 @@ IntCreateCompatibleBitmap(
{ {
DIBSECTION dibs; DIBSECTION dibs;
INT Count; INT Count;
PSURFACE psurf = SURFACE_LockSurface(Dc->w.hBitmap); PSURFACE psurf = SURFACE_LockSurface(Dc->rosdc.hBitmap);
Count = BITMAP_GetObject(psurf, sizeof(dibs), &dibs); Count = BITMAP_GetObject(psurf, sizeof(dibs), &dibs);
if (Count) if (Count)
@ -281,7 +281,7 @@ NtGdiCreateCompatibleBitmap(
Dc = DC_LockDc(hDC); Dc = DC_LockDc(hDC);
DPRINT("NtGdiCreateCompatibleBitmap(%04x,%d,%d, bpp:%d) = \n", DPRINT("NtGdiCreateCompatibleBitmap(%04x,%d,%d, bpp:%d) = \n",
hDC, Width, Height, ((PGDIDEVICE)Dc->pPDev)->GDIInfo.cBitsPixel); hDC, Width, Height, ((PGDIDEVICE)Dc->ppdev)->GDIInfo.cBitsPixel);
if (NULL == Dc) if (NULL == Dc)
{ {
@ -350,7 +350,7 @@ NtGdiGetPixel(HDC hDC, INT XPos, INT YPos)
return Result; return Result;
} }
if (dc->DC_Type == DC_TYPE_INFO) if (dc->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(dc); DC_UnlockDc(dc);
return Result; return Result;
@ -358,10 +358,10 @@ NtGdiGetPixel(HDC hDC, INT XPos, INT YPos)
XPos += dc->ptlDCOrig.x; XPos += dc->ptlDCOrig.x;
YPos += dc->ptlDCOrig.y; YPos += dc->ptlDCOrig.y;
if (RECTL_bPointInRect(&dc->CombinedClip->rclBounds, XPos, YPos)) if (RECTL_bPointInRect(&dc->rosdc.CombinedClip->rclBounds, XPos, YPos))
{ {
bInRect = TRUE; bInRect = TRUE;
psurf = SURFACE_LockSurface(dc->w.hBitmap); psurf = SURFACE_LockSurface(dc->rosdc.hBitmap);
pso = &psurf->SurfObj; pso = &psurf->SurfObj;
if (psurf) if (psurf)
{ {
@ -923,7 +923,7 @@ NtGdiSelectBitmap(
if (!pDc_Attr) pDc_Attr = &pDC->Dc_Attr; if (!pDc_Attr) pDc_Attr = &pDC->Dc_Attr;
/* must be memory dc to select bitmap */ /* must be memory dc to select bitmap */
if (pDC->DC_Type != DC_TYPE_MEMORY) if (pDC->dctype != DC_TYPE_MEMORY)
{ {
DC_UnlockDc(pDC); DC_UnlockDc(pDC);
return NULL; return NULL;
@ -935,10 +935,10 @@ NtGdiSelectBitmap(
DC_UnlockDc(pDC); DC_UnlockDc(pDC);
return NULL; return NULL;
} }
hOrgBmp = pDC->w.hBitmap; hOrgBmp = pDC->rosdc.hBitmap;
/* Release the old bitmap, lock the new one and convert it to a SURF */ /* Release the old bitmap, lock the new one and convert it to a SURF */
pDC->w.hBitmap = hBmp; pDC->rosdc.hBitmap = hBmp;
// If Info DC this is zero and pSurface is moved to DC->pSurfInfo. // If Info DC this is zero and pSurface is moved to DC->pSurfInfo.
pDC->DcLevel.pSurface = psurfBmp; pDC->DcLevel.pSurface = psurfBmp;
@ -948,12 +948,12 @@ NtGdiSelectBitmap(
// [fixme: only create if the selected palette is null] // [fixme: only create if the selected palette is null]
if (psurfBmp->hSecure) if (psurfBmp->hSecure)
{ {
// pDC->w.bitsPerPixel = psurfBmp->dib->dsBmih.biBitCount; ??? // pDC->rosdcbitsPerPixel = psurfBmp->dib->dsBmih.biBitCount; ???
pDC->w.bitsPerPixel = BitsPerFormat(psurfBmp->SurfObj.iBitmapFormat); pDC->rosdc.bitsPerPixel = BitsPerFormat(psurfBmp->SurfObj.iBitmapFormat);
} }
else else
{ {
pDC->w.bitsPerPixel = BitsPerFormat(psurfBmp->SurfObj.iBitmapFormat); pDC->rosdc.bitsPerPixel = BitsPerFormat(psurfBmp->SurfObj.iBitmapFormat);
} }
hVisRgn = NtGdiCreateRectRgn(0, hVisRgn = NtGdiCreateRectRgn(0,
@ -966,22 +966,22 @@ NtGdiSelectBitmap(
pBrush = BRUSHOBJ_LockBrush(pDc_Attr->hbrush); pBrush = BRUSHOBJ_LockBrush(pDc_Attr->hbrush);
if (pBrush) if (pBrush)
{ {
if (pDC->XlateBrush) if (pDC->rosdc.XlateBrush)
{ {
EngDeleteXlate(pDC->XlateBrush); EngDeleteXlate(pDC->rosdc.XlateBrush);
} }
pDC->XlateBrush = IntGdiCreateBrushXlate(pDC, pBrush, &bFailed); pDC->rosdc.XlateBrush = IntGdiCreateBrushXlate(pDC, pBrush, &bFailed);
BRUSHOBJ_UnlockBrush(pBrush); BRUSHOBJ_UnlockBrush(pBrush);
} }
pBrush = PENOBJ_LockPen(pDc_Attr->hpen); pBrush = PENOBJ_LockPen(pDc_Attr->hpen);
if (pBrush) if (pBrush)
{ {
if (pDC->XlatePen) if (pDC->rosdc.XlatePen)
{ {
EngDeleteXlate(pDC->XlatePen); EngDeleteXlate(pDC->rosdc.XlatePen);
} }
pDC->XlatePen = IntGdiCreateBrushXlate(pDC, pBrush, &bFailed); pDC->rosdc.XlatePen = IntGdiCreateBrushXlate(pDC, pBrush, &bFailed);
PENOBJ_UnlockPen(pBrush); PENOBJ_UnlockPen(pBrush);
} }

View file

@ -122,7 +122,7 @@ IntGdiCreateBrushXlate(PDC Dc, GDIBRUSHOBJ *BrushObj, BOOLEAN *Failed)
SURFACE * psurf; SURFACE * psurf;
HPALETTE hPalette = NULL; HPALETTE hPalette = NULL;
psurf = SURFACE_LockSurface(Dc->w.hBitmap); psurf = SURFACE_LockSurface(Dc->rosdc.hBitmap);
if (psurf) if (psurf)
{ {
hPalette = psurf->hDIBPalette; hPalette = psurf->hDIBPalette;
@ -152,7 +152,7 @@ IntGdiCreateBrushXlate(PDC Dc, GDIBRUSHOBJ *BrushObj, BOOLEAN *Failed)
PDC_ATTR Dc_Attr = Dc->pDc_Attr; PDC_ATTR Dc_Attr = Dc->pDc_Attr;
if (!Dc_Attr) Dc_Attr = &Dc->Dc_Attr; if (!Dc_Attr) Dc_Attr = &Dc->Dc_Attr;
if (Dc->w.bitsPerPixel != 1) if (Dc->rosdc.bitsPerPixel != 1)
Result = IntEngCreateSrcMonoXlate(hPalette, Dc_Attr->crBackgroundClr, BrushObj->BrushAttr.lbColor); Result = IntEngCreateSrcMonoXlate(hPalette, Dc_Attr->crBackgroundClr, BrushObj->BrushAttr.lbColor);
} }
else if (BrushObj->flAttrs & GDIBRUSH_IS_DIB) else if (BrushObj->flAttrs & GDIBRUSH_IS_DIB)
@ -543,11 +543,11 @@ IntGdiSelectBrush(
hOrgBrush = pDc_Attr->hbrush; hOrgBrush = pDc_Attr->hbrush;
pDc_Attr->hbrush = hBrush; pDc_Attr->hbrush = hBrush;
if (pDC->XlateBrush != NULL) if (pDC->rosdc.XlateBrush != NULL)
{ {
EngDeleteXlate(pDC->XlateBrush); EngDeleteXlate(pDC->rosdc.XlateBrush);
} }
pDC->XlateBrush = XlateObj; pDC->rosdc.XlateBrush = XlateObj;
pDc_Attr->ulDirty_ &= ~DC_BRUSH_DIRTY; pDc_Attr->ulDirty_ &= ~DC_BRUSH_DIRTY;

View file

@ -27,21 +27,21 @@ CLIPPING_UpdateGCRegion(DC* Dc)
{ {
PROSRGNDATA CombinedRegion; PROSRGNDATA CombinedRegion;
if (Dc->w.hGCClipRgn == NULL) if (Dc->rosdc.hGCClipRgn == NULL)
Dc->w.hGCClipRgn = NtGdiCreateRectRgn(0, 0, 0, 0); Dc->rosdc.hGCClipRgn = NtGdiCreateRectRgn(0, 0, 0, 0);
if (Dc->w.hClipRgn == NULL) if (Dc->rosdc.hClipRgn == NULL)
NtGdiCombineRgn(Dc->w.hGCClipRgn, Dc->w.hVisRgn, 0, RGN_COPY); NtGdiCombineRgn(Dc->rosdc.hGCClipRgn, Dc->rosdc.hVisRgn, 0, RGN_COPY);
else else
NtGdiCombineRgn(Dc->w.hGCClipRgn, Dc->w.hClipRgn, Dc->w.hVisRgn, RGN_AND); NtGdiCombineRgn(Dc->rosdc.hGCClipRgn, Dc->rosdc.hClipRgn, Dc->rosdc.hVisRgn, RGN_AND);
NtGdiOffsetRgn(Dc->w.hGCClipRgn, Dc->ptlDCOrig.x, Dc->ptlDCOrig.y); NtGdiOffsetRgn(Dc->rosdc.hGCClipRgn, Dc->ptlDCOrig.x, Dc->ptlDCOrig.y);
if((CombinedRegion = REGION_LockRgn(Dc->w.hGCClipRgn))) if((CombinedRegion = REGION_LockRgn(Dc->rosdc.hGCClipRgn)))
{ {
if (Dc->CombinedClip != NULL) if (Dc->rosdc.CombinedClip != NULL)
IntEngDeleteClipRegion(Dc->CombinedClip); IntEngDeleteClipRegion(Dc->rosdc.CombinedClip);
Dc->CombinedClip = IntEngCreateClipRegion( Dc->rosdc.CombinedClip = IntEngCreateClipRegion(
CombinedRegion->rdh.nCount, CombinedRegion->rdh.nCount,
CombinedRegion->Buffer, CombinedRegion->Buffer,
&CombinedRegion->rdh.rcBound); &CombinedRegion->rdh.rcBound);
@ -49,13 +49,13 @@ CLIPPING_UpdateGCRegion(DC* Dc)
REGION_UnlockRgn(CombinedRegion); REGION_UnlockRgn(CombinedRegion);
} }
if ( NULL == Dc->CombinedClip ) if ( NULL == Dc->rosdc.CombinedClip )
{ {
DPRINT1("IntEngCreateClipRegion() failed\n"); DPRINT1("IntEngCreateClipRegion() failed\n");
return ERROR; return ERROR;
} }
return NtGdiOffsetRgn(Dc->w.hGCClipRgn, -Dc->ptlDCOrig.x, -Dc->ptlDCOrig.y); return NtGdiOffsetRgn(Dc->rosdc.hGCClipRgn, -Dc->ptlDCOrig.x, -Dc->ptlDCOrig.y);
} }
INT FASTCALL INT FASTCALL
@ -75,18 +75,18 @@ GdiSelectVisRgn(HDC hdc, HRGN hrgn)
return ERROR; return ERROR;
} }
dc->DC_Flags &= ~DC_FLAG_DIRTY_RAO; dc->fs &= ~DC_FLAG_DIRTY_RAO;
if (dc->w.hVisRgn == NULL) if (dc->rosdc.hVisRgn == NULL)
{ {
dc->w.hVisRgn = NtGdiCreateRectRgn(0, 0, 0, 0); dc->rosdc.hVisRgn = NtGdiCreateRectRgn(0, 0, 0, 0);
GDIOBJ_CopyOwnership(hdc, dc->w.hVisRgn); GDIOBJ_CopyOwnership(hdc, dc->rosdc.hVisRgn);
} }
retval = NtGdiCombineRgn(dc->w.hVisRgn, hrgn, 0, RGN_COPY); retval = NtGdiCombineRgn(dc->rosdc.hVisRgn, hrgn, 0, RGN_COPY);
if ( retval != ERROR ) if ( retval != ERROR )
{ {
NtGdiOffsetRgn(dc->w.hVisRgn, -dc->ptlDCOrig.x, -dc->ptlDCOrig.y); NtGdiOffsetRgn(dc->rosdc.hVisRgn, -dc->ptlDCOrig.x, -dc->ptlDCOrig.y);
CLIPPING_UpdateGCRegion(dc); CLIPPING_UpdateGCRegion(dc);
} }
DC_UnlockDc(dc); DC_UnlockDc(dc);
@ -100,16 +100,16 @@ int FASTCALL GdiExtSelectClipRgn(PDC dc,
int fnMode) int fnMode)
{ {
int retval; int retval;
// dc->DC_Flags &= ~DC_FLAG_DIRTY_RAO; // dc->fs &= ~DC_FLAG_DIRTY_RAO;
if (!hrgn) if (!hrgn)
{ {
if (fnMode == RGN_COPY) if (fnMode == RGN_COPY)
{ {
if (dc->w.hClipRgn != NULL) if (dc->rosdc.hClipRgn != NULL)
{ {
NtGdiDeleteObject(dc->w.hClipRgn); NtGdiDeleteObject(dc->rosdc.hClipRgn);
dc->w.hClipRgn = NULL; dc->rosdc.hClipRgn = NULL;
retval = NULLREGION; retval = NULLREGION;
} }
} }
@ -121,27 +121,27 @@ int FASTCALL GdiExtSelectClipRgn(PDC dc,
} }
else else
{ {
if (!dc->w.hClipRgn) if (!dc->rosdc.hClipRgn)
{ {
PROSRGNDATA Rgn; PROSRGNDATA Rgn;
RECTL rect; RECTL rect;
if((Rgn = REGION_LockRgn(dc->w.hVisRgn))) if((Rgn = REGION_LockRgn(dc->rosdc.hVisRgn)))
{ {
REGION_GetRgnBox(Rgn, &rect); REGION_GetRgnBox(Rgn, &rect);
REGION_UnlockRgn(Rgn); REGION_UnlockRgn(Rgn);
dc->w.hClipRgn = UnsafeIntCreateRectRgnIndirect(&rect); dc->rosdc.hClipRgn = UnsafeIntCreateRectRgnIndirect(&rect);
} }
else else
{ {
dc->w.hClipRgn = NtGdiCreateRectRgn(0, 0, 0, 0); dc->rosdc.hClipRgn = NtGdiCreateRectRgn(0, 0, 0, 0);
} }
} }
if(fnMode == RGN_COPY) if(fnMode == RGN_COPY)
{ {
NtGdiCombineRgn(dc->w.hClipRgn, hrgn, 0, fnMode); NtGdiCombineRgn(dc->rosdc.hClipRgn, hrgn, 0, fnMode);
} }
else else
NtGdiCombineRgn(dc->w.hClipRgn, dc->w.hClipRgn, hrgn, fnMode); NtGdiCombineRgn(dc->rosdc.hClipRgn, dc->rosdc.hClipRgn, hrgn, fnMode);
} }
retval = CLIPPING_UpdateGCRegion(dc); retval = CLIPPING_UpdateGCRegion(dc);
@ -180,7 +180,7 @@ GdiGetClipBox(HDC hDC, PRECTL rc)
return ERROR; return ERROR;
} }
if (!(Rgn = REGION_LockRgn(dc->w.hGCClipRgn))) if (!(Rgn = REGION_LockRgn(dc->rosdc.hGCClipRgn)))
{ {
DC_UnlockDc(dc); DC_UnlockDc(dc);
return ERROR; return ERROR;
@ -255,15 +255,15 @@ int APIENTRY NtGdiExcludeClipRect(HDC hDC,
} }
else else
{ {
if (!dc->w.hClipRgn) if (!dc->rosdc.hClipRgn)
{ {
dc->w.hClipRgn = NtGdiCreateRectRgn(0, 0, 0, 0); dc->rosdc.hClipRgn = NtGdiCreateRectRgn(0, 0, 0, 0);
NtGdiCombineRgn(dc->w.hClipRgn, dc->w.hVisRgn, NewRgn, RGN_DIFF); NtGdiCombineRgn(dc->rosdc.hClipRgn, dc->rosdc.hVisRgn, NewRgn, RGN_DIFF);
Result = SIMPLEREGION; Result = SIMPLEREGION;
} }
else else
{ {
Result = NtGdiCombineRgn(dc->w.hClipRgn, dc->w.hClipRgn, NewRgn, RGN_DIFF); Result = NtGdiCombineRgn(dc->rosdc.hClipRgn, dc->rosdc.hClipRgn, NewRgn, RGN_DIFF);
} }
NtGdiDeleteObject(NewRgn); NtGdiDeleteObject(NewRgn);
} }
@ -307,14 +307,14 @@ int APIENTRY NtGdiIntersectClipRect(HDC hDC,
{ {
Result = ERROR; Result = ERROR;
} }
else if (!dc->w.hClipRgn) else if (!dc->rosdc.hClipRgn)
{ {
dc->w.hClipRgn = NewRgn; dc->rosdc.hClipRgn = NewRgn;
Result = SIMPLEREGION; Result = SIMPLEREGION;
} }
else else
{ {
Result = NtGdiCombineRgn(dc->w.hClipRgn, dc->w.hClipRgn, NewRgn, RGN_AND); Result = NtGdiCombineRgn(dc->rosdc.hClipRgn, dc->rosdc.hClipRgn, NewRgn, RGN_AND);
NtGdiDeleteObject(NewRgn); NtGdiDeleteObject(NewRgn);
} }
if (Result != ERROR) if (Result != ERROR)
@ -338,9 +338,9 @@ int APIENTRY NtGdiOffsetClipRgn(HDC hDC,
return ERROR; return ERROR;
} }
if(dc->w.hClipRgn != NULL) if(dc->rosdc.hClipRgn != NULL)
{ {
Result = NtGdiOffsetRgn(dc->w.hClipRgn, Result = NtGdiOffsetRgn(dc->rosdc.hClipRgn,
XOffset, XOffset,
YOffset); YOffset);
CLIPPING_UpdateGCRegion(dc); CLIPPING_UpdateGCRegion(dc);
@ -367,7 +367,7 @@ BOOL APIENTRY NtGdiPtVisible(HDC hDC,
return FALSE; return FALSE;
} }
rgn = dc->w.hGCClipRgn; rgn = dc->rosdc.hGCClipRgn;
DC_UnlockDc(dc); DC_UnlockDc(dc);
return (rgn ? NtGdiPtInRegion(rgn, X, Y) : FALSE); return (rgn ? NtGdiPtInRegion(rgn, X, Y) : FALSE);
@ -408,9 +408,9 @@ BOOL APIENTRY NtGdiRectVisible(HDC hDC,
return FALSE; return FALSE;
} }
if (dc->w.hGCClipRgn) if (dc->rosdc.hGCClipRgn)
{ {
if((Rgn = (PROSRGNDATA)REGION_LockRgn(dc->w.hGCClipRgn))) if((Rgn = (PROSRGNDATA)REGION_LockRgn(dc->rosdc.hGCClipRgn)))
{ {
IntLPtoDP(dc, (LPPOINT)&Rect, 2); IntLPtoDP(dc, (LPPOINT)&Rect, 2);
Result = REGION_RectInRegion(Rgn, &Rect); Result = REGION_RectInRegion(Rgn, &Rect);
@ -540,7 +540,7 @@ NEW_CLIPPING_UpdateGCRegion(PDC pDC)
RGN_AND); RGN_AND);
RtlCopyMemory(&pDC->erclClip, &((PROSRGNDATA)pDC->prgnRao)->rdh.rcBound , sizeof(RECTL)); RtlCopyMemory(&pDC->erclClip, &((PROSRGNDATA)pDC->prgnRao)->rdh.rcBound , sizeof(RECTL));
pDC->DC_Flags &= ~DC_FLAG_DIRTY_RAO; pDC->fs &= ~DC_FLAG_DIRTY_RAO;
// if (Dc->CombinedClip != NULL) IntEngDeleteClipRegion(Dc->CombinedClip); // if (Dc->CombinedClip != NULL) IntEngDeleteClipRegion(Dc->CombinedClip);

View file

@ -449,7 +449,7 @@ IntGetSystemPaletteEntries(HDC hDC,
} }
else else
{ {
Ret = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulNumPalReg; Ret = ((PGDIDEVICE)dc->ppdev)->GDIInfo.ulNumPalReg;
} }
} }
@ -521,7 +521,7 @@ UINT FASTCALL IntGdiRealizePalette(HDC hDC)
// The RealizePalette function modifies the palette for the device associated with the specified device context. If the // The RealizePalette function modifies the palette for the device associated with the specified device context. If the
// device context is a memory DC, the color table for the bitmap selected into the DC is modified. If the device // device context is a memory DC, the color table for the bitmap selected into the DC is modified. If the device
// context is a display DC, the physical palette for that device is modified. // context is a display DC, the physical palette for that device is modified.
if(dc->DC_Type == DC_TYPE_MEMORY) if(dc->dctype == DC_TYPE_MEMORY)
{ {
// Memory managed DC // Memory managed DC
DPRINT1("RealizePalette unimplemented for memory managed DCs\n"); DPRINT1("RealizePalette unimplemented for memory managed DCs\n");
@ -537,7 +537,7 @@ UINT FASTCALL IntGdiRealizePalette(HDC hDC)
PALETTE_UnlockPalette(palGDI); PALETTE_UnlockPalette(palGDI);
// Create the XLATEOBJ for device managed DCs // Create the XLATEOBJ for device managed DCs
if(dc->DC_Type != DC_TYPE_MEMORY) if(dc->dctype != DC_TYPE_MEMORY)
{ {
if (palGDI->logicalToSystem != NULL) if (palGDI->logicalToSystem != NULL)
{ {

View file

@ -675,36 +675,36 @@ IntGdiSetMapMode(PDC dc,
case MM_LOMETRIC: case MM_LOMETRIC:
Dc_Attr->szlWindowExt.cx = 3600; Dc_Attr->szlWindowExt.cx = 3600;
Dc_Attr->szlWindowExt.cy = 2700; Dc_Attr->szlWindowExt.cy = 2700;
Dc_Attr->szlViewportExt.cx = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzRes; Dc_Attr->szlViewportExt.cx = ((PGDIDEVICE)dc->ppdev)->GDIInfo.ulHorzRes;
Dc_Attr->szlViewportExt.cy = -((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertRes; Dc_Attr->szlViewportExt.cy = -((PGDIDEVICE)dc->ppdev)->GDIInfo.ulVertRes;
break; break;
case MM_HIMETRIC: case MM_HIMETRIC:
Dc_Attr->szlWindowExt.cx = 36000; Dc_Attr->szlWindowExt.cx = 36000;
Dc_Attr->szlWindowExt.cy = 27000; Dc_Attr->szlWindowExt.cy = 27000;
Dc_Attr->szlViewportExt.cx = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzRes; Dc_Attr->szlViewportExt.cx = ((PGDIDEVICE)dc->ppdev)->GDIInfo.ulHorzRes;
Dc_Attr->szlViewportExt.cy = -((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertRes; Dc_Attr->szlViewportExt.cy = -((PGDIDEVICE)dc->ppdev)->GDIInfo.ulVertRes;
break; break;
case MM_LOENGLISH: case MM_LOENGLISH:
Dc_Attr->szlWindowExt.cx = 1417; Dc_Attr->szlWindowExt.cx = 1417;
Dc_Attr->szlWindowExt.cy = 1063; Dc_Attr->szlWindowExt.cy = 1063;
Dc_Attr->szlViewportExt.cx = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzRes; Dc_Attr->szlViewportExt.cx = ((PGDIDEVICE)dc->ppdev)->GDIInfo.ulHorzRes;
Dc_Attr->szlViewportExt.cy = -((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertRes; Dc_Attr->szlViewportExt.cy = -((PGDIDEVICE)dc->ppdev)->GDIInfo.ulVertRes;
break; break;
case MM_HIENGLISH: case MM_HIENGLISH:
Dc_Attr->szlWindowExt.cx = 14173; Dc_Attr->szlWindowExt.cx = 14173;
Dc_Attr->szlWindowExt.cy = 10630; Dc_Attr->szlWindowExt.cy = 10630;
Dc_Attr->szlViewportExt.cx = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzRes; Dc_Attr->szlViewportExt.cx = ((PGDIDEVICE)dc->ppdev)->GDIInfo.ulHorzRes;
Dc_Attr->szlViewportExt.cy = -((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertRes; Dc_Attr->szlViewportExt.cy = -((PGDIDEVICE)dc->ppdev)->GDIInfo.ulVertRes;
break; break;
case MM_TWIPS: case MM_TWIPS:
Dc_Attr->szlWindowExt.cx = 20409; Dc_Attr->szlWindowExt.cx = 20409;
Dc_Attr->szlWindowExt.cy = 15307; Dc_Attr->szlWindowExt.cy = 15307;
Dc_Attr->szlViewportExt.cx = ((PGDIDEVICE)dc->pPDev)->GDIInfo.ulHorzRes; Dc_Attr->szlViewportExt.cx = ((PGDIDEVICE)dc->ppdev)->GDIInfo.ulHorzRes;
Dc_Attr->szlViewportExt.cy = -((PGDIDEVICE)dc->pPDev)->GDIInfo.ulVertRes; Dc_Attr->szlViewportExt.cy = -((PGDIDEVICE)dc->ppdev)->GDIInfo.ulVertRes;
break; break;
case MM_ANISOTROPIC: case MM_ANISOTROPIC:

View file

@ -88,7 +88,7 @@ NtGdiCreateCompatibleDC(HDC hDC)
DPRINT1("Failed to lock hDC\n"); DPRINT1("Failed to lock hDC\n");
return NULL; return NULL;
} }
hNewDC = DC_AllocDC(&OrigDC->DriverName); hNewDC = DC_AllocDC(&OrigDC->rosdc.DriverName);
if (NULL == hNewDC) if (NULL == hNewDC)
{ {
DPRINT1("Failed to create hNewDC\n"); DPRINT1("Failed to create hNewDC\n");
@ -116,9 +116,9 @@ NtGdiCreateCompatibleDC(HDC hDC)
/* Copy information from original DC to new DC */ /* Copy information from original DC to new DC */
NewDC->DcLevel.hdcSave = hNewDC; NewDC->DcLevel.hdcSave = hNewDC;
NewDC->PDev = OrigDC->PDev; NewDC->dhpdev = OrigDC->dhpdev;
NewDC->w.bitsPerPixel = OrigDC->w.bitsPerPixel; NewDC->rosdc.bitsPerPixel = OrigDC->rosdc.bitsPerPixel;
/* DriverName is copied in the AllocDC routine */ /* DriverName is copied in the AllocDC routine */
nDc_Attr->ptlWindowOrg = oDc_Attr->ptlWindowOrg; nDc_Attr->ptlWindowOrg = oDc_Attr->ptlWindowOrg;
@ -126,9 +126,9 @@ NtGdiCreateCompatibleDC(HDC hDC)
nDc_Attr->ptlViewportOrg = oDc_Attr->ptlViewportOrg; nDc_Attr->ptlViewportOrg = oDc_Attr->ptlViewportOrg;
nDc_Attr->szlViewportExt = oDc_Attr->szlViewportExt; nDc_Attr->szlViewportExt = oDc_Attr->szlViewportExt;
NewDC->DC_Type = DC_TYPE_MEMORY; // Always! NewDC->dctype = DC_TYPE_MEMORY; // Always!
NewDC->w.hBitmap = NtGdiGetStockObject(DEFAULT_BITMAP); NewDC->rosdc.hBitmap = NtGdiGetStockObject(DEFAULT_BITMAP);
NewDC->pPDev = OrigDC->pPDev; NewDC->ppdev = OrigDC->ppdev;
NewDC->DcLevel.hpal = OrigDC->DcLevel.hpal; NewDC->DcLevel.hpal = OrigDC->DcLevel.hpal;
nDc_Attr->lTextAlign = oDc_Attr->lTextAlign; nDc_Attr->lTextAlign = oDc_Attr->lTextAlign;
@ -819,35 +819,35 @@ IntGdiCreateDC(PUNICODE_STRING Driver,
nDc_Attr = NewDC->pDc_Attr; nDc_Attr = NewDC->pDc_Attr;
if(!nDc_Attr) nDc_Attr = &NewDC->Dc_Attr; if(!nDc_Attr) nDc_Attr = &NewDC->Dc_Attr;
NewDC->DC_Type = DC_TYPE_DIRECT; NewDC->dctype = DC_TYPE_DIRECT;
NewDC->PDev = PrimarySurface.hPDev; NewDC->dhpdev = PrimarySurface.hPDev;
if(pUMdhpdev) pUMdhpdev = NewDC->PDev; // set DHPDEV for device. if(pUMdhpdev) pUMdhpdev = NewDC->dhpdev; // set DHPDEV for device.
NewDC->pPDev = (PVOID)&PrimarySurface; NewDC->ppdev = (PVOID)&PrimarySurface;
NewDC->w.hBitmap = (HBITMAP)PrimarySurface.pSurface; NewDC->rosdc.hBitmap = (HBITMAP)PrimarySurface.pSurface;
// ATM we only have one display. // ATM we only have one display.
nDc_Attr->ulDirty_ |= DC_PRIMARY_DISPLAY; nDc_Attr->ulDirty_ |= DC_PRIMARY_DISPLAY;
NewDC->w.bitsPerPixel = ((PGDIDEVICE)NewDC->pPDev)->GDIInfo.cBitsPixel * NewDC->rosdc.bitsPerPixel = ((PGDIDEVICE)NewDC->ppdev)->GDIInfo.cBitsPixel *
((PGDIDEVICE)NewDC->pPDev)->GDIInfo.cPlanes; ((PGDIDEVICE)NewDC->ppdev)->GDIInfo.cPlanes;
DPRINT("Bits per pel: %u\n", NewDC->w.bitsPerPixel); DPRINT("Bits per pel: %u\n", NewDC->rosdc.bitsPerPixel);
NewDC->flGraphics = PrimarySurface.DevInfo.flGraphicsCaps; NewDC->flGraphicsCaps = PrimarySurface.DevInfo.flGraphicsCaps;
NewDC->flGraphics2 = PrimarySurface.DevInfo.flGraphicsCaps2; NewDC->flGraphicsCaps2 = PrimarySurface.DevInfo.flGraphicsCaps2;
NewDC->DcLevel.hpal = NtGdiGetStockObject(DEFAULT_PALETTE); NewDC->DcLevel.hpal = NtGdiGetStockObject(DEFAULT_PALETTE);
nDc_Attr->jROP2 = R2_COPYPEN; nDc_Attr->jROP2 = R2_COPYPEN;
NewDC->erclWindow.top = NewDC->erclWindow.left = 0; NewDC->erclWindow.top = NewDC->erclWindow.left = 0;
NewDC->erclWindow.right = ((PGDIDEVICE)NewDC->pPDev)->GDIInfo.ulHorzRes; NewDC->erclWindow.right = ((PGDIDEVICE)NewDC->ppdev)->GDIInfo.ulHorzRes;
NewDC->erclWindow.bottom = ((PGDIDEVICE)NewDC->pPDev)->GDIInfo.ulVertRes; NewDC->erclWindow.bottom = ((PGDIDEVICE)NewDC->ppdev)->GDIInfo.ulVertRes;
NewDC->DcLevel.flPath &= ~DCPATH_CLOCKWISE; // Default is CCW. NewDC->DcLevel.flPath &= ~DCPATH_CLOCKWISE; // Default is CCW.
nDc_Attr->iCS_CP = ftGdiGetTextCharsetInfo(NewDC,NULL,0); nDc_Attr->iCS_CP = ftGdiGetTextCharsetInfo(NewDC,NULL,0);
hVisRgn = NtGdiCreateRectRgn(0, 0, ((PGDIDEVICE)NewDC->pPDev)->GDIInfo.ulHorzRes, hVisRgn = NtGdiCreateRectRgn(0, 0, ((PGDIDEVICE)NewDC->ppdev)->GDIInfo.ulHorzRes,
((PGDIDEVICE)NewDC->pPDev)->GDIInfo.ulVertRes); ((PGDIDEVICE)NewDC->ppdev)->GDIInfo.ulVertRes);
if (!CreateAsIC) if (!CreateAsIC)
{ {
@ -868,7 +868,7 @@ IntGdiCreateDC(PUNICODE_STRING Driver,
device without creating a device context (DC). However, GDI drawing functions device without creating a device context (DC). However, GDI drawing functions
cannot accept a handle to an information context. cannot accept a handle to an information context.
*/ */
NewDC->DC_Type = DC_TYPE_INFO; NewDC->dctype = DC_TYPE_INFO;
// NewDC->pSurfInfo = // NewDC->pSurfInfo =
NewDC->DcLevel.pSurface = NULL; NewDC->DcLevel.pSurface = NULL;
nDc_Attr->crBackgroundClr = nDc_Attr->ulBackgroundClr = RGB(255, 255, 255); nDc_Attr->crBackgroundClr = nDc_Attr->ulBackgroundClr = RGB(255, 255, 255);
@ -1019,7 +1019,7 @@ IntGdiDeleteDC(HDC hDC, BOOL Force)
if(!Force) if(!Force)
{ {
if (DCToDelete->DC_Flags & DC_FLAG_PERMANENT) if (DCToDelete->fs & DC_FLAG_PERMANENT)
{ {
DPRINT1("No! You Naughty Application!\n"); DPRINT1("No! You Naughty Application!\n");
DC_UnlockDc( DCToDelete ); DC_UnlockDc( DCToDelete );
@ -1053,26 +1053,26 @@ IntGdiDeleteDC(HDC hDC, BOOL Force)
NtGdiSelectBrush (DCHandle, STOCK_WHITE_BRUSH); NtGdiSelectBrush (DCHandle, STOCK_WHITE_BRUSH);
NtGdiSelectFont (DCHandle, STOCK_SYSTEM_FONT); NtGdiSelectFont (DCHandle, STOCK_SYSTEM_FONT);
DC_LockDC (DCHandle); NtGdiSelectXxx does not recognize stock objects yet */ DC_LockDC (DCHandle); NtGdiSelectXxx does not recognize stock objects yet */
if (DCToDelete->XlateBrush != NULL) if (DCToDelete->rosdc.XlateBrush != NULL)
EngDeleteXlate(DCToDelete->XlateBrush); EngDeleteXlate(DCToDelete->rosdc.XlateBrush);
if (DCToDelete->XlatePen != NULL) if (DCToDelete->rosdc.XlatePen != NULL)
EngDeleteXlate(DCToDelete->XlatePen); EngDeleteXlate(DCToDelete->rosdc.XlatePen);
} }
if (DCToDelete->w.hClipRgn) if (DCToDelete->rosdc.hClipRgn)
{ {
NtGdiDeleteObject (DCToDelete->w.hClipRgn); NtGdiDeleteObject (DCToDelete->rosdc.hClipRgn);
} }
if (DCToDelete->w.hVisRgn) if (DCToDelete->rosdc.hVisRgn)
{ {
NtGdiDeleteObject (DCToDelete->w.hVisRgn); NtGdiDeleteObject (DCToDelete->rosdc.hVisRgn);
} }
if (NULL != DCToDelete->CombinedClip) if (NULL != DCToDelete->rosdc.CombinedClip)
{ {
IntEngDeleteClipRegion(DCToDelete->CombinedClip); IntEngDeleteClipRegion(DCToDelete->rosdc.CombinedClip);
} }
if (DCToDelete->w.hGCClipRgn) if (DCToDelete->rosdc.hGCClipRgn)
{ {
NtGdiDeleteObject (DCToDelete->w.hGCClipRgn); NtGdiDeleteObject (DCToDelete->rosdc.hGCClipRgn);
} }
PATH_Delete(DCToDelete->DcLevel.hPath); PATH_Delete(DCToDelete->DcLevel.hPath);
@ -1169,7 +1169,7 @@ NtGdiGetDCObject(HDC hDC, INT ObjectType)
SelObject = Dc_Attr->hlfntNew; SelObject = Dc_Attr->hlfntNew;
break; break;
case GDI_OBJECT_TYPE_BITMAP: case GDI_OBJECT_TYPE_BITMAP:
SelObject = dc->w.hBitmap; SelObject = dc->rosdc.hBitmap;
break; break;
case GDI_OBJECT_TYPE_COLORSPACE: case GDI_OBJECT_TYPE_COLORSPACE:
DPRINT1("FIXME: NtGdiGetCurrentObject() ObjectType OBJ_COLORSPACE not supported yet!\n"); DPRINT1("FIXME: NtGdiGetCurrentObject() ObjectType OBJ_COLORSPACE not supported yet!\n");
@ -1250,8 +1250,8 @@ IntGetAspectRatioFilter(PDC pDC,
{ {
// "This specifies that Windows should only match fonts that have the // "This specifies that Windows should only match fonts that have the
// same aspect ratio as the display.", Programming Windows, Fifth Ed. // same aspect ratio as the display.", Programming Windows, Fifth Ed.
AspectRatio->cx = ((PGDIDEVICE)pDC->pPDev)->GDIInfo.ulLogPixelsX; AspectRatio->cx = ((PGDIDEVICE)pDC->ppdev)->GDIInfo.ulLogPixelsX;
AspectRatio->cy = ((PGDIDEVICE)pDC->pPDev)->GDIInfo.ulLogPixelsY; AspectRatio->cy = ((PGDIDEVICE)pDC->ppdev)->GDIInfo.ulLogPixelsY;
} }
else else
{ {
@ -1388,9 +1388,9 @@ IntGdiCopyToSaveState(PDC dc, PDC newdc)
nDc_Attr->hpen = Dc_Attr->hpen; nDc_Attr->hpen = Dc_Attr->hpen;
nDc_Attr->hbrush = Dc_Attr->hbrush; nDc_Attr->hbrush = Dc_Attr->hbrush;
nDc_Attr->hlfntNew = Dc_Attr->hlfntNew; nDc_Attr->hlfntNew = Dc_Attr->hlfntNew;
newdc->w.hBitmap = dc->w.hBitmap; newdc->rosdc.hBitmap = dc->rosdc.hBitmap;
newdc->DcLevel.hpal = dc->DcLevel.hpal; newdc->DcLevel.hpal = dc->DcLevel.hpal;
newdc->w.bitsPerPixel = dc->w.bitsPerPixel; newdc->rosdc.bitsPerPixel = dc->rosdc.bitsPerPixel;
nDc_Attr->jROP2 = Dc_Attr->jROP2; nDc_Attr->jROP2 = Dc_Attr->jROP2;
nDc_Attr->jFillMode = Dc_Attr->jFillMode; nDc_Attr->jFillMode = Dc_Attr->jFillMode;
nDc_Attr->jStretchBltMode = Dc_Attr->jStretchBltMode; nDc_Attr->jStretchBltMode = Dc_Attr->jStretchBltMode;
@ -1425,7 +1425,7 @@ IntGdiCopyToSaveState(PDC dc, PDC newdc)
nDc_Attr->szlViewportExt = Dc_Attr->szlViewportExt; nDc_Attr->szlViewportExt = Dc_Attr->szlViewportExt;
newdc->DcLevel.lSaveDepth = 0; newdc->DcLevel.lSaveDepth = 0;
newdc->DC_Type = dc->DC_Type; newdc->dctype = dc->dctype;
#if 0 #if 0
PATH_InitGdiPath( &newdc->DcLevel.hPath ); PATH_InitGdiPath( &newdc->DcLevel.hPath );
@ -1433,11 +1433,11 @@ IntGdiCopyToSaveState(PDC dc, PDC newdc)
/* Get/SetDCState() don't change hVisRgn field ("Undoc. Windows" p.559). */ /* Get/SetDCState() don't change hVisRgn field ("Undoc. Windows" p.559). */
newdc->w.hGCClipRgn = newdc->w.hVisRgn = 0; newdc->rosdc.hGCClipRgn = newdc->rosdc.hVisRgn = 0;
if (dc->w.hClipRgn) if (dc->rosdc.hClipRgn)
{ {
newdc->w.hClipRgn = NtGdiCreateRectRgn( 0, 0, 0, 0 ); newdc->rosdc.hClipRgn = NtGdiCreateRectRgn( 0, 0, 0, 0 );
NtGdiCombineRgn( newdc->w.hClipRgn, dc->w.hClipRgn, 0, RGN_COPY ); NtGdiCombineRgn( newdc->rosdc.hClipRgn, dc->rosdc.hClipRgn, 0, RGN_COPY );
} }
} }
@ -1490,27 +1490,27 @@ IntGdiCopyFromSaveState(PDC dc, PDC dcs, HDC hDC)
Dc_Attr->ptlViewportOrg = sDc_Attr->ptlViewportOrg; Dc_Attr->ptlViewportOrg = sDc_Attr->ptlViewportOrg;
Dc_Attr->szlViewportExt = sDc_Attr->szlViewportExt; Dc_Attr->szlViewportExt = sDc_Attr->szlViewportExt;
if (dc->DC_Type != DC_TYPE_MEMORY) if (dc->dctype != DC_TYPE_MEMORY)
{ {
dc->w.bitsPerPixel = dcs->w.bitsPerPixel; dc->rosdc.bitsPerPixel = dcs->rosdc.bitsPerPixel;
} }
#if 0 #if 0
if (dcs->w.hClipRgn) if (dcs->rosdc.hClipRgn)
{ {
if (!dc->w.hClipRgn) if (!dc->rosdc.hClipRgn)
{ {
dc->w.hClipRgn = NtGdiCreateRectRgn( 0, 0, 0, 0 ); dc->rosdc.hClipRgn = NtGdiCreateRectRgn( 0, 0, 0, 0 );
} }
NtGdiCombineRgn( dc->w.hClipRgn, dcs->w.hClipRgn, 0, RGN_COPY ); NtGdiCombineRgn( dc->rosdc.hClipRgn, dcs->rosdc.hClipRgn, 0, RGN_COPY );
} }
else else
{ {
if (dc->w.hClipRgn) if (dc->rosdc.hClipRgn)
{ {
NtGdiDeleteObject( dc->w.hClipRgn ); NtGdiDeleteObject( dc->rosdc.hClipRgn );
} }
dc->w.hClipRgn = 0; dc->rosdc.hClipRgn = 0;
} }
{ {
int res; int res;
@ -1519,12 +1519,12 @@ IntGdiCopyFromSaveState(PDC dc, PDC dcs, HDC hDC)
} }
DC_UnlockDc ( dc ); DC_UnlockDc ( dc );
#else #else
GdiExtSelectClipRgn(dc, dcs->w.hClipRgn, RGN_COPY); GdiExtSelectClipRgn(dc, dcs->rosdc.hClipRgn, RGN_COPY);
DC_UnlockDc ( dc ); DC_UnlockDc ( dc );
#endif #endif
if(!hDC) return; // Not a MemoryDC or SaveLevel DC, return. if(!hDC) return; // Not a MemoryDC or SaveLevel DC, return.
NtGdiSelectBitmap( hDC, dcs->w.hBitmap ); NtGdiSelectBitmap( hDC, dcs->rosdc.hBitmap );
NtGdiSelectBrush( hDC, sDc_Attr->hbrush ); NtGdiSelectBrush( hDC, sDc_Attr->hbrush );
NtGdiSelectFont( hDC, sDc_Attr->hlfntNew ); NtGdiSelectFont( hDC, sDc_Attr->hlfntNew );
NtGdiSelectPen( hDC, sDc_Attr->hpen ); NtGdiSelectPen( hDC, sDc_Attr->hpen );
@ -1645,55 +1645,55 @@ INT FASTCALL
IntGdiGetDeviceCaps(PDC dc, INT Index) IntGdiGetDeviceCaps(PDC dc, INT Index)
{ {
INT ret = 0; INT ret = 0;
PGDIDEVICE pPDev = dc->pPDev; PGDIDEVICE ppdev = dc->ppdev;
/* Retrieve capability */ /* Retrieve capability */
switch (Index) switch (Index)
{ {
case DRIVERVERSION: case DRIVERVERSION:
ret = pPDev->GDIInfo.ulVersion; ret = ppdev->GDIInfo.ulVersion;
break; break;
case TECHNOLOGY: case TECHNOLOGY:
ret = pPDev->GDIInfo.ulTechnology; ret = ppdev->GDIInfo.ulTechnology;
break; break;
case HORZSIZE: case HORZSIZE:
ret = pPDev->GDIInfo.ulHorzSize; ret = ppdev->GDIInfo.ulHorzSize;
break; break;
case VERTSIZE: case VERTSIZE:
ret = pPDev->GDIInfo.ulVertSize; ret = ppdev->GDIInfo.ulVertSize;
break; break;
case HORZRES: case HORZRES:
ret = pPDev->GDIInfo.ulHorzRes; ret = ppdev->GDIInfo.ulHorzRes;
break; break;
case VERTRES: case VERTRES:
ret = pPDev->GDIInfo.ulVertRes; ret = ppdev->GDIInfo.ulVertRes;
break; break;
case LOGPIXELSX: case LOGPIXELSX:
ret = pPDev->GDIInfo.ulLogPixelsX; ret = ppdev->GDIInfo.ulLogPixelsX;
break; break;
case LOGPIXELSY: case LOGPIXELSY:
ret = pPDev->GDIInfo.ulLogPixelsY; ret = ppdev->GDIInfo.ulLogPixelsY;
break; break;
case CAPS1: case CAPS1:
if ( pPDev->pGraphicsDev && if ( ppdev->pGraphicsDev &&
(((PGRAPHICS_DEVICE)pPDev->pGraphicsDev)->StateFlags & (((PGRAPHICS_DEVICE)ppdev->pGraphicsDev)->StateFlags &
DISPLAY_DEVICE_MIRRORING_DRIVER)) DISPLAY_DEVICE_MIRRORING_DRIVER))
ret = C1_MIRRORING; ret = C1_MIRRORING;
break; break;
case BITSPIXEL: case BITSPIXEL:
ret = pPDev->GDIInfo.cBitsPixel; ret = ppdev->GDIInfo.cBitsPixel;
break; break;
case PLANES: case PLANES:
ret = pPDev->GDIInfo.cPlanes; ret = ppdev->GDIInfo.cPlanes;
break; break;
case NUMBRUSHES: case NUMBRUSHES:
@ -1701,28 +1701,28 @@ IntGdiGetDeviceCaps(PDC dc, INT Index)
break; break;
case NUMPENS: case NUMPENS:
ret = pPDev->GDIInfo.ulNumColors; ret = ppdev->GDIInfo.ulNumColors;
if ( ret != -1 ) ret *= 5; if ( ret != -1 ) ret *= 5;
break; break;
case NUMFONTS: case NUMFONTS:
ret = IntcFonts(pPDev); ret = IntcFonts(ppdev);
break; break;
case NUMCOLORS: case NUMCOLORS:
ret = pPDev->GDIInfo.ulNumColors; ret = ppdev->GDIInfo.ulNumColors;
break; break;
case ASPECTX: case ASPECTX:
ret = pPDev->GDIInfo.ulAspectX; ret = ppdev->GDIInfo.ulAspectX;
break; break;
case ASPECTY: case ASPECTY:
ret = pPDev->GDIInfo.ulAspectY; ret = ppdev->GDIInfo.ulAspectY;
break; break;
case ASPECTXY: case ASPECTXY:
ret = pPDev->GDIInfo.ulAspectXY; ret = ppdev->GDIInfo.ulAspectXY;
break; break;
case CLIPCAPS: case CLIPCAPS:
@ -1730,7 +1730,7 @@ IntGdiGetDeviceCaps(PDC dc, INT Index)
break; break;
case SIZEPALETTE: case SIZEPALETTE:
ret = pPDev->GDIInfo.ulNumPalReg; ret = ppdev->GDIInfo.ulNumPalReg;
break; break;
case NUMRESERVED: case NUMRESERVED:
@ -1738,53 +1738,53 @@ IntGdiGetDeviceCaps(PDC dc, INT Index)
break; break;
case COLORRES: case COLORRES:
ret = pPDev->GDIInfo.ulDACRed + ret = ppdev->GDIInfo.ulDACRed +
pPDev->GDIInfo.ulDACGreen + ppdev->GDIInfo.ulDACGreen +
pPDev->GDIInfo.ulDACBlue; ppdev->GDIInfo.ulDACBlue;
break; break;
case DESKTOPVERTRES: case DESKTOPVERTRES:
ret = pPDev->GDIInfo.ulVertRes; ret = ppdev->GDIInfo.ulVertRes;
break; break;
case DESKTOPHORZRES: case DESKTOPHORZRES:
ret = pPDev->GDIInfo.ulHorzRes; ret = ppdev->GDIInfo.ulHorzRes;
break; break;
case BLTALIGNMENT: case BLTALIGNMENT:
ret = pPDev->GDIInfo.ulBltAlignment; ret = ppdev->GDIInfo.ulBltAlignment;
break; break;
case SHADEBLENDCAPS: case SHADEBLENDCAPS:
ret = pPDev->GDIInfo.flShadeBlend; ret = ppdev->GDIInfo.flShadeBlend;
break; break;
case COLORMGMTCAPS: case COLORMGMTCAPS:
ret = IntGetColorManagementCaps(pPDev); ret = IntGetColorManagementCaps(ppdev);
break; break;
case PHYSICALWIDTH: case PHYSICALWIDTH:
ret = pPDev->GDIInfo.szlPhysSize.cx; ret = ppdev->GDIInfo.szlPhysSize.cx;
break; break;
case PHYSICALHEIGHT: case PHYSICALHEIGHT:
ret = pPDev->GDIInfo.szlPhysSize.cy; ret = ppdev->GDIInfo.szlPhysSize.cy;
break; break;
case PHYSICALOFFSETX: case PHYSICALOFFSETX:
ret = pPDev->GDIInfo.ptlPhysOffset.x; ret = ppdev->GDIInfo.ptlPhysOffset.x;
break; break;
case PHYSICALOFFSETY: case PHYSICALOFFSETY:
ret = pPDev->GDIInfo.ptlPhysOffset.y; ret = ppdev->GDIInfo.ptlPhysOffset.y;
break; break;
case VREFRESH: case VREFRESH:
ret = pPDev->GDIInfo.ulVRefresh; ret = ppdev->GDIInfo.ulVRefresh;
break; break;
case RASTERCAPS: case RASTERCAPS:
ret = pPDev->GDIInfo.flRaster; ret = ppdev->GDIInfo.flRaster;
break; break;
case CURVECAPS: case CURVECAPS:
@ -1803,8 +1803,8 @@ IntGdiGetDeviceCaps(PDC dc, INT Index)
break; break;
case TEXTCAPS: case TEXTCAPS:
ret = pPDev->GDIInfo.flTextCaps; ret = ppdev->GDIInfo.flTextCaps;
if (pPDev->GDIInfo.ulTechnology) ret |= TC_VA_ABLE; if (ppdev->GDIInfo.ulTechnology) ret |= TC_VA_ABLE;
ret |= (TC_SO_ABLE|TC_UA_ABLE); ret |= (TC_SO_ABLE|TC_UA_ABLE);
break; break;
@ -1933,7 +1933,7 @@ NtGdiGetDeviceCapsAll (
return FALSE; return FALSE;
} }
IntvGetDeviceCaps(dc->pPDev, pSafeDevCaps); IntvGetDeviceCaps(dc->ppdev, pSafeDevCaps);
_SEH2_TRY _SEH2_TRY
{ {
@ -2011,7 +2011,7 @@ NtGdiRestoreDC(HDC hDC, INT SaveLevel)
} }
DC_SetNextDC (dc, DC_GetNextDC (dcs)); DC_SetNextDC (dc, DC_GetNextDC (dcs));
dcs->hNext = 0; dcs->hdcNext = 0;
if (--dc->DcLevel.lSaveDepth < SaveLevel) if (--dc->DcLevel.lSaveDepth < SaveLevel)
{ {
@ -2115,13 +2115,13 @@ GdiSelectPalette(HDC hDC,
} }
/* Is this a valid palette for this depth? */ /* Is this a valid palette for this depth? */
if ((dc->w.bitsPerPixel <= 8 && PalGDI->Mode == PAL_INDEXED) || if ((dc->rosdc.bitsPerPixel <= 8 && PalGDI->Mode == PAL_INDEXED) ||
(dc->w.bitsPerPixel > 8 && PalGDI->Mode != PAL_INDEXED)) (dc->rosdc.bitsPerPixel > 8 && PalGDI->Mode != PAL_INDEXED))
{ {
oldPal = dc->DcLevel.hpal; oldPal = dc->DcLevel.hpal;
dc->DcLevel.hpal = hpal; dc->DcLevel.hpal = hpal;
} }
else if (8 < dc->w.bitsPerPixel && PAL_INDEXED == PalGDI->Mode) else if (8 < dc->rosdc.bitsPerPixel && PAL_INDEXED == PalGDI->Mode)
{ {
oldPal = dc->DcLevel.hpal; oldPal = dc->DcLevel.hpal;
dc->DcLevel.hpal = hpal; dc->DcLevel.hpal = hpal;
@ -2145,7 +2145,7 @@ IntGdiSetHookFlags(HDC hDC, WORD Flags)
return 0; return 0;
} }
wRet = dc->DC_Flags & DC_FLAG_DIRTY_RAO; // Fixme wrong flag! wRet = dc->fs & DC_FLAG_DIRTY_RAO; // Fixme wrong flag!
/* "Undocumented Windows" info is slightly confusing. /* "Undocumented Windows" info is slightly confusing.
*/ */
@ -2154,11 +2154,11 @@ IntGdiSetHookFlags(HDC hDC, WORD Flags)
if (Flags & DCHF_INVALIDATEVISRGN) if (Flags & DCHF_INVALIDATEVISRGN)
{ /* hVisRgn has to be updated */ { /* hVisRgn has to be updated */
dc->DC_Flags |= DC_FLAG_DIRTY_RAO; dc->fs |= DC_FLAG_DIRTY_RAO;
} }
else if (Flags & DCHF_VALIDATEVISRGN || 0 == Flags) else if (Flags & DCHF_VALIDATEVISRGN || 0 == Flags)
{ {
dc->DC_Flags &= ~DC_FLAG_DIRTY_RAO; dc->fs &= ~DC_FLAG_DIRTY_RAO;
} }
DC_UnlockDc(dc); DC_UnlockDc(dc);
@ -2222,7 +2222,7 @@ NtGdiGetDCDword(
SafeResult = IntGetFontLanguageInfo(dc); SafeResult = IntGetFontLanguageInfo(dc);
break; break;
case GdiGetIsMemDc: case GdiGetIsMemDc:
SafeResult = dc->DC_Type; SafeResult = dc->dctype;
break; break;
case GdiGetMapMode: case GdiGetMapMode:
SafeResult = Dc_Attr->iMapMode; SafeResult = Dc_Attr->iMapMode;
@ -2428,8 +2428,8 @@ DC_AllocDC(PUNICODE_STRING Driver)
if (Driver != NULL) if (Driver != NULL)
{ {
RtlCopyMemory(&NewDC->DriverName, Driver, sizeof(UNICODE_STRING)); RtlCopyMemory(&NewDC->rosdc.DriverName, Driver, sizeof(UNICODE_STRING));
NewDC->DriverName.Buffer = Buf; NewDC->rosdc.DriverName.Buffer = Buf;
} }
Dc_Attr = NewDC->pDc_Attr; Dc_Attr = NewDC->pDc_Attr;
if(!Dc_Attr) Dc_Attr = &NewDC->Dc_Attr; if(!Dc_Attr) Dc_Attr = &NewDC->Dc_Attr;
@ -2608,21 +2608,21 @@ BOOL INTERNAL_CALL
DC_Cleanup(PVOID ObjectBody) DC_Cleanup(PVOID ObjectBody)
{ {
PDC pDC = (PDC)ObjectBody; PDC pDC = (PDC)ObjectBody;
if (pDC->DriverName.Buffer) if (pDC->rosdc.DriverName.Buffer)
ExFreePoolWithTag(pDC->DriverName.Buffer, TAG_DC); ExFreePoolWithTag(pDC->rosdc.DriverName.Buffer, TAG_DC);
return TRUE; return TRUE;
} }
HDC FASTCALL HDC FASTCALL
DC_GetNextDC (PDC pDC) DC_GetNextDC (PDC pDC)
{ {
return pDC->hNext; return pDC->hdcNext;
} }
VOID FASTCALL VOID FASTCALL
DC_SetNextDC (PDC pDC, HDC hNextDC) DC_SetNextDC (PDC pDC, HDC hNextDC)
{ {
pDC->hNext = hNextDC; pDC->hdcNext = hNextDC;
} }
VOID FASTCALL VOID FASTCALL
@ -2696,17 +2696,17 @@ DC_SetOwnership(HDC hDC, PEPROCESS Owner)
pDC = DC_LockDc(hDC); pDC = DC_LockDc(hDC);
if (pDC) if (pDC)
{ {
if (pDC->w.hClipRgn) if (pDC->rosdc.hClipRgn)
{ {
if(!GDIOBJ_SetOwnership(pDC->w.hClipRgn, Owner)) return FALSE; if(!GDIOBJ_SetOwnership(pDC->rosdc.hClipRgn, Owner)) return FALSE;
} }
if (pDC->w.hVisRgn) if (pDC->rosdc.hVisRgn)
{ {
if(!GDIOBJ_SetOwnership(pDC->w.hVisRgn, Owner)) return FALSE; if(!GDIOBJ_SetOwnership(pDC->rosdc.hVisRgn, Owner)) return FALSE;
} }
if (pDC->w.hGCClipRgn) if (pDC->rosdc.hGCClipRgn)
{ {
if(!GDIOBJ_SetOwnership(pDC->w.hGCClipRgn, Owner)) return FALSE; if(!GDIOBJ_SetOwnership(pDC->rosdc.hGCClipRgn, Owner)) return FALSE;
} }
if (pDC->DcLevel.hPath) if (pDC->DcLevel.hPath)
{ {
@ -2727,7 +2727,7 @@ DC_LockDisplay(HDC hDC)
PERESOURCE Resource; PERESOURCE Resource;
PDC dc = DC_LockDc(hDC); PDC dc = DC_LockDc(hDC);
if (!dc) return; if (!dc) return;
Resource = ((PGDIDEVICE)dc->pPDev)->hsemDevLock; Resource = ((PGDIDEVICE)dc->ppdev)->hsemDevLock;
DC_UnlockDc(dc); DC_UnlockDc(dc);
if (!Resource) return; if (!Resource) return;
KeEnterCriticalRegion(); KeEnterCriticalRegion();
@ -2741,7 +2741,7 @@ DC_UnlockDisplay(HDC hDC)
PERESOURCE Resource; PERESOURCE Resource;
PDC dc = DC_LockDc(hDC); PDC dc = DC_LockDc(hDC);
if (!dc) return; if (!dc) return;
Resource = ((PGDIDEVICE)dc->pPDev)->hsemDevLock; Resource = ((PGDIDEVICE)dc->ppdev)->hsemDevLock;
DC_UnlockDc(dc); DC_UnlockDc(dc);
if (!Resource) return; if (!Resource) return;
ExReleaseResourceLite( Resource ); ExReleaseResourceLite( Resource );
@ -2771,22 +2771,22 @@ IntEnumHDev(VOID)
VOID FASTCALL VOID FASTCALL
IntGdiReferencePdev(PGDIDEVICE pPDev) IntGdiReferencePdev(PGDIDEVICE ppdev)
{ {
if(!hsemDriverMgmt) hsemDriverMgmt = EngCreateSemaphore(); // Hax, should be in dllmain.c if(!hsemDriverMgmt) hsemDriverMgmt = EngCreateSemaphore(); // Hax, should be in dllmain.c
IntGdiAcquireSemaphore(hsemDriverMgmt); IntGdiAcquireSemaphore(hsemDriverMgmt);
pPDev->cPdevRefs++; ppdev->cPdevRefs++;
IntGdiReleaseSemaphore(hsemDriverMgmt); IntGdiReleaseSemaphore(hsemDriverMgmt);
} }
VOID FASTCALL VOID FASTCALL
IntGdiUnreferencePdev(PGDIDEVICE pPDev, DWORD CleanUpType) IntGdiUnreferencePdev(PGDIDEVICE ppdev, DWORD CleanUpType)
{ {
IntGdiAcquireSemaphore(hsemDriverMgmt); IntGdiAcquireSemaphore(hsemDriverMgmt);
pPDev->cPdevRefs--; ppdev->cPdevRefs--;
if (!pPDev->cPdevRefs) if (!ppdev->cPdevRefs)
{ {
// Handle the destruction of pPDev or GDIDEVICE or PDEVOBJ or PDEV etc. // Handle the destruction of ppdev or GDIDEVICE or PDEVOBJ or PDEV etc.
} }
IntGdiReleaseSemaphore(hsemDriverMgmt); IntGdiReleaseSemaphore(hsemDriverMgmt);
} }
@ -2825,7 +2825,7 @@ GetDisplayNumberFromDeviceName(
DesktopHDC = UserGetWindowDC(DesktopObject); DesktopHDC = UserGetWindowDC(DesktopObject);
pDC = DC_LockDc(DesktopHDC); pDC = DC_LockDc(DesktopHDC);
*DisplayNumber = ((GDIDEVICE *)pDC->pPDev)->DisplayNumber; *DisplayNumber = ((GDIDEVICE *)pDC->ppdev)->DisplayNumber;
DC_UnlockDc(pDC); DC_UnlockDc(pDC);
UserReleaseDC(DesktopObject, DesktopHDC, FALSE); UserReleaseDC(DesktopObject, DesktopHDC, FALSE);
@ -3350,7 +3350,7 @@ IntChangeDisplaySettings(
{ {
return FALSE; return FALSE;
} }
swprintf (szBuffer, L"\\\\.\\DISPLAY%lu", ((GDIDEVICE *)DC->pPDev)->DisplayNumber); swprintf (szBuffer, L"\\\\.\\DISPLAY%lu", ((GDIDEVICE *)DC->ppdev)->DisplayNumber);
DC_UnlockDc(DC); DC_UnlockDc(DC);
RtlInitUnicodeString(&InDeviceName, szBuffer); RtlInitUnicodeString(&InDeviceName, szBuffer);
@ -3449,19 +3449,19 @@ APIENTRY
NtGdiGetDhpdev( NtGdiGetDhpdev(
IN HDEV hdev) IN HDEV hdev)
{ {
PGDIDEVICE pPDev, pGdiDevice = (PGDIDEVICE) hdev; PGDIDEVICE ppdev, pGdiDevice = (PGDIDEVICE) hdev;
if (!pGdiDevice) return NULL; if (!pGdiDevice) return NULL;
if ( pGdiDevice < (PGDIDEVICE)MmSystemRangeStart) return NULL; if ( pGdiDevice < (PGDIDEVICE)MmSystemRangeStart) return NULL;
pPDev = pPrimarySurface; ppdev = pPrimarySurface;
IntGdiAcquireSemaphore(hsemDriverMgmt); IntGdiAcquireSemaphore(hsemDriverMgmt);
do do
{ {
if (pGdiDevice == pPDev) break; if (pGdiDevice == ppdev) break;
else else
pPDev = pPDev->ppdevNext; ppdev = ppdev->ppdevNext;
} while (pPDev != NULL); } while (ppdev != NULL);
IntGdiReleaseSemaphore(hsemDriverMgmt); IntGdiReleaseSemaphore(hsemDriverMgmt);
if (!pPDev) return NULL; if (!ppdev) return NULL;
return pGdiDevice->hPDev; return pGdiDevice->hPDev;
} }

View file

@ -287,7 +287,7 @@ DCU_SetDcUndeletable(HDC hDC)
return; return;
} }
dc->DC_Flags |= DC_FLAG_PERMANENT; dc->fs |= DC_FLAG_PERMANENT;
DC_UnlockDc( dc ); DC_UnlockDc( dc );
return; return;
} }

View file

@ -79,13 +79,13 @@ IntSetDIBColorTable(HDC hDC, UINT StartIndex, UINT Entries, CONST RGBQUAD *Color
ULONG biBitCount; ULONG biBitCount;
if (!(dc = DC_LockDc(hDC))) return 0; if (!(dc = DC_LockDc(hDC))) return 0;
if (dc->DC_Type == DC_TYPE_INFO) if (dc->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(dc); DC_UnlockDc(dc);
return 0; return 0;
} }
psurf = SURFACE_LockSurface(dc->w.hBitmap); psurf = SURFACE_LockSurface(dc->rosdc.hBitmap);
if (psurf == NULL) if (psurf == NULL)
{ {
DC_UnlockDc(dc); DC_UnlockDc(dc);
@ -145,13 +145,13 @@ IntGetDIBColorTable(HDC hDC, UINT StartIndex, UINT Entries, RGBQUAD *Colors)
ULONG biBitCount; ULONG biBitCount;
if (!(dc = DC_LockDc(hDC))) return 0; if (!(dc = DC_LockDc(hDC))) return 0;
if (dc->DC_Type == DC_TYPE_INFO) if (dc->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(dc); DC_UnlockDc(dc);
return 0; return 0;
} }
psurf = SURFACE_LockSurface(dc->w.hBitmap); psurf = SURFACE_LockSurface(dc->rosdc.hBitmap);
if (psurf == NULL) if (psurf == NULL)
{ {
DC_UnlockDc(dc); DC_UnlockDc(dc);
@ -279,7 +279,7 @@ IntSetDIBits(
else else
{ {
// Destination palette obtained from the hDC // Destination palette obtained from the hDC
DDB_Palette = ((GDIDEVICE *)DC->pPDev)->DevInfo.hpalDefault; DDB_Palette = ((GDIDEVICE *)DC->ppdev)->DevInfo.hpalDefault;
} }
hDCPalette = PALETTE_LockPalette(DDB_Palette); hDCPalette = PALETTE_LockPalette(DDB_Palette);
if (NULL == hDCPalette) if (NULL == hDCPalette)
@ -395,7 +395,7 @@ NtGdiSetDIBits(
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
return 0; return 0;
} }
if (Dc->DC_Type == DC_TYPE_INFO) if (Dc->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(Dc); DC_UnlockDc(Dc);
return 0; return 0;
@ -470,13 +470,13 @@ NtGdiSetDIBitsToDeviceInternal(
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
return 0; return 0;
} }
if (pDC->DC_Type == DC_TYPE_INFO) if (pDC->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(pDC); DC_UnlockDc(pDC);
return 0; return 0;
} }
pDestSurf = EngLockSurface((HSURF)pDC->w.hBitmap); pDestSurf = EngLockSurface((HSURF)pDC->rosdc.hBitmap);
if (!pDestSurf) if (!pDestSurf)
{ {
/* FIXME: SetLastError ? */ /* FIXME: SetLastError ? */
@ -522,7 +522,7 @@ NtGdiSetDIBitsToDeviceInternal(
} }
/* Obtain destination palette from the DC */ /* Obtain destination palette from the DC */
pDCPalette = PALETTE_LockPalette(((GDIDEVICE *)pDC->pPDev)->DevInfo.hpalDefault); pDCPalette = PALETTE_LockPalette(((GDIDEVICE *)pDC->ppdev)->DevInfo.hpalDefault);
if (!pDCPalette) if (!pDCPalette)
{ {
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
@ -531,7 +531,7 @@ NtGdiSetDIBitsToDeviceInternal(
} }
DDBPaletteType = pDCPalette->Mode; DDBPaletteType = pDCPalette->Mode;
DDBPalette = ((GDIDEVICE *)pDC->pPDev)->DevInfo.hpalDefault; DDBPalette = ((GDIDEVICE *)pDC->ppdev)->DevInfo.hpalDefault;
PALETTE_UnlockPalette(pDCPalette); PALETTE_UnlockPalette(pDCPalette);
DIBPalette = BuildDIBPalette(bmi, (PINT)&DIBPaletteType); DIBPalette = BuildDIBPalette(bmi, (PINT)&DIBPaletteType);
@ -555,7 +555,7 @@ NtGdiSetDIBitsToDeviceInternal(
Status = IntEngBitBlt(pDestSurf, Status = IntEngBitBlt(pDestSurf,
pSourceSurf, pSourceSurf,
NULL, NULL,
pDC->CombinedClip, pDC->rosdc.CombinedClip,
XlateObj, XlateObj,
&rcDest, &rcDest,
&ptSource, &ptSource,
@ -635,7 +635,7 @@ NtGdiGetDIBitsInternal(HDC hDC,
Dc = DC_LockDc(hDC); Dc = DC_LockDc(hDC);
if (Dc == NULL) return 0; if (Dc == NULL) return 0;
if (Dc->DC_Type == DC_TYPE_INFO) if (Dc->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(Dc); DC_UnlockDc(Dc);
return 0; return 0;
@ -1238,13 +1238,13 @@ NtGdiCreateDIBitmapInternal(IN HDC hDc,
bpp = pbmi->bmiHeader.biBitCount; bpp = pbmi->bmiHeader.biBitCount;
else else
{ {
if (Dc->DC_Type != DC_TYPE_MEMORY ) if (Dc->dctype != DC_TYPE_MEMORY )
bpp = IntGdiGetDeviceCaps(Dc, BITSPIXEL); bpp = IntGdiGetDeviceCaps(Dc, BITSPIXEL);
else else
{ {
DIBSECTION dibs; DIBSECTION dibs;
INT Count; INT Count;
SURFACE *psurf = SURFACE_LockSurface(Dc->w.hBitmap); SURFACE *psurf = SURFACE_LockSurface(Dc->rosdc.hBitmap);
Count = BITMAP_GetObject(psurf, sizeof(dibs), &dibs); Count = BITMAP_GetObject(psurf, sizeof(dibs), &dibs);
if (!Count) if (!Count)
bpp = 1; bpp = 1;

View file

@ -1199,7 +1199,7 @@ IntFillRect( DC *dc,
ASSERT(BrushObj); ASSERT(BrushObj);
psurf = SURFACE_LockSurface(dc->w.hBitmap); psurf = SURFACE_LockSurface(dc->rosdc.hBitmap);
if (psurf == NULL) if (psurf == NULL)
{ {
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
@ -1238,15 +1238,15 @@ IntFillRect( DC *dc,
ROP = PATCOPY; ROP = PATCOPY;
if (Pen) if (Pen)
IntGdiInitBrushInstance(&BrushInst, BrushObj, dc->XlatePen); IntGdiInitBrushInstance(&BrushInst, BrushObj, dc->rosdc.XlatePen);
else else
IntGdiInitBrushInstance(&BrushInst, BrushObj, dc->XlateBrush); IntGdiInitBrushInstance(&BrushInst, BrushObj, dc->rosdc.XlateBrush);
Ret = IntEngBitBlt( Ret = IntEngBitBlt(
&psurf->SurfObj, &psurf->SurfObj,
NULL, NULL,
NULL, NULL,
dc->CombinedClip, dc->rosdc.CombinedClip,
NULL, NULL,
&DestRect, &DestRect,
NULL, NULL,

View file

@ -117,7 +117,7 @@ IntGdiPolygon(PDC dc,
/* Special locking order to avoid lock-ups */ /* Special locking order to avoid lock-ups */
FillBrushObj = BRUSHOBJ_LockBrush(Dc_Attr->hbrush); FillBrushObj = BRUSHOBJ_LockBrush(Dc_Attr->hbrush);
PenBrushObj = PENOBJ_LockPen(Dc_Attr->hpen); PenBrushObj = PENOBJ_LockPen(Dc_Attr->hpen);
psurf = SURFACE_LockSurface(dc->w.hBitmap); psurf = SURFACE_LockSurface(dc->rosdc.hBitmap);
/* FIXME - psurf can be NULL!!!! don't assert but handle this case gracefully! */ /* FIXME - psurf can be NULL!!!! don't assert but handle this case gracefully! */
ASSERT(psurf); ASSERT(psurf);
@ -127,7 +127,7 @@ IntGdiPolygon(PDC dc,
BrushOrigin = *((PPOINTL)&FillBrushObj->ptOrigin); BrushOrigin = *((PPOINTL)&FillBrushObj->ptOrigin);
BrushOrigin.x += dc->ptlDCOrig.x; BrushOrigin.x += dc->ptlDCOrig.x;
BrushOrigin.y += dc->ptlDCOrig.y; BrushOrigin.y += dc->ptlDCOrig.y;
IntGdiInitBrushInstance(&FillBrushInst, FillBrushObj, dc->XlateBrush); IntGdiInitBrushInstance(&FillBrushInst, FillBrushObj, dc->rosdc.XlateBrush);
ret = IntFillPolygon (dc, psurf, &FillBrushInst.BrushObject, Points, Count, ret = IntFillPolygon (dc, psurf, &FillBrushInst.BrushObject, Points, Count,
DestRect, &BrushOrigin); DestRect, &BrushOrigin);
} }
@ -139,7 +139,7 @@ IntGdiPolygon(PDC dc,
{ {
int i; int i;
IntGdiInitBrushInstance(&PenBrushInst, PenBrushObj, dc->XlatePen); IntGdiInitBrushInstance(&PenBrushInst, PenBrushObj, dc->rosdc.XlatePen);
for (i = 0; i < Count-1; i++) for (i = 0; i < Count-1; i++)
{ {
@ -149,7 +149,7 @@ IntGdiPolygon(PDC dc,
// Points[1].x, Points[1].y ); // Points[1].x, Points[1].y );
ret = IntEngLineTo(&psurf->SurfObj, ret = IntEngLineTo(&psurf->SurfObj,
dc->CombinedClip, dc->rosdc.CombinedClip,
&PenBrushInst.BrushObject, &PenBrushInst.BrushObject,
Points[i].x, /* From */ Points[i].x, /* From */
Points[i].y, Points[i].y,
@ -163,7 +163,7 @@ IntGdiPolygon(PDC dc,
if (ret) if (ret)
{ {
ret = IntEngLineTo(&psurf->SurfObj, ret = IntEngLineTo(&psurf->SurfObj,
dc->CombinedClip, dc->rosdc.CombinedClip,
&PenBrushInst.BrushObject, &PenBrushInst.BrushObject,
Points[Count-1].x, /* From */ Points[Count-1].x, /* From */
Points[Count-1].y, Points[Count-1].y,
@ -241,7 +241,7 @@ NtGdiEllipse(
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE; return FALSE;
} }
if (dc->DC_Type == DC_TYPE_INFO) if (dc->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(dc); DC_UnlockDc(dc);
/* Yes, Windows really returns TRUE in this case */ /* Yes, Windows really returns TRUE in this case */
@ -495,7 +495,7 @@ NtGdiPolyPolyDraw( IN HDC hDC,
return FALSE; return FALSE;
} }
if (dc->DC_Type == DC_TYPE_INFO) if (dc->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(dc); DC_UnlockDc(dc);
ExFreePool(pTemp); ExFreePool(pTemp);
@ -608,7 +608,7 @@ IntRectangle(PDC dc,
ret = FALSE; ret = FALSE;
goto cleanup; goto cleanup;
} }
psurf = SURFACE_LockSurface(dc->w.hBitmap); psurf = SURFACE_LockSurface(dc->rosdc.hBitmap);
if (!psurf) if (!psurf)
{ {
ret = FALSE; ret = FALSE;
@ -622,11 +622,11 @@ IntRectangle(PDC dc,
BrushOrigin = *((PPOINTL)&FillBrushObj->ptOrigin); BrushOrigin = *((PPOINTL)&FillBrushObj->ptOrigin);
BrushOrigin.x += dc->ptlDCOrig.x; BrushOrigin.x += dc->ptlDCOrig.x;
BrushOrigin.y += dc->ptlDCOrig.y; BrushOrigin.y += dc->ptlDCOrig.y;
IntGdiInitBrushInstance(&FillBrushInst, FillBrushObj, dc->XlateBrush); IntGdiInitBrushInstance(&FillBrushInst, FillBrushObj, dc->rosdc.XlateBrush);
ret = IntEngBitBlt(&psurf->SurfObj, ret = IntEngBitBlt(&psurf->SurfObj,
NULL, NULL,
NULL, NULL,
dc->CombinedClip, dc->rosdc.CombinedClip,
NULL, NULL,
&DestRect, &DestRect,
NULL, NULL,
@ -637,7 +637,7 @@ IntRectangle(PDC dc,
} }
} }
IntGdiInitBrushInstance(&PenBrushInst, PenBrushObj, dc->XlatePen); IntGdiInitBrushInstance(&PenBrushInst, PenBrushObj, dc->rosdc.XlatePen);
// Draw the rectangle with the current pen // Draw the rectangle with the current pen
@ -647,28 +647,28 @@ IntRectangle(PDC dc,
{ {
Mix = ROP2_TO_MIX(Dc_Attr->jROP2); Mix = ROP2_TO_MIX(Dc_Attr->jROP2);
ret = ret && IntEngLineTo(&psurf->SurfObj, ret = ret && IntEngLineTo(&psurf->SurfObj,
dc->CombinedClip, dc->rosdc.CombinedClip,
&PenBrushInst.BrushObject, &PenBrushInst.BrushObject,
DestRect.left, DestRect.top, DestRect.right, DestRect.top, DestRect.left, DestRect.top, DestRect.right, DestRect.top,
&DestRect, // Bounding rectangle &DestRect, // Bounding rectangle
Mix); Mix);
ret = ret && IntEngLineTo(&psurf->SurfObj, ret = ret && IntEngLineTo(&psurf->SurfObj,
dc->CombinedClip, dc->rosdc.CombinedClip,
&PenBrushInst.BrushObject, &PenBrushInst.BrushObject,
DestRect.right, DestRect.top, DestRect.right, DestRect.bottom, DestRect.right, DestRect.top, DestRect.right, DestRect.bottom,
&DestRect, // Bounding rectangle &DestRect, // Bounding rectangle
Mix); Mix);
ret = ret && IntEngLineTo(&psurf->SurfObj, ret = ret && IntEngLineTo(&psurf->SurfObj,
dc->CombinedClip, dc->rosdc.CombinedClip,
&PenBrushInst.BrushObject, &PenBrushInst.BrushObject,
DestRect.right, DestRect.bottom, DestRect.left, DestRect.bottom, DestRect.right, DestRect.bottom, DestRect.left, DestRect.bottom,
&DestRect, // Bounding rectangle &DestRect, // Bounding rectangle
Mix); Mix);
ret = ret && IntEngLineTo(&psurf->SurfObj, ret = ret && IntEngLineTo(&psurf->SurfObj,
dc->CombinedClip, dc->rosdc.CombinedClip,
&PenBrushInst.BrushObject, &PenBrushInst.BrushObject,
DestRect.left, DestRect.bottom, DestRect.left, DestRect.top, DestRect.left, DestRect.bottom, DestRect.left, DestRect.top,
&DestRect, // Bounding rectangle &DestRect, // Bounding rectangle
@ -708,7 +708,7 @@ NtGdiRectangle(HDC hDC,
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE; return FALSE;
} }
if (dc->DC_Type == DC_TYPE_INFO) if (dc->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(dc); DC_UnlockDc(dc);
/* Yes, Windows really returns TRUE in this case */ /* Yes, Windows really returns TRUE in this case */
@ -864,7 +864,7 @@ NtGdiRoundRect(
DPRINT1("NtGdiRoundRect() - hDC is invalid\n"); DPRINT1("NtGdiRoundRect() - hDC is invalid\n");
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
} }
else if (dc->DC_Type == DC_TYPE_INFO) else if (dc->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(dc); DC_UnlockDc(dc);
/* Yes, Windows really returns TRUE in this case */ /* Yes, Windows really returns TRUE in this case */
@ -950,7 +950,7 @@ IntGdiGradientFill(
Extent.top += DitherOrg.y; Extent.top += DitherOrg.y;
Extent.bottom += DitherOrg.y; Extent.bottom += DitherOrg.y;
psurf = SURFACE_LockSurface(dc->w.hBitmap); psurf = SURFACE_LockSurface(dc->rosdc.hBitmap);
/* FIXME - psurf can be NULL!!! Don't assert but handle this case gracefully! */ /* FIXME - psurf can be NULL!!! Don't assert but handle this case gracefully! */
ASSERT(psurf); ASSERT(psurf);
@ -970,7 +970,7 @@ IntGdiGradientFill(
ASSERT(XlateObj); ASSERT(XlateObj);
Ret = IntEngGradientFill(&psurf->SurfObj, Ret = IntEngGradientFill(&psurf->SurfObj,
dc->CombinedClip, dc->rosdc.CombinedClip,
XlateObj, XlateObj,
pVertex, pVertex,
uVertex, uVertex,
@ -1009,7 +1009,7 @@ NtGdiGradientFill(
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE; return FALSE;
} }
if (dc->DC_Type == DC_TYPE_INFO) if (dc->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(dc); DC_UnlockDc(dc);
/* Yes, Windows really returns TRUE in this case */ /* Yes, Windows really returns TRUE in this case */
@ -1125,7 +1125,7 @@ NtGdiExtFloodFill(
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE; return FALSE;
} }
if (dc->DC_Type == DC_TYPE_INFO) if (dc->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(dc); DC_UnlockDc(dc);
/* Yes, Windows really returns TRUE in this case */ /* Yes, Windows really returns TRUE in this case */
@ -1145,9 +1145,9 @@ NtGdiExtFloodFill(
Pt.y = YStart; Pt.y = YStart;
IntLPtoDP(dc, (LPPOINT)&Pt, 1); IntLPtoDP(dc, (LPPOINT)&Pt, 1);
Ret = NtGdiPtInRegion(dc->w.hGCClipRgn, Pt.x, Pt.y); Ret = NtGdiPtInRegion(dc->rosdc.hGCClipRgn, Pt.x, Pt.y);
if (Ret) if (Ret)
IntGdiGetRgnBox(dc->w.hGCClipRgn,(LPRECT)&DestRect); IntGdiGetRgnBox(dc->rosdc.hGCClipRgn,(LPRECT)&DestRect);
else else
goto cleanup; goto cleanup;
@ -1157,7 +1157,7 @@ NtGdiExtFloodFill(
Ret = FALSE; Ret = FALSE;
goto cleanup; goto cleanup;
} }
psurf = SURFACE_LockSurface(dc->w.hBitmap); psurf = SURFACE_LockSurface(dc->rosdc.hBitmap);
if (!psurf) if (!psurf)
{ {
Ret = FALSE; Ret = FALSE;
@ -1172,9 +1172,9 @@ NtGdiExtFloodFill(
BrushOrigin = *((PPOINTL)&FillBrushObj->ptOrigin); BrushOrigin = *((PPOINTL)&FillBrushObj->ptOrigin);
BrushOrigin.x += dc->ptlDCOrig.x; BrushOrigin.x += dc->ptlDCOrig.x;
BrushOrigin.y += dc->ptlDCOrig.y; BrushOrigin.y += dc->ptlDCOrig.y;
IntGdiInitBrushInstance(&FillBrushInst, FillBrushObj, dc->XlateBrush); IntGdiInitBrushInstance(&FillBrushInst, FillBrushObj, dc->rosdc.XlateBrush);
Ret = IntEngBitBlt(&psurf->SurfObj, NULL, NULL, Ret = IntEngBitBlt(&psurf->SurfObj, NULL, NULL,
dc->CombinedClip, NULL, dc->rosdc.CombinedClip, NULL,
&DestRect, NULL, NULL, &DestRect, NULL, NULL,
&FillBrushInst.BrushObject, &FillBrushInst.BrushObject,
&BrushOrigin, &BrushOrigin,

View file

@ -3163,7 +3163,7 @@ GreExtTextOutW(
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE; return FALSE;
} }
if (dc->DC_Type == DC_TYPE_INFO) if (dc->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(dc); DC_UnlockDc(dc);
/* Yes, Windows really returns TRUE in this case */ /* Yes, Windows really returns TRUE in this case */
@ -3200,7 +3200,7 @@ GreExtTextOutW(
IntLPtoDP(dc, (POINT *)lprc, 2); IntLPtoDP(dc, (POINT *)lprc, 2);
} }
psurf = SURFACE_LockSurface(dc->w.hBitmap); psurf = SURFACE_LockSurface(dc->rosdc.hBitmap);
if (!psurf) if (!psurf)
{ {
goto fail; goto fail;
@ -3280,7 +3280,7 @@ GreExtTextOutW(
&psurf->SurfObj, &psurf->SurfObj,
NULL, NULL,
NULL, NULL,
dc->CombinedClip, dc->rosdc.CombinedClip,
NULL, NULL,
&DestRect, &DestRect,
&SourcePoint, &SourcePoint,
@ -3526,7 +3526,7 @@ GreExtTextOutW(
&psurf->SurfObj, &psurf->SurfObj,
NULL, NULL,
NULL, NULL,
dc->CombinedClip, dc->rosdc.CombinedClip,
NULL, NULL,
&DestRect, &DestRect,
&SourcePoint, &SourcePoint,
@ -3597,7 +3597,7 @@ GreExtTextOutW(
IntEngMaskBlt( IntEngMaskBlt(
SurfObj, SurfObj,
SourceGlyphSurf, SourceGlyphSurf,
dc->CombinedClip, dc->rosdc.CombinedClip,
XlateObj, XlateObj,
XlateObj2, XlateObj2,
&DestRect, &DestRect,

View file

@ -154,7 +154,7 @@ NtGdiGetDeviceGammaRamp(HDC hDC,
return FALSE; return FALSE;
} }
Ret = IntGetDeviceGammaRamp((HDEV)dc->pPDev, SafeRamp); Ret = IntGetDeviceGammaRamp((HDEV)dc->ppdev, SafeRamp);
if (!Ret) return Ret; if (!Ret) return Ret;
@ -408,7 +408,7 @@ NtGdiSetDeviceGammaRamp(HDC hDC,
return FALSE; return FALSE;
} }
Ret = IntSetDeviceGammaRamp((HDEV)dc->pPDev, SafeRamp, TRUE); Ret = IntSetDeviceGammaRamp((HDEV)dc->ppdev, SafeRamp, TRUE);
DC_UnlockDc(dc); DC_UnlockDc(dc);
ExFreePool(SafeRamp); ExFreePool(SafeRamp);
return Ret; return Ret;

View file

@ -121,7 +121,7 @@ IntGdiLineTo(DC *dc,
if (Dc_Attr->ulDirty_ & DC_PEN_DIRTY) if (Dc_Attr->ulDirty_ & DC_PEN_DIRTY)
IntGdiSelectPen(dc,Dc_Attr->hpen); IntGdiSelectPen(dc,Dc_Attr->hpen);
psurf = SURFACE_LockSurface( dc->w.hBitmap ); psurf = SURFACE_LockSurface( dc->rosdc.hBitmap );
if (NULL == psurf) if (NULL == psurf)
{ {
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
@ -157,9 +157,9 @@ IntGdiLineTo(DC *dc,
if (!(PenBrushObj->flAttrs & GDIBRUSH_IS_NULL)) if (!(PenBrushObj->flAttrs & GDIBRUSH_IS_NULL))
{ {
IntGdiInitBrushInstance(&PenBrushInst, PenBrushObj, dc->XlatePen); IntGdiInitBrushInstance(&PenBrushInst, PenBrushObj, dc->rosdc.XlatePen);
Ret = IntEngLineTo(&psurf->SurfObj, Ret = IntEngLineTo(&psurf->SurfObj,
dc->CombinedClip, dc->rosdc.CombinedClip,
&PenBrushInst.BrushObject, &PenBrushInst.BrushObject,
Points[0].x, Points[0].y, Points[0].x, Points[0].y,
Points[1].x, Points[1].y, Points[1].x, Points[1].y,
@ -283,7 +283,7 @@ IntGdiPolyline(DC *dc,
Points = EngAllocMem(0, Count * sizeof(POINT), TAG_COORD); Points = EngAllocMem(0, Count * sizeof(POINT), TAG_COORD);
if (Points != NULL) if (Points != NULL)
{ {
psurf = SURFACE_LockSurface(dc->w.hBitmap); psurf = SURFACE_LockSurface(dc->rosdc.hBitmap);
/* FIXME - psurf can be NULL!!!! /* FIXME - psurf can be NULL!!!!
Don't assert but handle this case gracefully! */ Don't assert but handle this case gracefully! */
ASSERT(psurf); ASSERT(psurf);
@ -291,16 +291,16 @@ IntGdiPolyline(DC *dc,
RtlCopyMemory(Points, pt, Count * sizeof(POINT)); RtlCopyMemory(Points, pt, Count * sizeof(POINT));
IntLPtoDP(dc, Points, Count); IntLPtoDP(dc, Points, Count);
/* Offset the array of point by the dc->w.DCOrg */ /* Offset the array of point by the dc->rosdc.DCOrg */
for (i = 0; i < Count; i++) for (i = 0; i < Count; i++)
{ {
Points[i].x += dc->ptlDCOrig.x; Points[i].x += dc->ptlDCOrig.x;
Points[i].y += dc->ptlDCOrig.y; Points[i].y += dc->ptlDCOrig.y;
} }
IntGdiInitBrushInstance(&PenBrushInst, PenBrushObj, dc->XlatePen); IntGdiInitBrushInstance(&PenBrushInst, PenBrushObj, dc->rosdc.XlatePen);
Ret = IntEngPolyline(&psurf->SurfObj, Ret = IntEngPolyline(&psurf->SurfObj,
dc->CombinedClip, dc->rosdc.CombinedClip,
&PenBrushInst.BrushObject, &PenBrushInst.BrushObject,
Points, Points,
Count, Count,
@ -406,7 +406,7 @@ NtGdiLineTo(HDC hDC,
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE; return FALSE;
} }
if (dc->DC_Type == DC_TYPE_INFO) if (dc->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(dc); DC_UnlockDc(dc);
/* Yes, Windows really returns TRUE in this case */ /* Yes, Windows really returns TRUE in this case */

View file

@ -300,13 +300,13 @@ IntGdiSelectPen(
hOrgPen = pDc_Attr->hpen; hOrgPen = pDc_Attr->hpen;
pDc_Attr->hpen = hPen; pDc_Attr->hpen = hPen;
if (pDC->XlatePen != NULL) if (pDC->rosdc.XlatePen != NULL)
{ {
EngDeleteXlate(pDC->XlatePen); EngDeleteXlate(pDC->rosdc.XlatePen);
} }
pDc_Attr->ulDirty_ &= ~DC_PEN_DIRTY; pDc_Attr->ulDirty_ &= ~DC_PEN_DIRTY;
pDC->XlatePen = XlateObj; pDC->rosdc.XlatePen = XlateObj;
return hOrgPen; return hOrgPen;
} }

View file

@ -431,7 +431,7 @@ POLYGONFILL_FillScanLineAlternate(
//DPRINT("Fill Line (%d, %d) to (%d, %d)\n",x1, ScanLine, x2, ScanLine); //DPRINT("Fill Line (%d, %d) to (%d, %d)\n",x1, ScanLine, x2, ScanLine);
IntEngLineTo(&psurf->SurfObj, IntEngLineTo(&psurf->SurfObj,
dc->CombinedClip, dc->rosdc.CombinedClip,
BrushObj, BrushObj,
x1, x1,
ScanLine, ScanLine,
@ -504,7 +504,7 @@ POLYGONFILL_FillScanLineWinding(
//DPRINT("Fill Line (%d, %d) to (%d, %d)\n",x1, ScanLine, x2, ScanLine); //DPRINT("Fill Line (%d, %d) to (%d, %d)\n",x1, ScanLine, x2, ScanLine);
IntEngLineTo(&psurf->SurfObj, IntEngLineTo(&psurf->SurfObj,
dc->CombinedClip, dc->rosdc.CombinedClip,
BrushObj, BrushObj,
x1, x1,
ScanLine, ScanLine,
@ -527,7 +527,7 @@ POLYGONFILL_FillScanLineWinding(
//DPRINT("Fill Line (%d, %d) to (%d, %d)\n",x1, ScanLine, x2, ScanLine); //DPRINT("Fill Line (%d, %d) to (%d, %d)\n",x1, ScanLine, x2, ScanLine);
IntEngLineTo(&psurf->SurfObj, IntEngLineTo(&psurf->SurfObj,
dc->CombinedClip, dc->rosdc.CombinedClip,
BrushObj, BrushObj,
x1, x1,
ScanLine, ScanLine,
@ -652,7 +652,7 @@ IntFillPolygon(
IntEngBitBlt(&psurf->SurfObj, IntEngBitBlt(&psurf->SurfObj,
NULL, NULL,
NULL, NULL,
dc->CombinedClip, dc->rosdc.CombinedClip,
NULL, NULL,
&LineRect, &LineRect,
NULL, NULL,

View file

@ -114,12 +114,12 @@ IntGdiExtEscape(
INT OutSize, INT OutSize,
LPSTR OutData) LPSTR OutData)
{ {
SURFACE *psurf = SURFACE_LockSurface(dc->w.hBitmap); SURFACE *psurf = SURFACE_LockSurface(dc->rosdc.hBitmap);
INT Result; INT Result;
/* FIXME - Handle psurf == NULL !!!!!! */ /* FIXME - Handle psurf == NULL !!!!!! */
if ( NULL == ((GDIDEVICE *)dc->pPDev)->DriverFunctions.Escape ) if ( NULL == ((GDIDEVICE *)dc->ppdev)->DriverFunctions.Escape )
{ {
Result = IntEngExtEscape( Result = IntEngExtEscape(
&psurf->SurfObj, &psurf->SurfObj,
@ -131,7 +131,7 @@ IntGdiExtEscape(
} }
else else
{ {
Result = ((GDIDEVICE *)dc->pPDev)->DriverFunctions.Escape( Result = ((GDIDEVICE *)dc->ppdev)->DriverFunctions.Escape(
&psurf->SurfObj, &psurf->SurfObj,
Escape, Escape,
InSize, InSize,
@ -173,7 +173,7 @@ NtGdiExtEscape(
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
return -1; return -1;
} }
if ( pDC->DC_Type == DC_TYPE_INFO) if ( pDC->dctype == DC_TYPE_INFO)
{ {
DC_UnlockDc(pDC); DC_UnlockDc(pDC);
return 0; return 0;

View file

@ -2091,7 +2091,7 @@ IntGdiReleaseRaoRgn(PDC pDC)
{ {
INT Index = GDI_HANDLE_GET_INDEX(pDC->BaseObject.hHmgr); INT Index = GDI_HANDLE_GET_INDEX(pDC->BaseObject.hHmgr);
PGDI_TABLE_ENTRY Entry = &GdiHandleTable->Entries[Index]; PGDI_TABLE_ENTRY Entry = &GdiHandleTable->Entries[Index];
pDC->DC_Flags |= DC_FLAG_DIRTY_RAO; pDC->fs |= DC_FLAG_DIRTY_RAO;
Entry->Flags |= GDI_ENTRY_VALIDATE_VIS; Entry->Flags |= GDI_ENTRY_VALIDATE_VIS;
RECTL_vSetEmptyRect(&pDC->erclClip); RECTL_vSetEmptyRect(&pDC->erclClip);
} }
@ -2102,7 +2102,7 @@ IntGdiReleaseVisRgn(PDC pDC)
{ {
INT Index = GDI_HANDLE_GET_INDEX(pDC->BaseObject.hHmgr); INT Index = GDI_HANDLE_GET_INDEX(pDC->BaseObject.hHmgr);
PGDI_TABLE_ENTRY Entry = &GdiHandleTable->Entries[Index]; PGDI_TABLE_ENTRY Entry = &GdiHandleTable->Entries[Index];
pDC->DC_Flags |= DC_FLAG_DIRTY_RAO; pDC->fs |= DC_FLAG_DIRTY_RAO;
Entry->Flags |= GDI_ENTRY_VALIDATE_VIS; Entry->Flags |= GDI_ENTRY_VALIDATE_VIS;
RECTL_vSetEmptyRect(&pDC->erclClip); RECTL_vSetEmptyRect(&pDC->erclClip);
REGION_Delete(pDC->prgnVis); REGION_Delete(pDC->prgnVis);
@ -2707,7 +2707,7 @@ NtGdiGetRandomRgn(
switch (iCode) switch (iCode)
{ {
case CLIPRGN: case CLIPRGN:
hSrc = pDC->w.hClipRgn; hSrc = pDC->rosdc.hClipRgn;
// if (pDC->DcLevel.prgnClip) hSrc = ((PROSRGNDATA)pDC->DcLevel.prgnClip)->BaseObject.hHmgr; // if (pDC->DcLevel.prgnClip) hSrc = ((PROSRGNDATA)pDC->DcLevel.prgnClip)->BaseObject.hHmgr;
break; break;
case METARGN: case METARGN:
@ -2716,14 +2716,14 @@ NtGdiGetRandomRgn(
case APIRGN: case APIRGN:
DPRINT1("hMetaRgn not implemented\n"); DPRINT1("hMetaRgn not implemented\n");
//hSrc = dc->hMetaClipRgn; //hSrc = dc->hMetaClipRgn;
if (!hSrc) hSrc = pDC->w.hClipRgn; if (!hSrc) hSrc = pDC->rosdc.hClipRgn;
//if (!hSrc) rgn = dc->hMetaRgn; //if (!hSrc) rgn = dc->hMetaRgn;
// if (pDC->prgnAPI) hSrc = ((PROSRGNDATA)pDC->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.prgnClip) hSrc = ((PROSRGNDATA)pDC->DcLevel.prgnClip)->BaseObject.hHmgr;
// else if (pDC->DcLevel.prgnMeta) hSrc = ((PROSRGNDATA)pDC->DcLevel.prgnMeta)->BaseObject.hHmgr; // else if (pDC->DcLevel.prgnMeta) hSrc = ((PROSRGNDATA)pDC->DcLevel.prgnMeta)->BaseObject.hHmgr;
break; break;
case SYSRGN: case SYSRGN:
hSrc = pDC->w.hVisRgn; hSrc = pDC->rosdc.hVisRgn;
// if (pDC->prgnVis) hSrc = ((PROSRGNDATA)pDC->prgnVis)->BaseObject.hHmgr; // if (pDC->prgnVis) hSrc = ((PROSRGNDATA)pDC->prgnVis)->BaseObject.hHmgr;
break; break;
default: default:
@ -2925,7 +2925,7 @@ IntGdiPaintRgn(
return FALSE; return FALSE;
} }
NtGdiCombineRgn(tmpVisRgn, tmpVisRgn, dc->w.hGCClipRgn, RGN_AND); NtGdiCombineRgn(tmpVisRgn, tmpVisRgn, dc->rosdc.hGCClipRgn, RGN_AND);
visrgn = REGION_LockRgn(tmpVisRgn); visrgn = REGION_LockRgn(tmpVisRgn);
if (visrgn == NULL) if (visrgn == NULL)
@ -2940,11 +2940,11 @@ IntGdiPaintRgn(
ASSERT(ClipRegion); ASSERT(ClipRegion);
pBrush = BRUSHOBJ_LockBrush(Dc_Attr->hbrush); pBrush = BRUSHOBJ_LockBrush(Dc_Attr->hbrush);
ASSERT(pBrush); ASSERT(pBrush);
IntGdiInitBrushInstance(&BrushInst, pBrush, dc->XlateBrush); IntGdiInitBrushInstance(&BrushInst, pBrush, dc->rosdc.XlateBrush);
BrushOrigin.x = Dc_Attr->ptlBrushOrigin.x; BrushOrigin.x = Dc_Attr->ptlBrushOrigin.x;
BrushOrigin.y = Dc_Attr->ptlBrushOrigin.y; BrushOrigin.y = Dc_Attr->ptlBrushOrigin.y;
psurf = SURFACE_LockSurface(dc->w.hBitmap); psurf = SURFACE_LockSurface(dc->rosdc.hBitmap);
/* FIXME - Handle psurf == NULL !!!! */ /* FIXME - Handle psurf == NULL !!!! */
bRet = IntEngPaint(&psurf->SurfObj, bRet = IntEngPaint(&psurf->SurfObj,