ReactOS 0.4.15-dev-7654-g6bc40d3
pdevobj.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * PURPOSE: Support for physical devices
5 * FILE: win32ss/gdi/eng/pdevobj.c
6 * PROGRAMERS: Timo Kreuzer (timo.kreuzer@reactos.org)
7 * Oleg Dubinskiy (oleg.dubinskij30@gmail.com)
8 */
9
10#include <win32k.h>
11#define NDEBUG
12#include <debug.h>
14
17
18BOOL
21 _In_ ULONG iEngineVersion,
24
25extern DRVFN gPanDispDrvFn[];
27
28CODE_SEG("INIT")
32{
35 return STATUS_SUCCESS;
36}
37
38#if DBG
42{
43 PPDEVOBJ ppdev;
44
45 /* Lock PDEV list */
46 EngAcquireSemaphoreShared(ghsemPDEV);
47
48 /* Walk through the list of PDEVs */
49 for (ppdev = gppdevList; ppdev; ppdev = ppdev->ppdevNext)
50 {
51 /* Compare with the given DHPDEV */
52 if (ppdev->dhpdev == dhpdev) break;
53 }
54
55 /* Unlock PDEV list */
57
58 return ppdev;
59}
60#endif
61
64{
65 PPDEVOBJ ppdev;
66
68 if (!ppdev)
69 return NULL;
70
71 RtlZeroMemory(ppdev, sizeof(PDEVOBJ));
72
74 if (ppdev->hsemDevLock == NULL)
75 {
77 return NULL;
78 }
79
80 /* Allocate EDD_DIRECTDRAW_GLOBAL for our ReactX driver */
82 if (ppdev->pEDDgpl)
84
85 ppdev->cPdevRefs = 1;
86
87 return ppdev;
88}
89
90static
91VOID
93 PPDEVOBJ ppdev)
94{
96 if (ppdev->pdmwDev)
98 if (ppdev->pEDDgpl)
101}
102
103VOID
104NTAPI
106 _Inout_ PPDEVOBJ ppdev)
107{
108 /* Lock loader */
110
111 /* Decrease reference count */
112 InterlockedDecrement(&ppdev->cPdevRefs);
113 ASSERT(ppdev->cPdevRefs >= 0);
114
115 /* Check if references are left */
116 if (ppdev->cPdevRefs == 0)
117 {
118 /* Do we have a surface? */
119 if (ppdev->pSurface)
120 {
121 /* Release the surface and let the driver free it */
122 SURFACE_ShareUnlockSurface(ppdev->pSurface);
123 TRACE("DrvDisableSurface(dhpdev %p)\n", ppdev->dhpdev);
124 ppdev->pfn.DisableSurface(ppdev->dhpdev);
125 }
126
127 /* Do we have a palette? */
128 if (ppdev->ppalSurf)
129 {
130 PALETTE_ShareUnlockPalette(ppdev->ppalSurf);
131 }
132
133 /* Check if the PDEV was enabled */
134 if (ppdev->dhpdev != NULL)
135 {
136 /* Disable the PDEV */
137 TRACE("DrvDisablePDEV(dhpdev %p)\n", ppdev->dhpdev);
138 ppdev->pfn.DisablePDEV(ppdev->dhpdev);
139 }
140
141 /* Remove it from list */
142 if (ppdev == gppdevList)
143 {
144 gppdevList = ppdev->ppdevNext;
145 }
146 else if (gppdevList)
147 {
148 PPDEVOBJ ppdevCurrent = gppdevList;
149 BOOL found = FALSE;
150 while (!found && ppdevCurrent->ppdevNext)
151 {
152 if (ppdevCurrent->ppdevNext == ppdev)
153 found = TRUE;
154 else
155 ppdevCurrent = ppdevCurrent->ppdevNext;
156 }
157 if (found)
158 ppdevCurrent->ppdevNext = ppdev->ppdevNext;
159 }
160
161 /* Unload display driver */
162 EngUnloadImage(ppdev->pldev);
163
164 /* Free it */
165 PDEVOBJ_vDeletePDEV(ppdev);
166 }
167
168 /* Unlock loader */
170}
171
172BOOL
173NTAPI
175 _In_ PPDEVOBJ ppdev,
176 _In_ PDEVMODEW pdevmode,
178{
179 PFN_DrvEnablePDEV pfnEnablePDEV;
180 ULONG i;
181
182 /* Get the DrvEnablePDEV function */
183 pfnEnablePDEV = ppdev->pfn.EnablePDEV;
184
185 /* Call the drivers DrvEnablePDEV function */
186 TRACE("DrvEnablePDEV(pdevmode %p (%dx%dx%d %d Hz) hdev %p (%S))\n",
187 pdevmode,
188 ppdev->pGraphicsDevice ? pdevmode->dmPelsWidth : 0,
189 ppdev->pGraphicsDevice ? pdevmode->dmPelsHeight : 0,
190 ppdev->pGraphicsDevice ? pdevmode->dmBitsPerPel : 0,
191 ppdev->pGraphicsDevice ? pdevmode->dmDisplayFrequency : 0,
192 ppdev,
193 ppdev->pGraphicsDevice ? ppdev->pGraphicsDevice->szNtDeviceName : L"");
194 ppdev->dhpdev = pfnEnablePDEV(pdevmode,
197 ppdev->ahsurf,
198 sizeof(GDIINFO),
199 (PULONG)&ppdev->gdiinfo,
200 sizeof(DEVINFO),
201 &ppdev->devinfo,
202 (HDEV)ppdev,
203 ppdev->pGraphicsDevice ? ppdev->pGraphicsDevice->pwszDescription : NULL,
204 ppdev->pGraphicsDevice ? ppdev->pGraphicsDevice->DeviceObject : NULL);
205 TRACE("DrvEnablePDEV(pdevmode %p hdev %p) => dhpdev %p\n", pdevmode, ppdev, ppdev->dhpdev);
206 if (ppdev->dhpdev == NULL)
207 {
208 ERR("Failed to enable PDEV\n");
209 return FALSE;
210 }
211
212 /* Fix up some values */
213 if (ppdev->gdiinfo.ulLogPixelsX == 0)
214 ppdev->gdiinfo.ulLogPixelsX = 96;
215
216 if (ppdev->gdiinfo.ulLogPixelsY == 0)
217 ppdev->gdiinfo.ulLogPixelsY = 96;
218
219 /* Set raster caps */
220 ppdev->gdiinfo.flRaster = RC_OP_DX_OUTPUT | RC_GDI20_OUTPUT | RC_BIGFONT;
221 if ((ppdev->gdiinfo.ulTechnology != DT_PLOTTER) && (ppdev->gdiinfo.ulTechnology != DT_CHARSTREAM))
222 ppdev->gdiinfo.flRaster |= RC_STRETCHDIB | RC_STRETCHBLT | RC_DIBTODEV | RC_DI_BITMAP | RC_BITMAP64 | RC_BITBLT;
223 if (ppdev->gdiinfo.ulTechnology == DT_RASDISPLAY)
224 ppdev->gdiinfo.flRaster |= RC_FLOODFILL;
225 if (ppdev->devinfo.flGraphicsCaps & GCAPS_PALMANAGED)
226 ppdev->gdiinfo.flRaster |= RC_PALETTE;
227
228 /* Setup Palette */
229 ppdev->ppalSurf = PALETTE_ShareLockPalette(ppdev->devinfo.hpalDefault);
230
231 /* Setup hatch brushes */
232 for (i = 0; i < HS_DDI_MAX; i++)
233 {
234 if (ppdev->ahsurf[i] == NULL)
235 ppdev->ahsurf[i] = gahsurfHatch[i];
236 }
237
238 TRACE("PDEVOBJ_bEnablePDEV - dhpdev = %p\n", ppdev->dhpdev);
239
240 return TRUE;
241}
242
243VOID
244NTAPI
246 PPDEVOBJ ppdev)
247{
248 /* Call the drivers DrvCompletePDEV function */
249 TRACE("DrvCompletePDEV(dhpdev %p hdev %p)\n", ppdev->dhpdev, ppdev);
250 ppdev->pfn.CompletePDEV(ppdev->dhpdev, (HDEV)ppdev);
251}
252
253static
254VOID
256 _In_ PPDEVOBJ ppdev)
257{
258 PLDEVOBJ pldev = ppdev->pldev;
259 ULONG dwAccelerationLevel = ppdev->dwAccelerationLevel;
260
261 if (!pldev->pGdiDriverInfo)
262 return;
263 if (pldev->ldevtype != LDEV_DEVICE_DISPLAY)
264 return;
265
266 if (dwAccelerationLevel >= 1)
267 {
269 ppdev->apfn[INDEX_DrvCreateDeviceBitmap] = NULL;
270 }
271
272 if (dwAccelerationLevel >= 2)
273 {
274 /* Remove sophisticated display accelerations */
275 ppdev->pSurface->flags &= ~(HOOK_STRETCHBLT |
281 }
282
283 if (dwAccelerationLevel >= 3)
284 {
285 /* Disable DirectDraw and Direct3D accelerations */
286 /* FIXME: need to call DxDdSetAccelLevel */
288 }
289
290 if (dwAccelerationLevel >= 4)
291 {
292 /* Remove almost all display accelerations */
293 ppdev->pSurface->flags &= ~HOOK_FLAGS |
299
300 }
301
302 if (dwAccelerationLevel >= 5)
303 {
304 /* Disable all display accelerations */
305 /* (nothing to do. Already handled in PDEVOBJ_Create) */
306 }
307}
308
310NTAPI
312 PPDEVOBJ ppdev)
313{
314 HSURF hsurf;
315
316 /* Check if there is no surface for this PDEV yet */
317 if (ppdev->pSurface == NULL)
318 {
319 /* Call the drivers DrvEnableSurface */
320 TRACE("DrvEnableSurface(dhpdev %p)\n", ppdev->dhpdev);
321 hsurf = ppdev->pfn.EnableSurface(ppdev->dhpdev);
322 TRACE("DrvEnableSurface(dhpdev %p) => hsurf %p\n", ppdev->dhpdev, hsurf);
323 if (hsurf== NULL)
324 {
325 ERR("Failed to create PDEV surface!\n");
326 return NULL;
327 }
328
329 /* Get a reference to the surface */
330 ppdev->pSurface = SURFACE_ShareLockSurface(hsurf);
331 NT_ASSERT(ppdev->pSurface != NULL);
332 }
333
334 /* Increment reference count */
336
337 return ppdev->pSurface;
338}
339
340BOOL
342 _Inout_ PPDEVOBJ ppdev)
343{
346
347 /* Enable DirectDraw */
348 TRACE("DxDdEnableDirectDraw(ppdev %p)\n", ppdev);
349 Success = pfnDdEnableDirectDraw((HDEV)ppdev, TRUE);
350 TRACE("DxDdEnableDirectDraw(ppdev %p) => %d\n", ppdev, Success);
351
352 return Success;
353}
354
355VOID
357 _Inout_ PPDEVOBJ ppdev)
358{
360
361 /* Resume DirectDraw after mode change */
362 TRACE("DxDdResumeDirectDraw(ppdev %p)\n", ppdev);
363 pfnDdResumeDirectDraw((HDEV)ppdev, 0);
364}
365
366VOID
368 _Inout_ PPDEVOBJ ppdev)
369{
371
372 /* Suspend DirectDraw for mode change */
373 TRACE("DxDdSuspendDirectDraw(ppdev %p)\n", ppdev);
374 pfnDdSuspendDirectDraw((HDEV)ppdev, 0);
375}
376
377VOID
379 _Inout_ PPDEVOBJ ppdev,
380 _Inout_ PPDEVOBJ ppdev2)
381{
383
384 /* Switch DirectDraw instances between the PDEVs */
385 TRACE("DxDdDynamicModeChange(ppdev %p, ppdev2 %p)\n", ppdev, ppdev2);
386 pfnDdDynamicModeChange((HDEV)ppdev, (HDEV)ppdev2, 0);
387}
388
389VOID
391 _Inout_ PPDEVOBJ ppdev)
392{
393 BOOL assertVal;
394
395 if (!(ppdev->flFlags & PDEV_DISABLED))
396 return;
397
398 /* Try to enable display until success */
399 do
400 {
401 TRACE("DrvAssertMode(dhpdev %p, TRUE)\n", ppdev->dhpdev);
402 assertVal = ppdev->pfn.AssertMode(ppdev->dhpdev, TRUE);
403 TRACE("DrvAssertMode(dhpdev %p, TRUE) => %d\n", ppdev->dhpdev, assertVal);
404 } while (!assertVal);
405
406 ppdev->flFlags &= ~PDEV_DISABLED;
407}
408
409BOOL
411 _Inout_ PPDEVOBJ ppdev)
412{
413 BOOL assertVal;
414
415 if (ppdev->flFlags & PDEV_DISABLED)
416 return TRUE;
417
419
420 TRACE("DrvAssertMode(dhpdev %p, FALSE)\n", ppdev->dhpdev);
421 assertVal = ppdev->pfn.AssertMode(ppdev->dhpdev, FALSE);
422 TRACE("DrvAssertMode(dhpdev %p, FALSE) => %d\n", ppdev->dhpdev, assertVal);
423
424 if (assertVal)
425 ppdev->flFlags |= PDEV_DISABLED;
426
427 return assertVal;
428}
429
430VOID
431NTAPI
433 PPDEVOBJ ppdev)
434{
435 PGRAPHICS_DEVICE pGraphicsDevice;
436 PDEVMODEINFO pdminfo, pdmiNext;
437
438 /* Lock the PDEV */
440
441 pGraphicsDevice = ppdev->pGraphicsDevice;
442
443 /* Clear out the modes */
444 for (pdminfo = pGraphicsDevice->pdevmodeInfo;
445 pdminfo;
446 pdminfo = pdmiNext)
447 {
448 pdmiNext = pdminfo->pdmiNext;
450 }
451 pGraphicsDevice->pdevmodeInfo = NULL;
453 pGraphicsDevice->pDevModeList = NULL;
454
455 /* Update available display mode list */
456 LDEVOBJ_bBuildDevmodeList(pGraphicsDevice);
457
458 /* Unlock PDEV */
460}
461
464 _In_opt_ PGRAPHICS_DEVICE pGraphicsDevice,
466 _In_ ULONG dwAccelerationLevel,
467 _In_ ULONG ldevtype)
468{
469 PPDEVOBJ ppdev, ppdevMatch = NULL;
470 PLDEVOBJ pldev;
472
473 TRACE("PDEVOBJ_Create(%p %p %d)\n", pGraphicsDevice, pdm, ldevtype);
474
475 if (ldevtype != LDEV_DEVICE_META)
476 {
477 ASSERT(pGraphicsDevice);
478 ASSERT(pdm);
479 /* Search if we already have a PPDEV with the required characteristics.
480 * We will compare the graphics device, the devmode and the desktop
481 */
482 for (ppdev = gppdevList; ppdev; ppdev = ppdev->ppdevNext)
483 {
484 if (ppdev->pGraphicsDevice == pGraphicsDevice)
485 {
486 PDEVOBJ_vReference(ppdev);
487
488 if (RtlEqualMemory(pdm, ppdev->pdmwDev, sizeof(DEVMODEW)) &&
489 ppdev->dwAccelerationLevel == dwAccelerationLevel)
490 {
491 PDEVOBJ_vReference(ppdev);
492 ppdevMatch = ppdev;
493 }
494 else
495 {
497 }
498
499 PDEVOBJ_vRelease(ppdev);
500 }
501 }
502
503 if (ppdevMatch)
504 {
505 PDEVOBJ_vEnableDisplay(ppdevMatch);
506
507 return ppdevMatch;
508 }
509 }
510
511 /* Try to get a display driver */
512 if (ldevtype == LDEV_DEVICE_META)
513 pldev = LDEVOBJ_pLoadInternal(MultiEnableDriver, ldevtype);
514 else
515 pldev = LDEVOBJ_pLoadDriver(pdm->dmDeviceName, ldevtype);
516 if (!pldev)
517 {
518 ERR("Could not load display driver '%S'\n",
519 (ldevtype == LDEV_DEVICE_META) ? L"" : pdm->dmDeviceName);
520 return NULL;
521 }
522
523 /* Allocate a new PDEVOBJ */
524 ppdev = PDEVOBJ_AllocPDEV();
525 if (!ppdev)
526 {
527 ERR("failed to allocate a PDEV\n");
528 return NULL;
529 }
530
531 if (ldevtype != LDEV_DEVICE_META)
532 {
533 ppdev->pGraphicsDevice = pGraphicsDevice;
534
535 // DxEngGetHdevData asks for Graphics DeviceObject in hSpooler field
536 ppdev->hSpooler = ppdev->pGraphicsDevice->DeviceObject;
537
538 /* Keep selected resolution */
539 if (ppdev->pdmwDev)
541 ppdev->pdmwDev = ExAllocatePoolWithTag(PagedPool, pdm->dmSize + pdm->dmDriverExtra, GDITAG_DEVMODE);
542 if (ppdev->pdmwDev)
543 {
544 RtlCopyMemory(ppdev->pdmwDev, pdm, pdm->dmSize + pdm->dmDriverExtra);
545 /* FIXME: this must be done in a better way */
547 }
548 }
549
550 /* FIXME! */
551 ppdev->flFlags = PDEV_DISPLAY;
552
553 /* HACK: Don't use the pointer */
554 ppdev->Pointer.Exclude.right = -1;
555
556 /* Initialize PDEV */
557 ppdev->pldev = pldev;
558 ppdev->dwAccelerationLevel = dwAccelerationLevel;
559
560 /* Copy the function table */
561 if ((ldevtype == LDEV_DEVICE_DISPLAY && dwAccelerationLevel >= 5) ||
562 pdm->dmFields & (DM_PANNINGWIDTH | DM_PANNINGHEIGHT))
563 {
564 ULONG i;
565
566 /* Initialize missing fields */
567 if (!(pdm->dmFields & DM_PANNINGWIDTH))
568 pdm->dmPanningWidth = pdm->dmPelsWidth;
569 if (!(pdm->dmFields & DM_PANNINGHEIGHT))
570 pdm->dmPanningHeight = pdm->dmPelsHeight;
571
572 /* Replace vtable by panning vtable */
573 for (i = 0; i < gPanDispDrvCount; i++)
575 }
576 else
577 {
578 ppdev->pfn = ppdev->pldev->pfn;
579 }
580
581 /* Call the driver to enable the PDEV */
582 if (!PDEVOBJ_bEnablePDEV(ppdev, pdm, NULL))
583 {
584 ERR("Failed to enable PDEV!\n");
585 PDEVOBJ_vRelease(ppdev);
586 EngUnloadImage(pldev);
587 return NULL;
588 }
589
590 /* Tell the driver that the PDEV is ready */
592
593 /* Create the initial surface */
594 pSurface = PDEVOBJ_pSurface(ppdev);
595 if (!pSurface)
596 {
597 ERR("Failed to create surface\n");
598 PDEVOBJ_vRelease(ppdev);
599 EngUnloadImage(pldev);
600 return NULL;
601 }
602
603 /* Enable DirectDraw */
604 if (!PDEVOBJ_bEnableDirectDraw(ppdev))
605 {
606 ERR("Failed to enable DirectDraw\n");
607 PDEVOBJ_vRelease(ppdev);
608 EngUnloadImage(pldev);
609 return NULL;
610 }
611
612 /* Remove some acceleration capabilities from driver */
614
615 /* Set MovePointer function */
616 ppdev->pfnMovePointer = ppdev->pfn.MovePointer;
617 if (!ppdev->pfnMovePointer)
619
620 /* Insert the PDEV into the list */
621 ppdev->ppdevNext = gppdevList;
622 gppdevList = ppdev;
623
624 /* Return the PDEV */
625 return ppdev;
626}
627
629VOID
631 _Inout_ PVOID pvPointer1,
632 _Inout_ PVOID pvPointer2)
633{
634 PVOID *ppvPointer1 = pvPointer1;
635 PVOID *ppvPointer2 = pvPointer2;
636 PVOID pvTemp;
637
638 pvTemp = *ppvPointer1;
639 *ppvPointer1 = *ppvPointer2;
640 *ppvPointer2 = pvTemp;
641}
642
643BOOL
644NTAPI
646 PPDEVOBJ ppdev,
647 PPDEVOBJ ppdev2)
648{
649 union
650 {
652 GDIINFO gdiinfo;
653 DEVINFO devinfo;
654 DWORD StateFlags;
655 } temp;
656
657 /* Exchange driver functions */
658 temp.pfn = ppdev->pfn;
659 ppdev->pfn = ppdev2->pfn;
660 ppdev2->pfn = temp.pfn;
661
662 /* Exchange LDEVs */
663 SwitchPointer(&ppdev->pldev, &ppdev2->pldev);
664
665 /* Exchange DHPDEV */
666 SwitchPointer(&ppdev->dhpdev, &ppdev2->dhpdev);
667
668 /* Exchange surfaces and associate them with their new PDEV */
669 SwitchPointer(&ppdev->pSurface, &ppdev2->pSurface);
670 ppdev->pSurface->SurfObj.hdev = (HDEV)ppdev;
671 ppdev2->pSurface->SurfObj.hdev = (HDEV)ppdev2;
672
673 /* Exchange devinfo */
674 temp.devinfo = ppdev->devinfo;
675 ppdev->devinfo = ppdev2->devinfo;
676 ppdev2->devinfo = temp.devinfo;
677
678 /* Exchange gdiinfo */
679 temp.gdiinfo = ppdev->gdiinfo;
680 ppdev->gdiinfo = ppdev2->gdiinfo;
681 ppdev2->gdiinfo = temp.gdiinfo;
682
683 /* Exchange DEVMODE */
684 SwitchPointer(&ppdev->pdmwDev, &ppdev2->pdmwDev);
685
686 /* Exchange state flags */
687 temp.StateFlags = ppdev->pGraphicsDevice->StateFlags;
689 ppdev2->pGraphicsDevice->StateFlags = temp.StateFlags;
690
691 /* Notify each driver instance of its new HDEV association */
692 ppdev->pfn.CompletePDEV(ppdev->dhpdev, (HDEV)ppdev);
693 ppdev2->pfn.CompletePDEV(ppdev2->dhpdev, (HDEV)ppdev2);
694
695 /* Switch DirectDraw mode */
696 PDEVOBJ_vSwitchDirectDraw(ppdev, ppdev2);
697
698 return TRUE;
699}
700
701
702BOOL
703NTAPI
705 PPDEVOBJ ppdev,
706 PDEVMODEW pdm)
707{
708 PPDEVOBJ ppdevTmp;
710 BOOL retval = FALSE;
711
712 /* Lock the PDEV */
714
715 /* And everything else */
717
718 DPRINT1("PDEVOBJ_bSwitchMode, ppdev = %p, pSurface = %p\n", ppdev, ppdev->pSurface);
719
720 // Lookup the GraphicsDevice + select DEVMODE
721 // pdm = LDEVOBJ_bProbeAndCaptureDevmode(ppdev, pdm);
722
723 /* 1. Temporarily disable the current PDEV and reset video to its default mode */
724 if (!PDEVOBJ_bDisableDisplay(ppdev))
725 {
726 DPRINT1("PDEVOBJ_bDisableDisplay() failed\n");
727 /* Resume DirectDraw in case of failure */
729 goto leave;
730 }
731
732 /* 2. Create new PDEV */
733 ppdevTmp = PDEVOBJ_Create(ppdev->pGraphicsDevice, pdm, 0, LDEV_DEVICE_DISPLAY);
734 if (!ppdevTmp)
735 {
736 DPRINT1("Failed to create a new PDEV\n");
737 goto leave2;
738 }
739
740 /* 3. Create a new surface */
741 pSurface = PDEVOBJ_pSurface(ppdevTmp);
742 if (!pSurface)
743 {
744 DPRINT1("PDEVOBJ_pSurface failed\n");
745 PDEVOBJ_vRelease(ppdevTmp);
746 goto leave2;
747 }
748
749 /* 4. Temporarily suspend DirectDraw for mode change */
752
753 /* 5. Switch the PDEVs */
754 if (!PDEVOBJ_bDynamicModeChange(ppdev, ppdevTmp))
755 {
756 DPRINT1("PDEVOBJ_bDynamicModeChange() failed\n");
757 PDEVOBJ_vRelease(ppdevTmp);
758 goto leave2;
759 }
760
761 /* 6. Resume DirectDraw */
764
765 /* Release temp PDEV */
766 PDEVOBJ_vRelease(ppdevTmp);
767
768 /* Re-initialize DirectDraw data */
769 ppdev->pEDDgpl->hDev = (HDEV)ppdev;
770 ppdev->pEDDgpl->dhpdev = ppdev->dhpdev;
771
772 /* Update primary display capabilities */
773 if (ppdev == gpmdev->ppdevGlobal)
774 {
775 PDEVOBJ_vGetDeviceCaps(ppdev, &GdiHandleTable->DevCaps);
776 }
777
778 /* Success! */
779 retval = TRUE;
780
781leave2:
782 /* Set the new video mode, or restore the original one in case of failure */
784
785leave:
786 /* Unlock everything else */
788 /* Unlock the PDEV */
790
791 DPRINT1("leave, ppdev = %p, pSurface = %p\n", ppdev, ppdev->pSurface);
792
793 return retval;
794}
795
796
798NTAPI
800 _In_opt_ PUNICODE_STRING pustrDeviceName)
801{
802 UNICODE_STRING ustrCurrent;
803 PPDEVOBJ ppdev = NULL;
804 PGRAPHICS_DEVICE pGraphicsDevice;
805 ULONG i;
806
807 /* Acquire PDEV lock */
809
810 /* Did the caller pass a device name? */
811 if (pustrDeviceName)
812 {
813 /* Loop all present PDEVs */
814 for (i = 0; i < gpmdev->cDev; i++)
815 {
816 /* Get a pointer to the GRAPHICS_DEVICE */
817 pGraphicsDevice = gpmdev->dev[i].ppdev->pGraphicsDevice;
818
819 /* Compare the name */
820 RtlInitUnicodeString(&ustrCurrent, pGraphicsDevice->szWinDeviceName);
821 if (RtlEqualUnicodeString(pustrDeviceName, &ustrCurrent, FALSE))
822 {
823 /* Found! */
824 ppdev = gpmdev->dev[i].ppdev;
825 break;
826 }
827 }
828 }
829 else if (gpmdev)
830 {
831 /* Otherwise use the primary PDEV */
832 ppdev = gpmdev->ppdevGlobal;
833 }
834
835 /* Did we find one? */
836 if (ppdev)
837 {
838 /* Yes, reference the PDEV */
839 PDEVOBJ_vReference(ppdev);
840 }
841
842 /* Release PDEV lock */
844
845 return ppdev;
846}
847
848LONG
850 _In_opt_ PUNICODE_STRING pustrDeviceName,
851 _In_opt_ PDEVMODEW RequestedMode,
852 _In_opt_ PMDEVOBJ pmdevOld,
853 _Out_ PMDEVOBJ *ppmdevNew,
854 _In_ BOOL bSearchClosestMode)
855{
856 PGRAPHICS_DEVICE pGraphicsDevice = NULL;
857 PMDEVOBJ pmdev = NULL;
858 PDEVMODEW pdm = NULL;
860 ULONG i, j;
861
862 TRACE("PDEVOBJ_lChangeDisplaySettings('%wZ' '%dx%dx%d (%d Hz)' %p %p)\n",
863 pustrDeviceName,
864 RequestedMode ? RequestedMode->dmPelsWidth : 0,
865 RequestedMode ? RequestedMode->dmPelsHeight : 0,
866 RequestedMode ? RequestedMode->dmBitsPerPel : 0,
867 RequestedMode ? RequestedMode->dmDisplayFrequency : 0,
868 pmdevOld, ppmdevNew);
869
870 if (pustrDeviceName)
871 {
872 pGraphicsDevice = EngpFindGraphicsDevice(pustrDeviceName, 0);
873 if (!pGraphicsDevice)
874 {
875 ERR("Wrong device name provided: '%wZ'\n", pustrDeviceName);
877 goto cleanup;
878 }
879 }
880 else if (RequestedMode)
881 {
882 pGraphicsDevice = gpPrimaryGraphicsDevice;
883 if (!pGraphicsDevice)
884 {
885 ERR("Wrong device'\n");
887 goto cleanup;
888 }
889 }
890
891 if (pGraphicsDevice)
892 {
893 if (!LDEVOBJ_bProbeAndCaptureDevmode(pGraphicsDevice, RequestedMode, &pdm, bSearchClosestMode))
894 {
895 ERR("DrvProbeAndCaptureDevmode() failed\n");
896 lRet = DISP_CHANGE_BADMODE;
897 goto cleanup;
898 }
899 }
900
901 /* Here, we know that input parameters were correct */
902
903 {
904 /* Create new MDEV. Note that if we provide a device name,
905 * MDEV will only contain one device.
906 * */
907
908 if (pmdevOld)
909 {
910 /* Disable old MDEV */
911 if (MDEVOBJ_bDisable(pmdevOld))
912 {
913 /* Create new MDEV. On failure, reenable old MDEV */
914 pmdev = MDEVOBJ_Create(pustrDeviceName, pdm);
915 if (!pmdev)
916 MDEVOBJ_vEnable(pmdevOld);
917 }
918 }
919 else
920 {
921 pmdev = MDEVOBJ_Create(pustrDeviceName, pdm);
922 }
923
924 if (!pmdev)
925 {
926 ERR("Failed to create new MDEV\n");
927 lRet = DISP_CHANGE_FAILED;
928 goto cleanup;
929 }
930
932 *ppmdevNew = pmdev;
933
934 /* We now have to do the mode switch */
935
936 if (pustrDeviceName && pmdevOld)
937 {
938 /* We changed settings of one device. Add other devices which were already present */
939 for (i = 0; i < pmdevOld->cDev; i++)
940 {
941 for (j = 0; j < pmdev->cDev; j++)
942 {
943 if (pmdev->dev[j].ppdev->pGraphicsDevice == pmdevOld->dev[i].ppdev->pGraphicsDevice)
944 {
945 if (PDEVOBJ_bDynamicModeChange(pmdevOld->dev[i].ppdev, pmdev->dev[j].ppdev))
946 {
947 PPDEVOBJ tmp = pmdevOld->dev[i].ppdev;
948 pmdevOld->dev[i].ppdev = pmdev->dev[j].ppdev;
949 pmdev->dev[j].ppdev = tmp;
950 }
951 else
952 {
953 ERR("Failed to apply new settings\n");
955 ASSERT(FALSE);
956 }
957 break;
958 }
959 }
960 if (j == pmdev->cDev)
961 {
962 PDEVOBJ_vReference(pmdevOld->dev[i].ppdev);
963 pmdev->dev[pmdev->cDev].ppdev = pmdevOld->dev[i].ppdev;
964 pmdev->cDev++;
965 }
966 }
967 }
968
969 if (pmdev->cDev == 1)
970 {
971 pmdev->ppdevGlobal = pmdev->dev[0].ppdev;
972 }
973 else
974 {
975 /* Enable MultiDriver */
977 if (!pmdev->ppdevGlobal)
978 {
979 WARN("Failed to create meta-device. Using only first display\n");
980 PDEVOBJ_vReference(pmdev->dev[0].ppdev);
981 pmdev->ppdevGlobal = pmdev->dev[0].ppdev;
982 }
983 }
984
985 if (pmdevOld)
986 {
987 /* Search PDEVs which were in pmdevOld, but are not anymore in pmdev, and disable them */
988 for (i = 0; i < pmdevOld->cDev; i++)
989 {
990 for (j = 0; j < pmdev->cDev; j++)
991 {
992 if (pmdev->dev[j].ppdev->pGraphicsDevice == pmdevOld->dev[i].ppdev->pGraphicsDevice)
993 break;
994 }
995 if (j == pmdev->cDev)
996 PDEVOBJ_bDisableDisplay(pmdevOld->dev[i].ppdev);
997 }
998 }
999 }
1000
1001cleanup:
1002 if (lRet != DISP_CHANGE_SUCCESSFUL)
1003 {
1004 *ppmdevNew = NULL;
1005 if (pmdev)
1006 MDEVOBJ_vDestroy(pmdev);
1007 if (pdm && pdm != RequestedMode)
1009 }
1010
1011 return lRet;
1012}
1013
1014INT
1015NTAPI
1017{
1018 INT ret = CM_NONE;
1019
1020 if (ppdev->flFlags & PDEV_DISPLAY)
1021 {
1022 if (ppdev->devinfo.iDitherFormat == BMF_8BPP ||
1024 ret = CM_GAMMA_RAMP;
1025 }
1026
1028 ret |= CM_CMYK_COLOR;
1029 if (ppdev->devinfo.flGraphicsCaps & GCAPS_ICM)
1030 ret |= CM_DEVICE_ICM;
1031
1032 return ret;
1033}
1034
1035VOID
1036NTAPI
1038 IN PPDEVOBJ ppdev,
1040{
1041 PGDIINFO pGdiInfo = &ppdev->gdiinfo;
1042
1043 pDevCaps->ulVersion = pGdiInfo->ulVersion;
1044 pDevCaps->ulTechnology = pGdiInfo->ulTechnology;
1045 pDevCaps->ulHorzSizeM = (pGdiInfo->ulHorzSize + 500) / 1000;
1046 pDevCaps->ulVertSizeM = (pGdiInfo->ulVertSize + 500) / 1000;
1047 pDevCaps->ulHorzSize = pGdiInfo->ulHorzSize;
1048 pDevCaps->ulVertSize = pGdiInfo->ulVertSize;
1049 pDevCaps->ulHorzRes = pGdiInfo->ulHorzRes;
1050 pDevCaps->ulVertRes = pGdiInfo->ulVertRes;
1051 pDevCaps->ulBitsPixel = pGdiInfo->cBitsPixel;
1052 if (pDevCaps->ulBitsPixel == 15) pDevCaps->ulBitsPixel = 16;
1053 pDevCaps->ulPlanes = pGdiInfo->cPlanes;
1054 pDevCaps->ulNumPens = pGdiInfo->ulNumColors;
1055 if (pDevCaps->ulNumPens != -1) pDevCaps->ulNumPens *= 5;
1056 pDevCaps->ulNumFonts = 0; // PDEVOBJ_cFonts(ppdev);
1057 pDevCaps->ulNumColors = pGdiInfo->ulNumColors;
1058 pDevCaps->ulRasterCaps = pGdiInfo->flRaster;
1059 pDevCaps->ulAspectX = pGdiInfo->ulAspectX;
1060 pDevCaps->ulAspectY = pGdiInfo->ulAspectY;
1061 pDevCaps->ulAspectXY = pGdiInfo->ulAspectXY;
1062 pDevCaps->ulLogPixelsX = pGdiInfo->ulLogPixelsX;
1063 pDevCaps->ulLogPixelsY = pGdiInfo->ulLogPixelsY;
1064 pDevCaps->ulSizePalette = pGdiInfo->ulNumPalReg;
1065 pDevCaps->ulColorRes = pGdiInfo->ulDACRed +
1066 pGdiInfo->ulDACGreen +
1067 pGdiInfo->ulDACBlue;
1072 pDevCaps->ulTextCaps = pGdiInfo->flTextCaps;
1074 if (pGdiInfo->ulTechnology != DT_PLOTTER)
1076 pDevCaps->ulVRefresh = pGdiInfo->ulVRefresh;
1077 pDevCaps->ulDesktopHorzRes = pGdiInfo->ulHorzRes;
1078 pDevCaps->ulDesktopVertRes = pGdiInfo->ulVertRes;
1084 pDevCaps->ulShadeBlend = pGdiInfo->flShadeBlend;
1086}
1087
1088
1091/*
1092 * @implemented
1093 */
1094BOOL
1097 _In_ HDEV hdev,
1098 _In_ ENG_DEVICE_ATTRIBUTE devAttr,
1099 _In_reads_bytes_(cjInSize) PVOID pvIn,
1100 _In_ ULONG cjInSize,
1101 _Out_writes_bytes_(cjOutSize) PVOID pvOut,
1102 _In_ ULONG cjOutSize)
1103{
1104 PPDEVOBJ ppdev = (PPDEVOBJ)hdev;
1105
1106 if (devAttr != QDA_ACCELERATION_LEVEL)
1107 return FALSE;
1108
1109 if (cjOutSize >= sizeof(DWORD))
1110 {
1111 /* Set all Accelerations Level Key to enabled Full 0 to 5 turned off. */
1112 *(DWORD*)pvOut = ppdev->dwAccelerationLevel;
1113 return TRUE;
1114 }
1115
1116 return FALSE;
1117}
1118
1120LPWSTR
1123{
1124 PPDEVOBJ ppdev = (PPDEVOBJ)hdev;
1125
1126 ASSERT(ppdev);
1127 ASSERT(ppdev->pldev);
1128 ASSERT(ppdev->pldev->pGdiDriverInfo);
1129 ASSERT(ppdev->pldev->pGdiDriverInfo->DriverName.Buffer);
1130
1131 return ppdev->pldev->pGdiDriverInfo->DriverName.Buffer;
1132}
1133
1134
1135INT
1138 HDC hdc,
1139 INT Index)
1140{
1141 PDC pdc;
1142 DEVCAPS devcaps;
1143
1144 /* Lock the given DC */
1145 pdc = DC_LockDc(hdc);
1146 if (!pdc)
1147 {
1149 return 0;
1150 }
1151
1152 /* Get the data */
1153 PDEVOBJ_vGetDeviceCaps(pdc->ppdev, &devcaps);
1154
1155 /* Unlock the DC */
1156 DC_UnlockDc(pdc);
1157
1158 /* Return capability */
1159 switch (Index)
1160 {
1161 case DRIVERVERSION:
1162 return devcaps.ulVersion;
1163
1164 case TECHNOLOGY:
1165 return devcaps.ulTechnology;
1166
1167 case HORZSIZE:
1168 return devcaps.ulHorzSize;
1169
1170 case VERTSIZE:
1171 return devcaps.ulVertSize;
1172
1173 case HORZRES:
1174 return devcaps.ulHorzRes;
1175
1176 case VERTRES:
1177 return devcaps.ulVertRes;
1178
1179 case LOGPIXELSX:
1180 return devcaps.ulLogPixelsX;
1181
1182 case LOGPIXELSY:
1183 return devcaps.ulLogPixelsY;
1184
1185 case BITSPIXEL:
1186 return devcaps.ulBitsPixel;
1187
1188 case PLANES:
1189 return devcaps.ulPlanes;
1190
1191 case NUMBRUSHES:
1192 return -1;
1193
1194 case NUMPENS:
1195 return devcaps.ulNumPens;
1196
1197 case NUMFONTS:
1198 return devcaps.ulNumFonts;
1199
1200 case NUMCOLORS:
1201 return devcaps.ulNumColors;
1202
1203 case ASPECTX:
1204 return devcaps.ulAspectX;
1205
1206 case ASPECTY:
1207 return devcaps.ulAspectY;
1208
1209 case ASPECTXY:
1210 return devcaps.ulAspectXY;
1211
1212 case CLIPCAPS:
1213 return CP_RECTANGLE;
1214
1215 case SIZEPALETTE:
1216 return devcaps.ulSizePalette;
1217
1218 case NUMRESERVED:
1219 return 20;
1220
1221 case COLORRES:
1222 return devcaps.ulColorRes;
1223
1224 case DESKTOPVERTRES:
1225 return devcaps.ulVertRes;
1226
1227 case DESKTOPHORZRES:
1228 return devcaps.ulHorzRes;
1229
1230 case BLTALIGNMENT:
1231 return devcaps.ulBltAlignment;
1232
1233 case SHADEBLENDCAPS:
1234 return devcaps.ulShadeBlend;
1235
1236 case COLORMGMTCAPS:
1237 return devcaps.ulColorMgmtCaps;
1238
1239 case PHYSICALWIDTH:
1240 return devcaps.ulPhysicalWidth;
1241
1242 case PHYSICALHEIGHT:
1243 return devcaps.ulPhysicalHeight;
1244
1245 case PHYSICALOFFSETX:
1246 return devcaps.ulPhysicalOffsetX;
1247
1248 case PHYSICALOFFSETY:
1249 return devcaps.ulPhysicalOffsetY;
1250
1251 case VREFRESH:
1252 return devcaps.ulVRefresh;
1253
1254 case RASTERCAPS:
1255 return devcaps.ulRasterCaps;
1256
1257 case CURVECAPS:
1258 return (CC_CIRCLES | CC_PIE | CC_CHORD | CC_ELLIPSES | CC_WIDE |
1260
1261 case LINECAPS:
1264
1265 case POLYGONALCAPS:
1268
1269 case TEXTCAPS:
1270 return devcaps.ulTextCaps;
1271
1272 case CAPS1:
1273 case PDEVICESIZE:
1274 case SCALINGFACTORX:
1275 case SCALINGFACTORY:
1276 default:
1277 return 0;
1278 }
1279
1280 return 0;
1281}
1282
1284BOOL
1286NtGdiGetDeviceCapsAll(
1287 IN HDC hDC,
1289{
1290 PDC pdc;
1291 DEVCAPS devcaps;
1292 BOOL bResult = TRUE;
1293
1294 /* Lock the given DC */
1295 pdc = DC_LockDc(hDC);
1296 if (!pdc)
1297 {
1299 return FALSE;
1300 }
1301
1302 /* Get the data */
1303 PDEVOBJ_vGetDeviceCaps(pdc->ppdev, &devcaps);
1304
1305 /* Unlock the DC */
1306 DC_UnlockDc(pdc);
1307
1308 /* Copy data to caller */
1309 _SEH2_TRY
1310 {
1311 ProbeForWrite(pDevCaps, sizeof(DEVCAPS), 1);
1312 RtlCopyMemory(pDevCaps, &devcaps, sizeof(DEVCAPS));
1313 }
1315 {
1317 bResult = FALSE;
1318 }
1319 _SEH2_END;
1320
1321 return bResult;
1322}
1323
1324DHPDEV
1327 IN HDEV hdev)
1328{
1329 PPDEVOBJ ppdev;
1330 DHPDEV dhpdev = NULL;
1331
1332 /* Check parameter */
1334 return NULL;
1335
1336 /* Lock PDEV list */
1337 EngAcquireSemaphoreShared(ghsemPDEV);
1338
1339 /* Walk through the list of PDEVs */
1340 for (ppdev = gppdevList; ppdev; ppdev = ppdev->ppdevNext)
1341 {
1342 /* Compare with the given HDEV */
1343 if (ppdev == (PPDEVOBJ)hdev)
1344 {
1345 /* Found the PDEV! Get it's dhpdev and break */
1346 dhpdev = ppdev->dhpdev;
1347 break;
1348 }
1349 }
1350
1351 /* Unlock PDEV list */
1353
1354 return dhpdev;
1355}
1356
1357PSIZEL
1360{
1361 if (ppdev->flFlags & PDEV_META_DEVICE)
1362 {
1363 *psizl = ppdev->szlMetaRes;
1364 }
1365 else
1366 {
1367 psizl->cx = ppdev->gdiinfo.ulHorzRes;
1368 psizl->cy = ppdev->gdiinfo.ulVertRes;
1369 }
1370 return psizl;
1371}
static HDC hDC
Definition: 3dtext.c:33
#define InterlockedDecrement
Definition: armddk.h:52
DWORD_PTR HSEMAPHORE
Definition: axcore.idl:60
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
#define UNIMPLEMENTED
Definition: debug.h:115
#define WARN(fmt,...)
Definition: debug.h:112
#define ERR(fmt,...)
Definition: debug.h:110
#define DBG_DEFAULT_CHANNEL(ch)
Definition: debug.h:103
#define leave
Definition: btrfs_drv.h:138
FORCEINLINE VOID DC_UnlockDc(PDC pdc)
Definition: dc.h:238
FORCEINLINE PDC DC_LockDc(HDC hdc)
Definition: dc.h:220
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define APIENTRY
Definition: api.h:79
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
static void cleanup(void)
Definition: main.c:1335
PPDEVOBJ NTAPI DbgLookupDHPDEV(DHPDEV dhpdev)
#define DXG_INDEX_DxDdDynamicModeChange
Definition: dxg.h:111
BOOLEAN(NTAPI * PGD_DXDDENABLEDIRECTDRAW)(PVOID, BOOLEAN)
Definition: dxg.h:199
#define DXG_INDEX_DxDdResumeDirectDraw
Definition: dxg.h:110
#define DXG_INDEX_DxDdEnableDirectDraw
Definition: dxg.h:107
#define DXG_INDEX_DxDdSuspendDirectDraw
Definition: dxg.h:109
HSURF gahsurfHatch[HS_DDI_MAX]
Definition: engbrush.c:24
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define PagedPool
Definition: env_spec_w32.h:308
@ Success
Definition: eventcreate.c:712
VOID NTAPI ProbeForWrite(IN PVOID Address, IN SIZE_T Length, IN ULONG Alignment)
Definition: exintrin.c:143
#define _SEH2_END
Definition: filesup.c:22
#define _SEH2_TRY
Definition: filesup.c:19
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
VOID WINAPI EngReleaseSemaphore(IN HSEMAPHORE hsem)
Definition: eng.c:235
HSEMAPHORE WINAPI EngCreateSemaphore(VOID)
Definition: eng.c:75
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
VOID(APIENTRY * PGD_DXDDSUSPENDDIRECTDRAW)(HDEV, ULONG_PTR)
Definition: intddraw.h:113
VOID(APIENTRY * PGD_DXDDRESUMEDIRECTDRAW)(HDEV, ULONG_PTR)
Definition: intddraw.h:112
VOID(APIENTRY * PGD_DXDDDYNAMICMODECHANGE)(HDEV, HDEV, ULONG_PTR)
Definition: intddraw.h:111
static CODE_SEG("PAGE")
Definition: isapnp.c:1482
#define RtlEqualMemory(a, b, c)
Definition: kdvm.h:18
PLDEVOBJ NTAPI LDEVOBJ_pLoadDriver(_In_z_ LPWSTR pwszDriverName, _In_ ULONG ldevtype)
Definition: ldevobj.c:347
BOOL LDEVOBJ_bBuildDevmodeList(_Inout_ PGRAPHICS_DEVICE pGraphicsDevice)
Definition: ldevobj.c:565
BOOL LDEVOBJ_bProbeAndCaptureDevmode(_Inout_ PGRAPHICS_DEVICE pGraphicsDevice, _In_ PDEVMODEW RequestedMode, _Out_ PDEVMODEW *pSelectedMode, _In_ BOOL bSearchClosestMode)
Definition: ldevobj.c:737
PLDEVOBJ LDEVOBJ_pLoadInternal(_In_ PFN_DrvEnableDriver pfnEnableDriver, _In_ ULONG ldevtype)
Definition: ldevobj.c:303
@ LDEV_DEVICE_DISPLAY
Definition: ldevobj.h:8
@ LDEV_DEVICE_META
Definition: ldevobj.h:10
VOID MDEVOBJ_vDestroy(_Inout_ PMDEVOBJ pmdev)
Definition: mdevobj.c:164
PMDEVOBJ gpmdev
Definition: mdevobj.c:14
PMDEVOBJ MDEVOBJ_Create(_In_opt_ PUNICODE_STRING pustrDeviceName, _In_opt_ PDEVMODEW pdm)
Definition: mdevobj.c:57
BOOL MDEVOBJ_bDisable(_Inout_ PMDEVOBJ pmdev)
Definition: mdevobj.c:29
VOID MDEVOBJ_vEnable(_Inout_ PMDEVOBJ pmdev)
Definition: mdevobj.c:17
struct _PDEVOBJ * PPDEVOBJ
Definition: mdevobj.h:6
#define CAPS1
Definition: mmsystem.h:934
#define ASSERT(a)
Definition: mode.c:44
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1109
HDC hdc
Definition: main.c:9
static HDC
Definition: imagelist.c:92
#define _Success_(expr)
Definition: ms_sal.h:259
#define _In_reads_bytes_(size)
Definition: ms_sal.h:321
#define _Inout_
Definition: ms_sal.h:378
#define _Out_writes_bytes_(size)
Definition: ms_sal.h:350
#define _Must_inspect_result_
Definition: ms_sal.h:558
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
#define _Inout_bytecount_(size)
Definition: ms_sal.h:936
#define _Ret_z_
Definition: ms_sal.h:524
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI BOOLEAN NTAPI RtlEqualUnicodeString(PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive)
#define FASTCALL
Definition: nt_native.h:50
_Out_ PDEVCAPS pDevCaps
Definition: ntgdi.h:2664
#define MmSystemRangeStart
Definition: mm.h:32
#define L(x)
Definition: ntvdm.h:50
PPDEVOBJ NTAPI EngpGetPDEV(_In_opt_ PUNICODE_STRING pustrDeviceName)
Definition: pdevobj.c:799
BOOL NTAPI PDEVOBJ_bEnablePDEV(_In_ PPDEVOBJ ppdev, _In_ PDEVMODEW pdevmode, _In_ PWSTR pwszLogAddress)
Definition: pdevobj.c:174
BOOL APIENTRY MultiEnableDriver(_In_ ULONG iEngineVersion, _In_ ULONG cj, _Inout_bytecount_(cj) PDRVENABLEDATA pded)
Definition: multidisp.c:17
VOID PDEVOBJ_vResumeDirectDraw(_Inout_ PPDEVOBJ ppdev)
Definition: pdevobj.c:356
static VOID PDEVOBJ_vFilterDriverHooks(_In_ PPDEVOBJ ppdev)
Definition: pdevobj.c:255
BOOL PDEVOBJ_bDisableDisplay(_Inout_ PPDEVOBJ ppdev)
Definition: pdevobj.c:410
BOOL APIENTRY EngQueryDeviceAttribute(_In_ HDEV hdev, _In_ ENG_DEVICE_ATTRIBUTE devAttr, _In_reads_bytes_(cjInSize) PVOID pvIn, _In_ ULONG cjInSize, _Out_writes_bytes_(cjOutSize) PVOID pvOut, _In_ ULONG cjOutSize)
Definition: pdevobj.c:1096
_Must_inspect_result_ _Ret_z_ LPWSTR APIENTRY EngGetDriverName(_In_ HDEV hdev)
Definition: pdevobj.c:1122
BOOL PDEVOBJ_bEnableDirectDraw(_Inout_ PPDEVOBJ ppdev)
Definition: pdevobj.c:341
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:849
static HSEMAPHORE ghsemPDEV
Definition: pdevobj.c:16
VOID PDEVOBJ_vSuspendDirectDraw(_Inout_ PPDEVOBJ ppdev)
Definition: pdevobj.c:367
DRVFN gPanDispDrvFn[]
Definition: pandisp.c:477
PPDEVOBJ PDEVOBJ_Create(_In_opt_ PGRAPHICS_DEVICE pGraphicsDevice, _In_opt_ PDEVMODEW pdm, _In_ ULONG dwAccelerationLevel, _In_ ULONG ldevtype)
Definition: pdevobj.c:463
BOOL NTAPI PDEVOBJ_bDynamicModeChange(PPDEVOBJ ppdev, PPDEVOBJ ppdev2)
Definition: pdevobj.c:645
static PPDEVOBJ gppdevList
Definition: pdevobj.c:15
PSIZEL FASTCALL PDEVOBJ_sizl(PPDEVOBJ ppdev, PSIZEL psizl)
Definition: pdevobj.c:1359
DHPDEV APIENTRY NtGdiGetDhpdev(IN HDEV hdev)
Definition: pdevobj.c:1326
INT NTAPI PDEVOBJ_iGetColorManagementCaps(PPDEVOBJ ppdev)
Definition: pdevobj.c:1016
VOID NTAPI PDEVOBJ_vRefreshModeList(PPDEVOBJ ppdev)
Definition: pdevobj.c:432
BOOL NTAPI PDEVOBJ_bSwitchMode(PPDEVOBJ ppdev, PDEVMODEW pdm)
Definition: pdevobj.c:704
INT APIENTRY NtGdiGetDeviceCaps(HDC hdc, INT Index)
Definition: pdevobj.c:1137
VOID NTAPI PDEVOBJ_vRelease(_Inout_ PPDEVOBJ ppdev)
Definition: pdevobj.c:105
VOID NTAPI PDEVOBJ_vGetDeviceCaps(IN PPDEVOBJ ppdev, OUT PDEVCAPS pDevCaps)
Definition: pdevobj.c:1037
PSURFACE NTAPI PDEVOBJ_pSurface(PPDEVOBJ ppdev)
Definition: pdevobj.c:311
VOID PDEVOBJ_vEnableDisplay(_Inout_ PPDEVOBJ ppdev)
Definition: pdevobj.c:390
PPDEVOBJ PDEVOBJ_AllocPDEV(VOID)
Definition: pdevobj.c:63
static VOID PDEVOBJ_vDeletePDEV(PPDEVOBJ ppdev)
Definition: pdevobj.c:92
ULONG gPanDispDrvCount
Definition: pandisp.c:501
VOID PDEVOBJ_vSwitchDirectDraw(_Inout_ PPDEVOBJ ppdev, _Inout_ PPDEVOBJ ppdev2)
Definition: pdevobj.c:378
FORCEINLINE VOID SwitchPointer(_Inout_ PVOID pvPointer1, _Inout_ PVOID pvPointer2)
Definition: pdevobj.c:630
NTSTATUS NTAPI InitPDEVImpl(VOID)
Definition: pdevobj.c:31
VOID NTAPI PDEVOBJ_vCompletePDEV(PPDEVOBJ ppdev)
Definition: pdevobj.c:245
@ PDEV_DISABLED
Definition: pdevobj.h:14
@ PDEV_DISPLAY
Definition: pdevobj.h:7
@ PDEV_META_DEVICE
Definition: pdevobj.h:20
FORCEINLINE VOID PDEVOBJ_vReference(_In_ PPDEVOBJ ppdev)
Definition: pdevobj.h:160
long LONG
Definition: pedump.c:60
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:159
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:34
static calc_node_t temp
Definition: rpn_ieee.c:38
#define STATUS_SUCCESS
Definition: shellext.h:65
#define TRACE(s)
Definition: solgame.cpp:4
Definition: polytest.cpp:41
long right
Definition: polytest.cpp:53
ULONG ulDesktopVertRes
Definition: ntgdityp.h:326
ULONG ulVertSize
Definition: ntgdityp.h:303
ULONG ulPhysicalOffsetX
Definition: ntgdityp.h:321
ULONG ulNumFonts
Definition: ntgdityp.h:309
ULONG ulTechnology
Definition: ntgdityp.h:299
ULONG ulTextCaps
Definition: ntgdityp.h:323
ULONG ulAspectY
Definition: ntgdityp.h:313
ULONG ulLogPixelsX
Definition: ntgdityp.h:315
ULONG ulLogPixelsY
Definition: ntgdityp.h:316
ULONG ulVersion
Definition: ntgdityp.h:298
ULONG yPanningAlignment
Definition: ntgdityp.h:331
ULONG ulDesktopHorzRes
Definition: ntgdityp.h:325
ULONG ulAspectX
Definition: ntgdityp.h:312
ULONG xPanningAlignment
Definition: ntgdityp.h:330
ULONG ulHorzSize
Definition: ntgdityp.h:302
ULONG ulBltAlignment
Definition: ntgdityp.h:327
ULONG ulSizePalette
Definition: ntgdityp.h:317
ULONG ulBitsPixel
Definition: ntgdityp.h:306
ULONG ulColorMgmtCaps
Definition: ntgdityp.h:333
ULONG ulPanningHorzRes
Definition: ntgdityp.h:328
ULONG ulHorzRes
Definition: ntgdityp.h:304
ULONG ulPhysicalHeight
Definition: ntgdityp.h:320
ULONG ulHorzSizeM
Definition: ntgdityp.h:300
ULONG ulColorRes
Definition: ntgdityp.h:318
ULONG ulNumPens
Definition: ntgdityp.h:308
ULONG ulPhysicalOffsetY
Definition: ntgdityp.h:322
ULONG ulPhysicalWidth
Definition: ntgdityp.h:319
ULONG ulVertRes
Definition: ntgdityp.h:305
ULONG ulRasterCaps
Definition: ntgdityp.h:311
ULONG ulVertSizeM
Definition: ntgdityp.h:301
ULONG ulNumColors
Definition: ntgdityp.h:310
ULONG ulShadeBlend
Definition: ntgdityp.h:332
ULONG ulAspectXY
Definition: ntgdityp.h:314
ULONG ulPanningVertRes
Definition: ntgdityp.h:329
ULONG ulPlanes
Definition: ntgdityp.h:307
ULONG ulVRefresh
Definition: ntgdityp.h:324
FLONG flGraphicsCaps
Definition: winddi.h:390
ULONG iDitherFormat
Definition: winddi.h:395
FLONG flGraphicsCaps2
Definition: winddi.h:399
struct _DEVMODEINFO * pdmiNext
Definition: pdevobj.h:44
PFN_DrvMovePointer MovePointer
Definition: ntgdityp.h:599
PFN_DrvCompletePDEV CompletePDEV
Definition: ntgdityp.h:570
PFN_DrvEnableSurface EnableSurface
Definition: ntgdityp.h:572
Definition: winddi.h:529
PFN pfn
Definition: winddi.h:531
ULONG iFunc
Definition: winddi.h:530
ULONG ulVertSize
Definition: winddi.h:881
ULONG ulLogPixelsY
Definition: winddi.h:889
ULONG ulDACGreen
Definition: winddi.h:892
ULONG ulPanningHorzRes
Definition: winddi.h:911
ULONG ulPanningVertRes
Definition: winddi.h:912
ULONG ulLogPixelsX
Definition: winddi.h:888
ULONG ulAspectY
Definition: winddi.h:895
ULONG ulTechnology
Definition: winddi.h:879
ULONG ulNumColors
Definition: winddi.h:886
ULONG ulAspectX
Definition: winddi.h:894
ULONG flShadeBlend
Definition: winddi.h:920
ULONG cBitsPixel
Definition: winddi.h:884
ULONG ulVertRes
Definition: winddi.h:883
ULONG yPanningAlignment
Definition: winddi.h:914
POINTL ptlPhysOffset
Definition: winddi.h:900
ULONG xPanningAlignment
Definition: winddi.h:913
ULONG ulBltAlignment
Definition: winddi.h:910
SIZEL szlPhysSize
Definition: winddi.h:901
ULONG ulHorzSize
Definition: winddi.h:880
ULONG ulHorzRes
Definition: winddi.h:882
ULONG flRaster
Definition: winddi.h:887
ULONG ulDACBlue
Definition: winddi.h:893
ULONG ulVersion
Definition: winddi.h:878
ULONG ulAspectXY
Definition: winddi.h:896
ULONG ulNumPalReg
Definition: winddi.h:902
ULONG flTextCaps
Definition: winddi.h:890
ULONG cPlanes
Definition: winddi.h:885
ULONG ulDACRed
Definition: winddi.h:891
ULONG ulVRefresh
Definition: winddi.h:909
RECTL Exclude
Definition: pdevobj.h:39
DWORD StateFlags
Definition: pdevobj.h:66
PDEVMODEENTRY pDevModeList
Definition: pdevobj.h:70
WCHAR szWinDeviceName[CCHDEVICENAME/2]
Definition: pdevobj.h:60
PDEVMODEINFO pdevmodeInfo
Definition: pdevobj.h:68
PDEVICE_OBJECT DeviceObject
Definition: pdevobj.h:63
SYSTEM_GDI_DRIVER_INFORMATION * pGdiDriverInfo
Definition: ldevobj.h:19
LDEVTYPE ldevtype
Definition: ldevobj.h:20
PVOID apfn[INDEX_LAST]
Definition: ldevobj.h:26
PPDEVOBJ ppdev
Definition: mdevobj.h:10
PPDEVOBJ ppdevGlobal
Definition: mdevobj.h:16
ULONG cDev
Definition: mdevobj.h:15
MDEVDISPLAY dev[0]
Definition: mdevobj.h:17
DRIVER_FUNCTIONS pfn
Definition: pdevobj.h:138
PSURFACE pSurface
Definition: pdevobj.h:124
struct _PDEVOBJ * ppdevNext
Definition: pdevobj.h:83
GDIPOINTER Pointer
Definition: pdevobj.h:143
struct _LDEVOBJ * pldev
Definition: pdevobj.h:119
DWORD dwAccelerationLevel
Definition: pdevobj.h:132
struct _EDD_DIRECTDRAW_GLOBAL * pEDDgpl
Definition: pdevobj.h:148
FLONG flFlags
Definition: pdevobj.h:87
GDIINFO gdiinfo
Definition: pdevobj.h:123
HANDLE hSpooler
Definition: pdevobj.h:125
PDEVMODEW pdmwDev
Definition: pdevobj.h:129
DHPDEV dhpdev
Definition: pdevobj.h:120
PGRAPHICS_DEVICE pGraphicsDevice
Definition: pdevobj.h:127
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
LONG y
Definition: windef.h:330
LONG x
Definition: windef.h:329
LONG cx
Definition: kdterminal.h:27
LONG cy
Definition: kdterminal.h:28
SURFOBJ SurfObj
Definition: surface.h:8
BASEOBJECT BaseObject
Definition: surface.h:6
HDEV hdev
Definition: winddi.h:1208
WORD dmSize
Definition: wingdi.h:1620
uint16_t * PWSTR
Definition: typedefs.h:56
uint32_t * PULONG
Definition: typedefs.h:59
#define NTAPI
Definition: typedefs.h:36
int32_t INT
Definition: typedefs.h:58
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
char * PCHAR
Definition: typedefs.h:51
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
int ret
_In_ WDFCOLLECTION _In_ ULONG Index
#define FORCEINLINE
Definition: wdftypes.h:67
#define GdiHandleTable
Definition: win32nt.h:37
PGRAPHICS_DEVICE NTAPI EngpFindGraphicsDevice(_In_opt_ PUNICODE_STRING pustrDevice, _In_ ULONG iDevNum)
Definition: device.c:641
PGRAPHICS_DEVICE gpPrimaryGraphicsDevice
Definition: device.c:15
VOID FASTCALL SetLastNtError(_In_ NTSTATUS Status)
Definition: error.c:31
#define SURFACE_ShareUnlockSurface(pBMObj)
Definition: surface.h:102
#define SURFACE_ShareLockSurface(hBMObj)
Definition: surface.h:91
VOID NTAPI GDIOBJ_vReferenceObjectByPointer(POBJ pobj)
Definition: gdiobj.c:734
#define PALETTE_ShareLockPalette(hpal)
Definition: palette.h:57
#define PALETTE_ShareUnlockPalette(ppal)
Definition: palette.h:59
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:24
#define GDITAG_DEVMODE
Definition: tags.h:73
#define GDITAG_PDEV
Definition: tags.h:75
#define GDITAG_GDEVICE
Definition: tags.h:99
#define INDEX_DrvSetPointerShape
Definition: winddi.h:445
#define GCAPS2_CHANGEGAMMARAMP
Definition: winddi.h:370
#define BMF_8BPP
Definition: winddi.h:357
_Requires_lock_not_held_ hsem ENGAPI VOID APIENTRY EngDeleteSemaphore(_Inout_ __drv_freesMem(Mem) HSEMAPHORE hsem)
Definition: semaphor.c:106
typedef DHPDEV(APIENTRY FN_DrvEnablePDEV)(_In_ DEVMODEW *pdm
@ QDA_ACCELERATION_LEVEL
Definition: winddi.h:2231
#define HOOK_TRANSPARENTBLT
Definition: winddi.h:1434
#define HOOK_STRETCHBLT
Definition: winddi.h:1421
_In_ DD_SURFACE_LOCAL * pSurface
Definition: winddi.h:3481
ENGAPI VOID APIENTRY EngAcquireSemaphore(_Inout_ HSEMAPHORE hsem)
ENGAPI VOID APIENTRY EngMovePointer(_In_ SURFOBJ *pso, _In_ LONG x, _In_ LONG y, _In_ RECTL *prcl)
Definition: mouse.c:575
_In_ HDEV hdev
Definition: winddi.h:3449
#define GCAPS_ICM
Definition: winddi.h:346
_In_ LPWSTR pwszLogAddress
Definition: winddi.h:3548
#define HOOK_TEXTOUT
Definition: winddi.h:1423
#define GCAPS_CMYKCOLOR
Definition: winddi.h:347
_In_ ULONG cj
Definition: winddi.h:3540
#define HOOK_GRADIENTFILL
Definition: winddi.h:1436
#define HS_DDI_MAX
Definition: winddi.h:3954
#define HOOK_BITBLT
Definition: winddi.h:1420
typedef HSURF(APIENTRY FN_DrvEnableSurface)(_In_ DHPDEV dhpdev)
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:22
FN_DrvEnablePDEV * PFN_DrvEnablePDEV
Definition: winddi.h:3558
ENGAPI VOID APIENTRY EngUnloadImage(_In_ HANDLE hModule)
Definition: ldevobj.c:913
#define HOOK_FILLPATH
Definition: winddi.h:1426
#define INDEX_DrvCreateDeviceBitmap
Definition: winddi.h:426
enum _ENG_DEVICE_ATTRIBUTE ENG_DEVICE_ATTRIBUTE
#define HOOK_ALPHABLEND
Definition: winddi.h:1435
#define HOOK_SYNCHRONIZE
Definition: winddi.h:1431
#define GCAPS_PALMANAGED
Definition: winddi.h:341
#define HOOK_COPYBITS
Definition: winddi.h:1429
#define HOOK_LINETO
Definition: winddi.h:1428
#define HOOK_STROKEPATH
Definition: winddi.h:1425
#define NUMRESERVED
Definition: wingdi.h:733
#define PHYSICALOFFSETY
Definition: wingdi.h:738
#define NUMBRUSHES
Definition: wingdi.h:722
#define LC_WIDESTYLED
Definition: wingdi.h:777
#define RC_GDI20_OUTPUT
Definition: wingdi.h:786
#define RASTERCAPS
Definition: wingdi.h:745
#define CC_CIRCLES
Definition: wingdi.h:761
#define DT_CHARSTREAM
Definition: wingdi.h:711
#define HORZRES
Definition: wingdi.h:716
#define RC_STRETCHDIB
Definition: wingdi.h:756
#define CC_WIDESTYLED
Definition: wingdi.h:767
#define TC_SO_ABLE
Definition: wingdi.h:819
#define TC_CP_STROKE
Definition: wingdi.h:809
#define ASPECTX
Definition: wingdi.h:727
#define DT_RASDISPLAY
Definition: wingdi.h:708
#define PC_RECTANGLE
Definition: wingdi.h:797
#define CC_WIDE
Definition: wingdi.h:765
#define CC_INTERIORS
Definition: wingdi.h:768
#define RC_BITMAP64
Definition: wingdi.h:783
#define PHYSICALHEIGHT
Definition: wingdi.h:736
#define CP_RECTANGLE
Definition: wingdi.h:826
#define COLORRES
Definition: wingdi.h:734
#define RC_BIGFONT
Definition: wingdi.h:781
#define SCALINGFACTORX
Definition: wingdi.h:739
#define BLTALIGNMENT
Definition: wingdi.h:744
#define LC_STYLED
Definition: wingdi.h:776
#define PC_SCANLINE
Definition: wingdi.h:799
#define VERTSIZE
Definition: wingdi.h:715
#define LOGPIXELSY
Definition: wingdi.h:719
#define PHYSICALOFFSETX
Definition: wingdi.h:737
#define RC_OP_DX_OUTPUT
Definition: wingdi.h:789
#define SIZEPALETTE
Definition: wingdi.h:732
#define DRIVERVERSION
Definition: wingdi.h:705
#define NUMCOLORS
Definition: wingdi.h:725
#define TC_OP_CHARACTER
Definition: wingdi.h:807
#define POLYGONALCAPS
Definition: wingdi.h:779
#define CC_ELLIPSES
Definition: wingdi.h:764
#define LC_POLYMARKER
Definition: wingdi.h:774
#define HORZSIZE
Definition: wingdi.h:714
#define PDEVICESIZE
Definition: wingdi.h:730
#define RC_DIBTODEV
Definition: wingdi.h:750
#define DM_PANNINGHEIGHT
Definition: wingdi.h:1278
#define TEXTCAPS
Definition: wingdi.h:806
#define SCALINGFACTORY
Definition: wingdi.h:740
#define VREFRESH
Definition: wingdi.h:741
#define VERTRES
Definition: wingdi.h:717
#define TC_VA_ABLE
Definition: wingdi.h:821
#define LC_POLYLINE
Definition: wingdi.h:772
#define CC_ROUNDRECT
Definition: wingdi.h:769
#define PC_WINDPOLYGON
Definition: wingdi.h:798
#define CURVECAPS
Definition: wingdi.h:759
#define PHYSICALWIDTH
Definition: wingdi.h:735
#define PC_WIDE
Definition: wingdi.h:801
#define LC_WIDE
Definition: wingdi.h:775
#define DISPLAY_DEVICE_PRIMARY_DEVICE
Definition: wingdi.h:1398
#define PLANES
Definition: wingdi.h:721
#define TC_UA_ABLE
Definition: wingdi.h:818
#define DESKTOPHORZRES
Definition: wingdi.h:742
#define CC_PIE
Definition: wingdi.h:762
#define LOGPIXELSX
Definition: wingdi.h:718
#define DT_PLOTTER
Definition: wingdi.h:707
#define CC_STYLED
Definition: wingdi.h:766
#define BITSPIXEL
Definition: wingdi.h:720
#define DISPLAY_DEVICE_ATTACHED_TO_DESKTOP
Definition: wingdi.h:1396
#define RC_STRETCHBLT
Definition: wingdi.h:755
#define PC_STYLED
Definition: wingdi.h:802
#define CC_CHORD
Definition: wingdi.h:763
#define NUMFONTS
Definition: wingdi.h:724
#define PC_INTERIORS
Definition: wingdi.h:804
#define LC_INTERIORS
Definition: wingdi.h:778
#define PC_POLYGON
Definition: wingdi.h:794
#define LINECAPS
Definition: wingdi.h:770
#define ASPECTY
Definition: wingdi.h:728
#define NUMPENS
Definition: wingdi.h:723
#define DM_PANNINGWIDTH
Definition: wingdi.h:1277
#define LC_MARKER
Definition: wingdi.h:773
#define DESKTOPVERTRES
Definition: wingdi.h:743
#define RC_DI_BITMAP
Definition: wingdi.h:785
#define RC_BITBLT
Definition: wingdi.h:782
#define RC_FLOODFILL
Definition: wingdi.h:751
#define CLIPCAPS
Definition: wingdi.h:731
#define TC_OP_STROKE
Definition: wingdi.h:808
#define ASPECTXY
Definition: wingdi.h:729
#define TECHNOLOGY
Definition: wingdi.h:706
#define RC_PALETTE
Definition: wingdi.h:790
#define PC_WIDESTYLED
Definition: wingdi.h:803
#define DISP_CHANGE_BADMODE
Definition: winuser.h:195
#define DISP_CHANGE_SUCCESSFUL
Definition: winuser.h:190
#define DISP_CHANGE_BADPARAM
Definition: winuser.h:193
#define DISP_CHANGE_FAILED
Definition: winuser.h:194
#define NT_ASSERT
Definition: rtlfuncs.h:3310
WCHAR * LPWSTR
Definition: xmlstorage.h:184