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

View file

@ -59,7 +59,7 @@ intEnableReactXDriver(HDC hdc)
return FALSE;
}
pDev = (PGDIDEVICE)pDC->pPDev;
pDev = (PGDIDEVICE)pDC->ppdev;
/* test see if drv got a dx interface or not */
if ( ( pDev->DriverFunctions.DisableDirectDraw == NULL) ||
@ -86,7 +86,7 @@ intEnableReactXDriver(HDC hdc)
{
DPRINT1(" call to pfnDdEnableDirectDraw \n ");
/* 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_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:
* 1. If the DC is full screen
* 2. Get Complexity of visible region
* 3. Get Driver hdev, which is pPDev
* 3. Get Driver hdev, which is ppdev
*
* @param HDC hdc
* The DC handle
@ -438,7 +438,7 @@ DxEngSetHdevData(HDEV hDev,
* @param DWORD type
* value 1 = Is DC fullscreen
* 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 one of the type values
@ -462,7 +462,7 @@ DxEngGetDCState(HDC hDC,
switch (type)
{
case 1:
retVal = (DWORD_PTR) pDC->DC_Flags & DC_FLAG_FULLSCREEN;
retVal = (DWORD_PTR) pDC->fs & DC_FLAG_FULLSCREEN;
break;
case 2:
UNIMPLEMENTED;
@ -470,7 +470,7 @@ DxEngGetDCState(HDC hDC,
case 3:
{
/* Return the HDEV of this DC. */
retVal = (DWORD_PTR) pDC->pPDev;
retVal = (DWORD_PTR) pDC->ppdev;
break;
}
default:
@ -527,14 +527,14 @@ BOOLEAN
APIENTRY
DxEngLockHdev(HDEV hDev)
{
PGDIDEVICE pPDev = (PGDIDEVICE)hDev;
PGDIDEVICE ppdev = (PGDIDEVICE)hDev;
PERESOURCE Resource;
DPRINT1("ReactX Calling : DxEngLockHdev \n");
DPRINT1("hDev : 0x%08lx\n",hDev);
Resource = pPDev->hsemDevLock;
Resource = ppdev->hsemDevLock;
if (Resource)
{
@ -564,8 +564,8 @@ BOOLEAN
APIENTRY
DxEngUnlockHdev(HDEV hDev)
{
PGDIDEVICE pPDev = (PGDIDEVICE)hDev;
PERESOURCE Resource = pPDev->hsemDevLock;
PGDIDEVICE ppdev = (PGDIDEVICE)hDev;
PERESOURCE Resource = ppdev->hsemDevLock;
DPRINT1("ReactX Calling : DxEngUnlockHdev \n");
@ -759,9 +759,9 @@ DxEngSetDCState(HDC hDC, DWORD SetType, DWORD Set)
if (SetType == 1)
{
if ( Set )
pDC->DC_Flags |= DC_FLAG_FULLSCREEN;
pDC->fs |= DC_FLAG_FULLSCREEN;
else
pDC->DC_Flags &= ~DC_FLAG_FULLSCREEN;
pDC->fs &= ~DC_FLAG_FULLSCREEN;
Ret = TRUE;
}
DC_UnlockDc(pDC);

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1180,7 +1180,7 @@ UserScrollDC(HDC hDC, INT dx, INT dy, const RECTL *prcScroll,
{
return FALSE;
}
hrgnVisible = pDC->w.hVisRgn; // pDC->w.hGCClipRgn?
hrgnVisible = pDC->rosdc.hVisRgn; // pDC->w.hGCClipRgn?
DC_UnlockDc(pDC);
/* 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.y = CurrentWindow->Wnd->ClientRect.top;
}
if (NULL != dc->w.hClipRgn)
if (NULL != dc->rosdc.hClipRgn)
{
int FASTCALL CLIPPING_UpdateGCRegion(DC* Dc);
NtGdiOffsetRgn(dc->w.hClipRgn, DeltaX, DeltaY);
NtGdiOffsetRgn(dc->rosdc.hClipRgn, DeltaX, DeltaY);
CLIPPING_UpdateGCRegion(dc);
}
if (NULL != pDCE->hClipRgn)

View file

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

View file

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

View file

@ -142,7 +142,7 @@ IntCreateCompatibleBitmap(
}
else
{
if (Dc->DC_Type != DC_TYPE_MEMORY)
if (Dc->dctype != DC_TYPE_MEMORY)
{
Bmp = IntGdiCreateBitmap(abs(Width),
abs(Height),
@ -154,7 +154,7 @@ IntCreateCompatibleBitmap(
{
DIBSECTION dibs;
INT Count;
PSURFACE psurf = SURFACE_LockSurface(Dc->w.hBitmap);
PSURFACE psurf = SURFACE_LockSurface(Dc->rosdc.hBitmap);
Count = BITMAP_GetObject(psurf, sizeof(dibs), &dibs);
if (Count)
@ -281,7 +281,7 @@ NtGdiCreateCompatibleBitmap(
Dc = DC_LockDc(hDC);
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)
{
@ -350,7 +350,7 @@ NtGdiGetPixel(HDC hDC, INT XPos, INT YPos)
return Result;
}
if (dc->DC_Type == DC_TYPE_INFO)
if (dc->dctype == DC_TYPE_INFO)
{
DC_UnlockDc(dc);
return Result;
@ -358,10 +358,10 @@ NtGdiGetPixel(HDC hDC, INT XPos, INT YPos)
XPos += dc->ptlDCOrig.x;
YPos += dc->ptlDCOrig.y;
if (RECTL_bPointInRect(&dc->CombinedClip->rclBounds, XPos, YPos))
if (RECTL_bPointInRect(&dc->rosdc.CombinedClip->rclBounds, XPos, YPos))
{
bInRect = TRUE;
psurf = SURFACE_LockSurface(dc->w.hBitmap);
psurf = SURFACE_LockSurface(dc->rosdc.hBitmap);
pso = &psurf->SurfObj;
if (psurf)
{
@ -923,7 +923,7 @@ NtGdiSelectBitmap(
if (!pDc_Attr) pDc_Attr = &pDC->Dc_Attr;
/* must be memory dc to select bitmap */
if (pDC->DC_Type != DC_TYPE_MEMORY)
if (pDC->dctype != DC_TYPE_MEMORY)
{
DC_UnlockDc(pDC);
return NULL;
@ -935,10 +935,10 @@ NtGdiSelectBitmap(
DC_UnlockDc(pDC);
return NULL;
}
hOrgBmp = pDC->w.hBitmap;
hOrgBmp = pDC->rosdc.hBitmap;
/* 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.
pDC->DcLevel.pSurface = psurfBmp;
@ -948,12 +948,12 @@ NtGdiSelectBitmap(
// [fixme: only create if the selected palette is null]
if (psurfBmp->hSecure)
{
// pDC->w.bitsPerPixel = psurfBmp->dib->dsBmih.biBitCount; ???
pDC->w.bitsPerPixel = BitsPerFormat(psurfBmp->SurfObj.iBitmapFormat);
// pDC->rosdcbitsPerPixel = psurfBmp->dib->dsBmih.biBitCount; ???
pDC->rosdc.bitsPerPixel = BitsPerFormat(psurfBmp->SurfObj.iBitmapFormat);
}
else
{
pDC->w.bitsPerPixel = BitsPerFormat(psurfBmp->SurfObj.iBitmapFormat);
pDC->rosdc.bitsPerPixel = BitsPerFormat(psurfBmp->SurfObj.iBitmapFormat);
}
hVisRgn = NtGdiCreateRectRgn(0,
@ -966,22 +966,22 @@ NtGdiSelectBitmap(
pBrush = BRUSHOBJ_LockBrush(pDc_Attr->hbrush);
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);
}
pBrush = PENOBJ_LockPen(pDc_Attr->hpen);
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);
}

View file

@ -122,7 +122,7 @@ IntGdiCreateBrushXlate(PDC Dc, GDIBRUSHOBJ *BrushObj, BOOLEAN *Failed)
SURFACE * psurf;
HPALETTE hPalette = NULL;
psurf = SURFACE_LockSurface(Dc->w.hBitmap);
psurf = SURFACE_LockSurface(Dc->rosdc.hBitmap);
if (psurf)
{
hPalette = psurf->hDIBPalette;
@ -152,7 +152,7 @@ IntGdiCreateBrushXlate(PDC Dc, GDIBRUSHOBJ *BrushObj, BOOLEAN *Failed)
PDC_ATTR Dc_Attr = Dc->pDc_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);
}
else if (BrushObj->flAttrs & GDIBRUSH_IS_DIB)
@ -543,11 +543,11 @@ IntGdiSelectBrush(
hOrgBrush = pDc_Attr->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;

View file

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

View file

@ -449,7 +449,7 @@ IntGetSystemPaletteEntries(HDC hDC,
}
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
// 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.
if(dc->DC_Type == DC_TYPE_MEMORY)
if(dc->dctype == DC_TYPE_MEMORY)
{
// Memory managed DC
DPRINT1("RealizePalette unimplemented for memory managed DCs\n");
@ -537,7 +537,7 @@ UINT FASTCALL IntGdiRealizePalette(HDC hDC)
PALETTE_UnlockPalette(palGDI);
// Create the XLATEOBJ for device managed DCs
if(dc->DC_Type != DC_TYPE_MEMORY)
if(dc->dctype != DC_TYPE_MEMORY)
{
if (palGDI->logicalToSystem != NULL)
{

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -121,7 +121,7 @@ IntGdiLineTo(DC *dc,
if (Dc_Attr->ulDirty_ & DC_PEN_DIRTY)
IntGdiSelectPen(dc,Dc_Attr->hpen);
psurf = SURFACE_LockSurface( dc->w.hBitmap );
psurf = SURFACE_LockSurface( dc->rosdc.hBitmap );
if (NULL == psurf)
{
SetLastWin32Error(ERROR_INVALID_HANDLE);
@ -157,9 +157,9 @@ IntGdiLineTo(DC *dc,
if (!(PenBrushObj->flAttrs & GDIBRUSH_IS_NULL))
{
IntGdiInitBrushInstance(&PenBrushInst, PenBrushObj, dc->XlatePen);
IntGdiInitBrushInstance(&PenBrushInst, PenBrushObj, dc->rosdc.XlatePen);
Ret = IntEngLineTo(&psurf->SurfObj,
dc->CombinedClip,
dc->rosdc.CombinedClip,
&PenBrushInst.BrushObject,
Points[0].x, Points[0].y,
Points[1].x, Points[1].y,
@ -283,7 +283,7 @@ IntGdiPolyline(DC *dc,
Points = EngAllocMem(0, Count * sizeof(POINT), TAG_COORD);
if (Points != NULL)
{
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! */
ASSERT(psurf);
@ -291,16 +291,16 @@ IntGdiPolyline(DC *dc,
RtlCopyMemory(Points, pt, Count * sizeof(POINT));
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++)
{
Points[i].x += dc->ptlDCOrig.x;
Points[i].y += dc->ptlDCOrig.y;
}
IntGdiInitBrushInstance(&PenBrushInst, PenBrushObj, dc->XlatePen);
IntGdiInitBrushInstance(&PenBrushInst, PenBrushObj, dc->rosdc.XlatePen);
Ret = IntEngPolyline(&psurf->SurfObj,
dc->CombinedClip,
dc->rosdc.CombinedClip,
&PenBrushInst.BrushObject,
Points,
Count,
@ -406,7 +406,7 @@ NtGdiLineTo(HDC hDC,
SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE;
}
if (dc->DC_Type == DC_TYPE_INFO)
if (dc->dctype == DC_TYPE_INFO)
{
DC_UnlockDc(dc);
/* Yes, Windows really returns TRUE in this case */

View file

@ -300,13 +300,13 @@ IntGdiSelectPen(
hOrgPen = pDc_Attr->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->XlatePen = XlateObj;
pDC->rosdc.XlatePen = XlateObj;
return hOrgPen;
}

View file

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

View file

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

View file

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