ReactOS  0.4.14-dev-608-gd495a4f
pdevobj.h
Go to the documentation of this file.
1 #ifndef __WIN32K_PDEVOBJ_H
2 #define __WIN32K_PDEVOBJ_H
3 
4 /* PDEVOBJ flags */
6 {
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,
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
23 };
24 
25 /* Type definitions ***********************************************************/
26 
27 typedef struct _GDIPOINTER /* should stay private to ENG? No, part of PDEVOBJ aka HDEV aka PDEV. */
28 {
29  /* Private GDI pointer handling information, required for software emulation */
37 
38  /* Public pointer information */
39  RECTL Exclude; /* Required publicly for SPS_ACCEPT_EXCLUDE */
41 
42 typedef struct _DEVMODEINFO
43 {
45  struct _LDEVOBJ *pldev;
49 
50 typedef struct _DEVMODEENTRY
51 {
54 
56 
57 typedef struct _GRAPHICS_DEVICE
58 {
66  DWORD StateFlags; /* See DISPLAY_DEVICE_* */
80 
81 typedef struct _PDEVOBJ
82 {
84 
85  struct _PDEVOBJ * ppdevNext;
89  FLONG flFlags; // flags
90 // FLONG flAccelerated;
91  HSEMAPHORE hsemDevLock; /* Device lock. */
92 // HSEMAPHORE hsemPointer;
94 // SIZEL szlPointer;
95 // SPRITESTATE SpriteState;
96 // HFONT hlfntDefault;
97 // HFONT hlfntAnsiVariable;
98 // HFONT hlfntAnsiFixed;
100 // PUNICODE_STRING pusPrtDataFileName;
101 // PVOID pDevHTInfo;
102 // RFONT * prfntActive;
103 // RFONT * prfntInactive;
104 // ULONG cInactive;
105 // BYTE ajbo[0x5C];
106 // ULONG cDirectDrawDisableLocks;
107 // PVOID TypeOneInfo;
108  PVOID pvGammaRamp; /* Gamma ramp pointer. */
109 // PVOID RemoteTypeOne;
112 // PFN_DrvSetPointerShape pfnDrvSetPointerShape;
113 // PFN_DrvMovePointer pfnDrvMovePointer;
115 // PFN_DrvSynchronize pfnDrvSynchronize;
116 // PFN_DrvSynchronizeSurface pfnDrvSynchronizeSurface;
117 // PFN_DrvSetPalette pfnDrvSetPalette;
118 // PFN_DrvNotify pfnDrvNotify;
119 // ULONG TagSig;
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 */
127 // PVOID pDesktopId;
130  PDEVMODEW pdmwDev; /* Ptr->DEVMODEW.dmSize + dmDriverExtra == alloc size. */
131 // DWORD Unknown3;
132  FLONG DxDd_Flags; /* DxDD active status flags. */
133 // LONG devAttr;
134 // PVOID WatchDogContext;
135 // ULONG WatchDogs;
136  union
137  {
140  PVOID apfn[INDEX_LAST]; // B8C 0x0598
141  };
142 
143  /* ros specific */
146  /* Stuff to keep track of software cursors; win32k gdi part */
147  UINT SafetyRemoveLevel; /* at what level was the cursor removed?
148  0 for not removed */
151 } PDEVOBJ, *PPDEVOBJ;
152 
153 /* Globals ********************************************************************/
154 
155 extern PPDEVOBJ gppdevPrimary;
156 
157 
158 /* Function prototypes ********************************************************/
159 
160 PPDEVOBJ
161 NTAPI
163  _In_opt_ PUNICODE_STRING pustrDevice);
164 
166 VOID
168  _In_ PPDEVOBJ ppdev)
169 {
170  ASSERT(ppdev);
171 
172  /* Fail if the PDEV is being destroyed */
173  if (ppdev->cPdevRefs == 0)
174  {
175  ASSERT(FALSE);
176  return;
177  }
178  ASSERT(ppdev->cPdevRefs > 0);
179 
180  InterlockedIncrement(&ppdev->cPdevRefs);
181 }
182 
183 VOID
184 NTAPI
186  _Inout_ PPDEVOBJ ppdev);
187 
188 PSURFACE
189 NTAPI
191  _In_ PPDEVOBJ ppdev);
192 
193 VOID
194 NTAPI
196  _In_ PPDEVOBJ ppdev,
198 
199 INIT_FUNCTION
200 NTSTATUS
201 NTAPI
203 
204 PSIZEL
205 FASTCALL
207  _In_ PPDEVOBJ ppdev,
208  _Out_ PSIZEL psizl);
209 
210 BOOL
211 NTAPI
213  PPDEVOBJ ppdev,
214  PDEVMODEW pdm);
215 
216 PDEVMODEW
217 NTAPI
219  PPDEVOBJ ppdev,
220  PDEVMODEW pdm);
221 
222 #endif /* !__WIN32K_PDEVOBJ_H */
DHPDEV dhpdev
Definition: pdevobj.h:121
_Out_ PDEVCAPS pDevCaps
Definition: ntgdi.h:2664
SIZEL Size
Definition: pdevobj.h:31
LONG cPdevRefs
Definition: pdevobj.h:86
BOOL Enabled
Definition: pdevobj.h:30
#define HS_DDI_MAX
Definition: winddi.h:3954
typedef DHPDEV(APIENTRY FN_DrvEnablePDEV)(_In_ DEVMODEW *pdm
PDEVMODEW NTAPI PDEVOBJ_pdmMatchDevMode(PPDEVOBJ ppdev, PDEVMODEW pdm)
Definition: pdevobj.c:307
PDEVICE_OBJECT DeviceObject
Definition: pdevobj.h:63
struct _LDEVOBJ * pldev
Definition: pdevobj.h:120
struct _DEVMODEENTRY DEVMODEENTRY
VOID NTAPI PDEVOBJ_vGetDeviceCaps(_In_ PPDEVOBJ ppdev, _Out_ PDEVCAPS pDevCaps)
POINTL HotSpot
Definition: pdevobj.h:32
PFN_DrvMovePointer pfnMovePointer
Definition: pdevobj.h:114
POINTL ptlPointer
Definition: pdevobj.h:93
WCHAR szWinDeviceName[CCHDEVICENAME/2]
Definition: pdevobj.h:60
FORCEINLINE VOID PDEVOBJ_vReference(_In_ PPDEVOBJ ppdev)
Definition: pdevobj.h:167
WCHAR szNtDeviceName[CCHDEVICENAME/2]
Definition: pdevobj.h:59
GDIINFO gdiinfo
Definition: pdevobj.h:124
struct _GRAPHICS_DEVICE * PGRAPHICS_DEVICE
DWORD StateFlags
Definition: pdevobj.h:66
ULONG cbdevmodeInfo
Definition: pdevobj.h:67
LONG NTSTATUS
Definition: precomp.h:26
SURFACE * psurfSave
Definition: pdevobj.h:35
PVOID pDeviceHandle
Definition: pdevobj.h:64
PDEVMODEENTRY pDevModeList
Definition: pdevobj.h:70
FN_DrvMovePointer * PFN_DrvMovePointer
Definition: winddi.h:3735
PVOID apfn[INDEX_LAST]
Definition: pdevobj.h:140
POINTL ptlOrigion
Definition: pdevobj.h:129
#define FASTCALL
Definition: nt_native.h:50
PVOID pvGammaRamp
Definition: pdevobj.h:108
struct _DEVMODEINFO DEVMODEINFO
PDEVMODEW pdm
Definition: pdevobj.h:53
#define _In_opt_
Definition: no_sal2.h:213
struct _PDEVOBJ * ppdevNext
Definition: pdevobj.h:85
struct _PDEVOBJ * PPDEVOBJ
PPDEVOBJ NTAPI EngpGetPDEV(_In_opt_ PUNICODE_STRING pustrDevice)
Definition: pdevobj.c:595
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
DRIVER_FUNCTIONS DriverFunctions
Definition: pdevobj.h:138
FLONG flFlags
Definition: pdevobj.h:89
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
PPDEVOBJ gppdevPrimary
Definition: pdevobj.c:13
RECTL Exclude
Definition: pdevobj.h:39
ULONG cbdevmode
Definition: pdevobj.h:46
LPWSTR pwszDescription
Definition: pdevobj.h:72
LONG cPdevOpenRefs
Definition: pdevobj.h:87
struct _PALETTE * ppalSurf
Definition: pdevobj.h:122
struct _GDIPOINTER * PGDIPOINTER
DWORD dwUnknown
Definition: pdevobj.h:73
#define FORCEINLINE
Definition: ntbasedef.h:221
#define _Out_
Definition: no_sal2.h:323
_PDEVFLAGS
Definition: pdevobj.h:5
PDEVMODEW pdmwDev
Definition: pdevobj.h:130
HSEMAPHORE hsemDevLock
Definition: pdevobj.h:91
DRIVER_FUNCTIONS pfn
Definition: pdevobj.h:139
unsigned long FLONG
Definition: ntbasedef.h:373
DEVMODEW adevmode[1]
Definition: pdevobj.h:47
typedef HSURF(APIENTRY FN_DrvEnableSurface)(_In_ DHPDEV dhpdev)
struct _DEVMODEINFO * PDEVMODEINFO
SURFACE * psurfMask
Definition: pdevobj.h:34
struct _GRAPHICS_DEVICE * pNextGraphicsDevice
Definition: pdevobj.h:61
DWORD_PTR HSEMAPHORE
Definition: axcore.idl:60
__wchar_t WCHAR
Definition: xmlstorage.h:180
ULONG iCurrentMode
Definition: pdevobj.h:78
LPWSTR pDiplayDrivers
Definition: pdevobj.h:71
ULONG cDevModes
Definition: pdevobj.h:69
struct _DEVMODEINFO * pdmiNext
Definition: pdevobj.h:44
DEVINFO devinfo
Definition: pdevobj.h:123
struct _PDEVOBJ PDEVOBJ
struct _PDEVOBJ * ppdevParent
Definition: pdevobj.h:88
unsigned long DWORD
Definition: ntddk_ex.h:95
FLONG flags
Definition: pdevobj.h:36
#define _Inout_
Definition: no_sal2.h:244
ULONG ulHorzRes
Definition: pdevobj.h:110
* PFILE_OBJECT
Definition: iotypes.h:1955
SURFACE * psurfColor
Definition: pdevobj.h:33
HANDLE hSpooler
Definition: pdevobj.h:126
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
PVOID pUnknown
Definition: pdevobj.h:74
#define INDEX_LAST
Definition: winddi.h:521
UINT SafetyRemoveCount
Definition: pdevobj.h:149
INIT_FUNCTION NTSTATUS NTAPI InitPDEVImpl(VOID)
Definition: pdevobj.c:21
ULONG DxDd_nCount
Definition: pdevobj.h:144
DWORD ProtocolType
Definition: pdevobj.h:76
struct _EDD_DIRECTDRAW_GLOBAL * pEDDgpl
Definition: pdevobj.h:150
ULONG ulVertRes
Definition: pdevobj.h:111
#define _In_
Definition: no_sal2.h:204
struct _GRAPHICS_DEVICE GRAPHICS_DEVICE
FLONG DxDd_Flags
Definition: pdevobj.h:132
#define InterlockedIncrement
Definition: armddk.h:53
#define CCHDEVICENAME
Definition: ddrawi.h:63
PSURFACE NTAPI PDEVOBJ_pSurface(_In_ PPDEVOBJ ppdev)
struct _GRAPHICS_DEVICE * pVgaDevice
Definition: pdevobj.h:62
unsigned int UINT
Definition: ndis.h:50
PSURFACE pSurface
Definition: pdevobj.h:125
GDIPOINTER Pointer
Definition: pdevobj.h:145
BASEOBJECT BaseObject
Definition: pdevobj.h:83
DWORD hkClassDriverConfig
Definition: pdevobj.h:65
struct _DEVMODEENTRY * PDEVMODEENTRY
unsigned int ULONG
Definition: retypes.h:1
VOID NTAPI PDEVOBJ_vRelease(_Inout_ PPDEVOBJ ppdev)
Definition: pdevobj.c:93
DWORD dwFlags
Definition: pdevobj.h:52
struct _GDIPOINTER GDIPOINTER
PSIZEL FASTCALL PDEVOBJ_sizl(_In_ PPDEVOBJ ppdev, _Out_ PSIZEL psizl)
UINT SafetyRemoveLevel
Definition: pdevobj.h:147
WCHAR * LPWSTR
Definition: xmlstorage.h:184
HSURF ahsurf[HS_DDI_MAX]
Definition: pdevobj.h:99
PDEVMODEINFO pdevmodeInfo
Definition: pdevobj.h:68
PGRAPHICS_DEVICE pGraphicsDevice
Definition: pdevobj.h:128
struct _LDEVOBJ * pldev
Definition: pdevobj.h:45
BOOL NTAPI PDEVOBJ_bSwitchMode(PPDEVOBJ ppdev, PDEVMODEW pdm)
Definition: pdevobj.c:509
ULONG iDefaultMode
Definition: pdevobj.h:77
PFILE_OBJECT FileObject
Definition: pdevobj.h:75