Author: tkreuzer Date: Fri Mar 20 21:02:55 2009 New Revision: 40137
URL: http://svn.reactos.org/svn/reactos?rev=40137&view=rev Log: Rename GDIDEVICE to PDEVOBJ. Is seems ms uses both PDEV and PDEVOBJ, whith the latter being the C++ representation. But we don't use C++ and PDEVOBJ seems to be a more appropriate name, as PDEV is often used by display drivers. Make DC.ppdev of type PDEVOBJ* and remove a bunch of typecasts.
Modified: trunk/reactos/subsystems/win32/win32k/eng/driverobj.c trunk/reactos/subsystems/win32/win32k/eng/mouse.c trunk/reactos/subsystems/win32/win32k/eng/palette.c trunk/reactos/subsystems/win32/win32k/eng/surface.c trunk/reactos/subsystems/win32/win32k/include/dc.h trunk/reactos/subsystems/win32/win32k/include/monitor.h trunk/reactos/subsystems/win32/win32k/include/surface.h trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c trunk/reactos/subsystems/win32/win32k/ntuser/input.c trunk/reactos/subsystems/win32/win32k/ntuser/metric.c trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c trunk/reactos/subsystems/win32/win32k/objects/color.c trunk/reactos/subsystems/win32/win32k/objects/coord.c trunk/reactos/subsystems/win32/win32k/objects/dc.c trunk/reactos/subsystems/win32/win32k/objects/dibobj.c trunk/reactos/subsystems/win32/win32k/objects/gdibatch.c trunk/reactos/subsystems/win32/win32k/objects/icm.c trunk/reactos/subsystems/win32/win32k/objects/print.c
Modified: trunk/reactos/subsystems/win32/win32k/eng/driverobj.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/eng... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/eng/driverobj.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/eng/driverobj.c [iso-8859-1] Fri Mar 20 21:02:55 2009 @@ -45,7 +45,7 @@ { PEDRIVEROBJ pedo; HDRVOBJ hdo; - GDIDEVICE *ppdev = (GDIDEVICE*)hdev; + PDEVOBJ *ppdev = (PDEVOBJ*)hdev;
/* Allocate a new DRIVEROBJ */ pedo = DRIVEROBJ_AllocObjectWithHandle();
Modified: trunk/reactos/subsystems/win32/win32k/eng/mouse.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/eng... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/eng/mouse.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/eng/mouse.c [iso-8859-1] Fri Mar 20 21:02:55 2009 @@ -43,7 +43,7 @@ */ { LONG tmp; - GDIDEVICE *ppdev; + PDEVOBJ *ppdev; GDIPOINTER *pgp;
ASSERT(SurfObj != NULL); @@ -101,7 +101,7 @@ * FUNCTION: Notify the mouse driver that drawing has finished on a surface. */ { - GDIDEVICE *ppdev; + PDEVOBJ *ppdev; GDIPOINTER *pgp;
ASSERT(SurfObj != NULL); @@ -138,7 +138,7 @@ /* SOFTWARE MOUSE POINTER IMPLEMENTATION **************************************/
VOID INTERNAL_CALL -IntHideMousePointer(GDIDEVICE *ppdev, SURFOBJ *psoDest) +IntHideMousePointer(PDEVOBJ *ppdev, SURFOBJ *psoDest) { GDIPOINTER *pgp; POINTL pt; @@ -207,7 +207,7 @@ }
VOID INTERNAL_CALL -IntShowMousePointer(GDIDEVICE *ppdev, SURFOBJ *psoDest) +IntShowMousePointer(PDEVOBJ *ppdev, SURFOBJ *psoDest) { GDIPOINTER *pgp; SURFOBJ *SaveSurface; @@ -335,7 +335,7 @@ IN RECTL *prcl, IN FLONG fl) { - GDIDEVICE *ppdev; + PDEVOBJ *ppdev; SURFOBJ *psoTemp; GDIPOINTER *pgp;
@@ -536,7 +536,7 @@ IN LONG y, IN RECTL *prcl) { - GDIDEVICE *ppdev; + PDEVOBJ *ppdev; GDIPOINTER *pgp;
ASSERT(pso);
Modified: trunk/reactos/subsystems/win32/win32k/eng/palette.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/eng... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/eng/palette.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/eng/palette.c [iso-8859-1] Fri Mar 20 21:02:55 2009 @@ -38,14 +38,14 @@ VOID FASTCALL ColorCorrection(PPALGDI PalGDI, PPALETTEENTRY PaletteEntry, ULONG Colors) { - PGDIDEVICE pGDev = (PGDIDEVICE)PalGDI->hPDev; + PPDEVOBJ ppdev = (PPDEVOBJ)PalGDI->hPDev;
- if (!pGDev) return; + if (!ppdev) return;
- if (pGDev->flFlags & PDEV_GAMMARAMP_TABLE) + if (ppdev->flFlags & PDEV_GAMMARAMP_TABLE) { INT i; - PGAMMARAMP GammaRamp = (PGAMMARAMP)pGDev->pvGammaRamp; + PGAMMARAMP GammaRamp = (PGAMMARAMP)ppdev->pvGammaRamp; for ( i = 0; i < Colors; i++) { PaletteEntry[i].peRed += GammaRamp->Red[i];
Modified: trunk/reactos/subsystems/win32/win32k/eng/surface.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/eng... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/eng/surface.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/eng/surface.c [iso-8859-1] Fri Mar 20 21:02:55 2009 @@ -508,21 +508,21 @@ */ BOOL APIENTRY EngAssociateSurface(IN HSURF hsurf, - IN HDEV Dev, + IN HDEV hdev, IN ULONG Hooks) { SURFOBJ *pso; PSURFACE psurf; - GDIDEVICE* Device; - - Device = (GDIDEVICE*)Dev; + PDEVOBJ* Device; + + Device = (PDEVOBJ*)hdev;
psurf = SURFACE_LockSurface(hsurf); ASSERT(psurf); pso = &psurf->SurfObj;
/* Associate the hdev */ - pso->hdev = Dev; + pso->hdev = hdev; pso->dhpdev = Device->hPDev;
/* Hook up specified functions */
Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/inc... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] Fri Mar 20 21:02:55 2009 @@ -9,7 +9,7 @@ /* Get/SetBounds/Rect support. */ #define DCB_WINDOWMGR 0x8000 /* Queries the Windows bounding rectangle instead of the application's */
-/* GDIDEVICE flags */ +/* PDEVOBJ flags */ #define PDEV_DISPLAY 0x00000001 /* Display device */ #define PDEV_HARDWARE_POINTER 0x00000002 /* Supports hardware cursor */ #define PDEV_SOFTWARE_POINTER 0x00000004 @@ -28,6 +28,69 @@ #define PDEV_CLONE_DEVICE 0x00080000
/* Type definitions ***********************************************************/ + +// FIXME: move me to an appropriate header +typedef struct _GDIPOINTER /* should stay private to ENG? No, part of PDEVOBJ aka HDEV aka PDEV. */ +{ + /* private GDI pointer handling information, required for software emulation */ + BOOL Enabled; + SIZEL Size; + POINTL HotSpot; + XLATEOBJ *XlateObject; + HSURF ColorSurface; + HSURF MaskSurface; + HSURF SaveSurface; + int ShowPointer; /* counter negtive do not show the mouse postive show the mouse */ + + /* public pointer information */ + RECTL Exclude; /* required publicly for SPS_ACCEPT_EXCLUDE */ + PGD_MOVEPOINTER MovePointer; + ULONG Status; +} GDIPOINTER, *PGDIPOINTER; + +typedef struct _PDEVOBJ +{ + BASEOBJECT BaseObject; + + struct _PDEVOBJ *ppdevNext; + INT cPdevRefs; + INT cPdevOpenRefs; + struct _PDEVOBJ *ppdevParent; + FLONG flFlags; + PERESOURCE hsemDevLock; /* Device lock. */ + + PVOID pvGammaRamp; /* Gamma ramp pointer. */ + + HSURF FillPatterns[HS_DDI_MAX]; + + ULONG DxDd_nCount; + + DHPDEV hPDev; /* DHPDEV for device. */ + PVOID ppalSurf; /* PEPALOBJ/PPALGDI for this device. */ + DEVINFO DevInfo; + GDIINFO GDIInfo; + HSURF pSurface; /* SURFACE for this device. */ + HANDLE hSpooler; /* Handle to spooler, if spooler dev driver. */ + ULONG DisplayNumber; + PVOID pGraphicsDev; /* PGRAPHICS_DEVICE */ + + DEVMODEW DMW; + PVOID pdmwDev; /* Ptr->DEVMODEW.dmSize + dmDriverExtra == alloc size. */ + + FLONG DxDd_Flags; /* DxDD active status flags. */ + + PFILE_OBJECT VideoFileObject; + BOOLEAN PreparedDriver; + GDIPOINTER Pointer; + /* Stuff to keep track of software cursors; win32k gdi part */ + UINT SafetyRemoveLevel; /* at what level was the cursor removed? + 0 for not removed */ + UINT SafetyRemoveCount; + + DRIVER_FUNCTIONS DriverFunctions; + struct _EDD_DIRECTDRAW_GLOBAL * pEDDgpl; +} PDEVOBJ, *PPDEVOBJ; +
typedef struct _ROS_DC_INFO { @@ -106,10 +169,10 @@ Do not (re)move this. */ BASEOBJECT BaseObject;
- DHPDEV dhpdev; /* <- GDIDEVICE.hPDev DHPDEV for device. */ + DHPDEV dhpdev; /* <- PDEVOBJ.hPDev DHPDEV for device. */ INT dctype; INT fs; - PVOID ppdev; /* PGDIDEVICE aka PDEVOBJ */ + PPDEVOBJ ppdev; PVOID hsem; /* PERESOURCE aka HSEMAPHORE */ FLONG flGraphicsCaps; FLONG flGraphicsCaps2; @@ -155,66 +218,6 @@ DWORD StateFlags; /* See DISPLAY_DEVICE_* */ } GRAPHICS_DEVICE, *PGRAPHICS_DEVICE;
-typedef struct _GDIPOINTER /* should stay private to ENG? No, part of GDIDEVICE aka HDEV aka PDEV. */ -{ - /* private GDI pointer handling information, required for software emulation */ - BOOL Enabled; - SIZEL Size; - POINTL HotSpot; - XLATEOBJ *XlateObject; - HSURF ColorSurface; - HSURF MaskSurface; - HSURF SaveSurface; - int ShowPointer; /* counter negtive do not show the mouse postive show the mouse */ - - /* public pointer information */ - RECTL Exclude; /* required publicly for SPS_ACCEPT_EXCLUDE */ - PGD_MOVEPOINTER MovePointer; - ULONG Status; -} GDIPOINTER, *PGDIPOINTER; - -typedef struct _GDIDEVICE -{ - BASEOBJECT BaseObject; - - struct _GDIDEVICE *ppdevNext; - INT cPdevRefs; - INT cPdevOpenRefs; - struct _GDIDEVICE *ppdevParent; - FLONG flFlags; - PERESOURCE hsemDevLock; /* Device lock. */ - - PVOID pvGammaRamp; /* Gamma ramp pointer. */ - - HSURF FillPatterns[HS_DDI_MAX]; - - ULONG DxDd_nCount; - - DHPDEV hPDev; /* DHPDEV for device. */ - PVOID ppalSurf; /* PEPALOBJ/PPALGDI for this device. */ - DEVINFO DevInfo; - GDIINFO GDIInfo; - HSURF pSurface; /* SURFACE for this device. */ - HANDLE hSpooler; /* Handle to spooler, if spooler dev driver. */ - ULONG DisplayNumber; - PVOID pGraphicsDev; /* PGRAPHICS_DEVICE */ - - DEVMODEW DMW; - PVOID pdmwDev; /* Ptr->DEVMODEW.dmSize + dmDriverExtra == alloc size. */ - - FLONG DxDd_Flags; /* DxDD active status flags. */ - - PFILE_OBJECT VideoFileObject; - BOOLEAN PreparedDriver; - GDIPOINTER Pointer; - /* Stuff to keep track of software cursors; win32k gdi part */ - UINT SafetyRemoveLevel; /* at what level was the cursor removed? - 0 for not removed */ - UINT SafetyRemoveCount; - - DRIVER_FUNCTIONS DriverFunctions; - struct _EDD_DIRECTDRAW_GLOBAL * pEDDgpl; -} GDIDEVICE, *PGDIDEVICE;
/* Internal functions *********************************************************/
@@ -226,7 +229,7 @@ extern PDC defaultDCstate;
NTSTATUS FASTCALL InitDcImpl(VOID); -PGDIDEVICE FASTCALL IntEnumHDev(VOID); +PPDEVOBJ FASTCALL IntEnumHDev(VOID); HDC FASTCALL DC_AllocDC(PUNICODE_STRING Driver); VOID FASTCALL DC_InitDC(HDC DCToInit); HDC FASTCALL DC_FindOpenDC(PUNICODE_STRING Driver); @@ -264,15 +267,15 @@ UINT APIENTRY IntGdiGetTextAlign(HDC hDC); COLORREF APIENTRY IntGdiGetTextColor(HDC hDC); INT APIENTRY IntGdiSetStretchBltMode(HDC hDC, INT stretchBltMode); -VOID FASTCALL IntGdiReferencePdev(PGDIDEVICE pPDev); -VOID FASTCALL IntGdiUnreferencePdev(PGDIDEVICE pPDev, DWORD CleanUpType); +VOID FASTCALL IntGdiReferencePdev(PPDEVOBJ pPDev); +VOID FASTCALL IntGdiUnreferencePdev(PPDEVOBJ pPDev, DWORD CleanUpType); HDC FASTCALL IntGdiCreateDisplayDC(HDEV hDev, ULONG DcType, BOOL EmptyDC); BOOL FASTCALL IntGdiCleanDC(HDC hDC); -VOID FASTCALL IntvGetDeviceCaps(PGDIDEVICE, PDEVCAPS); +VOID FASTCALL IntvGetDeviceCaps(PPDEVOBJ, PDEVCAPS); HPEN FASTCALL IntGdiSelectPen(PDC,HPEN); HBRUSH FASTCALL IntGdiSelectBrush(PDC,HBRUSH); INT FASTCALL IntGdiGetDeviceCaps(PDC,INT);
-extern PGDIDEVICE pPrimarySurface; +extern PPDEVOBJ pPrimarySurface;
#endif /* not __WIN32K_DC_H */
Modified: trunk/reactos/subsystems/win32/win32k/include/monitor.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/inc... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/monitor.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/monitor.h [iso-8859-1] Fri Mar 20 21:02:55 2009 @@ -1,7 +1,7 @@ #ifndef _WIN32K_MONITOR_H #define _WIN32K_MONITOR_H
-struct GDIDEVICE; +//struct PDEVOBJ;
/* monitor object */ typedef struct _MONITOR_OBJECT @@ -11,7 +11,7 @@
BOOL IsPrimary; /* wether this is the primary monitor */ UNICODE_STRING DeviceName; /* name of the monitor */ - GDIDEVICE *GdiDevice; /* pointer to the GDI device to + PDEVOBJ *GdiDevice; /* pointer to the GDI device to which this monitor is attached */ struct _MONITOR_OBJECT *Prev, *Next; /* doubly linked list */ } MONITOR_OBJECT, *PMONITOR_OBJECT; @@ -20,8 +20,8 @@ NTSTATUS InitMonitorImpl(); NTSTATUS CleanupMonitorImpl();
-NTSTATUS IntAttachMonitor(GDIDEVICE *pGdiDevice, ULONG DisplayNumber); -NTSTATUS IntDetachMonitor(GDIDEVICE *pGdiDevice); +NTSTATUS IntAttachMonitor(PDEVOBJ *pGdiDevice, ULONG DisplayNumber); +NTSTATUS IntDetachMonitor(PDEVOBJ *pGdiDevice); PMONITOR_OBJECT FASTCALL UserGetMonitorObject(IN HMONITOR);
#endif /* _WIN32K_MONITOR_H */
Modified: trunk/reactos/subsystems/win32/win32k/include/surface.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/inc... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/surface.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/surface.h [iso-8859-1] Fri Mar 20 21:02:55 2009 @@ -57,8 +57,8 @@ BOOL INTERNAL_CALL SURFACE_InitBitsLock(SURFACE *pBMObj); void INTERNAL_CALL SURFACE_CleanupBitsLock(SURFACE *pBMObj);
-#define GDIDEV(SurfObj) ((GDIDEVICE *)((SurfObj)->hdev)) -#define GDIDEVFUNCS(SurfObj) ((GDIDEVICE *)((SurfObj)->hdev))->DriverFunctions +#define GDIDEV(SurfObj) ((PDEVOBJ *)((SurfObj)->hdev)) +#define GDIDEVFUNCS(SurfObj) ((PDEVOBJ *)((SurfObj)->hdev))->DriverFunctions
INT FASTCALL BitsPerFormat (ULONG Format); ULONG FASTCALL BitmapFormat (WORD Bits, DWORD Compression);
Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntd... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c [iso-8859-1] Fri Mar 20 21:02:55 2009 @@ -35,7 +35,7 @@ NTSTATUS Status; PEPROCESS Proc = NULL; PDC pDC = NULL; - PGDIDEVICE pDev = NULL; + PPDEVOBJ pDev = NULL; PGD_DXDDENABLEDIRECTDRAW pfnDdEnableDirectDraw = NULL; BOOL success = FALSE;
@@ -59,7 +59,7 @@ return FALSE; }
- pDev = (PGDIDEVICE)pDC->ppdev; + pDev = pDC->ppdev;
/* test see if drv got a dx interface or not */ if ( ( pDev->DriverFunctions.DisableDirectDraw == NULL) ||
Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntd... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c [iso-8859-1] Fri Mar 20 21:02:55 2009 @@ -281,7 +281,7 @@ DXEGSHDEVDATA Type) { DWORD_PTR retVal = 0; - PGDIDEVICE PDev = (PGDIDEVICE)hDev; + PPDEVOBJ PDev = (PPDEVOBJ)hDev;
DPRINT1("ReactX Calling : DxEngGetHdevData DXEGSHDEVDATA : %ld\n", Type);
@@ -416,7 +416,7 @@
if ( Type == DxEGShDevData_dd_nCount ) { - ((PGDIDEVICE)hDev)->DxDd_nCount = Data; + ((PPDEVOBJ)hDev)->DxDd_nCount = Data; retVal = TRUE; // Set } return retVal; @@ -514,7 +514,7 @@ * The function DxEngLockHdev lock the internal PDEV * * @param HDEV type -* it is a pointer to win32k internal pdev struct known as PGDIDEVICE +* it is a pointer to win32k internal pdev struct known as PPDEVOBJ
* @return * This function returns TRUE no matter what. @@ -527,7 +527,7 @@ APIENTRY DxEngLockHdev(HDEV hDev) { - PGDIDEVICE ppdev = (PGDIDEVICE)hDev; + PPDEVOBJ ppdev = (PPDEVOBJ)hDev; PERESOURCE Resource;
DPRINT1("ReactX Calling : DxEngLockHdev \n"); @@ -551,7 +551,7 @@ * The function DxEngUnlockHdev unlock the internal PDEV * * @param HDEV type -* it is a pointer to win32k internal pdev struct known as PGDIDEVICE +* it is a pointer to win32k internal pdev struct known as PPDEVOBJ
* @return * This function returns TRUE no matter what. @@ -564,7 +564,7 @@ APIENTRY DxEngUnlockHdev(HDEV hDev) { - PGDIDEVICE ppdev = (PGDIDEVICE)hDev; + PPDEVOBJ ppdev = (PPDEVOBJ)hDev; PERESOURCE Resource = ppdev->hsemDevLock;
DPRINT1("ReactX Calling : DxEngUnlockHdev \n"); @@ -585,7 +585,7 @@ APIENTRY DxEngReferenceHdev(HDEV hDev) { - IntGdiReferencePdev((PGDIDEVICE) hDev); + IntGdiReferencePdev((PPDEVOBJ) hDev); /* ALWAYS return true */ return TRUE; } @@ -675,7 +675,7 @@ APIENTRY DxEngIsHdevLockedByCurrentThread(HDEV hDev) { // base on EngIsSemaphoreOwnedByCurrentThread w/o the Ex call. - PERESOURCE pSem = ((PGDIDEVICE)hDev)->hsemDevLock; + PERESOURCE pSem = ((PPDEVOBJ)hDev)->hsemDevLock; return pSem->OwnerEntry.OwnerThread == (ERESOURCE_THREAD)PsGetCurrentThread(); }
@@ -687,7 +687,7 @@ APIENTRY DxEngUnreferenceHdev(HDEV hDev) { - IntGdiUnreferencePdev((PGDIDEVICE) hDev, 0); + IntGdiUnreferencePdev((PPDEVOBJ) hDev, 0); return TRUE; // Always true. }
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c [iso-8859-1] Fri Mar 20 21:02:55 2009 @@ -120,7 +120,7 @@ return Ret; } dcbmp = dc->rosdc.hBitmap; - DevInfo = (PDEVINFO)&((GDIDEVICE *)dc->ppdev)->DevInfo; + DevInfo = (PDEVINFO)&dc->ppdev->DevInfo; DC_UnlockDc(dc);
psurf = SURFACE_LockSurface(dcbmp); @@ -1753,7 +1753,7 @@ HBITMAP hbmpDc; SURFOBJ *SurfObj; SURFACE *psurfDc; - GDIDEVICE *ppdev; + PDEVOBJ *ppdev; GDIPOINTER *pgp; int showpointer=0;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/input.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/input.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/input.c [iso-8859-1] Fri Mar 20 21:02:55 2009 @@ -1181,7 +1181,7 @@ { IntEngMovePointer(pso, MousePos.x, MousePos.y, &(GDIDEV(pso)->Pointer.Exclude)); } - /* Only now, update the info in the GDIDEVICE, so EngMovePointer can + /* Only now, update the info in the PDEVOBJ, so EngMovePointer can * use the old values to move the pointer image */ gpsi->ptCursor.x = MousePos.x; gpsi->ptCursor.y = MousePos.y;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/metric.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/metric.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/metric.c [iso-8859-1] Fri Mar 20 21:02:55 2009 @@ -40,8 +40,8 @@ pScreenDC = DC_LockDc(hScreenDC); if (pScreenDC) { - Width = ((PGDIDEVICE)pScreenDC->ppdev)->GDIInfo.ulHorzRes; - Height = ((PGDIDEVICE)pScreenDC->ppdev)->GDIInfo.ulVertRes; + Width = pScreenDC->ppdev->GDIInfo.ulHorzRes; + Height = pScreenDC->ppdev->GDIInfo.ulVertRes; DC_UnlockDc(pScreenDC); } NtGdiDeleteObjectApp(hScreenDC);
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c [iso-8859-1] Fri Mar 20 21:02:55 2009 @@ -151,14 +151,14 @@ * * Arguments * - * pGdiDevice Pointer to the GDIDEVICE onto which the monitor was attached + * pGdiDevice Pointer to the PDEVOBJ onto which the monitor was attached * DisplayNumber Display Number (starting with 0) * * Return value * Returns a NTSTATUS */ NTSTATUS -IntAttachMonitor(IN GDIDEVICE *pGdiDevice, +IntAttachMonitor(IN PDEVOBJ *pGdiDevice, IN ULONG DisplayNumber) { PMONITOR_OBJECT Monitor; @@ -211,13 +211,13 @@ * * Arguments * - * pGdiDevice Pointer to the GDIDEVICE from which the monitor was detached + * pGdiDevice Pointer to the PDEVOBJ from which the monitor was detached * * Return value * Returns a NTSTATUS */ NTSTATUS -IntDetachMonitor(IN GDIDEVICE *pGdiDevice) +IntDetachMonitor(IN PDEVOBJ *pGdiDevice) { PMONITOR_OBJECT Monitor;
Modified: trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c [iso-8859-1] Fri Mar 20 21:02:55 2009 @@ -281,7 +281,7 @@ Dc = DC_LockDc(hDC);
DPRINT("NtGdiCreateCompatibleBitmap(%04x,%d,%d, bpp:%d) = \n", - hDC, Width, Height, ((PGDIDEVICE)Dc->ppdev)->GDIInfo.cBitsPixel); + hDC, Width, Height, Dc->ppdev->GDIInfo.cBitsPixel);
if (NULL == Dc) {
Modified: trunk/reactos/subsystems/win32/win32k/objects/color.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/color.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/color.c [iso-8859-1] Fri Mar 20 21:02:55 2009 @@ -449,7 +449,7 @@ } else { - Ret = ((PGDIDEVICE)dc->ppdev)->GDIInfo.ulNumPalReg; + Ret = dc->ppdev->GDIInfo.ulNumPalReg; } }
Modified: trunk/reactos/subsystems/win32/win32k/objects/coord.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/coord.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/coord.c [iso-8859-1] Fri Mar 20 21:02:55 2009 @@ -668,36 +668,36 @@ case MM_LOMETRIC: pdcattr->szlWindowExt.cx = 3600; pdcattr->szlWindowExt.cy = 2700; - pdcattr->szlViewportExt.cx = ((PGDIDEVICE)dc->ppdev)->GDIInfo.ulHorzRes; - pdcattr->szlViewportExt.cy = -((PGDIDEVICE)dc->ppdev)->GDIInfo.ulVertRes; + pdcattr->szlViewportExt.cx = dc->ppdev->GDIInfo.ulHorzRes; + pdcattr->szlViewportExt.cy = -dc->ppdev->GDIInfo.ulVertRes; break;
case MM_HIMETRIC: pdcattr->szlWindowExt.cx = 36000; pdcattr->szlWindowExt.cy = 27000; - pdcattr->szlViewportExt.cx = ((PGDIDEVICE)dc->ppdev)->GDIInfo.ulHorzRes; - pdcattr->szlViewportExt.cy = -((PGDIDEVICE)dc->ppdev)->GDIInfo.ulVertRes; + pdcattr->szlViewportExt.cx = dc->ppdev->GDIInfo.ulHorzRes; + pdcattr->szlViewportExt.cy = -dc->ppdev->GDIInfo.ulVertRes; break;
case MM_LOENGLISH: pdcattr->szlWindowExt.cx = 1417; pdcattr->szlWindowExt.cy = 1063; - pdcattr->szlViewportExt.cx = ((PGDIDEVICE)dc->ppdev)->GDIInfo.ulHorzRes; - pdcattr->szlViewportExt.cy = -((PGDIDEVICE)dc->ppdev)->GDIInfo.ulVertRes; + pdcattr->szlViewportExt.cx = dc->ppdev->GDIInfo.ulHorzRes; + pdcattr->szlViewportExt.cy = -dc->ppdev->GDIInfo.ulVertRes; break;
case MM_HIENGLISH: pdcattr->szlWindowExt.cx = 14173; pdcattr->szlWindowExt.cy = 10630; - pdcattr->szlViewportExt.cx = ((PGDIDEVICE)dc->ppdev)->GDIInfo.ulHorzRes; - pdcattr->szlViewportExt.cy = -((PGDIDEVICE)dc->ppdev)->GDIInfo.ulVertRes; + pdcattr->szlViewportExt.cx = dc->ppdev->GDIInfo.ulHorzRes; + pdcattr->szlViewportExt.cy = -dc->ppdev->GDIInfo.ulVertRes; break;
case MM_TWIPS: pdcattr->szlWindowExt.cx = 20409; pdcattr->szlWindowExt.cy = 15307; - pdcattr->szlViewportExt.cx = ((PGDIDEVICE)dc->ppdev)->GDIInfo.ulHorzRes; - pdcattr->szlViewportExt.cy = -((PGDIDEVICE)dc->ppdev)->GDIInfo.ulVertRes; + pdcattr->szlViewportExt.cx = dc->ppdev->GDIInfo.ulHorzRes; + pdcattr->szlViewportExt.cy = -dc->ppdev->GDIInfo.ulVertRes; break;
case MM_ANISOTROPIC:
Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] Fri Mar 20 21:02:55 2009 @@ -29,8 +29,8 @@
// --------------------------------------------------------- File Statics
-static GDIDEVICE PrimarySurface; -PGDIDEVICE pPrimarySurface = &PrimarySurface; +static PDEVOBJ PrimarySurface; +PPDEVOBJ pPrimarySurface = &PrimarySurface; static KEVENT VideoDriverNeedsPreparation; static KEVENT VideoDriverPrepared; PDC defaultDCstate = NULL; @@ -358,7 +358,7 @@
RtlZeroMemory(&PrimarySurface, sizeof(PrimarySurface));
-// if (!pPrimarySurface) pPrimarySurface = ExAllocatePoolWithTag(PagedPool, sizeof(GDIDEVICE), TAG_GDIPDEV); +// if (!pPrimarySurface) pPrimarySurface = ExAllocatePoolWithTag(PagedPool, sizeof(PDEVOBJ), TAG_GDIPDEV);
PrimarySurface.VideoFileObject = DRIVER_FindMPDriver(DisplayNumber);
@@ -824,8 +824,8 @@ // ATM we only have one display. pdcattr->ulDirty_ |= DC_PRIMARY_DISPLAY;
- pdc->rosdc.bitsPerPixel = ((PGDIDEVICE)pdc->ppdev)->GDIInfo.cBitsPixel * - ((PGDIDEVICE)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; @@ -836,14 +836,14 @@ pdcattr->jROP2 = R2_COPYPEN;
pdc->erclWindow.top = pdc->erclWindow.left = 0; - pdc->erclWindow.right = ((PGDIDEVICE)pdc->ppdev)->GDIInfo.ulHorzRes; - pdc->erclWindow.bottom = ((PGDIDEVICE)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, ((PGDIDEVICE)pdc->ppdev)->GDIInfo.ulHorzRes, - ((PGDIDEVICE)pdc->ppdev)->GDIInfo.ulVertRes); + hVisRgn = NtGdiCreateRectRgn(0, 0, pdc->ppdev->GDIInfo.ulHorzRes, + pdc->ppdev->GDIInfo.ulVertRes);
if (!CreateAsIC) { @@ -1245,8 +1245,8 @@ { // "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 = pDC->ppdev->GDIInfo.ulLogPixelsX; + AspectRatio->cy = pDC->ppdev->GDIInfo.ulLogPixelsY; } else { @@ -1595,7 +1595,7 @@
INT FASTCALL -IntcFonts(PGDIDEVICE pDevObj) +IntcFonts(PPDEVOBJ pDevObj) { ULONG_PTR Junk; // Msdn DrvQueryFont: @@ -1614,7 +1614,7 @@
INT FASTCALL -IntGetColorManagementCaps(PGDIDEVICE pDevObj) +IntGetColorManagementCaps(PPDEVOBJ pDevObj) { INT ret = CM_NONE;
@@ -1635,7 +1635,7 @@ IntGdiGetDeviceCaps(PDC dc, INT Index) { INT ret = 0; - PGDIDEVICE ppdev = dc->ppdev; + PPDEVOBJ ppdev = dc->ppdev; /* Retrieve capability */ switch (Index) { @@ -1834,7 +1834,7 @@ VOID FASTCALL IntvGetDeviceCaps( - PGDIDEVICE pDevObj, + PPDEVOBJ pDevObj, PDEVCAPS pDevCaps) { ULONG Tmp = 0; @@ -2715,7 +2715,7 @@ PERESOURCE Resource; PDC dc = DC_LockDc(hDC); if (!dc) return; - Resource = ((PGDIDEVICE)dc->ppdev)->hsemDevLock; + Resource = dc->ppdev->hsemDevLock; DC_UnlockDc(dc); if (!Resource) return; KeEnterCriticalRegion(); @@ -2729,7 +2729,7 @@ PERESOURCE Resource; PDC dc = DC_LockDc(hDC); if (!dc) return; - Resource = ((PGDIDEVICE)dc->ppdev)->hsemDevLock; + Resource = dc->ppdev->hsemDevLock; DC_UnlockDc(dc); if (!Resource) return; ExReleaseResourceLite( Resource ); @@ -2749,7 +2749,7 @@ // // Enumerate HDev // -PGDIDEVICE FASTCALL +PPDEVOBJ FASTCALL IntEnumHDev(VOID) { // I guess we will soon have more than one primary surface. @@ -2759,7 +2759,7 @@
VOID FASTCALL -IntGdiReferencePdev(PGDIDEVICE ppdev) +IntGdiReferencePdev(PPDEVOBJ ppdev) { if(!hsemDriverMgmt) hsemDriverMgmt = EngCreateSemaphore(); // Hax, should be in dllmain.c IntGdiAcquireSemaphore(hsemDriverMgmt); @@ -2768,13 +2768,13 @@ }
VOID FASTCALL -IntGdiUnreferencePdev(PGDIDEVICE ppdev, DWORD CleanUpType) +IntGdiUnreferencePdev(PPDEVOBJ ppdev, DWORD CleanUpType) { IntGdiAcquireSemaphore(hsemDriverMgmt); ppdev->cPdevRefs--; if (!ppdev->cPdevRefs) { - // Handle the destruction of ppdev or GDIDEVICE or PDEVOBJ or PDEV etc. + // Handle the destruction of ppdev or PDEVOBJ or PDEVOBJ or PDEV etc. } IntGdiReleaseSemaphore(hsemDriverMgmt); } @@ -2813,7 +2813,7 @@ DesktopHDC = UserGetWindowDC(DesktopObject); pDC = DC_LockDc(DesktopHDC);
- *DisplayNumber = ((GDIDEVICE *)pDC->ppdev)->DisplayNumber; + *DisplayNumber = pDC->ppdev->DisplayNumber;
DC_UnlockDc(pDC); UserReleaseDC(DesktopObject, DesktopHDC, FALSE); @@ -3338,7 +3338,7 @@ { return FALSE; } - swprintf (szBuffer, L"\\.\DISPLAY%lu", ((GDIDEVICE *)DC->ppdev)->DisplayNumber); + swprintf (szBuffer, L"\\.\DISPLAY%lu", DC->ppdev->DisplayNumber); DC_UnlockDc(DC);
RtlInitUnicodeString(&InDeviceName, szBuffer); @@ -3437,9 +3437,9 @@ NtGdiGetDhpdev( IN HDEV hdev) { - PGDIDEVICE ppdev, pGdiDevice = (PGDIDEVICE) hdev; + PPDEVOBJ ppdev, pGdiDevice = (PPDEVOBJ) hdev; if (!pGdiDevice) return NULL; - if ( pGdiDevice < (PGDIDEVICE)MmSystemRangeStart) return NULL; + if ( pGdiDevice < (PPDEVOBJ)MmSystemRangeStart) return NULL; ppdev = pPrimarySurface; IntGdiAcquireSemaphore(hsemDriverMgmt); do
Modified: trunk/reactos/subsystems/win32/win32k/objects/dibobj.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] Fri Mar 20 21:02:55 2009 @@ -279,7 +279,7 @@ else { // Destination palette obtained from the hDC - DDB_Palette = ((GDIDEVICE *)DC->ppdev)->DevInfo.hpalDefault; + DDB_Palette = DC->ppdev->DevInfo.hpalDefault; } hDCPalette = PALETTE_LockPalette(DDB_Palette); if (NULL == hDCPalette) @@ -522,7 +522,7 @@ }
/* Obtain destination palette from the DC */ - pDCPalette = PALETTE_LockPalette(((GDIDEVICE *)pDC->ppdev)->DevInfo.hpalDefault); + pDCPalette = PALETTE_LockPalette(pDC->ppdev->DevInfo.hpalDefault); if (!pDCPalette) { SetLastWin32Error(ERROR_INVALID_HANDLE); @@ -531,7 +531,7 @@ }
DDBPaletteType = pDCPalette->Mode; - DDBPalette = ((GDIDEVICE *)pDC->ppdev)->DevInfo.hpalDefault; + DDBPalette = pDC->ppdev->DevInfo.hpalDefault; PALETTE_UnlockPalette(pDCPalette);
DIBPalette = BuildDIBPalette(bmi, (PINT)&DIBPaletteType);
Modified: trunk/reactos/subsystems/win32/win32k/objects/gdibatch.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/gdibatch.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/gdibatch.c [iso-8859-1] Fri Mar 20 21:02:55 2009 @@ -19,7 +19,7 @@ FASTCALL DoDeviceSync( SURFOBJ *Surface, PRECTL Rect, FLONG fl) { - PGDIDEVICE Device = (GDIDEVICE*)Surface->hdev; + PPDEVOBJ Device = (PDEVOBJ*)Surface->hdev; // No punting and "Handle to a surface, provided that the surface is device-managed. // Otherwise, dhsurf is zero". if (!(Device->flFlags & PDEV_DRIVER_PUNTED_CALL) && (Surface->dhsurf)) @@ -40,7 +40,7 @@ SynchonizeDriver(FLONG Flags) { SURFOBJ *SurfObj; - PGDIDEVICE Device; + PPDEVOBJ Device;
if (Flags & GCAPS2_SYNCFLUSH) Flags = DSS_FLUSH_EVENT;
Modified: trunk/reactos/subsystems/win32/win32k/objects/icm.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/icm.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/icm.c [iso-8859-1] Fri Mar 20 21:02:55 2009 @@ -99,7 +99,7 @@ FASTCALL IntGetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp) { - PGDIDEVICE pGDev = (PGDIDEVICE) hPDev; + PPDEVOBJ pGDev = (PPDEVOBJ) hPDev; int i;
if (!(pGDev->flFlags & PDEV_DISPLAY )) return FALSE; @@ -234,7 +234,7 @@ BOOL Ret = FALSE; PPALGDI palGDI; PALOBJ *palPtr; - PGDIDEVICE pGDev = (PGDIDEVICE) hPDev; + PPDEVOBJ pGDev = (PPDEVOBJ) hPDev;
if ((pGDev->DevInfo.iDitherFormat == BMF_8BPP) || (pGDev->DevInfo.iDitherFormat == BMF_16BPP) || @@ -290,7 +290,7 @@ { WORD IcmGR, i, R, G, B; BOOL Ret = FALSE, TstPeak; - PGDIDEVICE pGDev = (PGDIDEVICE) hPDev; + PPDEVOBJ pGDev = (PPDEVOBJ) hPDev;
if (!hPDev) return FALSE;
Modified: trunk/reactos/subsystems/win32/win32k/objects/print.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/print.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/print.c [iso-8859-1] Fri Mar 20 21:02:55 2009 @@ -119,7 +119,7 @@
/* FIXME - Handle psurf == NULL !!!!!! */
- if ( NULL == ((GDIDEVICE *)dc->ppdev)->DriverFunctions.Escape ) + if ( NULL == dc->ppdev->DriverFunctions.Escape ) { Result = IntEngExtEscape( &psurf->SurfObj, @@ -131,7 +131,7 @@ } else { - Result = ((GDIDEVICE *)dc->ppdev)->DriverFunctions.Escape( + Result = dc->ppdev->DriverFunctions.Escape( &psurf->SurfObj, Escape, InSize,