Sync with trunk head (part 1 of 2)
[reactos.git] / subsystems / win32 / win32k / include / pdevobj.h
1 #pragma once
2
3 #include <drivers/directx/directxint.h>
4
5 /* PDEVOBJ flags */
6 #define PDEV_DISPLAY 0x00000001 /* Display device */
7 #define PDEV_HARDWARE_POINTER 0x00000002 /* Supports hardware cursor */
8 #define PDEV_SOFTWARE_POINTER 0x00000004
9 #define PDEV_GOTFONTS 0x00000040 /* Has font driver */
10 #define PDEV_PRINTER 0x00000080
11 #define PDEV_ALLOCATEDBRUSHES 0x00000100
12 #define PDEV_HTPAL_IS_DEVPAL 0x00000200
13 #define PDEV_DISABLED 0x00000400
14 #define PDEV_SYNCHRONIZE_ENABLED 0x00000800
15 #define PDEV_FONTDRIVER 0x00002000 /* Font device */
16 #define PDEV_GAMMARAMP_TABLE 0x00004000
17 #define PDEV_UMPD 0x00008000
18 #define PDEV_SHARED_DEVLOCK 0x00010000
19 #define PDEV_META_DEVICE 0x00020000
20 #define PDEV_DRIVER_PUNTED_CALL 0x00040000 /* Driver calls back to GDI engine */
21 #define PDEV_CLONE_DEVICE 0x00080000
22
23 /* Type definitions ***********************************************************/
24
25 typedef struct _GDIPOINTER /* should stay private to ENG? No, part of PDEVOBJ aka HDEV aka PDEV. */
26 {
27 /* private GDI pointer handling information, required for software emulation */
28 BOOL Enabled;
29 SIZEL Size;
30 POINTL HotSpot;
31 XLATEOBJ *XlateObject;
32 SURFACE *psurfColor;
33 SURFACE *psurfMask;
34 SURFACE *psurfSave;
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 /* PDEV and EDDX extra data container.*/
138 typedef struct _PDEVEDD
139 {
140 PDEVOBJ pdevobj;
141 EDD_DIRECTDRAW_GLOBAL EDDgpl;
142 } PDEVEDD, *PPDEVEDD;
143
144 extern ULONG gdwDirectDrawContext;