Update PDEVOBJ and GRAPHICS_DEVICE fields

svn path=/trunk/; revision=42735
This commit is contained in:
Timo Kreuzer 2009-08-16 12:57:41 +00:00
parent c13c6c8daa
commit 074f29786e
20 changed files with 187 additions and 173 deletions

View file

@ -59,7 +59,7 @@ EngCreateDriverObj(
pedo->drvobj.pvObj = pvObj;
pedo->drvobj.pFreeProc = pFreeObjProc;
pedo->drvobj.hdev = hdev;
pedo->drvobj.dhpdev = ppdev->hPDev;
pedo->drvobj.dhpdev = ppdev->dhpdev;
/* Unlock the object */
DRIVEROBJ_UnlockObject(pedo);

View file

@ -39,7 +39,7 @@ EBRUSHOBJ_vInit(EBRUSHOBJ *pebo, PBRUSH pbrush, PDC pdc)
if (pebo->psurfTrg)
hpal = pebo->psurfTrg->hDIBPalette;
if (!hpal) hpal = pPrimarySurface->DevInfo.hpalDefault;
if (!hpal) hpal = pPrimarySurface->devinfo.hpalDefault;
pebo->ppalSurf = PALETTE_ShareLockPalette(hpal);
if (!pebo->ppalSurf)
pebo->ppalSurf = &gpalRGB;

View file

@ -428,7 +428,7 @@ EngSetPointerShape(
if(pgp->psurfMask)
{
ppal = PALETTE_LockPalette(ppdev->DevInfo.hpalDefault);
ppal = PALETTE_LockPalette(ppdev->devinfo.hpalDefault);
EXLATEOBJ_vInitialize(&exlo,
&gpalMono,
ppal,

View file

@ -536,7 +536,7 @@ EngAssociateSurface(
/* Associate the hdev */
pso->hdev = hdev;
pso->dhpdev = ppdev->hPDev;
pso->dhpdev = ppdev->dhpdev;
/* Hook up specified functions */
psurf->flHooks = flHooks;
@ -578,7 +578,7 @@ EngModifySurface(
/* Associate the hdev */
pso->hdev = hdev;
pso->dhpdev = ppdev->hPDev;
pso->dhpdev = ppdev->dhpdev;
/* Hook up specified functions */
psurf->flHooks = flHooks;

View file

@ -621,14 +621,14 @@ EXLATEOBJ_vInitXlateFromDCs(
hpalSrc = psurfSrc->hDIBPalette;
if (!hpalSrc)
hpalSrc = pPrimarySurface->DevInfo.hpalDefault;
hpalSrc = pPrimarySurface->devinfo.hpalDefault;
ppalSrc = PALETTE_ShareLockPalette(hpalSrc);
if (!ppalSrc)
return;
hpalDst = psurfDst->hDIBPalette;
if (!hpalDst) hpalDst = pPrimarySurface->DevInfo.hpalDefault;
if (!hpalDst) hpalDst = pPrimarySurface->devinfo.hpalDefault;
ppalDst = PALETTE_ShareLockPalette(hpalDst);
if (!ppalDst)
@ -695,7 +695,7 @@ EXLATEOBJ_vInitBrushXlate(
EXLATEOBJ_vInitTrivial(pexlo);
hpalDst = psurfDst->hDIBPalette;
if (!hpalDst) hpalDst = pPrimarySurface->DevInfo.hpalDefault;
if (!hpalDst) hpalDst = pPrimarySurface->devinfo.hpalDefault;
ppalDst = PALETTE_ShareLockPalette(hpalDst);
if (!ppalDst)
{

View file

@ -39,10 +39,24 @@ typedef struct _GDIPOINTER /* should stay private to ENG? No, part of PDEVOBJ ak
typedef struct _GRAPHICS_DEVICE
{
CHAR szNtDeviceName[CCHDEVICENAME]; /* Yes char AscII */
CHAR szWinDeviceName[CCHDEVICENAME]; /* <- chk GetMonitorInfoW MxIxEX.szDevice */
struct _GRAPHICS_DEVICE * pNextGraphicsDevice;
DWORD StateFlags; /* See DISPLAY_DEVICE_* */
WCHAR szNtDeviceName[CCHDEVICENAME/2];
WCHAR szWinDeviceName[CCHDEVICENAME/2];
struct _GRAPHICS_DEVICE * pNextGraphicsDevice;
struct _GRAPHICS_DEVICE * pVgaDevice;
PDEVICE_OBJECT DeviceObject;
PVOID pDeviceHandle;
DWORD hkClassDriverConfig;
DWORD StateFlags; /* See DISPLAY_DEVICE_* */
ULONG cbdevmodeInfo;
PVOID devmodeInfo;
DWORD cbdevmodeInfo1;
PVOID devmodeInfo1;
LPWSTR pwszDeviceNames;
LPWSTR pwszDescription;
DWORD dwUnknown;
PVOID pUnknown;
PFILE_OBJECT FileObject;
DWORD ProtocolType;
} GRAPHICS_DEVICE, *PGRAPHICS_DEVICE;
typedef struct _PDEVOBJ
@ -55,7 +69,7 @@ typedef struct _PDEVOBJ
struct _PDEVOBJ * ppdevParent;
FLONG flFlags; // flags
// FLONG flAccelerated;
PERESOURCE hsemDevLock; /* Device lock. */
HSEMAPHORE hsemDevLock; /* Device lock. */
// HSEMAPHORE hsemPointer;
POINTL ptlPointer;
// SIZEL szlPointer;
@ -63,7 +77,7 @@ typedef struct _PDEVOBJ
// HFONT hlfntDefault;
// HFONT hlfntAnsiVariable;
// HFONT hlfntAnsiFixed;
HSURF FillPatterns[HS_DDI_MAX]; // ahsurf[HS_DDI_MAX];
HSURF ahsurf[HS_DDI_MAX];
// PUNICODE_STRING pusPrtDataFileName;
// PVOID pDevHTInfo;
// RFONT * prfntActive;
@ -85,14 +99,14 @@ typedef struct _PDEVOBJ
// PFN_DrvNotify pfnDrvNotify;
// ULONG TagSig;
// PLDEVOBJ pldev;
DHPDEV hPDev; /* dhpdev, DHPDEV for device. */
DHPDEV dhpdev; /* DHPDEV for device. */
PVOID ppalSurf; /* PEPALOBJ/PPALETTE for this device. */
DEVINFO DevInfo; // devinfo
GDIINFO GDIInfo; // gdiinfo
DEVINFO devinfo;
GDIINFO gdiinfo;
HSURF pSurface; /* SURFACE for this device., FIXME: PSURFACE */
// HANDLE hSpooler; /* Handle to spooler, if spooler dev driver. */
// PVOID pDesktopId;
PGRAPHICS_DEVICE pGraphicsDev; /* pGraphicsDevice */
PGRAPHICS_DEVICE pGraphicsDevice;
// POINTL ptlOrigion;
PVOID pdmwDev; /* Ptr->DEVMODEW.dmSize + dmDriverExtra == alloc size. */
// DWORD Unknown3;

View file

@ -265,7 +265,7 @@ DxEngSetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp, BOOL Test)
* DxEGShDevData_OpenRefs Retrieve the pdevOpenRefs counter
* DxEGShDevData_palette See if the device RC_PALETTE is set
* DxEGShDevData_ldev ATM we do not support the Loader Device driver structure
* DxEGShDevData_GDev Retrieve the device pGraphicsDev
* DxEGShDevData_GDev Retrieve the device pGraphicsDevice
* DxEGShDevData_clonedev Retrieve the device PDEV_CLONE_DEVICE flag is set or not
*
* @return
@ -302,15 +302,15 @@ DxEngGetHdevData(HDEV hDev,
break;
case DxEGShDevData_DitherFmt:
DPRINT1("requested DXEGSHDEVDATA DxEGShDevData_DitherFmt\n");
retVal = (DWORD_PTR) PDev->DevInfo.iDitherFormat;
retVal = (DWORD_PTR) PDev->devinfo.iDitherFormat;
break;
case DxEGShDevData_FxCaps:
DPRINT1("requested DXEGSHDEVDATA DxEGShDevData_FxCaps\n");
retVal = (DWORD_PTR) PDev->DevInfo.flGraphicsCaps;
retVal = (DWORD_PTR) PDev->devinfo.flGraphicsCaps;
break;
case DxEGShDevData_FxCaps2:
DPRINT1("requested DXEGSHDEVDATA DxEGShDevData_FxCaps2\n");
retVal = (DWORD_PTR) PDev->DevInfo.flGraphicsCaps2;
retVal = (DWORD_PTR) PDev->devinfo.flGraphicsCaps2;
break;
case DxEGShDevData_DrvFuncs:
DPRINT1("requested DXEGSHDEVDATA DxEGShDevData_DrvFuncs\n");
@ -318,7 +318,7 @@ DxEngGetHdevData(HDEV hDev,
break;
case DxEGShDevData_dhpdev:
DPRINT1("requested DXEGSHDEVDATA DxEGShDevData_dhpdev\n");
retVal = (DWORD_PTR) PDev->hPDev; // DHPDEV
retVal = (DWORD_PTR) PDev->dhpdev; // DHPDEV
break;
case DxEGShDevData_eddg:
DPRINT1("requested DXEGSHDEVDATA DxEGShDevData_eddg\n");
@ -354,7 +354,7 @@ DxEngGetHdevData(HDEV hDev,
break;
case DxEGShDevData_palette:
DPRINT1("requested DXEGSHDEVDATA DxEGShDevData_palette\n");
retVal = (DWORD_PTR) PDev->GDIInfo.flRaster & RC_PALETTE;
retVal = (DWORD_PTR) PDev->gdiinfo.flRaster & RC_PALETTE;
break;
case DxEGShDevData_ldev:
DPRINT1("DxEGShDevData_ldev not supported yet\n");
@ -363,7 +363,7 @@ DxEngGetHdevData(HDEV hDev,
break;
case DxEGShDevData_GDev:
DPRINT1("requested DXEGSHDEVDATA DxEGShDevData_GDev\n");
retVal = (DWORD_PTR) PDev->pGraphicsDev; // P"GRAPHICS_DEVICE"
retVal = (DWORD_PTR) PDev->pGraphicsDevice; // P"GRAPHICS_DEVICE"
break;
case DxEGShDevData_clonedev:
DPRINT1("requested DXEGSHDEVDATA DxEGShDevData_clonedev\n");

View file

@ -29,8 +29,8 @@ InitMetrics(VOID)
PSYSTEM_CURSORINFO CurInfo;
INT *piSysMet;
Width = pPrimarySurface->GDIInfo.ulHorzRes;
Height = pPrimarySurface->GDIInfo.ulVertRes;
Width = pPrimarySurface->gdiinfo.ulHorzRes;
Height = pPrimarySurface->gdiinfo.ulVertRes;
Status = IntValidateWindowStationHandle(PsGetCurrentProcess()->Win32WindowStation,
KernelMode,

View file

@ -334,8 +334,8 @@ IntGetMonitorsFromRect(OPTIONAL IN LPCRECTL pRect,
ExEnterCriticalRegionAndAcquireFastMutexUnsafe(&Monitor->Lock);
MonitorRect.left = 0; /* FIXME: get origin */
MonitorRect.top = 0; /* FIXME: get origin */
MonitorRect.right = MonitorRect.left + Monitor->GdiDevice->GDIInfo.ulHorzRes;
MonitorRect.bottom = MonitorRect.top + Monitor->GdiDevice->GDIInfo.ulVertRes;
MonitorRect.right = MonitorRect.left + Monitor->GdiDevice->gdiinfo.ulHorzRes;
MonitorRect.bottom = MonitorRect.top + Monitor->GdiDevice->gdiinfo.ulVertRes;
ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(&Monitor->Lock);
DPRINT("MonitorRect: left = %d, top = %d, right = %d, bottom = %d\n",
@ -667,8 +667,8 @@ NtUserGetMonitorInfo(
/* fill monitor info */
MonitorInfo.rcMonitor.left = 0; /* FIXME: get origin */
MonitorInfo.rcMonitor.top = 0; /* FIXME: get origin */
MonitorInfo.rcMonitor.right = MonitorInfo.rcMonitor.left + Monitor->GdiDevice->GDIInfo.ulHorzRes;
MonitorInfo.rcMonitor.bottom = MonitorInfo.rcMonitor.top + Monitor->GdiDevice->GDIInfo.ulVertRes;
MonitorInfo.rcMonitor.right = MonitorInfo.rcMonitor.left + Monitor->GdiDevice->gdiinfo.ulHorzRes;
MonitorInfo.rcMonitor.bottom = MonitorInfo.rcMonitor.top + Monitor->GdiDevice->gdiinfo.ulVertRes;
MonitorInfo.rcWork = MonitorInfo.rcMonitor; /* FIXME: use DEVMODE panning to calculate work area? */
MonitorInfo.dwFlags = 0;

View file

@ -377,10 +377,10 @@ NtGdiTransparentBlt(
}
DestPalette = BitmapDest->hDIBPalette;
if (!DestPalette) DestPalette = pPrimarySurface->DevInfo.hpalDefault;
if (!DestPalette) DestPalette = pPrimarySurface->devinfo.hpalDefault;
SourcePalette = BitmapSrc->hDIBPalette;
if (!SourcePalette) SourcePalette = pPrimarySurface->DevInfo.hpalDefault;
if (!SourcePalette) SourcePalette = pPrimarySurface->devinfo.hpalDefault;
if(!(PalSourceGDI = PALETTE_LockPalette(SourcePalette)))
{

View file

@ -278,7 +278,7 @@ NtGdiCreateCompatibleBitmap(
Dc = DC_LockDc(hDC);
DPRINT("NtGdiCreateCompatibleBitmap(%04x,%d,%d, bpp:%d) = \n",
hDC, Width, Height, Dc->ppdev->GDIInfo.cBitsPixel);
hDC, Width, Height, Dc->ppdev->gdiinfo.cBitsPixel);
if (NULL == Dc)
{
@ -364,7 +364,7 @@ NtGdiGetPixel(HDC hDC, INT XPos, INT YPos)
{
pso = &psurf->SurfObj;
hpal = psurf->hDIBPalette;
if (!hpal) hpal = pPrimarySurface->DevInfo.hpalDefault;
if (!hpal) hpal = pPrimarySurface->devinfo.hpalDefault;
ppal = PALETTE_ShareLockPalette(hpal);
if (psurf->SurfObj.iBitmapFormat == BMF_1BPP && !psurf->hSecure)

View file

@ -674,38 +674,38 @@ IntGdiSetMapMode(
/* Fall through */
case MM_LOMETRIC:
pdcattr->szlWindowExt.cx = dc->ppdev->GDIInfo.ulHorzSize * 10;
pdcattr->szlWindowExt.cy = dc->ppdev->GDIInfo.ulVertSize * 10;
pdcattr->szlViewportExt.cx = dc->ppdev->GDIInfo.ulHorzRes;
pdcattr->szlViewportExt.cy = -dc->ppdev->GDIInfo.ulVertRes;
pdcattr->szlWindowExt.cx = dc->ppdev->gdiinfo.ulHorzSize * 10;
pdcattr->szlWindowExt.cy = dc->ppdev->gdiinfo.ulVertSize * 10;
pdcattr->szlViewportExt.cx = dc->ppdev->gdiinfo.ulHorzRes;
pdcattr->szlViewportExt.cy = -dc->ppdev->gdiinfo.ulVertRes;
break;
case MM_HIMETRIC:
pdcattr->szlWindowExt.cx = dc->ppdev->GDIInfo.ulHorzSize * 100;
pdcattr->szlWindowExt.cy = dc->ppdev->GDIInfo.ulVertSize * 100;
pdcattr->szlViewportExt.cx = dc->ppdev->GDIInfo.ulHorzRes;
pdcattr->szlViewportExt.cy = -dc->ppdev->GDIInfo.ulVertRes;
pdcattr->szlWindowExt.cx = dc->ppdev->gdiinfo.ulHorzSize * 100;
pdcattr->szlWindowExt.cy = dc->ppdev->gdiinfo.ulVertSize * 100;
pdcattr->szlViewportExt.cx = dc->ppdev->gdiinfo.ulHorzRes;
pdcattr->szlViewportExt.cy = -dc->ppdev->gdiinfo.ulVertRes;
break;
case MM_LOENGLISH:
pdcattr->szlWindowExt.cx = MulDiv(1000, dc->ppdev->GDIInfo.ulHorzSize, 254);
pdcattr->szlWindowExt.cy = MulDiv(1000, dc->ppdev->GDIInfo.ulVertSize, 254);
pdcattr->szlViewportExt.cx = dc->ppdev->GDIInfo.ulHorzRes;
pdcattr->szlViewportExt.cy = -dc->ppdev->GDIInfo.ulVertRes;
pdcattr->szlWindowExt.cx = MulDiv(1000, dc->ppdev->gdiinfo.ulHorzSize, 254);
pdcattr->szlWindowExt.cy = MulDiv(1000, dc->ppdev->gdiinfo.ulVertSize, 254);
pdcattr->szlViewportExt.cx = dc->ppdev->gdiinfo.ulHorzRes;
pdcattr->szlViewportExt.cy = -dc->ppdev->gdiinfo.ulVertRes;
break;
case MM_HIENGLISH:
pdcattr->szlWindowExt.cx = MulDiv(10000, dc->ppdev->GDIInfo.ulHorzSize, 254);
pdcattr->szlWindowExt.cy = MulDiv(10000, dc->ppdev->GDIInfo.ulVertSize, 254);
pdcattr->szlViewportExt.cx = dc->ppdev->GDIInfo.ulHorzRes;
pdcattr->szlViewportExt.cy = -dc->ppdev->GDIInfo.ulVertRes;
pdcattr->szlWindowExt.cx = MulDiv(10000, dc->ppdev->gdiinfo.ulHorzSize, 254);
pdcattr->szlWindowExt.cy = MulDiv(10000, dc->ppdev->gdiinfo.ulVertSize, 254);
pdcattr->szlViewportExt.cx = dc->ppdev->gdiinfo.ulHorzRes;
pdcattr->szlViewportExt.cy = -dc->ppdev->gdiinfo.ulVertRes;
break;
case MM_TWIPS:
pdcattr->szlWindowExt.cx = MulDiv(14400, dc->ppdev->GDIInfo.ulHorzSize, 254);
pdcattr->szlWindowExt.cy = MulDiv(14400, dc->ppdev->GDIInfo.ulVertSize, 254);
pdcattr->szlViewportExt.cx = dc->ppdev->GDIInfo.ulHorzRes;
pdcattr->szlViewportExt.cy = -dc->ppdev->GDIInfo.ulVertRes;
pdcattr->szlWindowExt.cx = MulDiv(14400, dc->ppdev->gdiinfo.ulHorzSize, 254);
pdcattr->szlWindowExt.cy = MulDiv(14400, dc->ppdev->gdiinfo.ulVertSize, 254);
pdcattr->szlViewportExt.cx = dc->ppdev->gdiinfo.ulHorzRes;
pdcattr->szlViewportExt.cy = -dc->ppdev->gdiinfo.ulVertRes;
break;
case MM_ANISOTROPIC:
@ -1151,8 +1151,8 @@ DC_vGetAspectRatioFilter(PDC pDC, LPSIZE AspectRatio)
{
// "This specifies that Windows should only match fonts that have the
// same aspect ratio as the display.", Programming Windows, Fifth Ed.
AspectRatio->cx = pDC->ppdev->GDIInfo.ulLogPixelsX;
AspectRatio->cy = pDC->ppdev->GDIInfo.ulLogPixelsY;
AspectRatio->cx = pDC->ppdev->gdiinfo.ulLogPixelsX;
AspectRatio->cy = pDC->ppdev->gdiinfo.ulLogPixelsY;
}
else
{

View file

@ -296,33 +296,33 @@ IntGdiCreateDC(
pdc->dctype = DC_TYPE_DIRECT;
pdc->dhpdev = PrimarySurface.hPDev;
pdc->dhpdev = PrimarySurface.dhpdev;
if (pUMdhpdev) pUMdhpdev = pdc->dhpdev; // set DHPDEV for device.
pdc->ppdev = (PVOID)&PrimarySurface;
// ATM we only have one display.
pdcattr->ulDirty_ |= DC_PRIMARY_DISPLAY;
pdc->rosdc.bitsPerPixel = pdc->ppdev->GDIInfo.cBitsPixel *
pdc->ppdev->GDIInfo.cPlanes;
pdc->rosdc.bitsPerPixel = pdc->ppdev->gdiinfo.cBitsPixel *
pdc->ppdev->gdiinfo.cPlanes;
DPRINT("Bits per pel: %u\n", pdc->rosdc.bitsPerPixel);
pdc->flGraphicsCaps = PrimarySurface.DevInfo.flGraphicsCaps;
pdc->flGraphicsCaps2 = PrimarySurface.DevInfo.flGraphicsCaps2;
pdc->flGraphicsCaps = PrimarySurface.devinfo.flGraphicsCaps;
pdc->flGraphicsCaps2 = PrimarySurface.devinfo.flGraphicsCaps2;
pdc->dclevel.hpal = NtGdiGetStockObject(DEFAULT_PALETTE);
pdcattr->jROP2 = R2_COPYPEN;
pdc->erclWindow.top = pdc->erclWindow.left = 0;
pdc->erclWindow.right = pdc->ppdev->GDIInfo.ulHorzRes;
pdc->erclWindow.bottom = pdc->ppdev->GDIInfo.ulVertRes;
pdc->erclWindow.right = pdc->ppdev->gdiinfo.ulHorzRes;
pdc->erclWindow.bottom = pdc->ppdev->gdiinfo.ulVertRes;
pdc->dclevel.flPath &= ~DCPATH_CLOCKWISE; // Default is CCW.
pdcattr->iCS_CP = ftGdiGetTextCharsetInfo(pdc,NULL,0);
hVisRgn = NtGdiCreateRectRgn(0, 0, pdc->ppdev->GDIInfo.ulHorzRes,
pdc->ppdev->GDIInfo.ulVertRes);
hVisRgn = NtGdiCreateRectRgn(0, 0, pdc->ppdev->gdiinfo.ulHorzRes,
pdc->ppdev->gdiinfo.ulVertRes);
if (!CreateAsIC)
{

View file

@ -320,19 +320,19 @@ IntPrepareDriver()
PrimarySurface.DMW.dmSize = sizeof (PrimarySurface.DMW);
if (SetupDevMode(&PrimarySurface.DMW, DisplayNumber))
{
PrimarySurface.hPDev = PrimarySurface.DriverFunctions.EnablePDEV(
PrimarySurface.dhpdev = PrimarySurface.DriverFunctions.EnablePDEV(
&PrimarySurface.DMW,
L"",
HS_DDI_MAX,
PrimarySurface.FillPatterns,
sizeof(PrimarySurface.GDIInfo),
&PrimarySurface.GDIInfo,
sizeof(PrimarySurface.DevInfo),
&PrimarySurface.DevInfo,
PrimarySurface.ahsurf,
sizeof(PrimarySurface.gdiinfo),
&PrimarySurface.gdiinfo,
sizeof(PrimarySurface.devinfo),
&PrimarySurface.devinfo,
NULL,
L"",
(HANDLE) (PrimarySurface.VideoFileObject->DeviceObject));
DoDefault = (NULL == PrimarySurface.hPDev);
DoDefault = (NULL == PrimarySurface.dhpdev);
if (DoDefault)
{
DPRINT1("DrvEnablePDev with registry parameters failed\n");
@ -347,20 +347,20 @@ IntPrepareDriver()
{
RtlZeroMemory(&(PrimarySurface.DMW), sizeof(DEVMODEW));
PrimarySurface.DMW.dmSize = sizeof (PrimarySurface.DMW);
PrimarySurface.hPDev = PrimarySurface.DriverFunctions.EnablePDEV(
PrimarySurface.dhpdev = PrimarySurface.DriverFunctions.EnablePDEV(
&PrimarySurface.DMW,
L"",
HS_DDI_MAX,
PrimarySurface.FillPatterns,
sizeof(PrimarySurface.GDIInfo),
&PrimarySurface.GDIInfo,
sizeof(PrimarySurface.DevInfo),
&PrimarySurface.DevInfo,
PrimarySurface.ahsurf,
sizeof(PrimarySurface.gdiinfo),
&PrimarySurface.gdiinfo,
sizeof(PrimarySurface.devinfo),
&PrimarySurface.devinfo,
NULL,
L"",
(HANDLE) (PrimarySurface.VideoFileObject->DeviceObject));
if (NULL == PrimarySurface.hPDev)
if (NULL == PrimarySurface.dhpdev)
{
ObDereferenceObject(PrimarySurface.VideoFileObject);
DPRINT1("DrvEnablePDEV with default parameters failed\n");
@ -369,10 +369,10 @@ IntPrepareDriver()
}
// Update the primary surface with what we really got
PrimarySurface.DMW.dmPelsWidth = PrimarySurface.GDIInfo.ulHorzRes;
PrimarySurface.DMW.dmPelsHeight = PrimarySurface.GDIInfo.ulVertRes;
PrimarySurface.DMW.dmBitsPerPel = PrimarySurface.GDIInfo.cBitsPixel;
PrimarySurface.DMW.dmDisplayFrequency = PrimarySurface.GDIInfo.ulVRefresh;
PrimarySurface.DMW.dmPelsWidth = PrimarySurface.gdiinfo.ulHorzRes;
PrimarySurface.DMW.dmPelsHeight = PrimarySurface.gdiinfo.ulVertRes;
PrimarySurface.DMW.dmBitsPerPel = PrimarySurface.gdiinfo.cBitsPixel;
PrimarySurface.DMW.dmDisplayFrequency = PrimarySurface.gdiinfo.ulVRefresh;
}
if (!PrimarySurface.DMW.dmDriverExtra)
@ -389,15 +389,15 @@ IntPrepareDriver()
DPRINT1("**** DMW extra = %u bytes. Please report to ros-dev@reactos.org ****\n", PrimarySurface.DMW.dmDriverExtra);
}
if (0 == PrimarySurface.GDIInfo.ulLogPixelsX)
if (0 == PrimarySurface.gdiinfo.ulLogPixelsX)
{
DPRINT("Adjusting GDIInfo.ulLogPixelsX\n");
PrimarySurface.GDIInfo.ulLogPixelsX = 96;
DPRINT("Adjusting gdiinfo.ulLogPixelsX\n");
PrimarySurface.gdiinfo.ulLogPixelsX = 96;
}
if (0 == PrimarySurface.GDIInfo.ulLogPixelsY)
if (0 == PrimarySurface.gdiinfo.ulLogPixelsY)
{
DPRINT("Adjusting GDIInfo.ulLogPixelsY\n");
PrimarySurface.GDIInfo.ulLogPixelsY = 96;
DPRINT("Adjusting gdiinfo.ulLogPixelsY\n");
PrimarySurface.gdiinfo.ulLogPixelsY = 96;
}
PrimarySurface.Pointer.Exclude.right = -1;
@ -406,7 +406,7 @@ IntPrepareDriver()
/* Complete initialization of the physical device */
PrimarySurface.DriverFunctions.CompletePDEV(
PrimarySurface.hPDev,
PrimarySurface.dhpdev,
(HDEV)&PrimarySurface);
DPRINT("calling DRIVER_ReferenceDriver\n");
@ -421,7 +421,7 @@ IntPrepareDriver()
PrimarySurface.pvGammaRamp = NULL;
PrimarySurface.ppdevNext = NULL; // Fixme! We need to support more than display drvs.
PrimarySurface.ppdevParent = NULL; // Always NULL if primary.
PrimarySurface.pGraphicsDev = NULL; // Fixme!
PrimarySurface.pGraphicsDevice = NULL; // Fixme!
PrimarySurface.pEDDgpl = ExAllocatePoolWithTag(PagedPool, sizeof(EDD_DIRECTDRAW_GLOBAL), TAG_EDDGBL);
if (PrimarySurface.pEDDgpl)
{
@ -519,17 +519,17 @@ IntCreatePrimarySurface()
DPRINT("calling EnableSurface\n");
/* Enable the drawing surface */
PrimarySurface.pSurface =
PrimarySurface.DriverFunctions.EnableSurface(PrimarySurface.hPDev);
PrimarySurface.DriverFunctions.EnableSurface(PrimarySurface.dhpdev);
if (NULL == PrimarySurface.pSurface)
{
/* PrimarySurface.DriverFunctions.AssertMode(PrimarySurface.hPDev, FALSE);*/
PrimarySurface.DriverFunctions.DisablePDEV(PrimarySurface.hPDev);
/* PrimarySurface.DriverFunctions.AssertMode(PrimarySurface.dhpdev, FALSE);*/
PrimarySurface.DriverFunctions.DisablePDEV(PrimarySurface.dhpdev);
ObDereferenceObject(PrimarySurface.VideoFileObject);
DPRINT1("DrvEnableSurface failed\n");
return FALSE;
}
PrimarySurface.DriverFunctions.AssertMode(PrimarySurface.hPDev, TRUE);
PrimarySurface.DriverFunctions.AssertMode(PrimarySurface.dhpdev, TRUE);
calledFromUser = UserIsEntered(); //fixme: possibly upgrade a shared lock
if (!calledFromUser)
@ -541,7 +541,7 @@ IntCreatePrimarySurface()
IntAttachMonitor(&PrimarySurface, PrimarySurface.DisplayNumber);
SurfObj = EngLockSurface(PrimarySurface.pSurface);
SurfObj->dhpdev = PrimarySurface.hPDev;
SurfObj->dhpdev = PrimarySurface.dhpdev;
SurfSize = SurfObj->sizlBitmap;
SurfaceRect.left = SurfaceRect.top = 0;
SurfaceRect.right = SurfObj->sizlBitmap.cx;
@ -599,9 +599,9 @@ IntDestroyPrimarySurface()
*/
DPRINT("Reseting display\n" );
PrimarySurface.DriverFunctions.AssertMode(PrimarySurface.hPDev, FALSE);
PrimarySurface.DriverFunctions.DisableSurface(PrimarySurface.hPDev);
PrimarySurface.DriverFunctions.DisablePDEV(PrimarySurface.hPDev);
PrimarySurface.DriverFunctions.AssertMode(PrimarySurface.dhpdev, FALSE);
PrimarySurface.DriverFunctions.DisableSurface(PrimarySurface.dhpdev);
PrimarySurface.DriverFunctions.DisablePDEV(PrimarySurface.dhpdev);
PrimarySurface.PreparedDriver = FALSE;
KeSetEvent(&VideoDriverNeedsPreparation, 1, FALSE);
KeResetEvent(&VideoDriverPrepared);
@ -619,15 +619,15 @@ IntcFonts(PPDEVOBJ pDevObj)
// Msdn DrvQueryFont:
// If the number of fonts in DEVINFO is -1 and iFace is zero, the driver
// should return the number of fonts it supports.
if ( pDevObj->DevInfo.cFonts == -1)
if ( pDevObj->devinfo.cFonts == -1)
{
if (pDevObj->DriverFunctions.QueryFont)
pDevObj->DevInfo.cFonts =
(ULONG)pDevObj->DriverFunctions.QueryFont(pDevObj->hPDev, 0, 0, &Junk);
pDevObj->devinfo.cFonts =
(ULONG)pDevObj->DriverFunctions.QueryFont(pDevObj->dhpdev, 0, 0, &Junk);
else
pDevObj->DevInfo.cFonts = 0;
pDevObj->devinfo.cFonts = 0;
}
return pDevObj->DevInfo.cFonts;
return pDevObj->devinfo.cFonts;
}
//
@ -704,13 +704,13 @@ IntGetColorManagementCaps(PPDEVOBJ pDevObj)
if ( pDevObj->flFlags & PDEV_DISPLAY)
{
if (pDevObj->DevInfo.iDitherFormat == BMF_8BPP ||
pDevObj->DevInfo.flGraphicsCaps2 & GCAPS2_CHANGEGAMMARAMP)
if (pDevObj->devinfo.iDitherFormat == BMF_8BPP ||
pDevObj->devinfo.flGraphicsCaps2 & GCAPS2_CHANGEGAMMARAMP)
ret = CM_GAMMA_RAMP;
}
if (pDevObj->DevInfo.flGraphicsCaps & GCAPS_CMYKCOLOR)
if (pDevObj->devinfo.flGraphicsCaps & GCAPS_CMYKCOLOR)
ret |= CM_CMYK_COLOR;
if (pDevObj->DevInfo.flGraphicsCaps & GCAPS_ICM)
if (pDevObj->devinfo.flGraphicsCaps & GCAPS_ICM)
ret |= CM_DEVICE_ICM;
return ret;
}
@ -724,50 +724,50 @@ IntGdiGetDeviceCaps(PDC dc, INT Index)
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->pGraphicsDevice &&
(((PGRAPHICS_DEVICE)ppdev->pGraphicsDevice)->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:
@ -775,7 +775,7 @@ IntGdiGetDeviceCaps(PDC dc, INT Index)
break;
case NUMPENS:
ret = ppdev->GDIInfo.ulNumColors;
ret = ppdev->gdiinfo.ulNumColors;
if ( ret != -1 ) ret *= 5;
break;
@ -784,19 +784,19 @@ IntGdiGetDeviceCaps(PDC dc, INT Index)
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:
@ -804,7 +804,7 @@ IntGdiGetDeviceCaps(PDC dc, INT Index)
break;
case SIZEPALETTE:
ret = ppdev->GDIInfo.ulNumPalReg;
ret = ppdev->gdiinfo.ulNumPalReg;
break;
case NUMRESERVED:
@ -812,25 +812,25 @@ 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:
@ -838,27 +838,27 @@ IntGdiGetDeviceCaps(PDC dc, INT Index)
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:
@ -877,8 +877,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;
@ -922,7 +922,7 @@ IntvGetDeviceCaps(
PDEVCAPS pDevCaps)
{
ULONG Tmp = 0;
PGDIINFO pGdiInfo = &pDevObj->GDIInfo;
PGDIINFO pGdiInfo = &pDevObj->gdiinfo;
pDevCaps->ulVersion = pGdiInfo->ulVersion;
pDevCaps->ulTechnology = pGdiInfo->ulTechnology;
@ -1056,7 +1056,7 @@ NtGdiGetDhpdev(
while (ppdev != NULL);
IntGdiReleaseSemaphore(hsemDriverMgmt);
if (!ppdev) return NULL;
return pGdiDevice->hPDev;
return pGdiDevice->dhpdev;
}
static NTSTATUS FASTCALL

View file

@ -287,7 +287,7 @@ IntSetDIBits(
else
{
// Destination palette obtained from the hDC
DDB_Palette = DC->ppdev->DevInfo.hpalDefault;
DDB_Palette = DC->ppdev->devinfo.hpalDefault;
}
ppalDDB = PALETTE_LockPalette(DDB_Palette);
@ -478,7 +478,7 @@ NtGdiSetDIBitsToDeviceInternal(
}
/* Use destination palette obtained from the DC by default */
DDBPalette = pDC->ppdev->DevInfo.hpalDefault;
DDBPalette = pDC->ppdev->devinfo.hpalDefault;
/* Try to use hDIBPalette if it exists */
pSurf = pDC->dclevel.pSurface;
@ -654,7 +654,7 @@ NtGdiGetDIBitsInternal(
hSourcePalette = psurf->hDIBPalette;
if (!hSourcePalette)
{
hSourcePalette = pPrimarySurface->DevInfo.hpalDefault;
hSourcePalette = pPrimarySurface->devinfo.hpalDefault;
}
ColorPtr = ((PBYTE)Info + Info->bmiHeader.biSize);

View file

@ -918,7 +918,7 @@ IntGdiGradientFill(
ASSERT(psurf);
hDestPalette = psurf->hDIBPalette;
if (!hDestPalette) hDestPalette = pPrimarySurface->DevInfo.hpalDefault;
if (!hDestPalette) hDestPalette = pPrimarySurface->devinfo.hpalDefault;
PalDestGDI = PALETTE_LockPalette(hDestPalette);
EXLATEOBJ_vInitialize(&exlo, &gpalRGB, PalDestGDI, 0, 0, 0);
@ -1113,7 +1113,7 @@ NtGdiExtFloodFill(
}
hpal = dc->dclevel.pSurface->hDIBPalette;
if (!hpal) hpal = pPrimarySurface->DevInfo.hpalDefault;
if (!hpal) hpal = pPrimarySurface->devinfo.hpalDefault;
ppal = PALETTE_ShareLockPalette(hpal);
EXLATEOBJ_vInitialize(&exlo, &gpalRGB, ppal, 0, 0xffffff, 0);

View file

@ -3386,7 +3386,7 @@ GreExtTextOutW(
/* Create the xlateobj */
hDestPalette = psurf->hDIBPalette;
if (!hDestPalette) hDestPalette = pPrimarySurface->DevInfo.hpalDefault;
if (!hDestPalette) hDestPalette = pPrimarySurface->devinfo.hpalDefault;
ppalDst = PALETTE_LockPalette(hDestPalette);
EXLATEOBJ_vInitialize(&exloRGB2Dst, &gpalRGB, ppalDst, 0, 0, 0);
EXLATEOBJ_vInitialize(&exloDst2RGB, ppalDst, &gpalRGB, 0, 0, 0);

View file

@ -104,10 +104,10 @@ IntGetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp)
if (!(pGDev->flFlags & PDEV_DISPLAY )) return FALSE;
if ((pGDev->DevInfo.iDitherFormat == BMF_8BPP) ||
(pGDev->DevInfo.iDitherFormat == BMF_16BPP) ||
(pGDev->DevInfo.iDitherFormat == BMF_24BPP) ||
(pGDev->DevInfo.iDitherFormat == BMF_32BPP))
if ((pGDev->devinfo.iDitherFormat == BMF_8BPP) ||
(pGDev->devinfo.iDitherFormat == BMF_16BPP) ||
(pGDev->devinfo.iDitherFormat == BMF_24BPP) ||
(pGDev->devinfo.iDitherFormat == BMF_32BPP))
{
if (pGDev->flFlags & PDEV_GAMMARAMP_TABLE)
RtlCopyMemory( Ramp,
@ -236,22 +236,22 @@ UpdateDeviceGammaRamp( HDEV hPDev )
PALOBJ *palPtr;
PPDEVOBJ pGDev = (PPDEVOBJ) hPDev;
if ((pGDev->DevInfo.iDitherFormat == BMF_8BPP) ||
(pGDev->DevInfo.iDitherFormat == BMF_16BPP) ||
(pGDev->DevInfo.iDitherFormat == BMF_24BPP) ||
(pGDev->DevInfo.iDitherFormat == BMF_32BPP))
if ((pGDev->devinfo.iDitherFormat == BMF_8BPP) ||
(pGDev->devinfo.iDitherFormat == BMF_16BPP) ||
(pGDev->devinfo.iDitherFormat == BMF_24BPP) ||
(pGDev->devinfo.iDitherFormat == BMF_32BPP))
{
if (pGDev->DriverFunctions.IcmSetDeviceGammaRamp)
return pGDev->DriverFunctions.IcmSetDeviceGammaRamp( pGDev->hPDev,
return pGDev->DriverFunctions.IcmSetDeviceGammaRamp( pGDev->dhpdev,
IGRF_RGB_256WORDS,
pGDev->pvGammaRamp);
if ( (pGDev->DevInfo.iDitherFormat != BMF_8BPP) ||
!(pGDev->GDIInfo.flRaster & RC_PALETTE)) return FALSE;
if ( (pGDev->devinfo.iDitherFormat != BMF_8BPP) ||
!(pGDev->gdiinfo.flRaster & RC_PALETTE)) return FALSE;
if (!(pGDev->flFlags & PDEV_GAMMARAMP_TABLE)) return FALSE;
palGDI = PALETTE_LockPalette(pGDev->DevInfo.hpalDefault);
palGDI = PALETTE_LockPalette(pGDev->devinfo.hpalDefault);
if(!palGDI) return FALSE;
palPtr = (PALOBJ*) palGDI;
@ -266,7 +266,7 @@ UpdateDeviceGammaRamp( HDEV hPDev )
// PALOBJ_cGetColors check mode flags and update Gamma Correction.
// Set the HDEV to pal and go.
palGDI->hPDev = hPDev;
Ret = pGDev->DriverFunctions.SetPalette(pGDev->hPDev,
Ret = pGDev->DriverFunctions.SetPalette(pGDev->dhpdev,
palPtr,
0,
0,
@ -296,18 +296,18 @@ IntSetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp, BOOL Test)
if (!(pGDev->flFlags & PDEV_DISPLAY )) return FALSE;
if ((pGDev->DevInfo.iDitherFormat == BMF_8BPP) ||
(pGDev->DevInfo.iDitherFormat == BMF_16BPP) ||
(pGDev->DevInfo.iDitherFormat == BMF_24BPP) ||
(pGDev->DevInfo.iDitherFormat == BMF_32BPP))
if ((pGDev->devinfo.iDitherFormat == BMF_8BPP) ||
(pGDev->devinfo.iDitherFormat == BMF_16BPP) ||
(pGDev->devinfo.iDitherFormat == BMF_24BPP) ||
(pGDev->devinfo.iDitherFormat == BMF_32BPP))
{
if (!pGDev->DriverFunctions.IcmSetDeviceGammaRamp)
{ // No driver support
if (!(pGDev->DevInfo.flGraphicsCaps2 & GCAPS2_CHANGEGAMMARAMP))
if (!(pGDev->devinfo.flGraphicsCaps2 & GCAPS2_CHANGEGAMMARAMP))
{ // Driver does not support Gamma Ramp, so test to see we
// have BMF_8BPP only and palette operation support.
if ((pGDev->DevInfo.iDitherFormat != BMF_8BPP) ||
!(pGDev->GDIInfo.flRaster & RC_PALETTE)) return FALSE;
if ((pGDev->devinfo.iDitherFormat != BMF_8BPP) ||
!(pGDev->gdiinfo.flRaster & RC_PALETTE)) return FALSE;
}
}

View file

@ -916,7 +916,7 @@ IntGetSystemPaletteEntries(HDC hDC,
}
else
{
Ret = dc->ppdev->GDIInfo.ulNumPalReg;
Ret = dc->ppdev->gdiinfo.ulNumPalReg;
}
}

View file

@ -39,7 +39,7 @@ IntGetipfdDevMax(PDC pdc)
if (ppdev->DriverFunctions.DescribePixelFormat)
{
Ret = ppdev->DriverFunctions.DescribePixelFormat(
ppdev->hPDev,
ppdev->dhpdev,
1,
0,
NULL);
@ -94,7 +94,7 @@ NtGdiDescribePixelFormat(HDC hDC,
if (ppdev->DriverFunctions.DescribePixelFormat)
{
Ret = ppdev->DriverFunctions.DescribePixelFormat(
ppdev->hPDev,
ppdev->dhpdev,
PixelFormat,
sizeof(PIXELFORMATDESCRIPTOR),
&pfdSafe);