1 #ifndef __WIN32K_PDEVOBJ_H
2 #define __WIN32K_PDEVOBJ_H
5 #define PDEV_DISPLAY 0x00000001 /* Display device */
6 #define PDEV_HARDWARE_POINTER 0x00000002 /* Supports hardware cursor */
7 #define PDEV_SOFTWARE_POINTER 0x00000004
8 #define PDEV_GOTFONTS 0x00000040 /* Has font driver */
9 #define PDEV_PRINTER 0x00000080
10 #define PDEV_ALLOCATEDBRUSHES 0x00000100
11 #define PDEV_HTPAL_IS_DEVPAL 0x00000200
12 #define PDEV_DISABLED 0x00000400
13 #define PDEV_SYNCHRONIZE_ENABLED 0x00000800
14 #define PDEV_FONTDRIVER 0x00002000 /* Font device */
15 #define PDEV_GAMMARAMP_TABLE 0x00004000
16 #define PDEV_UMPD 0x00008000
17 #define PDEV_SHARED_DEVLOCK 0x00010000
18 #define PDEV_META_DEVICE 0x00020000
19 #define PDEV_DRIVER_PUNTED_CALL 0x00040000 /* Driver calls back to GDI engine */
20 #define PDEV_CLONE_DEVICE 0x00080000
22 /* Type definitions ***********************************************************/
24 typedef struct _GDIPOINTER
/* should stay private to ENG? No, part of PDEVOBJ aka HDEV aka PDEV. */
26 /* Private GDI pointer handling information, required for software emulation */
30 XLATEOBJ
*XlateObject
;
35 /* Public pointer information */
36 RECTL Exclude
; /* Required publicly for SPS_ACCEPT_EXCLUDE */
37 } GDIPOINTER
, *PGDIPOINTER
;
39 typedef struct _DEVMODEINFO
41 struct _DEVMODEINFO
*pdmiNext
;
42 struct _LDEVOBJ
*pldev
;
45 } DEVMODEINFO
, *PDEVMODEINFO
;
47 typedef struct _DEVMODEENTRY
52 } DEVMODEENTRY
, *PDEVMODEENTRY
;
54 typedef struct _GRAPHICS_DEVICE
56 WCHAR szNtDeviceName
[CCHDEVICENAME
/2];
57 WCHAR szWinDeviceName
[CCHDEVICENAME
/2];
58 struct _GRAPHICS_DEVICE
* pNextGraphicsDevice
;
59 struct _GRAPHICS_DEVICE
* pVgaDevice
;
60 PDEVICE_OBJECT DeviceObject
;
62 DWORD hkClassDriverConfig
;
63 DWORD StateFlags
; /* See DISPLAY_DEVICE_* */
65 PDEVMODEINFO pdevmodeInfo
;
67 PDEVMODEENTRY pDevModeList
;
68 LPWSTR pDiplayDrivers
;
69 LPWSTR pwszDescription
;
72 PFILE_OBJECT FileObject
;
76 } GRAPHICS_DEVICE
, *PGRAPHICS_DEVICE
;
78 typedef struct _PDEVOBJ
80 BASEOBJECT BaseObject
;
82 struct _PDEVOBJ
* ppdevNext
;
85 struct _PDEVOBJ
* ppdevParent
;
86 FLONG flFlags
; // flags
87 // FLONG flAccelerated;
88 HSEMAPHORE hsemDevLock
; /* Device lock. */
89 // HSEMAPHORE hsemPointer;
92 // SPRITESTATE SpriteState;
93 // HFONT hlfntDefault;
94 // HFONT hlfntAnsiVariable;
95 // HFONT hlfntAnsiFixed;
96 HSURF ahsurf
[HS_DDI_MAX
];
97 // PUNICODE_STRING pusPrtDataFileName;
99 // RFONT * prfntActive;
100 // RFONT * prfntInactive;
103 // ULONG cDirectDrawDisableLocks;
104 // PVOID TypeOneInfo;
105 PVOID pvGammaRamp
; /* Gamma ramp pointer. */
106 // PVOID RemoteTypeOne;
109 // PFN_DrvSetPointerShape pfnDrvSetPointerShape;
110 // PFN_DrvMovePointer pfnDrvMovePointer;
111 PFN_DrvMovePointer pfnMovePointer
;
112 // PFN_DrvSynchronize pfnDrvSynchronize;
113 // PFN_DrvSynchronizeSurface pfnDrvSynchronizeSurface;
114 // PFN_DrvSetPalette pfnDrvSetPalette;
115 // PFN_DrvNotify pfnDrvNotify;
117 struct _LDEVOBJ
* pldev
;
118 DHPDEV dhpdev
; /* DHPDEV for device. */
119 struct _PALETTE
* ppalSurf
; /* PEPALOBJ/PPALETTE for this device. */
122 PSURFACE pSurface
; /* SURFACE for this device. */
123 // HANDLE hSpooler; /* Handle to spooler, if spooler dev driver. */
125 PGRAPHICS_DEVICE pGraphicsDevice
;
127 PDEVMODEW pdmwDev
; /* Ptr->DEVMODEW.dmSize + dmDriverExtra == alloc size. */
129 FLONG DxDd_Flags
; /* DxDD active status flags. */
131 // PVOID WatchDogContext;
135 DRIVER_FUNCTIONS DriverFunctions
;
136 DRIVER_FUNCTIONS pfn
;
137 PVOID apfn
[INDEX_LAST
]; // B8C 0x0598
143 /* Stuff to keep track of software cursors; win32k gdi part */
144 UINT SafetyRemoveLevel
; /* at what level was the cursor removed?
146 UINT SafetyRemoveCount
;
147 struct _EDD_DIRECTDRAW_GLOBAL
* pEDDgpl
;
148 } PDEVOBJ
, *PPDEVOBJ
;
150 /* Globals ********************************************************************/
152 extern PPDEVOBJ gppdevPrimary
;
153 #define pPrimarySurface gppdevPrimary
156 /* Function prototypes ********************************************************/
160 EngpGetPDEV(PUNICODE_STRING pustrDevice
);
164 PDEVOBJ_vRelease(PPDEVOBJ ppdev
);
173 PDEVOBJ_vGetDeviceCaps(
184 PDEVOBJ_sizl(PPDEVOBJ
, PSIZEL
);
186 #endif /* !__WIN32K_PDEVOBJ_H */