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);
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;
if(pgp->psurfMask)
{
- ppal = PALETTE_LockPalette(ppdev->DevInfo.hpalDefault);
+ ppal = PALETTE_LockPalette(ppdev->devinfo.hpalDefault);
EXLATEOBJ_vInitialize(&exlo,
&gpalMono,
ppal,
/* Associate the hdev */
pso->hdev = hdev;
- pso->dhpdev = ppdev->hPDev;
+ pso->dhpdev = ppdev->dhpdev;
/* Hook up specified functions */
psurf->flHooks = flHooks;
/* Associate the hdev */
pso->hdev = hdev;
- pso->dhpdev = ppdev->hPDev;
+ pso->dhpdev = ppdev->dhpdev;
/* Hook up specified functions */
psurf->flHooks = flHooks;
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)
EXLATEOBJ_vInitTrivial(pexlo);
hpalDst = psurfDst->hDIBPalette;
- if (!hpalDst) hpalDst = pPrimarySurface->DevInfo.hpalDefault;
+ if (!hpalDst) hpalDst = pPrimarySurface->devinfo.hpalDefault;
ppalDst = PALETTE_ShareLockPalette(hpalDst);
if (!ppalDst)
{
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
struct _PDEVOBJ * ppdevParent;
FLONG flFlags; // flags
// FLONG flAccelerated;
- PERESOURCE hsemDevLock; /* Device lock. */
+ HSEMAPHORE hsemDevLock; /* Device lock. */
// HSEMAPHORE hsemPointer;
POINTL ptlPointer;
// SIZEL szlPointer;
// 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;
// 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;
* 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
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");
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");
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");
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");
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,
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",
/* 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;
}
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)))
{
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)
{
{
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)
/* 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:
{
// "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
{
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)
{
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");
{
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");
}
// 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)
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;
/* Complete initialization of the physical device */
PrimarySurface.DriverFunctions.CompletePDEV(
- PrimarySurface.hPDev,
+ PrimarySurface.dhpdev,
(HDEV)&PrimarySurface);
DPRINT("calling DRIVER_ReferenceDriver\n");
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)
{
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)
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;
*/
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);
// 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;
}
//
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;
}
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:
break;
case NUMPENS:
- ret = ppdev->GDIInfo.ulNumColors;
+ ret = ppdev->gdiinfo.ulNumColors;
if ( ret != -1 ) ret *= 5;
break;
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:
break;
case SIZEPALETTE:
- ret = ppdev->GDIInfo.ulNumPalReg;
+ ret = ppdev->gdiinfo.ulNumPalReg;
break;
case NUMRESERVED:
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:
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:
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;
PDEVCAPS pDevCaps)
{
ULONG Tmp = 0;
- PGDIINFO pGdiInfo = &pDevObj->GDIInfo;
+ PGDIINFO pGdiInfo = &pDevObj->gdiinfo;
pDevCaps->ulVersion = pGdiInfo->ulVersion;
pDevCaps->ulTechnology = pGdiInfo->ulTechnology;
while (ppdev != NULL);
IntGdiReleaseSemaphore(hsemDriverMgmt);
if (!ppdev) return NULL;
- return pGdiDevice->hPDev;
+ return pGdiDevice->dhpdev;
}
static NTSTATUS FASTCALL
else
{
// Destination palette obtained from the hDC
- DDB_Palette = DC->ppdev->DevInfo.hpalDefault;
+ DDB_Palette = DC->ppdev->devinfo.hpalDefault;
}
ppalDDB = PALETTE_LockPalette(DDB_Palette);
}
/* 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;
hSourcePalette = psurf->hDIBPalette;
if (!hSourcePalette)
{
- hSourcePalette = pPrimarySurface->DevInfo.hpalDefault;
+ hSourcePalette = pPrimarySurface->devinfo.hpalDefault;
}
ColorPtr = ((PBYTE)Info + Info->bmiHeader.biSize);
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);
}
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);
/* 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);
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,
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;
// 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,
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;
}
}
}
else
{
- Ret = dc->ppdev->GDIInfo.ulNumPalReg;
+ Ret = dc->ppdev->gdiinfo.ulNumPalReg;
}
}
if (ppdev->DriverFunctions.DescribePixelFormat)
{
Ret = ppdev->DriverFunctions.DescribePixelFormat(
- ppdev->hPDev,
+ ppdev->dhpdev,
1,
0,
NULL);
if (ppdev->DriverFunctions.DescribePixelFormat)
{
Ret = ppdev->DriverFunctions.DescribePixelFormat(
- ppdev->hPDev,
+ ppdev->dhpdev,
PixelFormat,
sizeof(PIXELFORMATDESCRIPTOR),
&pfdSafe);