Merge from amd64-branch:
[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 CHAR szNtDeviceName[CCHDEVICENAME]; /* Yes char AscII */
43 CHAR szWinDeviceName[CCHDEVICENAME]; /* <- chk GetMonitorInfoW MxIxEX.szDevice */
44 struct _GRAPHICS_DEVICE * pNextGraphicsDevice;
45 DWORD StateFlags; /* See DISPLAY_DEVICE_* */
46 } GRAPHICS_DEVICE, *PGRAPHICS_DEVICE;
47
48 typedef struct _PDEVOBJ
49 {
50 BASEOBJECT BaseObject;
51
52 struct _PDEVOBJ * ppdevNext;
53 INT cPdevRefs;
54 INT cPdevOpenRefs;
55 struct _PDEVOBJ * ppdevParent;
56 FLONG flFlags; // flags
57 // FLONG flAccelerated;
58 PERESOURCE hsemDevLock; /* Device lock. */
59 // HSEMAPHORE hsemPointer;
60 POINTL ptlPointer;
61 // SIZEL szlPointer;
62 // SPRITESTATE SpriteState;
63 // HFONT hlfntDefault;
64 // HFONT hlfntAnsiVariable;
65 // HFONT hlfntAnsiFixed;
66 HSURF FillPatterns[HS_DDI_MAX]; // ahsurf[HS_DDI_MAX];
67 // PUNICODE_STRING pusPrtDataFileName;
68 // PVOID pDevHTInfo;
69 // RFONT * prfntActive;
70 // RFONT * prfntInactive;
71 // ULONG cInactive;
72 // BYTE ajbo[0x5C];
73 // ULONG cDirectDrawDisableLocks;
74 // PVOID TypeOneInfo;
75 PVOID pvGammaRamp; /* Gamma ramp pointer. */
76 // PVOID RemoteTypeOne;
77 // ULONG ulHorzRes;
78 // ULONG ulVertRes;
79 // PFN_DrvSetPointerShape pfnDrvSetPointerShape;
80 // PFN_DrvMovePointer pfnDrvMovePointer;
81 PFN_DrvMovePointer pfnMovePointer;
82 // PFN_DrvSynchronize pfnDrvSynchronize;
83 // PFN_DrvSynchronizeSurface pfnDrvSynchronizeSurface;
84 // PFN_DrvSetPalette pfnDrvSetPalette;
85 // PFN_DrvNotify pfnDrvNotify;
86 // ULONG TagSig;
87 // PLDEVOBJ pldev;
88 DHPDEV hPDev; /* dhpdev, DHPDEV for device. */
89 PVOID ppalSurf; /* PEPALOBJ/PPALETTE for this device. */
90 DEVINFO DevInfo; // devinfo
91 GDIINFO GDIInfo; // gdiinfo
92 HSURF pSurface; /* SURFACE for this device., FIXME: PSURFACE */
93 // HANDLE hSpooler; /* Handle to spooler, if spooler dev driver. */
94 // PVOID pDesktopId;
95 PGRAPHICS_DEVICE pGraphicsDev; /* pGraphicsDevice */
96 // POINTL ptlOrigion;
97 PVOID pdmwDev; /* Ptr->DEVMODEW.dmSize + dmDriverExtra == alloc size. */
98 // DWORD Unknown3;
99 FLONG DxDd_Flags; /* DxDD active status flags. */
100 // LONG devAttr;
101 // PVOID WatchDogContext;
102 // ULONG WatchDogs;
103 union
104 {
105 DRIVER_FUNCTIONS DriverFunctions;
106 PVOID apfn[INDEX_LAST]; // B8C 0x0598
107 };
108
109 /* ros specific */
110 ULONG DxDd_nCount;
111 ULONG DisplayNumber;
112 DEVMODEW DMW;
113 PFILE_OBJECT VideoFileObject;
114 BOOLEAN PreparedDriver;
115 GDIPOINTER Pointer;
116 /* Stuff to keep track of software cursors; win32k gdi part */
117 UINT SafetyRemoveLevel; /* at what level was the cursor removed?
118 0 for not removed */
119 UINT SafetyRemoveCount;
120 struct _EDD_DIRECTDRAW_GLOBAL * pEDDgpl;
121 } PDEVOBJ, *PPDEVOBJ;
122
123 #endif /* !__WIN32K_PDEVOBJ_H */