Update PDEVOBJ and GRAPHICS_DEVICE fields
[reactos.git] / reactos / subsystems / win32 / win32k / include / pdevobj.h
1 #ifndef __WIN32K_PDEVOBJ_H
2 #define __WIN32K_PDEVOBJ_H
3
4 /* PDEVOBJ flags */
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
21
22 /* Type definitions ***********************************************************/
23
24 typedef struct _GDIPOINTER /* should stay private to ENG? No, part of PDEVOBJ aka HDEV aka PDEV. */
25 {
26 /* private GDI pointer handling information, required for software emulation */
27 BOOL Enabled;
28 SIZEL Size;
29 POINTL HotSpot;
30 XLATEOBJ *XlateObject;
31 SURFACE *psurfColor;
32 SURFACE *psurfMask;
33 SURFACE *psurfSave;
34 int ShowPointer; /* counter negtive do not show the mouse postive show the mouse */
35
36 /* public pointer information */
37 RECTL Exclude; /* required publicly for SPS_ACCEPT_EXCLUDE */
38 } GDIPOINTER, *PGDIPOINTER;
39
40 typedef struct _GRAPHICS_DEVICE
41 {
42 WCHAR szNtDeviceName[CCHDEVICENAME/2];
43 WCHAR szWinDeviceName[CCHDEVICENAME/2];
44 struct _GRAPHICS_DEVICE * pNextGraphicsDevice;
45 struct _GRAPHICS_DEVICE * pVgaDevice;
46 PDEVICE_OBJECT DeviceObject;
47 PVOID pDeviceHandle;
48 DWORD hkClassDriverConfig;
49 DWORD StateFlags; /* See DISPLAY_DEVICE_* */
50 ULONG cbdevmodeInfo;
51 PVOID devmodeInfo;
52 DWORD cbdevmodeInfo1;
53 PVOID devmodeInfo1;
54 LPWSTR pwszDeviceNames;
55 LPWSTR pwszDescription;
56 DWORD dwUnknown;
57 PVOID pUnknown;
58 PFILE_OBJECT FileObject;
59 DWORD ProtocolType;
60 } GRAPHICS_DEVICE, *PGRAPHICS_DEVICE;
61
62 typedef struct _PDEVOBJ
63 {
64 BASEOBJECT BaseObject;
65
66 struct _PDEVOBJ * ppdevNext;
67 INT cPdevRefs;
68 INT cPdevOpenRefs;
69 struct _PDEVOBJ * ppdevParent;
70 FLONG flFlags; // flags
71 // FLONG flAccelerated;
72 HSEMAPHORE hsemDevLock; /* Device lock. */
73 // HSEMAPHORE hsemPointer;
74 POINTL ptlPointer;
75 // SIZEL szlPointer;
76 // SPRITESTATE SpriteState;
77 // HFONT hlfntDefault;
78 // HFONT hlfntAnsiVariable;
79 // HFONT hlfntAnsiFixed;
80 HSURF ahsurf[HS_DDI_MAX];
81 // PUNICODE_STRING pusPrtDataFileName;
82 // PVOID pDevHTInfo;
83 // RFONT * prfntActive;
84 // RFONT * prfntInactive;
85 // ULONG cInactive;
86 // BYTE ajbo[0x5C];
87 // ULONG cDirectDrawDisableLocks;
88 // PVOID TypeOneInfo;
89 PVOID pvGammaRamp; /* Gamma ramp pointer. */
90 // PVOID RemoteTypeOne;
91 // ULONG ulHorzRes;
92 // ULONG ulVertRes;
93 // PFN_DrvSetPointerShape pfnDrvSetPointerShape;
94 // PFN_DrvMovePointer pfnDrvMovePointer;
95 PFN_DrvMovePointer pfnMovePointer;
96 // PFN_DrvSynchronize pfnDrvSynchronize;
97 // PFN_DrvSynchronizeSurface pfnDrvSynchronizeSurface;
98 // PFN_DrvSetPalette pfnDrvSetPalette;
99 // PFN_DrvNotify pfnDrvNotify;
100 // ULONG TagSig;
101 // PLDEVOBJ pldev;
102 DHPDEV dhpdev; /* DHPDEV for device. */
103 PVOID ppalSurf; /* PEPALOBJ/PPALETTE for this device. */
104 DEVINFO devinfo;
105 GDIINFO gdiinfo;
106 HSURF pSurface; /* SURFACE for this device., FIXME: PSURFACE */
107 // HANDLE hSpooler; /* Handle to spooler, if spooler dev driver. */
108 // PVOID pDesktopId;
109 PGRAPHICS_DEVICE pGraphicsDevice;
110 // POINTL ptlOrigion;
111 PVOID pdmwDev; /* Ptr->DEVMODEW.dmSize + dmDriverExtra == alloc size. */
112 // DWORD Unknown3;
113 FLONG DxDd_Flags; /* DxDD active status flags. */
114 // LONG devAttr;
115 // PVOID WatchDogContext;
116 // ULONG WatchDogs;
117 union
118 {
119 DRIVER_FUNCTIONS DriverFunctions;
120 PVOID apfn[INDEX_LAST]; // B8C 0x0598
121 };
122
123 /* ros specific */
124 ULONG DxDd_nCount;
125 ULONG DisplayNumber;
126 DEVMODEW DMW;
127 PFILE_OBJECT VideoFileObject;
128 BOOLEAN PreparedDriver;
129 GDIPOINTER Pointer;
130 /* Stuff to keep track of software cursors; win32k gdi part */
131 UINT SafetyRemoveLevel; /* at what level was the cursor removed?
132 0 for not removed */
133 UINT SafetyRemoveCount;
134 struct _EDD_DIRECTDRAW_GLOBAL * pEDDgpl;
135 } PDEVOBJ, *PPDEVOBJ;
136
137 #endif /* !__WIN32K_PDEVOBJ_H */