mirror of
https://github.com/reactos/reactos.git
synced 2025-04-30 02:58:48 +00:00
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. svn path=/trunk/; revision=40137
This commit is contained in:
parent
f0b2b4bfa6
commit
b4cc54f089
21 changed files with 159 additions and 156 deletions
|
@ -45,7 +45,7 @@ EngCreateDriverObj(
|
||||||
{
|
{
|
||||||
PEDRIVEROBJ pedo;
|
PEDRIVEROBJ pedo;
|
||||||
HDRVOBJ hdo;
|
HDRVOBJ hdo;
|
||||||
GDIDEVICE *ppdev = (GDIDEVICE*)hdev;
|
PDEVOBJ *ppdev = (PDEVOBJ*)hdev;
|
||||||
|
|
||||||
/* Allocate a new DRIVEROBJ */
|
/* Allocate a new DRIVEROBJ */
|
||||||
pedo = DRIVEROBJ_AllocObjectWithHandle();
|
pedo = DRIVEROBJ_AllocObjectWithHandle();
|
||||||
|
|
|
@ -43,7 +43,7 @@ MouseSafetyOnDrawStart(SURFOBJ *SurfObj, LONG HazardX1,
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
LONG tmp;
|
LONG tmp;
|
||||||
GDIDEVICE *ppdev;
|
PDEVOBJ *ppdev;
|
||||||
GDIPOINTER *pgp;
|
GDIPOINTER *pgp;
|
||||||
|
|
||||||
ASSERT(SurfObj != NULL);
|
ASSERT(SurfObj != NULL);
|
||||||
|
@ -101,7 +101,7 @@ MouseSafetyOnDrawEnd(SURFOBJ *SurfObj)
|
||||||
* FUNCTION: Notify the mouse driver that drawing has finished on a surface.
|
* FUNCTION: Notify the mouse driver that drawing has finished on a surface.
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
GDIDEVICE *ppdev;
|
PDEVOBJ *ppdev;
|
||||||
GDIPOINTER *pgp;
|
GDIPOINTER *pgp;
|
||||||
|
|
||||||
ASSERT(SurfObj != NULL);
|
ASSERT(SurfObj != NULL);
|
||||||
|
@ -138,7 +138,7 @@ MouseSafetyOnDrawEnd(SURFOBJ *SurfObj)
|
||||||
/* SOFTWARE MOUSE POINTER IMPLEMENTATION **************************************/
|
/* SOFTWARE MOUSE POINTER IMPLEMENTATION **************************************/
|
||||||
|
|
||||||
VOID INTERNAL_CALL
|
VOID INTERNAL_CALL
|
||||||
IntHideMousePointer(GDIDEVICE *ppdev, SURFOBJ *psoDest)
|
IntHideMousePointer(PDEVOBJ *ppdev, SURFOBJ *psoDest)
|
||||||
{
|
{
|
||||||
GDIPOINTER *pgp;
|
GDIPOINTER *pgp;
|
||||||
POINTL pt;
|
POINTL pt;
|
||||||
|
@ -207,7 +207,7 @@ IntHideMousePointer(GDIDEVICE *ppdev, SURFOBJ *psoDest)
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID INTERNAL_CALL
|
VOID INTERNAL_CALL
|
||||||
IntShowMousePointer(GDIDEVICE *ppdev, SURFOBJ *psoDest)
|
IntShowMousePointer(PDEVOBJ *ppdev, SURFOBJ *psoDest)
|
||||||
{
|
{
|
||||||
GDIPOINTER *pgp;
|
GDIPOINTER *pgp;
|
||||||
SURFOBJ *SaveSurface;
|
SURFOBJ *SaveSurface;
|
||||||
|
@ -335,7 +335,7 @@ EngSetPointerShape(
|
||||||
IN RECTL *prcl,
|
IN RECTL *prcl,
|
||||||
IN FLONG fl)
|
IN FLONG fl)
|
||||||
{
|
{
|
||||||
GDIDEVICE *ppdev;
|
PDEVOBJ *ppdev;
|
||||||
SURFOBJ *psoTemp;
|
SURFOBJ *psoTemp;
|
||||||
GDIPOINTER *pgp;
|
GDIPOINTER *pgp;
|
||||||
|
|
||||||
|
@ -536,7 +536,7 @@ EngMovePointer(
|
||||||
IN LONG y,
|
IN LONG y,
|
||||||
IN RECTL *prcl)
|
IN RECTL *prcl)
|
||||||
{
|
{
|
||||||
GDIDEVICE *ppdev;
|
PDEVOBJ *ppdev;
|
||||||
GDIPOINTER *pgp;
|
GDIPOINTER *pgp;
|
||||||
|
|
||||||
ASSERT(pso);
|
ASSERT(pso);
|
||||||
|
|
|
@ -38,14 +38,14 @@
|
||||||
VOID FASTCALL
|
VOID FASTCALL
|
||||||
ColorCorrection(PPALGDI PalGDI, PPALETTEENTRY PaletteEntry, ULONG Colors)
|
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;
|
INT i;
|
||||||
PGAMMARAMP GammaRamp = (PGAMMARAMP)pGDev->pvGammaRamp;
|
PGAMMARAMP GammaRamp = (PGAMMARAMP)ppdev->pvGammaRamp;
|
||||||
for ( i = 0; i < Colors; i++)
|
for ( i = 0; i < Colors; i++)
|
||||||
{
|
{
|
||||||
PaletteEntry[i].peRed += GammaRamp->Red[i];
|
PaletteEntry[i].peRed += GammaRamp->Red[i];
|
||||||
|
|
|
@ -508,21 +508,21 @@ EngCreateDeviceSurface(IN DHSURF dhsurf,
|
||||||
*/
|
*/
|
||||||
BOOL APIENTRY
|
BOOL APIENTRY
|
||||||
EngAssociateSurface(IN HSURF hsurf,
|
EngAssociateSurface(IN HSURF hsurf,
|
||||||
IN HDEV Dev,
|
IN HDEV hdev,
|
||||||
IN ULONG Hooks)
|
IN ULONG Hooks)
|
||||||
{
|
{
|
||||||
SURFOBJ *pso;
|
SURFOBJ *pso;
|
||||||
PSURFACE psurf;
|
PSURFACE psurf;
|
||||||
GDIDEVICE* Device;
|
PDEVOBJ* Device;
|
||||||
|
|
||||||
Device = (GDIDEVICE*)Dev;
|
Device = (PDEVOBJ*)hdev;
|
||||||
|
|
||||||
psurf = SURFACE_LockSurface(hsurf);
|
psurf = SURFACE_LockSurface(hsurf);
|
||||||
ASSERT(psurf);
|
ASSERT(psurf);
|
||||||
pso = &psurf->SurfObj;
|
pso = &psurf->SurfObj;
|
||||||
|
|
||||||
/* Associate the hdev */
|
/* Associate the hdev */
|
||||||
pso->hdev = Dev;
|
pso->hdev = hdev;
|
||||||
pso->dhpdev = Device->hPDev;
|
pso->dhpdev = Device->hPDev;
|
||||||
|
|
||||||
/* Hook up specified functions */
|
/* Hook up specified functions */
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
/* Get/SetBounds/Rect support. */
|
/* Get/SetBounds/Rect support. */
|
||||||
#define DCB_WINDOWMGR 0x8000 /* Queries the Windows bounding rectangle instead of the application's */
|
#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_DISPLAY 0x00000001 /* Display device */
|
||||||
#define PDEV_HARDWARE_POINTER 0x00000002 /* Supports hardware cursor */
|
#define PDEV_HARDWARE_POINTER 0x00000002 /* Supports hardware cursor */
|
||||||
#define PDEV_SOFTWARE_POINTER 0x00000004
|
#define PDEV_SOFTWARE_POINTER 0x00000004
|
||||||
|
@ -29,6 +29,69 @@
|
||||||
|
|
||||||
/* Type definitions ***********************************************************/
|
/* 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
|
typedef struct _ROS_DC_INFO
|
||||||
{
|
{
|
||||||
HRGN hClipRgn; /* Clip region (may be 0) */
|
HRGN hClipRgn; /* Clip region (may be 0) */
|
||||||
|
@ -106,10 +169,10 @@ typedef struct _DC
|
||||||
Do not (re)move this. */
|
Do not (re)move this. */
|
||||||
BASEOBJECT BaseObject;
|
BASEOBJECT BaseObject;
|
||||||
|
|
||||||
DHPDEV dhpdev; /* <- GDIDEVICE.hPDev DHPDEV for device. */
|
DHPDEV dhpdev; /* <- PDEVOBJ.hPDev DHPDEV for device. */
|
||||||
INT dctype;
|
INT dctype;
|
||||||
INT fs;
|
INT fs;
|
||||||
PVOID ppdev; /* PGDIDEVICE aka PDEVOBJ */
|
PPDEVOBJ ppdev;
|
||||||
PVOID hsem; /* PERESOURCE aka HSEMAPHORE */
|
PVOID hsem; /* PERESOURCE aka HSEMAPHORE */
|
||||||
FLONG flGraphicsCaps;
|
FLONG flGraphicsCaps;
|
||||||
FLONG flGraphicsCaps2;
|
FLONG flGraphicsCaps2;
|
||||||
|
@ -155,66 +218,6 @@ typedef struct _GRAPHICS_DEVICE
|
||||||
DWORD StateFlags; /* See DISPLAY_DEVICE_* */
|
DWORD StateFlags; /* See DISPLAY_DEVICE_* */
|
||||||
} GRAPHICS_DEVICE, *PGRAPHICS_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 *********************************************************/
|
/* Internal functions *********************************************************/
|
||||||
|
|
||||||
|
@ -226,7 +229,7 @@ typedef struct _GDIDEVICE
|
||||||
extern PDC defaultDCstate;
|
extern PDC defaultDCstate;
|
||||||
|
|
||||||
NTSTATUS FASTCALL InitDcImpl(VOID);
|
NTSTATUS FASTCALL InitDcImpl(VOID);
|
||||||
PGDIDEVICE FASTCALL IntEnumHDev(VOID);
|
PPDEVOBJ FASTCALL IntEnumHDev(VOID);
|
||||||
HDC FASTCALL DC_AllocDC(PUNICODE_STRING Driver);
|
HDC FASTCALL DC_AllocDC(PUNICODE_STRING Driver);
|
||||||
VOID FASTCALL DC_InitDC(HDC DCToInit);
|
VOID FASTCALL DC_InitDC(HDC DCToInit);
|
||||||
HDC FASTCALL DC_FindOpenDC(PUNICODE_STRING Driver);
|
HDC FASTCALL DC_FindOpenDC(PUNICODE_STRING Driver);
|
||||||
|
@ -264,15 +267,15 @@ UINT FASTCALL IntGdiSetTextAlign(HDC hDC, UINT Mode);
|
||||||
UINT APIENTRY IntGdiGetTextAlign(HDC hDC);
|
UINT APIENTRY IntGdiGetTextAlign(HDC hDC);
|
||||||
COLORREF APIENTRY IntGdiGetTextColor(HDC hDC);
|
COLORREF APIENTRY IntGdiGetTextColor(HDC hDC);
|
||||||
INT APIENTRY IntGdiSetStretchBltMode(HDC hDC, INT stretchBltMode);
|
INT APIENTRY IntGdiSetStretchBltMode(HDC hDC, INT stretchBltMode);
|
||||||
VOID FASTCALL IntGdiReferencePdev(PGDIDEVICE pPDev);
|
VOID FASTCALL IntGdiReferencePdev(PPDEVOBJ pPDev);
|
||||||
VOID FASTCALL IntGdiUnreferencePdev(PGDIDEVICE pPDev, DWORD CleanUpType);
|
VOID FASTCALL IntGdiUnreferencePdev(PPDEVOBJ pPDev, DWORD CleanUpType);
|
||||||
HDC FASTCALL IntGdiCreateDisplayDC(HDEV hDev, ULONG DcType, BOOL EmptyDC);
|
HDC FASTCALL IntGdiCreateDisplayDC(HDEV hDev, ULONG DcType, BOOL EmptyDC);
|
||||||
BOOL FASTCALL IntGdiCleanDC(HDC hDC);
|
BOOL FASTCALL IntGdiCleanDC(HDC hDC);
|
||||||
VOID FASTCALL IntvGetDeviceCaps(PGDIDEVICE, PDEVCAPS);
|
VOID FASTCALL IntvGetDeviceCaps(PPDEVOBJ, PDEVCAPS);
|
||||||
HPEN FASTCALL IntGdiSelectPen(PDC,HPEN);
|
HPEN FASTCALL IntGdiSelectPen(PDC,HPEN);
|
||||||
HBRUSH FASTCALL IntGdiSelectBrush(PDC,HBRUSH);
|
HBRUSH FASTCALL IntGdiSelectBrush(PDC,HBRUSH);
|
||||||
INT FASTCALL IntGdiGetDeviceCaps(PDC,INT);
|
INT FASTCALL IntGdiGetDeviceCaps(PDC,INT);
|
||||||
|
|
||||||
extern PGDIDEVICE pPrimarySurface;
|
extern PPDEVOBJ pPrimarySurface;
|
||||||
|
|
||||||
#endif /* not __WIN32K_DC_H */
|
#endif /* not __WIN32K_DC_H */
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef _WIN32K_MONITOR_H
|
#ifndef _WIN32K_MONITOR_H
|
||||||
#define _WIN32K_MONITOR_H
|
#define _WIN32K_MONITOR_H
|
||||||
|
|
||||||
struct GDIDEVICE;
|
//struct PDEVOBJ;
|
||||||
|
|
||||||
/* monitor object */
|
/* monitor object */
|
||||||
typedef struct _MONITOR_OBJECT
|
typedef struct _MONITOR_OBJECT
|
||||||
|
@ -11,7 +11,7 @@ typedef struct _MONITOR_OBJECT
|
||||||
|
|
||||||
BOOL IsPrimary; /* wether this is the primary monitor */
|
BOOL IsPrimary; /* wether this is the primary monitor */
|
||||||
UNICODE_STRING DeviceName; /* name of the 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 */
|
which this monitor is attached */
|
||||||
struct _MONITOR_OBJECT *Prev, *Next; /* doubly linked list */
|
struct _MONITOR_OBJECT *Prev, *Next; /* doubly linked list */
|
||||||
} MONITOR_OBJECT, *PMONITOR_OBJECT;
|
} MONITOR_OBJECT, *PMONITOR_OBJECT;
|
||||||
|
@ -20,8 +20,8 @@ typedef struct _MONITOR_OBJECT
|
||||||
NTSTATUS InitMonitorImpl();
|
NTSTATUS InitMonitorImpl();
|
||||||
NTSTATUS CleanupMonitorImpl();
|
NTSTATUS CleanupMonitorImpl();
|
||||||
|
|
||||||
NTSTATUS IntAttachMonitor(GDIDEVICE *pGdiDevice, ULONG DisplayNumber);
|
NTSTATUS IntAttachMonitor(PDEVOBJ *pGdiDevice, ULONG DisplayNumber);
|
||||||
NTSTATUS IntDetachMonitor(GDIDEVICE *pGdiDevice);
|
NTSTATUS IntDetachMonitor(PDEVOBJ *pGdiDevice);
|
||||||
PMONITOR_OBJECT FASTCALL UserGetMonitorObject(IN HMONITOR);
|
PMONITOR_OBJECT FASTCALL UserGetMonitorObject(IN HMONITOR);
|
||||||
|
|
||||||
#endif /* _WIN32K_MONITOR_H */
|
#endif /* _WIN32K_MONITOR_H */
|
||||||
|
|
|
@ -57,8 +57,8 @@ BOOL INTERNAL_CALL SURFACE_Cleanup(PVOID ObjectBody);
|
||||||
BOOL INTERNAL_CALL SURFACE_InitBitsLock(SURFACE *pBMObj);
|
BOOL INTERNAL_CALL SURFACE_InitBitsLock(SURFACE *pBMObj);
|
||||||
void INTERNAL_CALL SURFACE_CleanupBitsLock(SURFACE *pBMObj);
|
void INTERNAL_CALL SURFACE_CleanupBitsLock(SURFACE *pBMObj);
|
||||||
|
|
||||||
#define GDIDEV(SurfObj) ((GDIDEVICE *)((SurfObj)->hdev))
|
#define GDIDEV(SurfObj) ((PDEVOBJ *)((SurfObj)->hdev))
|
||||||
#define GDIDEVFUNCS(SurfObj) ((GDIDEVICE *)((SurfObj)->hdev))->DriverFunctions
|
#define GDIDEVFUNCS(SurfObj) ((PDEVOBJ *)((SurfObj)->hdev))->DriverFunctions
|
||||||
|
|
||||||
INT FASTCALL BitsPerFormat (ULONG Format);
|
INT FASTCALL BitsPerFormat (ULONG Format);
|
||||||
ULONG FASTCALL BitmapFormat (WORD Bits, DWORD Compression);
|
ULONG FASTCALL BitmapFormat (WORD Bits, DWORD Compression);
|
||||||
|
|
|
@ -35,7 +35,7 @@ intEnableReactXDriver(HDC hdc)
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
PEPROCESS Proc = NULL;
|
PEPROCESS Proc = NULL;
|
||||||
PDC pDC = NULL;
|
PDC pDC = NULL;
|
||||||
PGDIDEVICE pDev = NULL;
|
PPDEVOBJ pDev = NULL;
|
||||||
PGD_DXDDENABLEDIRECTDRAW pfnDdEnableDirectDraw = NULL;
|
PGD_DXDDENABLEDIRECTDRAW pfnDdEnableDirectDraw = NULL;
|
||||||
BOOL success = FALSE;
|
BOOL success = FALSE;
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ intEnableReactXDriver(HDC hdc)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
pDev = (PGDIDEVICE)pDC->ppdev;
|
pDev = pDC->ppdev;
|
||||||
|
|
||||||
/* test see if drv got a dx interface or not */
|
/* test see if drv got a dx interface or not */
|
||||||
if ( ( pDev->DriverFunctions.DisableDirectDraw == NULL) ||
|
if ( ( pDev->DriverFunctions.DisableDirectDraw == NULL) ||
|
||||||
|
|
|
@ -281,7 +281,7 @@ DxEngGetHdevData(HDEV hDev,
|
||||||
DXEGSHDEVDATA Type)
|
DXEGSHDEVDATA Type)
|
||||||
{
|
{
|
||||||
DWORD_PTR retVal = 0;
|
DWORD_PTR retVal = 0;
|
||||||
PGDIDEVICE PDev = (PGDIDEVICE)hDev;
|
PPDEVOBJ PDev = (PPDEVOBJ)hDev;
|
||||||
|
|
||||||
DPRINT1("ReactX Calling : DxEngGetHdevData DXEGSHDEVDATA : %ld\n", Type);
|
DPRINT1("ReactX Calling : DxEngGetHdevData DXEGSHDEVDATA : %ld\n", Type);
|
||||||
|
|
||||||
|
@ -416,7 +416,7 @@ DxEngSetHdevData(HDEV hDev,
|
||||||
|
|
||||||
if ( Type == DxEGShDevData_dd_nCount )
|
if ( Type == DxEGShDevData_dd_nCount )
|
||||||
{
|
{
|
||||||
((PGDIDEVICE)hDev)->DxDd_nCount = Data;
|
((PPDEVOBJ)hDev)->DxDd_nCount = Data;
|
||||||
retVal = TRUE; // Set
|
retVal = TRUE; // Set
|
||||||
}
|
}
|
||||||
return retVal;
|
return retVal;
|
||||||
|
@ -514,7 +514,7 @@ DxEngIncDispUniq()
|
||||||
* The function DxEngLockHdev lock the internal PDEV
|
* The function DxEngLockHdev lock the internal PDEV
|
||||||
*
|
*
|
||||||
* @param HDEV type
|
* @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
|
* @return
|
||||||
* This function returns TRUE no matter what.
|
* This function returns TRUE no matter what.
|
||||||
|
@ -527,7 +527,7 @@ BOOLEAN
|
||||||
APIENTRY
|
APIENTRY
|
||||||
DxEngLockHdev(HDEV hDev)
|
DxEngLockHdev(HDEV hDev)
|
||||||
{
|
{
|
||||||
PGDIDEVICE ppdev = (PGDIDEVICE)hDev;
|
PPDEVOBJ ppdev = (PPDEVOBJ)hDev;
|
||||||
PERESOURCE Resource;
|
PERESOURCE Resource;
|
||||||
|
|
||||||
DPRINT1("ReactX Calling : DxEngLockHdev \n");
|
DPRINT1("ReactX Calling : DxEngLockHdev \n");
|
||||||
|
@ -551,7 +551,7 @@ DxEngLockHdev(HDEV hDev)
|
||||||
* The function DxEngUnlockHdev unlock the internal PDEV
|
* The function DxEngUnlockHdev unlock the internal PDEV
|
||||||
*
|
*
|
||||||
* @param HDEV type
|
* @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
|
* @return
|
||||||
* This function returns TRUE no matter what.
|
* This function returns TRUE no matter what.
|
||||||
|
@ -564,7 +564,7 @@ BOOLEAN
|
||||||
APIENTRY
|
APIENTRY
|
||||||
DxEngUnlockHdev(HDEV hDev)
|
DxEngUnlockHdev(HDEV hDev)
|
||||||
{
|
{
|
||||||
PGDIDEVICE ppdev = (PGDIDEVICE)hDev;
|
PPDEVOBJ ppdev = (PPDEVOBJ)hDev;
|
||||||
PERESOURCE Resource = ppdev->hsemDevLock;
|
PERESOURCE Resource = ppdev->hsemDevLock;
|
||||||
|
|
||||||
DPRINT1("ReactX Calling : DxEngUnlockHdev \n");
|
DPRINT1("ReactX Calling : DxEngUnlockHdev \n");
|
||||||
|
@ -585,7 +585,7 @@ BOOLEAN
|
||||||
APIENTRY
|
APIENTRY
|
||||||
DxEngReferenceHdev(HDEV hDev)
|
DxEngReferenceHdev(HDEV hDev)
|
||||||
{
|
{
|
||||||
IntGdiReferencePdev((PGDIDEVICE) hDev);
|
IntGdiReferencePdev((PPDEVOBJ) hDev);
|
||||||
/* ALWAYS return true */
|
/* ALWAYS return true */
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -675,7 +675,7 @@ BOOLEAN
|
||||||
APIENTRY
|
APIENTRY
|
||||||
DxEngIsHdevLockedByCurrentThread(HDEV hDev)
|
DxEngIsHdevLockedByCurrentThread(HDEV hDev)
|
||||||
{ // base on EngIsSemaphoreOwnedByCurrentThread w/o the Ex call.
|
{ // 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();
|
return pSem->OwnerEntry.OwnerThread == (ERESOURCE_THREAD)PsGetCurrentThread();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -687,7 +687,7 @@ BOOLEAN
|
||||||
APIENTRY
|
APIENTRY
|
||||||
DxEngUnreferenceHdev(HDEV hDev)
|
DxEngUnreferenceHdev(HDEV hDev)
|
||||||
{
|
{
|
||||||
IntGdiUnreferencePdev((PGDIDEVICE) hDev, 0);
|
IntGdiUnreferencePdev((PPDEVOBJ) hDev, 0);
|
||||||
return TRUE; // Always true.
|
return TRUE; // Always true.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,7 @@ IntSetCursor(PWINSTATION_OBJECT WinSta, PCURICON_OBJECT NewCursor,
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
dcbmp = dc->rosdc.hBitmap;
|
dcbmp = dc->rosdc.hBitmap;
|
||||||
DevInfo = (PDEVINFO)&((GDIDEVICE *)dc->ppdev)->DevInfo;
|
DevInfo = (PDEVINFO)&dc->ppdev->DevInfo;
|
||||||
DC_UnlockDc(dc);
|
DC_UnlockDc(dc);
|
||||||
|
|
||||||
psurf = SURFACE_LockSurface(dcbmp);
|
psurf = SURFACE_LockSurface(dcbmp);
|
||||||
|
@ -1753,7 +1753,7 @@ UserShowCursor(BOOL bShow)
|
||||||
HBITMAP hbmpDc;
|
HBITMAP hbmpDc;
|
||||||
SURFOBJ *SurfObj;
|
SURFOBJ *SurfObj;
|
||||||
SURFACE *psurfDc;
|
SURFACE *psurfDc;
|
||||||
GDIDEVICE *ppdev;
|
PDEVOBJ *ppdev;
|
||||||
GDIPOINTER *pgp;
|
GDIPOINTER *pgp;
|
||||||
int showpointer=0;
|
int showpointer=0;
|
||||||
|
|
||||||
|
|
|
@ -1181,7 +1181,7 @@ IntMouseInput(MOUSEINPUT *mi)
|
||||||
{
|
{
|
||||||
IntEngMovePointer(pso, MousePos.x, MousePos.y, &(GDIDEV(pso)->Pointer.Exclude));
|
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 */
|
* use the old values to move the pointer image */
|
||||||
gpsi->ptCursor.x = MousePos.x;
|
gpsi->ptCursor.x = MousePos.x;
|
||||||
gpsi->ptCursor.y = MousePos.y;
|
gpsi->ptCursor.y = MousePos.y;
|
||||||
|
|
|
@ -40,8 +40,8 @@ InitMetrics(VOID)
|
||||||
pScreenDC = DC_LockDc(hScreenDC);
|
pScreenDC = DC_LockDc(hScreenDC);
|
||||||
if (pScreenDC)
|
if (pScreenDC)
|
||||||
{
|
{
|
||||||
Width = ((PGDIDEVICE)pScreenDC->ppdev)->GDIInfo.ulHorzRes;
|
Width = pScreenDC->ppdev->GDIInfo.ulHorzRes;
|
||||||
Height = ((PGDIDEVICE)pScreenDC->ppdev)->GDIInfo.ulVertRes;
|
Height = pScreenDC->ppdev->GDIInfo.ulVertRes;
|
||||||
DC_UnlockDc(pScreenDC);
|
DC_UnlockDc(pScreenDC);
|
||||||
}
|
}
|
||||||
NtGdiDeleteObjectApp(hScreenDC);
|
NtGdiDeleteObjectApp(hScreenDC);
|
||||||
|
|
|
@ -151,14 +151,14 @@ UserGetMonitorObject(IN HMONITOR hMonitor)
|
||||||
*
|
*
|
||||||
* Arguments
|
* 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)
|
* DisplayNumber Display Number (starting with 0)
|
||||||
*
|
*
|
||||||
* Return value
|
* Return value
|
||||||
* Returns a NTSTATUS
|
* Returns a NTSTATUS
|
||||||
*/
|
*/
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
IntAttachMonitor(IN GDIDEVICE *pGdiDevice,
|
IntAttachMonitor(IN PDEVOBJ *pGdiDevice,
|
||||||
IN ULONG DisplayNumber)
|
IN ULONG DisplayNumber)
|
||||||
{
|
{
|
||||||
PMONITOR_OBJECT Monitor;
|
PMONITOR_OBJECT Monitor;
|
||||||
|
@ -211,13 +211,13 @@ IntAttachMonitor(IN GDIDEVICE *pGdiDevice,
|
||||||
*
|
*
|
||||||
* Arguments
|
* 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
|
* Return value
|
||||||
* Returns a NTSTATUS
|
* Returns a NTSTATUS
|
||||||
*/
|
*/
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
IntDetachMonitor(IN GDIDEVICE *pGdiDevice)
|
IntDetachMonitor(IN PDEVOBJ *pGdiDevice)
|
||||||
{
|
{
|
||||||
PMONITOR_OBJECT Monitor;
|
PMONITOR_OBJECT Monitor;
|
||||||
|
|
||||||
|
|
|
@ -281,7 +281,7 @@ NtGdiCreateCompatibleBitmap(
|
||||||
Dc = DC_LockDc(hDC);
|
Dc = DC_LockDc(hDC);
|
||||||
|
|
||||||
DPRINT("NtGdiCreateCompatibleBitmap(%04x,%d,%d, bpp:%d) = \n",
|
DPRINT("NtGdiCreateCompatibleBitmap(%04x,%d,%d, bpp:%d) = \n",
|
||||||
hDC, Width, Height, ((PGDIDEVICE)Dc->ppdev)->GDIInfo.cBitsPixel);
|
hDC, Width, Height, Dc->ppdev->GDIInfo.cBitsPixel);
|
||||||
|
|
||||||
if (NULL == Dc)
|
if (NULL == Dc)
|
||||||
{
|
{
|
||||||
|
|
|
@ -449,7 +449,7 @@ IntGetSystemPaletteEntries(HDC hDC,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Ret = ((PGDIDEVICE)dc->ppdev)->GDIInfo.ulNumPalReg;
|
Ret = dc->ppdev->GDIInfo.ulNumPalReg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -668,36 +668,36 @@ IntGdiSetMapMode(PDC dc,
|
||||||
case MM_LOMETRIC:
|
case MM_LOMETRIC:
|
||||||
pdcattr->szlWindowExt.cx = 3600;
|
pdcattr->szlWindowExt.cx = 3600;
|
||||||
pdcattr->szlWindowExt.cy = 2700;
|
pdcattr->szlWindowExt.cy = 2700;
|
||||||
pdcattr->szlViewportExt.cx = ((PGDIDEVICE)dc->ppdev)->GDIInfo.ulHorzRes;
|
pdcattr->szlViewportExt.cx = dc->ppdev->GDIInfo.ulHorzRes;
|
||||||
pdcattr->szlViewportExt.cy = -((PGDIDEVICE)dc->ppdev)->GDIInfo.ulVertRes;
|
pdcattr->szlViewportExt.cy = -dc->ppdev->GDIInfo.ulVertRes;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MM_HIMETRIC:
|
case MM_HIMETRIC:
|
||||||
pdcattr->szlWindowExt.cx = 36000;
|
pdcattr->szlWindowExt.cx = 36000;
|
||||||
pdcattr->szlWindowExt.cy = 27000;
|
pdcattr->szlWindowExt.cy = 27000;
|
||||||
pdcattr->szlViewportExt.cx = ((PGDIDEVICE)dc->ppdev)->GDIInfo.ulHorzRes;
|
pdcattr->szlViewportExt.cx = dc->ppdev->GDIInfo.ulHorzRes;
|
||||||
pdcattr->szlViewportExt.cy = -((PGDIDEVICE)dc->ppdev)->GDIInfo.ulVertRes;
|
pdcattr->szlViewportExt.cy = -dc->ppdev->GDIInfo.ulVertRes;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MM_LOENGLISH:
|
case MM_LOENGLISH:
|
||||||
pdcattr->szlWindowExt.cx = 1417;
|
pdcattr->szlWindowExt.cx = 1417;
|
||||||
pdcattr->szlWindowExt.cy = 1063;
|
pdcattr->szlWindowExt.cy = 1063;
|
||||||
pdcattr->szlViewportExt.cx = ((PGDIDEVICE)dc->ppdev)->GDIInfo.ulHorzRes;
|
pdcattr->szlViewportExt.cx = dc->ppdev->GDIInfo.ulHorzRes;
|
||||||
pdcattr->szlViewportExt.cy = -((PGDIDEVICE)dc->ppdev)->GDIInfo.ulVertRes;
|
pdcattr->szlViewportExt.cy = -dc->ppdev->GDIInfo.ulVertRes;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MM_HIENGLISH:
|
case MM_HIENGLISH:
|
||||||
pdcattr->szlWindowExt.cx = 14173;
|
pdcattr->szlWindowExt.cx = 14173;
|
||||||
pdcattr->szlWindowExt.cy = 10630;
|
pdcattr->szlWindowExt.cy = 10630;
|
||||||
pdcattr->szlViewportExt.cx = ((PGDIDEVICE)dc->ppdev)->GDIInfo.ulHorzRes;
|
pdcattr->szlViewportExt.cx = dc->ppdev->GDIInfo.ulHorzRes;
|
||||||
pdcattr->szlViewportExt.cy = -((PGDIDEVICE)dc->ppdev)->GDIInfo.ulVertRes;
|
pdcattr->szlViewportExt.cy = -dc->ppdev->GDIInfo.ulVertRes;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MM_TWIPS:
|
case MM_TWIPS:
|
||||||
pdcattr->szlWindowExt.cx = 20409;
|
pdcattr->szlWindowExt.cx = 20409;
|
||||||
pdcattr->szlWindowExt.cy = 15307;
|
pdcattr->szlWindowExt.cy = 15307;
|
||||||
pdcattr->szlViewportExt.cx = ((PGDIDEVICE)dc->ppdev)->GDIInfo.ulHorzRes;
|
pdcattr->szlViewportExt.cx = dc->ppdev->GDIInfo.ulHorzRes;
|
||||||
pdcattr->szlViewportExt.cy = -((PGDIDEVICE)dc->ppdev)->GDIInfo.ulVertRes;
|
pdcattr->szlViewportExt.cy = -dc->ppdev->GDIInfo.ulVertRes;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MM_ANISOTROPIC:
|
case MM_ANISOTROPIC:
|
||||||
|
|
|
@ -29,8 +29,8 @@
|
||||||
|
|
||||||
// --------------------------------------------------------- File Statics
|
// --------------------------------------------------------- File Statics
|
||||||
|
|
||||||
static GDIDEVICE PrimarySurface;
|
static PDEVOBJ PrimarySurface;
|
||||||
PGDIDEVICE pPrimarySurface = &PrimarySurface;
|
PPDEVOBJ pPrimarySurface = &PrimarySurface;
|
||||||
static KEVENT VideoDriverNeedsPreparation;
|
static KEVENT VideoDriverNeedsPreparation;
|
||||||
static KEVENT VideoDriverPrepared;
|
static KEVENT VideoDriverPrepared;
|
||||||
PDC defaultDCstate = NULL;
|
PDC defaultDCstate = NULL;
|
||||||
|
@ -358,7 +358,7 @@ IntPrepareDriver()
|
||||||
|
|
||||||
RtlZeroMemory(&PrimarySurface, sizeof(PrimarySurface));
|
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);
|
PrimarySurface.VideoFileObject = DRIVER_FindMPDriver(DisplayNumber);
|
||||||
|
|
||||||
|
@ -824,8 +824,8 @@ IntGdiCreateDC(PUNICODE_STRING Driver,
|
||||||
// ATM we only have one display.
|
// ATM we only have one display.
|
||||||
pdcattr->ulDirty_ |= DC_PRIMARY_DISPLAY;
|
pdcattr->ulDirty_ |= DC_PRIMARY_DISPLAY;
|
||||||
|
|
||||||
pdc->rosdc.bitsPerPixel = ((PGDIDEVICE)pdc->ppdev)->GDIInfo.cBitsPixel *
|
pdc->rosdc.bitsPerPixel = pdc->ppdev->GDIInfo.cBitsPixel *
|
||||||
((PGDIDEVICE)pdc->ppdev)->GDIInfo.cPlanes;
|
pdc->ppdev->GDIInfo.cPlanes;
|
||||||
DPRINT("Bits per pel: %u\n", pdc->rosdc.bitsPerPixel);
|
DPRINT("Bits per pel: %u\n", pdc->rosdc.bitsPerPixel);
|
||||||
|
|
||||||
pdc->flGraphicsCaps = PrimarySurface.DevInfo.flGraphicsCaps;
|
pdc->flGraphicsCaps = PrimarySurface.DevInfo.flGraphicsCaps;
|
||||||
|
@ -836,14 +836,14 @@ IntGdiCreateDC(PUNICODE_STRING Driver,
|
||||||
pdcattr->jROP2 = R2_COPYPEN;
|
pdcattr->jROP2 = R2_COPYPEN;
|
||||||
|
|
||||||
pdc->erclWindow.top = pdc->erclWindow.left = 0;
|
pdc->erclWindow.top = pdc->erclWindow.left = 0;
|
||||||
pdc->erclWindow.right = ((PGDIDEVICE)pdc->ppdev)->GDIInfo.ulHorzRes;
|
pdc->erclWindow.right = pdc->ppdev->GDIInfo.ulHorzRes;
|
||||||
pdc->erclWindow.bottom = ((PGDIDEVICE)pdc->ppdev)->GDIInfo.ulVertRes;
|
pdc->erclWindow.bottom = pdc->ppdev->GDIInfo.ulVertRes;
|
||||||
pdc->dclevel.flPath &= ~DCPATH_CLOCKWISE; // Default is CCW.
|
pdc->dclevel.flPath &= ~DCPATH_CLOCKWISE; // Default is CCW.
|
||||||
|
|
||||||
pdcattr->iCS_CP = ftGdiGetTextCharsetInfo(pdc,NULL,0);
|
pdcattr->iCS_CP = ftGdiGetTextCharsetInfo(pdc,NULL,0);
|
||||||
|
|
||||||
hVisRgn = NtGdiCreateRectRgn(0, 0, ((PGDIDEVICE)pdc->ppdev)->GDIInfo.ulHorzRes,
|
hVisRgn = NtGdiCreateRectRgn(0, 0, pdc->ppdev->GDIInfo.ulHorzRes,
|
||||||
((PGDIDEVICE)pdc->ppdev)->GDIInfo.ulVertRes);
|
pdc->ppdev->GDIInfo.ulVertRes);
|
||||||
|
|
||||||
if (!CreateAsIC)
|
if (!CreateAsIC)
|
||||||
{
|
{
|
||||||
|
@ -1245,8 +1245,8 @@ IntGetAspectRatioFilter(PDC pDC,
|
||||||
{
|
{
|
||||||
// "This specifies that Windows should only match fonts that have the
|
// "This specifies that Windows should only match fonts that have the
|
||||||
// same aspect ratio as the display.", Programming Windows, Fifth Ed.
|
// same aspect ratio as the display.", Programming Windows, Fifth Ed.
|
||||||
AspectRatio->cx = ((PGDIDEVICE)pDC->ppdev)->GDIInfo.ulLogPixelsX;
|
AspectRatio->cx = pDC->ppdev->GDIInfo.ulLogPixelsX;
|
||||||
AspectRatio->cy = ((PGDIDEVICE)pDC->ppdev)->GDIInfo.ulLogPixelsY;
|
AspectRatio->cy = pDC->ppdev->GDIInfo.ulLogPixelsY;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1595,7 +1595,7 @@ IntGdiSetDCState ( HDC hDC, HDC hDCSave )
|
||||||
|
|
||||||
INT
|
INT
|
||||||
FASTCALL
|
FASTCALL
|
||||||
IntcFonts(PGDIDEVICE pDevObj)
|
IntcFonts(PPDEVOBJ pDevObj)
|
||||||
{
|
{
|
||||||
ULONG_PTR Junk;
|
ULONG_PTR Junk;
|
||||||
// Msdn DrvQueryFont:
|
// Msdn DrvQueryFont:
|
||||||
|
@ -1614,7 +1614,7 @@ IntcFonts(PGDIDEVICE pDevObj)
|
||||||
|
|
||||||
INT
|
INT
|
||||||
FASTCALL
|
FASTCALL
|
||||||
IntGetColorManagementCaps(PGDIDEVICE pDevObj)
|
IntGetColorManagementCaps(PPDEVOBJ pDevObj)
|
||||||
{
|
{
|
||||||
INT ret = CM_NONE;
|
INT ret = CM_NONE;
|
||||||
|
|
||||||
|
@ -1635,7 +1635,7 @@ INT FASTCALL
|
||||||
IntGdiGetDeviceCaps(PDC dc, INT Index)
|
IntGdiGetDeviceCaps(PDC dc, INT Index)
|
||||||
{
|
{
|
||||||
INT ret = 0;
|
INT ret = 0;
|
||||||
PGDIDEVICE ppdev = dc->ppdev;
|
PPDEVOBJ ppdev = dc->ppdev;
|
||||||
/* Retrieve capability */
|
/* Retrieve capability */
|
||||||
switch (Index)
|
switch (Index)
|
||||||
{
|
{
|
||||||
|
@ -1834,7 +1834,7 @@ NtGdiGetDeviceCaps(HDC hDC,
|
||||||
VOID
|
VOID
|
||||||
FASTCALL
|
FASTCALL
|
||||||
IntvGetDeviceCaps(
|
IntvGetDeviceCaps(
|
||||||
PGDIDEVICE pDevObj,
|
PPDEVOBJ pDevObj,
|
||||||
PDEVCAPS pDevCaps)
|
PDEVCAPS pDevCaps)
|
||||||
{
|
{
|
||||||
ULONG Tmp = 0;
|
ULONG Tmp = 0;
|
||||||
|
@ -2715,7 +2715,7 @@ DC_LockDisplay(HDC hDC)
|
||||||
PERESOURCE Resource;
|
PERESOURCE Resource;
|
||||||
PDC dc = DC_LockDc(hDC);
|
PDC dc = DC_LockDc(hDC);
|
||||||
if (!dc) return;
|
if (!dc) return;
|
||||||
Resource = ((PGDIDEVICE)dc->ppdev)->hsemDevLock;
|
Resource = dc->ppdev->hsemDevLock;
|
||||||
DC_UnlockDc(dc);
|
DC_UnlockDc(dc);
|
||||||
if (!Resource) return;
|
if (!Resource) return;
|
||||||
KeEnterCriticalRegion();
|
KeEnterCriticalRegion();
|
||||||
|
@ -2729,7 +2729,7 @@ DC_UnlockDisplay(HDC hDC)
|
||||||
PERESOURCE Resource;
|
PERESOURCE Resource;
|
||||||
PDC dc = DC_LockDc(hDC);
|
PDC dc = DC_LockDc(hDC);
|
||||||
if (!dc) return;
|
if (!dc) return;
|
||||||
Resource = ((PGDIDEVICE)dc->ppdev)->hsemDevLock;
|
Resource = dc->ppdev->hsemDevLock;
|
||||||
DC_UnlockDc(dc);
|
DC_UnlockDc(dc);
|
||||||
if (!Resource) return;
|
if (!Resource) return;
|
||||||
ExReleaseResourceLite( Resource );
|
ExReleaseResourceLite( Resource );
|
||||||
|
@ -2749,7 +2749,7 @@ IntIsPrimarySurface(SURFOBJ *SurfObj)
|
||||||
//
|
//
|
||||||
// Enumerate HDev
|
// Enumerate HDev
|
||||||
//
|
//
|
||||||
PGDIDEVICE FASTCALL
|
PPDEVOBJ FASTCALL
|
||||||
IntEnumHDev(VOID)
|
IntEnumHDev(VOID)
|
||||||
{
|
{
|
||||||
// I guess we will soon have more than one primary surface.
|
// I guess we will soon have more than one primary surface.
|
||||||
|
@ -2759,7 +2759,7 @@ IntEnumHDev(VOID)
|
||||||
|
|
||||||
|
|
||||||
VOID FASTCALL
|
VOID FASTCALL
|
||||||
IntGdiReferencePdev(PGDIDEVICE ppdev)
|
IntGdiReferencePdev(PPDEVOBJ ppdev)
|
||||||
{
|
{
|
||||||
if(!hsemDriverMgmt) hsemDriverMgmt = EngCreateSemaphore(); // Hax, should be in dllmain.c
|
if(!hsemDriverMgmt) hsemDriverMgmt = EngCreateSemaphore(); // Hax, should be in dllmain.c
|
||||||
IntGdiAcquireSemaphore(hsemDriverMgmt);
|
IntGdiAcquireSemaphore(hsemDriverMgmt);
|
||||||
|
@ -2768,13 +2768,13 @@ IntGdiReferencePdev(PGDIDEVICE ppdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID FASTCALL
|
VOID FASTCALL
|
||||||
IntGdiUnreferencePdev(PGDIDEVICE ppdev, DWORD CleanUpType)
|
IntGdiUnreferencePdev(PPDEVOBJ ppdev, DWORD CleanUpType)
|
||||||
{
|
{
|
||||||
IntGdiAcquireSemaphore(hsemDriverMgmt);
|
IntGdiAcquireSemaphore(hsemDriverMgmt);
|
||||||
ppdev->cPdevRefs--;
|
ppdev->cPdevRefs--;
|
||||||
if (!ppdev->cPdevRefs)
|
if (!ppdev->cPdevRefs)
|
||||||
{
|
{
|
||||||
// Handle the destruction of ppdev or GDIDEVICE or PDEVOBJ or PDEV etc.
|
// Handle the destruction of ppdev or PDEVOBJ or PDEVOBJ or PDEV etc.
|
||||||
}
|
}
|
||||||
IntGdiReleaseSemaphore(hsemDriverMgmt);
|
IntGdiReleaseSemaphore(hsemDriverMgmt);
|
||||||
}
|
}
|
||||||
|
@ -2813,7 +2813,7 @@ GetDisplayNumberFromDeviceName(
|
||||||
DesktopHDC = UserGetWindowDC(DesktopObject);
|
DesktopHDC = UserGetWindowDC(DesktopObject);
|
||||||
pDC = DC_LockDc(DesktopHDC);
|
pDC = DC_LockDc(DesktopHDC);
|
||||||
|
|
||||||
*DisplayNumber = ((GDIDEVICE *)pDC->ppdev)->DisplayNumber;
|
*DisplayNumber = pDC->ppdev->DisplayNumber;
|
||||||
|
|
||||||
DC_UnlockDc(pDC);
|
DC_UnlockDc(pDC);
|
||||||
UserReleaseDC(DesktopObject, DesktopHDC, FALSE);
|
UserReleaseDC(DesktopObject, DesktopHDC, FALSE);
|
||||||
|
@ -3338,7 +3338,7 @@ IntChangeDisplaySettings(
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
swprintf (szBuffer, L"\\\\.\\DISPLAY%lu", ((GDIDEVICE *)DC->ppdev)->DisplayNumber);
|
swprintf (szBuffer, L"\\\\.\\DISPLAY%lu", DC->ppdev->DisplayNumber);
|
||||||
DC_UnlockDc(DC);
|
DC_UnlockDc(DC);
|
||||||
|
|
||||||
RtlInitUnicodeString(&InDeviceName, szBuffer);
|
RtlInitUnicodeString(&InDeviceName, szBuffer);
|
||||||
|
@ -3437,9 +3437,9 @@ APIENTRY
|
||||||
NtGdiGetDhpdev(
|
NtGdiGetDhpdev(
|
||||||
IN HDEV hdev)
|
IN HDEV hdev)
|
||||||
{
|
{
|
||||||
PGDIDEVICE ppdev, pGdiDevice = (PGDIDEVICE) hdev;
|
PPDEVOBJ ppdev, pGdiDevice = (PPDEVOBJ) hdev;
|
||||||
if (!pGdiDevice) return NULL;
|
if (!pGdiDevice) return NULL;
|
||||||
if ( pGdiDevice < (PGDIDEVICE)MmSystemRangeStart) return NULL;
|
if ( pGdiDevice < (PPDEVOBJ)MmSystemRangeStart) return NULL;
|
||||||
ppdev = pPrimarySurface;
|
ppdev = pPrimarySurface;
|
||||||
IntGdiAcquireSemaphore(hsemDriverMgmt);
|
IntGdiAcquireSemaphore(hsemDriverMgmt);
|
||||||
do
|
do
|
||||||
|
|
|
@ -279,7 +279,7 @@ IntSetDIBits(
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Destination palette obtained from the hDC
|
// Destination palette obtained from the hDC
|
||||||
DDB_Palette = ((GDIDEVICE *)DC->ppdev)->DevInfo.hpalDefault;
|
DDB_Palette = DC->ppdev->DevInfo.hpalDefault;
|
||||||
}
|
}
|
||||||
hDCPalette = PALETTE_LockPalette(DDB_Palette);
|
hDCPalette = PALETTE_LockPalette(DDB_Palette);
|
||||||
if (NULL == hDCPalette)
|
if (NULL == hDCPalette)
|
||||||
|
@ -522,7 +522,7 @@ NtGdiSetDIBitsToDeviceInternal(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Obtain destination palette from the DC */
|
/* Obtain destination palette from the DC */
|
||||||
pDCPalette = PALETTE_LockPalette(((GDIDEVICE *)pDC->ppdev)->DevInfo.hpalDefault);
|
pDCPalette = PALETTE_LockPalette(pDC->ppdev->DevInfo.hpalDefault);
|
||||||
if (!pDCPalette)
|
if (!pDCPalette)
|
||||||
{
|
{
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
|
@ -531,7 +531,7 @@ NtGdiSetDIBitsToDeviceInternal(
|
||||||
}
|
}
|
||||||
|
|
||||||
DDBPaletteType = pDCPalette->Mode;
|
DDBPaletteType = pDCPalette->Mode;
|
||||||
DDBPalette = ((GDIDEVICE *)pDC->ppdev)->DevInfo.hpalDefault;
|
DDBPalette = pDC->ppdev->DevInfo.hpalDefault;
|
||||||
PALETTE_UnlockPalette(pDCPalette);
|
PALETTE_UnlockPalette(pDCPalette);
|
||||||
|
|
||||||
DIBPalette = BuildDIBPalette(bmi, (PINT)&DIBPaletteType);
|
DIBPalette = BuildDIBPalette(bmi, (PINT)&DIBPaletteType);
|
||||||
|
|
|
@ -19,7 +19,7 @@ VOID
|
||||||
FASTCALL
|
FASTCALL
|
||||||
DoDeviceSync( SURFOBJ *Surface, PRECTL Rect, FLONG fl)
|
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.
|
// No punting and "Handle to a surface, provided that the surface is device-managed.
|
||||||
// Otherwise, dhsurf is zero".
|
// Otherwise, dhsurf is zero".
|
||||||
if (!(Device->flFlags & PDEV_DRIVER_PUNTED_CALL) && (Surface->dhsurf))
|
if (!(Device->flFlags & PDEV_DRIVER_PUNTED_CALL) && (Surface->dhsurf))
|
||||||
|
@ -40,7 +40,7 @@ FASTCALL
|
||||||
SynchonizeDriver(FLONG Flags)
|
SynchonizeDriver(FLONG Flags)
|
||||||
{
|
{
|
||||||
SURFOBJ *SurfObj;
|
SURFOBJ *SurfObj;
|
||||||
PGDIDEVICE Device;
|
PPDEVOBJ Device;
|
||||||
|
|
||||||
if (Flags & GCAPS2_SYNCFLUSH)
|
if (Flags & GCAPS2_SYNCFLUSH)
|
||||||
Flags = DSS_FLUSH_EVENT;
|
Flags = DSS_FLUSH_EVENT;
|
||||||
|
|
|
@ -99,7 +99,7 @@ BOOL
|
||||||
FASTCALL
|
FASTCALL
|
||||||
IntGetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp)
|
IntGetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp)
|
||||||
{
|
{
|
||||||
PGDIDEVICE pGDev = (PGDIDEVICE) hPDev;
|
PPDEVOBJ pGDev = (PPDEVOBJ) hPDev;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!(pGDev->flFlags & PDEV_DISPLAY )) return FALSE;
|
if (!(pGDev->flFlags & PDEV_DISPLAY )) return FALSE;
|
||||||
|
@ -234,7 +234,7 @@ UpdateDeviceGammaRamp( HDEV hPDev )
|
||||||
BOOL Ret = FALSE;
|
BOOL Ret = FALSE;
|
||||||
PPALGDI palGDI;
|
PPALGDI palGDI;
|
||||||
PALOBJ *palPtr;
|
PALOBJ *palPtr;
|
||||||
PGDIDEVICE pGDev = (PGDIDEVICE) hPDev;
|
PPDEVOBJ pGDev = (PPDEVOBJ) hPDev;
|
||||||
|
|
||||||
if ((pGDev->DevInfo.iDitherFormat == BMF_8BPP) ||
|
if ((pGDev->DevInfo.iDitherFormat == BMF_8BPP) ||
|
||||||
(pGDev->DevInfo.iDitherFormat == BMF_16BPP) ||
|
(pGDev->DevInfo.iDitherFormat == BMF_16BPP) ||
|
||||||
|
@ -290,7 +290,7 @@ IntSetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp, BOOL Test)
|
||||||
{
|
{
|
||||||
WORD IcmGR, i, R, G, B;
|
WORD IcmGR, i, R, G, B;
|
||||||
BOOL Ret = FALSE, TstPeak;
|
BOOL Ret = FALSE, TstPeak;
|
||||||
PGDIDEVICE pGDev = (PGDIDEVICE) hPDev;
|
PPDEVOBJ pGDev = (PPDEVOBJ) hPDev;
|
||||||
|
|
||||||
if (!hPDev) return FALSE;
|
if (!hPDev) return FALSE;
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ IntGdiExtEscape(
|
||||||
|
|
||||||
/* FIXME - Handle psurf == NULL !!!!!! */
|
/* FIXME - Handle psurf == NULL !!!!!! */
|
||||||
|
|
||||||
if ( NULL == ((GDIDEVICE *)dc->ppdev)->DriverFunctions.Escape )
|
if ( NULL == dc->ppdev->DriverFunctions.Escape )
|
||||||
{
|
{
|
||||||
Result = IntEngExtEscape(
|
Result = IntEngExtEscape(
|
||||||
&psurf->SurfObj,
|
&psurf->SurfObj,
|
||||||
|
@ -131,7 +131,7 @@ IntGdiExtEscape(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Result = ((GDIDEVICE *)dc->ppdev)->DriverFunctions.Escape(
|
Result = dc->ppdev->DriverFunctions.Escape(
|
||||||
&psurf->SurfObj,
|
&psurf->SurfObj,
|
||||||
Escape,
|
Escape,
|
||||||
InSize,
|
InSize,
|
||||||
|
|
Loading…
Reference in a new issue