94b3d56405bdc2a8344a8853d8b9d53cf8c067e0
[reactos.git] / subsystems / win32 / win32k / include / pdevobj.h
1 #ifndef __WIN32K_PDEVOBJ_H
2 #define __WIN32K_PDEVOBJ_H
3
4 #include <drivers/directx/directxint.h>
5
6 /* PDEVOBJ flags */
7 #define PDEV_DISPLAY 0x00000001 /* Display device */
8 #define PDEV_HARDWARE_POINTER 0x00000002 /* Supports hardware cursor */
9 #define PDEV_SOFTWARE_POINTER 0x00000004
10 #define PDEV_GOTFONTS 0x00000040 /* Has font driver */
11 #define PDEV_PRINTER 0x00000080
12 #define PDEV_ALLOCATEDBRUSHES 0x00000100
13 #define PDEV_HTPAL_IS_DEVPAL 0x00000200
14 #define PDEV_DISABLED 0x00000400
15 #define PDEV_SYNCHRONIZE_ENABLED 0x00000800
16 #define PDEV_FONTDRIVER 0x00002000 /* Font device */
17 #define PDEV_GAMMARAMP_TABLE 0x00004000
18 #define PDEV_UMPD 0x00008000
19 #define PDEV_SHARED_DEVLOCK 0x00010000
20 #define PDEV_META_DEVICE 0x00020000
21 #define PDEV_DRIVER_PUNTED_CALL 0x00040000 /* Driver calls back to GDI engine */
22 #define PDEV_CLONE_DEVICE 0x00080000
23
24 /* Type definitions ***********************************************************/
25
26 typedef struct _GDIPOINTER /* should stay private to ENG? No, part of PDEVOBJ aka HDEV aka PDEV. */
27 {
28 /* private GDI pointer handling information, required for software emulation */
29 BOOL Enabled;
30 SIZEL Size;
31 POINTL HotSpot;
32 XLATEOBJ *XlateObject;
33 SURFACE *psurfColor;
34 SURFACE *psurfMask;
35 SURFACE *psurfSave;
36
37 /* public pointer information */
38 RECTL Exclude; /* required publicly for SPS_ACCEPT_EXCLUDE */
39 } GDIPOINTER, *PGDIPOINTER;
40
41 typedef struct _GRAPHICS_DEVICE
42 {
43 WCHAR szNtDeviceName[CCHDEVICENAME/2];
44 WCHAR szWinDeviceName[CCHDEVICENAME/2];
45 struct _GRAPHICS_DEVICE * pNextGraphicsDevice;
46 struct _GRAPHICS_DEVICE * pVgaDevice;
47 PDEVICE_OBJECT DeviceObject;
48 PVOID pDeviceHandle;
49 DWORD hkClassDriverConfig;
50 DWORD StateFlags; /* See DISPLAY_DEVICE_* */
51 ULONG cbdevmodeInfo;
52 PVOID devmodeInfo;
53 DWORD cbdevmodeInfo1;
54 PVOID devmodeInfo1;
55 LPWSTR pwszDeviceNames;
56 LPWSTR pwszDescription;
57 DWORD dwUnknown;
58 PVOID pUnknown;
59 PFILE_OBJECT FileObject;
60 DWORD ProtocolType;
61 } GRAPHICS_DEVICE, *PGRAPHICS_DEVICE;
62
63 typedef struct _PDEVOBJ
64 {
65 BASEOBJECT BaseObject;
66
67 struct _PDEVOBJ * ppdevNext;
68 INT cPdevRefs;
69 INT cPdevOpenRefs;
70 struct _PDEVOBJ * ppdevParent;
71 FLONG flFlags; // flags
72 // FLONG flAccelerated;
73 HSEMAPHORE hsemDevLock; /* Device lock. */
74 // HSEMAPHORE hsemPointer;
75 POINTL ptlPointer;
76 // SIZEL szlPointer;
77 // SPRITESTATE SpriteState;
78 // HFONT hlfntDefault;
79 // HFONT hlfntAnsiVariable;
80 // HFONT hlfntAnsiFixed;
81 HSURF ahsurf[HS_DDI_MAX];
82 // PUNICODE_STRING pusPrtDataFileName;
83 // PVOID pDevHTInfo;
84 // RFONT * prfntActive;
85 // RFONT * prfntInactive;
86 // ULONG cInactive;
87 // BYTE ajbo[0x5C];
88 // ULONG cDirectDrawDisableLocks;
89 // PVOID TypeOneInfo;
90 PVOID pvGammaRamp; /* Gamma ramp pointer. */
91 // PVOID RemoteTypeOne;
92 // ULONG ulHorzRes;
93 // ULONG ulVertRes;
94 // PFN_DrvSetPointerShape pfnDrvSetPointerShape;
95 // PFN_DrvMovePointer pfnDrvMovePointer;
96 PFN_DrvMovePointer pfnMovePointer;
97 // PFN_DrvSynchronize pfnDrvSynchronize;
98 // PFN_DrvSynchronizeSurface pfnDrvSynchronizeSurface;
99 // PFN_DrvSetPalette pfnDrvSetPalette;
100 // PFN_DrvNotify pfnDrvNotify;
101 // ULONG TagSig;
102 // PLDEVOBJ pldev;
103 DHPDEV dhpdev; /* DHPDEV for device. */
104 PVOID ppalSurf; /* PEPALOBJ/PPALETTE for this device. */
105 DEVINFO devinfo;
106 GDIINFO gdiinfo;
107 HSURF pSurface; /* SURFACE for this device., FIXME: PSURFACE */
108 // HANDLE hSpooler; /* Handle to spooler, if spooler dev driver. */
109 // PVOID pDesktopId;
110 PGRAPHICS_DEVICE pGraphicsDevice;
111 // POINTL ptlOrigion;
112 PVOID pdmwDev; /* Ptr->DEVMODEW.dmSize + dmDriverExtra == alloc size. */
113 // DWORD Unknown3;
114 FLONG DxDd_Flags; /* DxDD active status flags. */
115 // LONG devAttr;
116 // PVOID WatchDogContext;
117 // ULONG WatchDogs;
118 union
119 {
120 DRIVER_FUNCTIONS DriverFunctions;
121 PVOID apfn[INDEX_LAST]; // B8C 0x0598
122 };
123
124 /* ros specific */
125 ULONG DxDd_nCount;
126 ULONG DisplayNumber;
127 DEVMODEW DMW;
128 PFILE_OBJECT VideoFileObject;
129 BOOLEAN PreparedDriver;
130 GDIPOINTER Pointer;
131 /* Stuff to keep track of software cursors; win32k gdi part */
132 UINT SafetyRemoveLevel; /* at what level was the cursor removed?
133 0 for not removed */
134 UINT SafetyRemoveCount;
135 struct _EDD_DIRECTDRAW_GLOBAL * pEDDgpl;
136 } PDEVOBJ, *PPDEVOBJ;
137
138 /* PDEV and EDDX extra data container.*/
139 typedef struct _PDEVEDD
140 {
141 PDEVOBJ pdevobj;
142 EDD_DIRECTDRAW_GLOBAL EDDgpl;
143 } PDEVEDD, *PPDEVEDD;
144
145 extern ULONG gdwDirectDrawContext;
146
147 #endif /* !__WIN32K_PDEVOBJ_H */