1 #ifndef __WIN32K_PDEVOBJ_H
2 #define __WIN32K_PDEVOBJ_H
7 PDEV_DISPLAY
= 0x00000001, /* Display device */
8 PDEV_HARDWARE_POINTER
= 0x00000002, /* Supports hardware cursor */
9 PDEV_SOFTWARE_POINTER
= 0x00000004,
10 PDEV_GOTFONTS
= 0x00000040, /* Has font driver */
11 PDEV_PRINTER
= 0x00000080,
12 PDEV_ALLOCATEDBRUSHES
= 0x00000100,
13 PDEV_HTPAL_IS_DEVPAL
= 0x00000200,
14 PDEV_DISABLED
= 0x00000400,
15 PDEV_SYNCHRONIZE_ENABLED
= 0x00000800,
16 PDEV_FONTDRIVER
= 0x00002000, /* Font device */
17 PDEV_GAMMARAMP_TABLE
= 0x00004000,
18 PDEV_UMPD
= 0x00008000,
19 PDEV_SHARED_DEVLOCK
= 0x00010000,
20 PDEV_META_DEVICE
= 0x00020000,
21 PDEV_DRIVER_PUNTED_CALL
= 0x00040000, /* Driver calls back to GDI engine */
22 PDEV_CLONE_DEVICE
= 0x00080000
25 /* Type definitions ***********************************************************/
27 typedef struct _GDIPOINTER
/* should stay private to ENG? No, part of PDEVOBJ aka HDEV aka PDEV. */
29 /* Private GDI pointer handling information, required for software emulation */
38 /* Public pointer information */
39 RECTL Exclude
; /* Required publicly for SPS_ACCEPT_EXCLUDE */
40 } GDIPOINTER
, *PGDIPOINTER
;
42 typedef struct _DEVMODEINFO
44 struct _DEVMODEINFO
*pdmiNext
;
45 struct _LDEVOBJ
*pldev
;
48 } DEVMODEINFO
, *PDEVMODEINFO
;
50 typedef struct _DEVMODEENTRY
55 } DEVMODEENTRY
, *PDEVMODEENTRY
;
57 typedef struct _GRAPHICS_DEVICE
59 WCHAR szNtDeviceName
[CCHDEVICENAME
/2];
60 WCHAR szWinDeviceName
[CCHDEVICENAME
/2];
61 struct _GRAPHICS_DEVICE
* pNextGraphicsDevice
;
62 struct _GRAPHICS_DEVICE
* pVgaDevice
;
63 PDEVICE_OBJECT DeviceObject
;
65 DWORD hkClassDriverConfig
;
66 DWORD StateFlags
; /* See DISPLAY_DEVICE_* */
68 PDEVMODEINFO pdevmodeInfo
;
70 PDEVMODEENTRY pDevModeList
;
71 LPWSTR pDiplayDrivers
;
72 LPWSTR pwszDescription
;
75 PFILE_OBJECT FileObject
;
79 } GRAPHICS_DEVICE
, *PGRAPHICS_DEVICE
;
81 typedef struct _PDEVOBJ
83 BASEOBJECT BaseObject
;
85 struct _PDEVOBJ
* ppdevNext
;
88 struct _PDEVOBJ
* ppdevParent
;
89 FLONG flFlags
; // flags
90 // FLONG flAccelerated;
91 HSEMAPHORE hsemDevLock
; /* Device lock. */
92 // HSEMAPHORE hsemPointer;
95 // SPRITESTATE SpriteState;
96 // HFONT hlfntDefault;
97 // HFONT hlfntAnsiVariable;
98 // HFONT hlfntAnsiFixed;
99 HSURF ahsurf
[HS_DDI_MAX
];
100 // PUNICODE_STRING pusPrtDataFileName;
102 // RFONT * prfntActive;
103 // RFONT * prfntInactive;
106 // ULONG cDirectDrawDisableLocks;
107 // PVOID TypeOneInfo;
108 PVOID pvGammaRamp
; /* Gamma ramp pointer. */
109 // PVOID RemoteTypeOne;
112 // PFN_DrvSetPointerShape pfnDrvSetPointerShape;
113 // PFN_DrvMovePointer pfnDrvMovePointer;
114 PFN_DrvMovePointer pfnMovePointer
;
115 // PFN_DrvSynchronize pfnDrvSynchronize;
116 // PFN_DrvSynchronizeSurface pfnDrvSynchronizeSurface;
117 // PFN_DrvSetPalette pfnDrvSetPalette;
118 // PFN_DrvNotify pfnDrvNotify;
120 struct _LDEVOBJ
* pldev
;
121 DHPDEV dhpdev
; /* DHPDEV for device. */
122 struct _PALETTE
* ppalSurf
; /* PEPALOBJ/PPALETTE for this device. */
125 PSURFACE pSurface
; /* SURFACE for this device. */
126 HANDLE hSpooler
; /* Handle to spooler, if spooler dev driver, DeviceObject if graphics device */
128 PGRAPHICS_DEVICE pGraphicsDevice
;
130 PDEVMODEW pdmwDev
; /* Ptr->DEVMODEW.dmSize + dmDriverExtra == alloc size. */
132 FLONG DxDd_Flags
; /* DxDD active status flags. */
134 // PVOID WatchDogContext;
138 DRIVER_FUNCTIONS DriverFunctions
;
139 DRIVER_FUNCTIONS pfn
;
140 PVOID apfn
[INDEX_LAST
]; // B8C 0x0598
146 /* Stuff to keep track of software cursors; win32k gdi part */
147 UINT SafetyRemoveLevel
; /* at what level was the cursor removed?
149 UINT SafetyRemoveCount
;
150 struct _EDD_DIRECTDRAW_GLOBAL
* pEDDgpl
;
151 } PDEVOBJ
, *PPDEVOBJ
;
153 /* Globals ********************************************************************/
155 extern PPDEVOBJ gppdevPrimary
;
158 /* Function prototypes ********************************************************/
163 _In_opt_ PUNICODE_STRING pustrDevice
);
168 _Inout_ PPDEVOBJ ppdev
);
173 _In_ PPDEVOBJ ppdev
);
177 PDEVOBJ_vGetDeviceCaps(
179 _Out_ PDEVCAPS pDevCaps
);
200 PDEVOBJ_pdmMatchDevMode(
206 PDEVOBJ_vReference(PPDEVOBJ ppdev
)
208 InterlockedIncrement(&ppdev
->cPdevRefs
);
211 #endif /* !__WIN32K_PDEVOBJ_H */