ReactOS  0.4.15-dev-5142-g967f5b9
pandisp.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Win32k subsystem
3  * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4  * PURPOSE: Pan-Display driver
5  * COPYRIGHT: Copyright 2022 HervĂ© Poussineau <hpoussin@reactos.org>
6  */
7 
8 /* INCLUDES *******************************************************************/
9 
10 #include <win32k.h>
11 #define NDEBUG
12 #include <debug.h>
13 
14 #define TAG_PAN 'DnaP'
15 #define GETPFN(name) ((PFN_Drv##name)(pandev->apfn[INDEX_Drv##name]))
16 
17 static DHPDEV gPan; /* FIXME: remove once PanSynchronize() is called periodically */
18 
19 typedef struct _PANDEV
20 {
22  HDEV hdev;
23  SIZEL szlDesktop; /* Size of the whole desktop */
24  RECTL rclViewport; /* Viewport area */
25  HSURF hsurf; /* Global surface */
26  HSURF hsurfShadow; /* Our shadow surface, used for drawing */
28 
29  /* Underlying PDEVOBJ */
33  BOOL enabledScreen; /* underlying surface enabled */
35  PFN apfn[INDEX_LAST]; /* Functions of underlying PDEVOBJ */
36 } PANDEV, *PPANDEV;
37 
38 BOOL
41  _In_ DHPDEV dhpdev,
43 {
44  PPANDEV pandev = (PPANDEV)dhpdev;
45  RECTL rclDest;
46  POINTL ptlSrc;
47 
48  /* FIXME: for now, copy the whole shadow buffer. We might try to optimize that */
49 
50  ptlSrc.x = pandev->rclViewport.left;
51  ptlSrc.y = pandev->rclViewport.top;
52 
53  rclDest.top = rclDest.left = 0;
54  rclDest.bottom = pandev->szlScreen.cy;
55  rclDest.right = pandev->szlScreen.cx;
56 
57  return EngCopyBits(pandev->surfObjScreen, pandev->psoShadow, NULL, NULL, &rclDest, &ptlSrc);
58 }
59 
60 DHPDEV
63  _In_ PDEVMODEW pdm,
65  _In_ ULONG cPat,
66  _In_reads_opt_(cPat) HSURF *phsurfPatterns,
71  _In_ HDEV hdev,
74 {
75  PPANDEV pandev;
76  PPDEVOBJ ppdev = (PPDEVOBJ)hdev;
77  DEVMODEW underlyingDevmode;
78  PGDIINFO pGdiInfo = (PGDIINFO)pdevcaps;
79 
80  DPRINT("PanEnablePDEV(ppdev %p %dx%dx%d -> %dx%dx%d %d Hz)\n",
81  ppdev,
82  pdm->dmPelsWidth, pdm->dmPelsHeight, pdm->dmBitsPerPel,
83  pdm->dmPanningWidth, pdm->dmPanningHeight, pdm->dmBitsPerPel, pdm->dmDisplayFrequency);
84 
85  ASSERT(pdm->dmPanningWidth <= pdm->dmPelsWidth && pdm->dmPanningHeight <= pdm->dmPelsHeight);
86 
87  /* Allocate PANDEV */
88  pandev = EngAllocMem(FL_ZERO_MEMORY, sizeof(PANDEV), TAG_PAN);
89  if (!pandev)
90  {
91  DPRINT1("Failed to allocate memory\n");
92  return NULL;
93  }
94 
95  /* Copy device pointers to our structure (do not copy ppdev->apfn,
96  * as it contains our local pointers!) */
97  RtlCopyMemory(pandev->apfn, ppdev->pldev->apfn, sizeof(pandev->apfn));
98 
99  /* Enable underlying PDEV */
100  underlyingDevmode = *pdm;
101  underlyingDevmode.dmPelsWidth = pdm->dmPanningWidth;
102  underlyingDevmode.dmPelsHeight = pdm->dmPanningHeight;
103  pandev->dhpdevScreen = GETPFN(EnablePDEV)(&underlyingDevmode,
105  cPat,
106  phsurfPatterns,
107  cjCaps,
108  pdevcaps,
109  cjDevInfo,
110  pdi,
111  hdev,
113  hDriver);
114  if (!pandev->dhpdevScreen)
115  {
116  DPRINT1("Failed to enable underlying PDEV\n");
117  EngFreeMem(pandev);
118  return NULL;
119  }
120 
121  pandev->iBitmapFormat = pdi->iDitherFormat;
122  pandev->szlDesktop.cx = pdm->dmPelsWidth;
123  pandev->szlDesktop.cy = pdm->dmPelsHeight;
124  pandev->szlScreen.cx = pdm->dmPanningWidth;
125  pandev->szlScreen.cy = pdm->dmPanningHeight;
126  pandev->flUnderlyingGraphicsCaps = pdi->flGraphicsCaps;
127 
128  /* Upgrade some capabilities */
129  pGdiInfo->ulHorzRes = pdm->dmPelsWidth;
130  pGdiInfo->ulVertRes = pdm->dmPelsHeight;
131  pdi->flGraphicsCaps |= GCAPS_PANNING;
132  pdi->flGraphicsCaps2 = GCAPS2_SYNCFLUSH | GCAPS2_SYNCTIMER;
133 
134  gPan = (DHPDEV)pandev;
135  return (DHPDEV)pandev;
136 }
137 
138 VOID
139 APIENTRY
141  _In_ DHPDEV dhpdev,
142  _In_ HDEV hdev)
143 {
144  PPANDEV pandev = (PPANDEV)dhpdev;
145 
146  DPRINT("PanCompletePDEV(%p %p)\n", dhpdev, hdev);
147 
148  pandev->hdev = hdev;
149  GETPFN(CompletePDEV)(pandev->dhpdevScreen, hdev);
150 }
151 
152 VOID
153 APIENTRY
155  _In_ DHPDEV dhpdev)
156 {
157  PPANDEV pandev = (PPANDEV)dhpdev;
158 
159  DPRINT("PanDisablePDEV(%p)\n", dhpdev);
160 
161  GETPFN(DisablePDEV)(pandev->dhpdevScreen);
162  EngFreeMem(pandev);
163 }
164 
165 VOID
166 APIENTRY
168  _In_ DHPDEV dhpdev)
169 {
170  PPANDEV pandev = (PPANDEV)dhpdev;
171 
172  DPRINT("PanDisableSurface(%p)\n", dhpdev);
173 
174  /* Note that we must handle a not fully initialized pandev, as this
175  * function is also called from PanEnableSurface in case of error. */
176 
177  if (pandev->psoShadow)
178  {
179  EngUnlockSurface(pandev->psoShadow);
180  pandev->psoShadow = NULL;
181  }
182  if (pandev->hsurfShadow)
183  {
184  EngDeleteSurface(pandev->hsurfShadow);
185  pandev->hsurfShadow = NULL;
186  }
187  if (pandev->hsurf)
188  {
189  EngDeleteSurface(pandev->hsurf);
190  pandev->hsurf = NULL;
191  }
192  if (pandev->surfObjScreen)
193  {
195  pandev->surfObjScreen = NULL;
196  }
197  if (pandev->enabledScreen)
198  {
199  GETPFN(DisableSurface)(pandev->dhpdevScreen);
200  pandev->enabledScreen = FALSE;
201  }
202 }
203 
204 HSURF
205 APIENTRY
207  _In_ DHPDEV dhpdev)
208 {
209  PPANDEV pandev = (PPANDEV)dhpdev;
210  HSURF surfScreen;
211 
212  /* Move viewport to center of screen */
213  pandev->rclViewport.left = (pandev->szlDesktop.cx - pandev->szlScreen.cx) / 2;
214  pandev->rclViewport.top = (pandev->szlDesktop.cy - pandev->szlScreen.cy) / 2;
215  pandev->rclViewport.right = pandev->rclViewport.left + pandev->szlScreen.cx;
216  pandev->rclViewport.bottom = pandev->rclViewport.top + pandev->szlScreen.cy;
217 
218  /* Enable underlying device */
219  surfScreen = GETPFN(EnableSurface)(pandev->dhpdevScreen);
220  if (!surfScreen)
221  {
222  DPRINT1("Failed to enable underlying surface\n");
223  goto failure;
224  }
225  pandev->enabledScreen = TRUE;
226 
227  pandev->surfObjScreen = EngLockSurface(surfScreen);
228  if (!pandev->surfObjScreen)
229  {
230  DPRINT1("Failed to lock underlying surface\n");
231  goto failure;
232  }
233 
234  /* Create device surface */
235  pandev->hsurf = EngCreateDeviceSurface(NULL, pandev->szlDesktop, pandev->iBitmapFormat);
236  if (!pandev->hsurf)
237  {
238  DPRINT1("EngCreateDeviceSurface() failed\n");
239  goto failure;
240  }
241 
242  if (!EngAssociateSurface(pandev->hsurf, pandev->hdev, HOOK_ALPHABLEND |
243  HOOK_BITBLT |
244  HOOK_COPYBITS |
248  HOOK_TEXTOUT))
249  {
250  DPRINT1("EngAssociateSurface() failed\n");
251  goto failure;
252  }
253 
254  /* Create shadow surface */
255  pandev->hsurfShadow = (HSURF)EngCreateBitmap(pandev->szlDesktop, pandev->szlDesktop.cx, pandev->iBitmapFormat, BMF_TOPDOWN, NULL);
256  if (!pandev->hsurfShadow)
257  {
258  DPRINT1("EngCreateBitmap() failed\n");
259  goto failure;
260  }
261 
262  pandev->psoShadow = EngLockSurface(pandev->hsurfShadow);
263  if (!pandev->psoShadow)
264  {
265  DPRINT1("EngLockSurface() failed\n");
266  goto failure;
267  }
268 
269  return pandev->hsurf;
270 
271 failure:
272  PanDisableSurface(dhpdev);
273  return NULL;
274 }
275 
276 BOOL
277 APIENTRY
279  _Inout_ SURFOBJ *psoTrg,
282  _In_ CLIPOBJ *pco,
289  _In_ ROP4 rop4)
290 {
291  PPANDEV pandev;
292  BOOL res;
293 
294  if (psoTrg->iType == STYPE_DEVICE)
295  {
296  pandev = (PPANDEV)psoTrg->dhpdev;
297  psoTrg = pandev->psoShadow;
298  }
299  if (psoSrc && psoSrc->iType == STYPE_DEVICE)
300  {
301  pandev = (PPANDEV)psoSrc->dhpdev;
302  psoSrc = pandev->psoShadow;
303  }
304 
306 
307  /* FIXME: PanSynchronize must be called periodically, as we have the GCAPS2_SYNCTIMER flag.
308  * That's not the case, so call PanSynchronize() manually */
309  if (res)
311 
312  return res;
313 }
314 
315 BOOL
316 APIENTRY
318  _Inout_ SURFOBJ *psoDest,
320  _In_ CLIPOBJ *pco,
324 {
325  /* Easy. Just call the more general function PanBitBlt */
326  return PanBitBlt(psoDest, psoSrc, NULL, pco, pxlo, prclDest, pptlSrc, NULL, NULL, NULL, ROP4_SRCCOPY);
327 }
328 
329 BOOL
330 APIENTRY
333  _In_ PATHOBJ *ppo,
334  _In_ CLIPOBJ *pco,
336  _In_ BRUSHOBJ *pbo,
339  _In_ MIX mix)
340 {
342  ASSERT(FALSE);
343  return FALSE;
344 }
345 
346 BOOL
347 APIENTRY
350  _In_ STROBJ *pstro,
351  _In_ FONTOBJ *pfo,
352  _In_ CLIPOBJ *pco,
358  _In_ MIX mix)
359 {
361  ASSERT(FALSE);
362  return FALSE;
363 }
364 
365 VOID
366 APIENTRY
369  _In_ LONG x,
370  _In_ LONG y,
371  _In_ PRECTL prcl)
372 {
373  PPANDEV pandev = (PPANDEV)pso->dhpdev;
374  PFN_DrvMovePointer pfnMovePointer;
375  BOOL bChanged = FALSE;
376 
377  DPRINT("PanMovePointer(%d, %d)\n", x, y);
378 
379  /* FIXME: MouseSafetyOnDrawStart/MouseSafetyOnDrawEnd like to call us to hide/show the cursor,
380  * without real reason (see 5b0f6dcceeae3cf21f2535e2c523c0bf2749ea6b). Ignore those calls */
381  if (x < 0 || y >= 0) return;
382 
383  /* We don't set DrvSetPointerShape, so we must not be called
384  * with x < 0 (hide cursor) or y >= 0 (we have GCAPS_PANNING) */
385  ASSERT(x >= 0 && y < 0);
386 
387  /* Call underlying MovePointer function */
389  {
390  pfnMovePointer = GETPFN(MovePointer);
391  if (pfnMovePointer)
392  pfnMovePointer(pandev->surfObjScreen, x, y, prcl);
393  }
394 
395  y += pso->sizlBitmap.cy;
396 
397  if (x < pandev->rclViewport.left)
398  {
399  pandev->rclViewport.left = x;
400  pandev->rclViewport.right = x + pandev->szlScreen.cx;
401  bChanged = TRUE;
402  }
403  else if (x >= pandev->rclViewport.right)
404  {
405  pandev->rclViewport.right = x + 1;
406  pandev->rclViewport.left = x - pandev->szlScreen.cx;
407  bChanged = TRUE;
408  }
409  if (y < pandev->rclViewport.top)
410  {
411  pandev->rclViewport.top = y;
412  pandev->rclViewport.bottom = y + pandev->szlScreen.cy;
413  bChanged = TRUE;
414  }
415  else if (y >= pandev->rclViewport.bottom)
416  {
417  pandev->rclViewport.bottom = y + 1;
418  pandev->rclViewport.top = y - pandev->szlScreen.cy;
419  bChanged = TRUE;
420  }
421 
422  if (bChanged)
423  PanSynchronize(pso->dhpdev, NULL);
424 }
425 
426 BOOL
427 APIENTRY
429  _Inout_ SURFOBJ *psoDest,
431  _In_ CLIPOBJ *pco,
436 {
437  PPANDEV pandev = (PPANDEV)psoDest->dhpdev;
438  BOOL res;
439 
441 
442  /* FIXME: PanSynchronize must be called periodically, as we have the GCAPS2_SYNCTIMER flag.
443  * That's not the case, so call PanSynchronize() manually */
444  if (res)
446 
447  return res;
448 }
449 
450 BOOL
451 APIENTRY
454  _In_ CLIPOBJ *pco,
458  _In_ PVOID pMesh,
459  _In_ ULONG nMesh,
462  _In_ ULONG ulMode)
463 {
464  PPANDEV pandev = (PPANDEV)pso->dhpdev;
465  BOOL res;
466 
468 
469  /* FIXME: PanSynchronize must be called periodically, as we have the GCAPS2_SYNCTIMER flag.
470  * That's not the case, so call PanSynchronize() manually */
471  if (res)
473 
474  return res;
475 }
476 
478 {
479  /* required */
485 
486  /* required for device-managed surfaces */
490 
491  /* optional, but required for panning functionality */
494 
495  /* optional */
499 };
500 
#define STYPE_DEVICE
Definition: lmshare.h:24
#define INDEX_DrvStrokePath
Definition: winddi.h:430
HSURF hsurf
Definition: pandisp.c:25
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX _In_ ULONG _In_ PVOID _In_ ULONG nMesh
Definition: winddi.h:3649
ULONG flUnderlyingGraphicsCaps
Definition: pandisp.c:30
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX _In_ ULONG _In_ PVOID pMesh
Definition: winddi.h:3649
_In_ STROBJ _In_ FONTOBJ _In_ CLIPOBJ _Null_ RECTL _In_opt_ RECTL _In_ BRUSHOBJ _In_ BRUSHOBJ * pboOpaque
Definition: winddi.h:4175
BOOL APIENTRY PanStrokePath(_Inout_ SURFOBJ *pso, _In_ PATHOBJ *ppo, _In_ CLIPOBJ *pco, _In_opt_ XFORMOBJ *pxo, _In_ BRUSHOBJ *pbo, _In_ PPOINTL pptlBrushOrg, _In_ PLINEATTRS plineattrs, _In_ MIX mix)
Definition: pandisp.c:331
#define INDEX_DrvCompletePDEV
Definition: winddi.h:417
typedef DHPDEV(APIENTRY FN_DrvEnablePDEV)(_In_ DEVMODEW *pdm
ENGAPI BOOL APIENTRY EngDeleteSurface(_In_ _Post_ptr_invalid_ HSURF hsurf)
Definition: surface.c:567
#define _In_opt_
Definition: ms_sal.h:309
ULONG MIX
Definition: winddi.h:129
#define GCAPS2_SYNCTIMER
Definition: winddi.h:373
HDEV hdev
Definition: pandisp.c:22
#define _Inout_
Definition: ms_sal.h:378
struct _LDEVOBJ * pldev
Definition: pdevobj.h:119
#define TRUE
Definition: types.h:120
#define EngFreeMem
Definition: polytest.cpp:56
HSURF hsurfShadow
Definition: pandisp.c:26
#define INDEX_DrvEnablePDEV
Definition: winddi.h:416
BOOL APIENTRY PanTextOut(_Inout_ SURFOBJ *pso, _In_ STROBJ *pstro, _In_ FONTOBJ *pfo, _In_ CLIPOBJ *pco, _In_opt_ PRECTL prclExtra, _In_opt_ PRECTL prclOpaque, _In_ BRUSHOBJ *pboFore, _In_ BRUSHOBJ *pboOpaque, _In_ PPOINTL pptlOrg, _In_ MIX mix)
Definition: pandisp.c:348
_In_opt_ SURFOBJ _In_opt_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL _In_opt_ POINTL _In_opt_ POINTL _In_opt_ BRUSHOBJ _In_opt_ POINTL _In_ ROP4 rop4
Definition: winddi.h:3433
#define BMF_TOPDOWN
Definition: winddi.h:1180
long bottom
Definition: polytest.cpp:53
_In_opt_ SURFOBJ _In_opt_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL * prclTrg
Definition: winddi.h:3433
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG _Out_ DEVINFO _In_ HDEV _In_ LPWSTR _In_ HANDLE hDriver
Definition: winddi.h:3553
FN_DrvMovePointer * PFN_DrvMovePointer
Definition: winddi.h:3735
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
BOOL APIENTRY PanBitBlt(_Inout_ SURFOBJ *psoTrg, _In_opt_ SURFOBJ *psoSrc, _In_opt_ SURFOBJ *psoMask, _In_ CLIPOBJ *pco, _In_opt_ XLATEOBJ *pxlo, _In_ PRECTL prclTrg, _In_opt_ PPOINTL pptlSrc, _In_opt_ PPOINTL pptlMask, _In_opt_ BRUSHOBJ *pbo, _In_opt_ PPOINTL pptlBrush, _In_ ROP4 rop4)
Definition: pandisp.c:278
ULONG iBitmapFormat
Definition: pandisp.c:21
ULONG ROP4
Definition: winddi.h:128
struct _PANDEV PANDEV
#define _In_reads_opt_(size)
Definition: ms_sal.h:320
SIZEL szlDesktop
Definition: pandisp.c:23
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX _In_ ULONG _In_ PVOID _In_ ULONG _In_ RECTL * prclExtents
Definition: winddi.h:3649
_In_ STROBJ _In_ FONTOBJ _In_ CLIPOBJ _Null_ RECTL * prclExtra
Definition: winddi.h:4175
BOOL APIENTRY PanSynchronize(_In_ DHPDEV dhpdev, _In_ PRECTL prcl)
Definition: pandisp.c:40
LONG y
Definition: windef.h:330
_In_ SURFOBJ * psoSrc
Definition: winddi.h:3414
_In_ PATHOBJ * ppo
Definition: winddi.h:3591
#define HOOK_GRADIENTFILL
Definition: winddi.h:1436
#define HOOK_ALPHABLEND
Definition: winddi.h:1435
long right
Definition: polytest.cpp:53
#define TAG_PAN
Definition: pandisp.c:14
struct _GDIINFO * PGDIINFO
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
_In_ PATHOBJ _In_ CLIPOBJ _In_ BRUSHOBJ _In_ POINTL * pptlBrushOrg
Definition: winddi.h:3591
long top
Definition: polytest.cpp:53
SURFOBJ * psoShadow
Definition: pandisp.c:27
_In_ STROBJ _In_ FONTOBJ _In_ CLIPOBJ _Null_ RECTL _In_opt_ RECTL _In_ BRUSHOBJ _In_ BRUSHOBJ _In_ POINTL * pptlOrg
Definition: winddi.h:4175
VOID APIENTRY PanCompletePDEV(_In_ DHPDEV dhpdev, _In_ HDEV hdev)
Definition: pandisp.c:140
ULONG ulHorzRes
Definition: winddi.h:882
BOOL APIENTRY PanGradientFill(_Inout_ SURFOBJ *pso, _In_ CLIPOBJ *pco, _In_opt_ XLATEOBJ *pxlo, _In_ PTRIVERTEX pVertex, _In_ ULONG nVertex, _In_ PVOID pMesh, _In_ ULONG nMesh, _In_ PRECTL prclExtents, _In_ PPOINTL pptlDitherOrg, _In_ ULONG ulMode)
Definition: pandisp.c:452
#define _In_
Definition: ms_sal.h:308
LONG cx
Definition: windef.h:334
struct _PDEVOBJ * PPDEVOBJ
Definition: mdevobj.h:6
#define ROP4_SRCCOPY
Definition: dib.h:13
_In_opt_ SURFOBJ _In_opt_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL _In_opt_ POINTL _In_opt_ POINTL _In_opt_ BRUSHOBJ _In_opt_ POINTL * pptlBrush
Definition: winddi.h:3433
long left
Definition: polytest.cpp:53
SURFOBJ * surfObjScreen
Definition: pandisp.c:34
typedef HSURF(APIENTRY FN_DrvEnableSurface)(_In_ DHPDEV dhpdev)
_In_ HANDLE _In_ SURFOBJ * pso
Definition: winddi.h:3664
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX * pVertex
Definition: winddi.h:3649
#define HOOK_TEXTOUT
Definition: winddi.h:1423
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL _In_ RECTL * prclSrc
Definition: winddi.h:3414
_In_opt_ FONTOBJ * pfo
Definition: winddi.h:3603
#define GCAPS_PANNING
Definition: winddi.h:339
RECTL rclViewport
Definition: pandisp.c:24
_In_ STROBJ * pstro
Definition: winddi.h:4175
#define HOOK_BITBLT
Definition: winddi.h:1420
_In_opt_ SURFOBJ _In_opt_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL _In_opt_ POINTL _In_opt_ POINTL _In_opt_ BRUSHOBJ * pbo
Definition: winddi.h:3433
#define ASSERT(a)
Definition: mode.c:44
BOOL APIENTRY PanAlphaBlend(_Inout_ SURFOBJ *psoDest, _In_ SURFOBJ *psoSrc, _In_ CLIPOBJ *pco, _In_opt_ XLATEOBJ *pxlo, _In_ PRECTL prclDest, _In_ PRECTL prclSrc, _In_ BLENDOBJ *pBlendObj)
Definition: pandisp.c:428
DHPDEV APIENTRY PanEnablePDEV(_In_ PDEVMODEW pdm, _In_ LPWSTR pwszLogAddress, _In_ ULONG cPat, _In_reads_opt_(cPat) HSURF *phsurfPatterns, _In_ ULONG cjCaps, _Out_writes_bytes_(cjCaps) PULONG pdevcaps, _In_ ULONG cjDevInfo, _Out_writes_bytes_(cjDevInfo) PDEVINFO pdi, _In_ HDEV hdev, _In_ LPWSTR pwszDeviceName, _In_ HANDLE hDriver)
Definition: pandisp.c:62
VOID APIENTRY PanMovePointer(_Inout_ SURFOBJ *pso, _In_ LONG x, _In_ LONG y, _In_ PRECTL prcl)
Definition: pandisp.c:367
static DHPDEV gPan
Definition: pandisp.c:17
DHPDEV dhpdevScreen
Definition: pandisp.c:32
LONG x
Definition: windef.h:329
PFN apfn[INDEX_LAST]
Definition: pandisp.c:35
ENGAPI SURFOBJ *APIENTRY EngLockSurface(_In_ HSURF hsurf)
Definition: surface.c:607
BOOL enabledScreen
Definition: pandisp.c:33
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL * prclDest
Definition: winddi.h:3414
_In_ LPWSTR pwszLogAddress
Definition: winddi.h:3548
DWORD dmPelsWidth
Definition: wingdi.h:1648
#define HOOK_SYNCHRONIZE
Definition: winddi.h:1431
void * EngAllocMem(int zero, unsigned long size, int tag=0)
Definition: polytest.cpp:70
#define INDEX_LAST
Definition: winddi.h:521
ENGAPI BOOL APIENTRY EngAssociateSurface(_In_ HSURF hsurf, _In_ HDEV hdev, _In_ FLONG flHooks)
Definition: surface.c:431
#define FL_ZERO_MEMORY
Definition: polytest.cpp:58
_In_ SURFOBJ _In_ CLIPOBJ * pco
Definition: winddi.h:3414
SIZEL szlScreen
Definition: pandisp.c:31
ENGAPI BOOL APIENTRY EngCopyBits(_In_ SURFOBJ *psoDest, _In_ SURFOBJ *psoSrc, _In_opt_ CLIPOBJ *pco, _In_opt_ XLATEOBJ *pxlo, _In_ __in_data_source(USER_MODE) RECTL *prclDest, _In_ __in_data_source(USER_MODE) POINTL *pptlSrc)
#define INDEX_DrvDisableSurface
Definition: winddi.h:420
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG _Out_ DEVINFO _In_ HDEV _In_ LPWSTR pwszDeviceName
Definition: winddi.h:3553
#define HOOK_COPYBITS
Definition: winddi.h:1429
_In_opt_ SURFOBJ _In_opt_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL _In_opt_ POINTL _In_opt_ POINTL * pptlMask
Definition: winddi.h:3433
#define INDEX_DrvBitBlt
Definition: winddi.h:434
#define GCAPS2_SYNCFLUSH
Definition: winddi.h:372
#define INDEX_DrvEnableSurface
Definition: winddi.h:419
HSURF APIENTRY PanEnableSurface(_In_ DHPDEV dhpdev)
Definition: pandisp.c:206
BOOLEAN(* PFN)(PARGS)
Definition: parse.h:47
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX _In_ ULONG _In_ PVOID _In_ ULONG _In_ RECTL _In_ POINTL _In_ ULONG ulMode
Definition: winddi.h:3649
_In_opt_ SURFOBJ _In_opt_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL _In_opt_ POINTL * pptlSrc
Definition: winddi.h:3433
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL _In_ RECTL _In_ BLENDOBJ * pBlendObj
Definition: winddi.h:3414
#define RTL_NUMBER_OF(x)
Definition: RtlRegistry.c:12
_In_ LPWSTR _In_ ULONG cPat
Definition: winddi.h:3548
#define INDEX_DrvAlphaBlend
Definition: winddi.h:487
_In_ PATHOBJ _In_ CLIPOBJ _In_ BRUSHOBJ _In_ POINTL _In_ MIX mix
Definition: winddi.h:3591
_In_ STROBJ _In_ FONTOBJ _In_ CLIPOBJ _Null_ RECTL _In_opt_ RECTL _In_ BRUSHOBJ * pboFore
Definition: winddi.h:4175
_Inout_ PATHOBJ _In_ CLIPOBJ _In_opt_ XFORMOBJ _In_ BRUSHOBJ _In_ LINEATTRS * plineattrs
Definition: winddi.h:4119
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG cjDevInfo
Definition: winddi.h:3553
ENGAPI VOID APIENTRY EngUnlockSurface(_In_ _Post_ptr_invalid_ SURFOBJ *pso)
Definition: surface.c:628
ENGAPI BOOL APIENTRY EngGradientFill(_Inout_ SURFOBJ *psoDest, _In_ CLIPOBJ *pco, _In_opt_ XLATEOBJ *pxlo, _In_ TRIVERTEX *pVertex, _In_ ULONG nVertex, _In_ PVOID pMesh, _In_ ULONG nMesh, _In_ RECTL *prclExtents, _In_ POINTL *pptlDitherOrg, _In_ ULONG ulMode)
Definition: gradient.c:475
unsigned int * PULONG
Definition: retypes.h:1
#define NULL
Definition: types.h:112
ULONG gPanDispDrvCount
Definition: pandisp.c:501
VOID APIENTRY PanDisablePDEV(_In_ DHPDEV dhpdev)
Definition: pandisp.c:154
_In_opt_ SURFOBJ _In_opt_ SURFOBJ * psoMask
Definition: winddi.h:3433
#define INDEX_DrvTextOut
Definition: winddi.h:439
struct _PANDEV * PPANDEV
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
#define INDEX_DrvDisablePDEV
Definition: winddi.h:418
#define INDEX_DrvMovePointer
Definition: winddi.h:446
_In_ XLATEOBJ _In_ XFORMOBJ * pxo
Definition: winddi.h:3810
#define DPRINT1
Definition: precomp.h:8
DWORD dmPelsHeight
Definition: wingdi.h:1649
_In_ ULONG _In_ CLIPOBJ _In_ RECTL * prcl
Definition: winddi.h:3529
_Must_inspect_result_ ENGAPI HSURF APIENTRY EngCreateDeviceSurface(_In_ DHSURF dhsurf, _In_ SIZEL sizl, _In_ ULONG iFormatCompat)
Definition: surface.c:391
_In_ LPWSTR _In_ ULONG _In_ ULONG cjCaps
Definition: winddi.h:3551
GLuint res
Definition: glext.h:9613
unsigned int ULONG
Definition: retypes.h:1
#define UNIMPLEMENTED
Definition: debug.h:115
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define GETPFN(name)
Definition: pandisp.c:15
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX _In_ ULONG nVertex
Definition: winddi.h:3649
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX _In_ ULONG _In_ PVOID _In_ ULONG _In_ RECTL _In_ POINTL * pptlDitherOrg
Definition: winddi.h:3649
#define INDEX_DrvCopyBits
Definition: winddi.h:435
_In_ STROBJ _In_ FONTOBJ _In_ CLIPOBJ _Null_ RECTL _In_opt_ RECTL * prclOpaque
Definition: winddi.h:4175
ULONG ulVertRes
Definition: winddi.h:883
#define DPRINT
Definition: sndvol32.h:71
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define HOOK_STROKEPATH
Definition: winddi.h:1425
#define _Out_writes_bytes_(size)
Definition: ms_sal.h:350
DRVFN gPanDispDrvFn[]
Definition: pandisp.c:477
LONG cy
Definition: windef.h:335
Definition: winddi.h:529
_In_ HDEV hdev
Definition: winddi.h:3449
#define INDEX_DrvSynchronize
Definition: winddi.h:454
ENGAPI BOOL APIENTRY EngBitBlt(_Inout_ SURFOBJ *psoTrg, _In_opt_ SURFOBJ *psoSrc, _In_opt_ SURFOBJ *psoMask, _In_opt_ CLIPOBJ *pco, _In_opt_ XLATEOBJ *pxlo, _In_ RECTL *prclTrg, _In_opt_ POINTL *pptlSrc, _In_opt_ POINTL *pptlMask, _In_opt_ BRUSHOBJ *pbo, _In_opt_ POINTL *pptlBrush, _In_ ROP4 rop4)
Definition: bitblt.c:328
#define APIENTRY
Definition: api.h:79
ENGAPI HBITMAP APIENTRY EngCreateBitmap(_In_ SIZEL sizl, _In_ LONG lWidth, _In_ ULONG iFormat, _In_ FLONG fl, _In_opt_ PVOID pvBits)
BOOL APIENTRY PanCopyBits(_Inout_ SURFOBJ *psoDest, _In_opt_ SURFOBJ *psoSrc, _In_ CLIPOBJ *pco, _In_opt_ XLATEOBJ *pxlo, _In_ PRECTL prclDest, _In_opt_ PPOINTL pptlSrc)
Definition: pandisp.c:317
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG _Out_ DEVINFO * pdi
Definition: winddi.h:3553
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ * pxlo
Definition: winddi.h:3414
ENGAPI BOOL APIENTRY EngAlphaBlend(_Inout_ SURFOBJ *psoDest, _In_ SURFOBJ *psoSrc, _In_opt_ CLIPOBJ *pco, _In_opt_ XLATEOBJ *pxlo, _In_ RECTL *prclDest, _In_ RECTL *prclSrc, _In_ BLENDOBJ *pBlendObj)
Definition: alphablend.c:20
VOID APIENTRY PanDisableSurface(_In_ DHPDEV dhpdev)
Definition: pandisp.c:167
#define INDEX_DrvGradientFill
Definition: winddi.h:484