ReactOS 0.4.15-dev-5666-gc548b97
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 */
10 PDEV_GOTFONTS = 0x00000040, /* Has font driver */
11 PDEV_PRINTER = 0x00000080,
14 PDEV_DISABLED = 0x00000400,
16 PDEV_FONTDRIVER = 0x00002000, /* Font device */
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
27typedef 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
42typedef struct _DEVMODEINFO
43{
45 struct _LDEVOBJ *pldev;
49
50typedef struct _DEVMODEENTRY
51{
54
56
57typedef struct _GRAPHICS_DEVICE
58{
66 DWORD StateFlags; /* See DISPLAY_DEVICE_* */
78
79typedef struct _PDEVOBJ
80{
82
87 FLONG flFlags; // flags
88// FLONG flAccelerated;
89 HSEMAPHORE hsemDevLock; /* Device lock. */
90// HSEMAPHORE hsemPointer;
92// SIZEL szlPointer;
93// SPRITESTATE SpriteState;
94// HFONT hlfntDefault;
95// HFONT hlfntAnsiVariable;
96// HFONT hlfntAnsiFixed;
98 PWSTR pusPrtDataFileName; // DRIVER_INFO_2->pDataFile
99// PVOID pDevHTInfo;
100// RFONT * prfntActive;
101// RFONT * prfntInactive;
102// ULONG cInactive;
103// BYTE ajbo[0x5C];
104// ULONG cDirectDrawDisableLocks;
105// PVOID TypeOneInfo;
106 PVOID pvGammaRamp; /* Gamma ramp pointer. */
108 SIZEL szlMetaRes; /* if PDEV_META_DEVICE */
109 // ULONG ulHorzRes;
110 // ULONG ulVertRes;
111// PFN_DrvSetPointerShape pfnDrvSetPointerShape;
112// PFN_DrvMovePointer pfnDrvMovePointer;
114// PFN_DrvSynchronize pfnDrvSynchronize;
115// PFN_DrvSynchronizeSurface pfnDrvSynchronizeSurface;
116// PFN_DrvSetPalette pfnDrvSetPalette;
117// PFN_DrvNotify pfnDrvNotify;
118// ULONG TagSig;
119 struct _LDEVOBJ * pldev;
120 DHPDEV dhpdev; /* DHPDEV for device. */
121 struct _PALETTE* ppalSurf; /* PEPALOBJ/PPALETTE for this device. */
124 PSURFACE pSurface; /* SURFACE for this device. */
125 HANDLE hSpooler; /* Handle to spooler, if spooler dev driver, DeviceObject if graphics device */
126// PVOID pDesktopId;
129 PDEVMODEW pdmwDev; /* Ptr->DEVMODEW.dmSize + dmDriverExtra == alloc size. */
130// DWORD Unknown3;
131 FLONG DxDd_Flags; /* DxDD active status flags set by CapabilityOverride Registry Key while Create Info DC type */
132 DWORD dwAccelerationLevel; /* Set by Accelerations.Level (0 - 5) Registry Key while Create Info DC type */
133// PVOID WatchDogContext;
134// ULONG WatchDogs;
135 union
136 {
139 PVOID apfn[INDEX_LAST]; // B8C 0x0598
140 };
141
142 /* ros specific */
145 /* Stuff to keep track of software cursors; win32k gdi part */
146 UINT SafetyRemoveLevel; /* at what level was the cursor removed?
147 0 for not removed */
151
152/* Function prototypes ********************************************************/
153
155NTAPI
157 _In_opt_ PUNICODE_STRING pustrDevice);
158
160VOID
162 _In_ PPDEVOBJ ppdev)
163{
164 ASSERT(ppdev);
165
166 /* Fail if the PDEV is being destroyed */
167 if (ppdev->cPdevRefs == 0)
168 {
169 ASSERT(FALSE);
170 return;
171 }
172 ASSERT(ppdev->cPdevRefs > 0);
173
174 InterlockedIncrement(&ppdev->cPdevRefs);
175}
176
177VOID
178NTAPI
180 _Inout_ PPDEVOBJ ppdev);
181
183NTAPI
185 _In_ PPDEVOBJ ppdev);
186
187VOID
188NTAPI
190 _In_ PPDEVOBJ ppdev,
192
193CODE_SEG("INIT")
195NTAPI
197
198PSIZEL
201 _In_ PPDEVOBJ ppdev,
202 _Out_ PSIZEL psizl);
203
204BOOL
205NTAPI
207 PPDEVOBJ ppdev,
208 PDEVMODEW pdm);
209
210BOOL
211NTAPI
213 _Inout_ PPDEVOBJ ppdev,
214 _Inout_ PPDEVOBJ ppdev2);
215
216VOID
218 _Inout_ PPDEVOBJ ppdev);
219
220BOOL
222 _Inout_ PPDEVOBJ ppdev);
223
226 _In_opt_ PGRAPHICS_DEVICE pGraphicsDevice,
228 _In_ ULONG dwAccelerationLevel,
229 _In_ ULONG ldevtype);
230
231/* Change display settings:
232 * - pustrDeviceName: name of the device to change settings. Can be NULL to specify whole display surface
233 * - RequestedMode: new parameters for device. Ignored if pstrDeviceName is NULL
234 * - pmdevOld: old MDEVOBJ. Can be NULL if we are creating the first one
235 * - ppdevNew: MDEVOBJ created by this function, with the new settings
236 * - bSearchClosestMode: do we need to search exact requested mode, or a mostly similar one
237 * Return value: a DISP_CHANGE_* value
238 */
239LONG
241 _In_opt_ PUNICODE_STRING pustrDeviceName,
242 _In_opt_ PDEVMODEW RequestedMode,
243 _In_opt_ PMDEVOBJ pmdevOld,
244 _Out_ PMDEVOBJ *ppmdevNew,
245 _In_ BOOL bSearchClosestMode);
246
247#endif /* !__WIN32K_PDEVOBJ_H */
#define InterlockedIncrement
Definition: armddk.h:53
DWORD_PTR HSEMAPHORE
Definition: axcore.idl:60
LONG NTSTATUS
Definition: precomp.h:26
#define CCHDEVICENAME
Definition: ddrawi.h:63
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
static CODE_SEG("PAGE")
Definition: isapnp.c:1482
unsigned int ULONG
Definition: retypes.h:1
#define ASSERT(a)
Definition: mode.c:44
#define _Inout_
Definition: ms_sal.h:378
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
unsigned int UINT
Definition: ndis.h:50
#define FASTCALL
Definition: nt_native.h:50
unsigned long FLONG
Definition: ntbasedef.h:366
_Out_ PDEVCAPS pDevCaps
Definition: ntgdi.h:2664
PSIZEL FASTCALL PDEVOBJ_sizl(_In_ PPDEVOBJ ppdev, _Out_ PSIZEL psizl)
struct _GRAPHICS_DEVICE * PGRAPHICS_DEVICE
struct _DEVMODEINFO DEVMODEINFO
struct _GDIPOINTER * PGDIPOINTER
BOOL NTAPI PDEVOBJ_bDynamicModeChange(_Inout_ PPDEVOBJ ppdev, _Inout_ PPDEVOBJ ppdev2)
struct _PDEVOBJ PDEVOBJ
BOOL PDEVOBJ_bDisableDisplay(_Inout_ PPDEVOBJ ppdev)
Definition: pdevobj.c:360
VOID NTAPI PDEVOBJ_vGetDeviceCaps(_In_ PPDEVOBJ ppdev, _Out_ PDEVCAPS pDevCaps)
LONG PDEVOBJ_lChangeDisplaySettings(_In_opt_ PUNICODE_STRING pustrDeviceName, _In_opt_ PDEVMODEW RequestedMode, _In_opt_ PMDEVOBJ pmdevOld, _Out_ PMDEVOBJ *ppmdevNew, _In_ BOOL bSearchClosestMode)
Definition: pdevobj.c:776
struct _DEVMODEENTRY DEVMODEENTRY
PPDEVOBJ PDEVOBJ_Create(_In_opt_ PGRAPHICS_DEVICE pGraphicsDevice, _In_opt_ PDEVMODEW pdm, _In_ ULONG dwAccelerationLevel, _In_ ULONG ldevtype)
Definition: pdevobj.c:411
_PDEVFLAGS
Definition: pdevobj.h:6
@ PDEV_UMPD
Definition: pdevobj.h:18
@ PDEV_FONTDRIVER
Definition: pdevobj.h:16
@ PDEV_HTPAL_IS_DEVPAL
Definition: pdevobj.h:13
@ PDEV_DISABLED
Definition: pdevobj.h:14
@ PDEV_DISPLAY
Definition: pdevobj.h:7
@ PDEV_GAMMARAMP_TABLE
Definition: pdevobj.h:17
@ PDEV_SYNCHRONIZE_ENABLED
Definition: pdevobj.h:15
@ PDEV_META_DEVICE
Definition: pdevobj.h:20
@ PDEV_GOTFONTS
Definition: pdevobj.h:10
@ PDEV_CLONE_DEVICE
Definition: pdevobj.h:22
@ PDEV_ALLOCATEDBRUSHES
Definition: pdevobj.h:12
@ PDEV_HARDWARE_POINTER
Definition: pdevobj.h:8
@ PDEV_SOFTWARE_POINTER
Definition: pdevobj.h:9
@ PDEV_PRINTER
Definition: pdevobj.h:11
@ PDEV_DRIVER_PUNTED_CALL
Definition: pdevobj.h:21
@ PDEV_SHARED_DEVLOCK
Definition: pdevobj.h:19
struct _DEVMODEINFO * PDEVMODEINFO
struct _PDEVOBJ * PPDEVOBJ
struct _GDIPOINTER GDIPOINTER
PSURFACE NTAPI PDEVOBJ_pSurface(_In_ PPDEVOBJ ppdev)
BOOL NTAPI PDEVOBJ_bSwitchMode(PPDEVOBJ ppdev, PDEVMODEW pdm)
Definition: pdevobj.c:640
struct _GRAPHICS_DEVICE GRAPHICS_DEVICE
VOID NTAPI PDEVOBJ_vRelease(_Inout_ PPDEVOBJ ppdev)
Definition: pdevobj.c:104
FORCEINLINE VOID PDEVOBJ_vReference(_In_ PPDEVOBJ ppdev)
Definition: pdevobj.h:161
VOID PDEVOBJ_vEnableDisplay(_Inout_ PPDEVOBJ ppdev)
Definition: pdevobj.c:340
struct _DEVMODEENTRY * PDEVMODEENTRY
NTSTATUS NTAPI InitPDEVImpl(VOID)
Definition: pdevobj.c:30
PPDEVOBJ NTAPI EngpGetPDEV(_In_opt_ PUNICODE_STRING pustrDevice)
Definition: pdevobj.c:726
long LONG
Definition: pedump.c:60
PDEVMODEW pdm
Definition: pdevobj.h:53
DWORD dwFlags
Definition: pdevobj.h:52
struct _DEVMODEINFO * pdmiNext
Definition: pdevobj.h:44
struct _LDEVOBJ * pldev
Definition: pdevobj.h:45
DEVMODEW adevmode[1]
Definition: pdevobj.h:47
ULONG cbdevmode
Definition: pdevobj.h:46
FLONG flags
Definition: pdevobj.h:36
POINTL HotSpot
Definition: pdevobj.h:32
SURFACE * psurfColor
Definition: pdevobj.h:33
BOOL Enabled
Definition: pdevobj.h:30
SURFACE * psurfMask
Definition: pdevobj.h:34
SURFACE * psurfSave
Definition: pdevobj.h:35
SIZEL Size
Definition: pdevobj.h:31
RECTL Exclude
Definition: pdevobj.h:39
DWORD StateFlags
Definition: pdevobj.h:66
PDEVMODEENTRY pDevModeList
Definition: pdevobj.h:70
struct _GRAPHICS_DEVICE * pVgaDevice
Definition: pdevobj.h:62
ULONG cbdevmodeInfo
Definition: pdevobj.h:67
LPWSTR pDiplayDrivers
Definition: pdevobj.h:71
WCHAR szWinDeviceName[CCHDEVICENAME/2]
Definition: pdevobj.h:60
DWORD hkClassDriverConfig
Definition: pdevobj.h:65
PDEVMODEINFO pdevmodeInfo
Definition: pdevobj.h:68
DWORD dwMonCnt
Definition: pdevobj.h:73
PFILE_OBJECT FileObject
Definition: pdevobj.h:75
WCHAR szNtDeviceName[CCHDEVICENAME/2]
Definition: pdevobj.h:59
LPWSTR pwszDescription
Definition: pdevobj.h:72
ULONG cDevModes
Definition: pdevobj.h:69
struct _GRAPHICS_DEVICE * pNextGraphicsDevice
Definition: pdevobj.h:61
PVIDEO_MONITOR_DEVICE pvMonDev
Definition: pdevobj.h:74
PDEVICE_OBJECT DeviceObject
Definition: pdevobj.h:63
DWORD ProtocolType
Definition: pdevobj.h:76
PDEVICE_OBJECT PhysDeviceHandle
Definition: pdevobj.h:64
LONG cPdevOpenRefs
Definition: pdevobj.h:85
struct _PDEVOBJ * ppdevParent
Definition: pdevobj.h:86
DRIVER_FUNCTIONS pfn
Definition: pdevobj.h:138
PSURFACE pSurface
Definition: pdevobj.h:124
POINTL ptlPointer
Definition: pdevobj.h:91
struct _PDEVOBJ * ppdevNext
Definition: pdevobj.h:83
BASEOBJECT BaseObject
Definition: pdevobj.h:81
FLONG DxDd_Flags
Definition: pdevobj.h:131
GDIPOINTER Pointer
Definition: pdevobj.h:144
ULONG DxDd_nCount
Definition: pdevobj.h:143
struct _LDEVOBJ * pldev
Definition: pdevobj.h:119
PWSTR pusPrtDataFileName
Definition: pdevobj.h:98
DWORD dwAccelerationLevel
Definition: pdevobj.h:132
struct _EDD_DIRECTDRAW_GLOBAL * pEDDgpl
Definition: pdevobj.h:149
UINT SafetyRemoveLevel
Definition: pdevobj.h:146
HSURF ahsurf[HS_DDI_MAX]
Definition: pdevobj.h:97
UINT SafetyRemoveCount
Definition: pdevobj.h:148
FLONG flFlags
Definition: pdevobj.h:87
GDIINFO gdiinfo
Definition: pdevobj.h:123
struct _PALETTE * ppalSurf
Definition: pdevobj.h:121
HANDLE hSpooler
Definition: pdevobj.h:125
PDEVMODEW pdmwDev
Definition: pdevobj.h:129
POINTL ptlOrigion
Definition: pdevobj.h:128
DHPDEV dhpdev
Definition: pdevobj.h:120
PGRAPHICS_DEVICE pGraphicsDevice
Definition: pdevobj.h:127
PVOID pvGammaRamp
Definition: pdevobj.h:106
DRIVER_FUNCTIONS DriverFunctions
Definition: pdevobj.h:137
LONG cPdevRefs
Definition: pdevobj.h:84
PFN_DrvMovePointer pfnMovePointer
Definition: pdevobj.h:113
DEVINFO devinfo
Definition: pdevobj.h:122
SIZEL szlMetaRes
Definition: pdevobj.h:108
PVOID apfn[INDEX_LAST]
Definition: pdevobj.h:139
HSEMAPHORE hsemDevLock
Definition: pdevobj.h:89
PVOID RemoteTypeOne
Definition: pdevobj.h:107
uint16_t * PWSTR
Definition: typedefs.h:56
#define NTAPI
Definition: typedefs.h:36
#define FORCEINLINE
Definition: wdftypes.h:67
typedef DHPDEV(APIENTRY FN_DrvEnablePDEV)(_In_ DEVMODEW *pdm
#define INDEX_LAST
Definition: winddi.h:521
#define HS_DDI_MAX
Definition: winddi.h:3954
typedef HSURF(APIENTRY FN_DrvEnableSurface)(_In_ DHPDEV dhpdev)
FN_DrvMovePointer * PFN_DrvMovePointer
Definition: winddi.h:3735
* PFILE_OBJECT
Definition: iotypes.h:1998
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184