1 /* 2 * PROJECT: Win32 subsystem 3 * LICENSE: GNU GPL, see COPYING in the top level directory 4 * FILE: win32ss/gdi/eng/drvdbg.c 5 * PURPOSE: Debug hooks for display driver callbacks 6 * PROGRAMMERS: Timo Kreuzer 7 */ 8 9 #include <win32k.h> 10 DBG_DEFAULT_CHANNEL(EngDev); 11 12 PPDEVOBJ 13 NTAPI 14 DbgLookupDHPDEV(DHPDEV dhpdev); 15 16 VOID 17 DbgDrvReserved(void) 18 { 19 ASSERT(FALSE); 20 } 21 22 DHPDEV 23 APIENTRY 24 DbgDrvEnablePDEV( 25 _In_ DEVMODEW *pdm, 26 _In_ LPWSTR pwszLogAddress, 27 ULONG cPat, 28 _In_opt_ HSURF *phsurfPatterns, 29 ULONG cjCaps, 30 _Out_ ULONG *pdevcaps, 31 ULONG cjDevInfo, 32 _Out_ DEVINFO *pdi, 33 HDEV hdev, 34 _In_ LPWSTR pwszDeviceName, 35 HANDLE hDriver) 36 { 37 PPDEVOBJ ppdev = (PPDEVOBJ)hdev; 38 39 ASSERT(pdm); 40 ASSERT(hdev); 41 42 return ppdev->pldev->pfn.EnablePDEV(pdm, 43 pwszLogAddress, 44 cPat, 45 phsurfPatterns, 46 cjCaps, 47 pdevcaps, 48 cjDevInfo, 49 pdi, 50 hdev, 51 pwszDeviceName, 52 hDriver); 53 } 54 55 VOID 56 APIENTRY 57 DbgDrvCompletePDEV( 58 DHPDEV dhpdev, 59 HDEV hdev) 60 { 61 PPDEVOBJ ppdev = (PPDEVOBJ)hdev; 62 63 ASSERT(ppdev); 64 65 ppdev->pldev->pfn.CompletePDEV(dhpdev, hdev); 66 } 67 68 VOID 69 APIENTRY 70 DbgDrvDisablePDEV( 71 DHPDEV dhpdev) 72 { 73 PPDEVOBJ ppdev = DbgLookupDHPDEV(dhpdev); 74 75 ASSERT(ppdev); 76 77 ppdev->pldev->pfn.DisablePDEV(dhpdev); 78 } 79 80 HSURF 81 APIENTRY 82 DbgDrvEnableSurface( 83 DHPDEV dhpdev) 84 { 85 PPDEVOBJ ppdev = DbgLookupDHPDEV(dhpdev); 86 87 ASSERT(ppdev); 88 89 return ppdev->pldev->pfn.EnableSurface(dhpdev); 90 } 91 92 VOID 93 APIENTRY 94 DbgDrvDisableSurface( 95 DHPDEV dhpdev) 96 { 97 PPDEVOBJ ppdev = DbgLookupDHPDEV(dhpdev); 98 99 ASSERT(ppdev); 100 101 ppdev->pldev->pfn.DisableSurface(dhpdev); 102 } 103 104 BOOL 105 APIENTRY 106 DbgDrvAssertMode( 107 _In_ DHPDEV dhpdev, 108 _In_ BOOL bEnable) 109 { 110 PPDEVOBJ ppdev = DbgLookupDHPDEV(dhpdev); 111 112 ASSERT(ppdev); 113 114 return ppdev->pldev->pfn.AssertMode(dhpdev, bEnable); 115 } 116 117 BOOL 118 APIENTRY 119 DbgDrvOffset( 120 SURFOBJ* pso, 121 LONG x1, 122 LONG x2, 123 FLONG fl) 124 { 125 PPDEVOBJ ppdev = (PPDEVOBJ)pso->hdev; 126 127 ASSERT(FALSE); 128 return 0; 129 } 130 131 ULONG 132 APIENTRY 133 DbgDrvResetPDEV( 134 DHPDEV dhpdev, 135 PVOID Reserved) 136 { 137 PPDEVOBJ ppdev = DbgLookupDHPDEV(dhpdev); 138 139 ASSERT(ppdev); 140 141 return ppdev->pldev->pfn.ResetDevice(dhpdev, Reserved); 142 } 143 144 VOID 145 APIENTRY 146 DbgDrvDisableDriver(void) 147 { 148 ASSERT(FALSE); 149 } 150 151 HBITMAP 152 APIENTRY 153 DbgDrvCreateDeviceBitmap( 154 DHPDEV dhpdev, 155 SIZEL sizl, 156 ULONG iFormat) 157 { 158 PPDEVOBJ ppdev = DbgLookupDHPDEV(dhpdev); 159 160 ASSERT(ppdev); 161 162 return ppdev->pldev->pfn.CreateDeviceBitmap(dhpdev, sizl, iFormat); 163 } 164 165 VOID 166 APIENTRY 167 DbgDrvDeleteDeviceBitmap( 168 DHSURF dhsurf) 169 { 170 ASSERT(FALSE); 171 } 172 173 BOOL 174 APIENTRY 175 DbgDrvRealizeBrush( 176 _In_ BRUSHOBJ *pbo, 177 _Inout_ SURFOBJ *psoTarget, 178 _In_ SURFOBJ *psoPattern, 179 _In_opt_ SURFOBJ *psoMask, 180 _In_ XLATEOBJ *pxlo, 181 _In_ ULONG iHatch) 182 { 183 PPDEVOBJ ppdev = (PPDEVOBJ)psoTarget->hdev; 184 ASSERT(FALSE); 185 return 0; 186 } 187 188 ULONG 189 APIENTRY 190 DbgDrvDitherColor( 191 _In_ DHPDEV dhpdev, 192 _In_ ULONG iMode, 193 _In_ ULONG rgb, 194 _Inout_ ULONG *pul) 195 { 196 PPDEVOBJ ppdev = DbgLookupDHPDEV(dhpdev); 197 198 ASSERT(ppdev); 199 200 return ppdev->pldev->pfn.DitherColor(dhpdev, iMode, rgb, pul); 201 } 202 203 BOOL 204 APIENTRY 205 DbgDrvStrokePath( 206 _Inout_ SURFOBJ *pso, 207 _In_ PATHOBJ *ppo, 208 _In_ CLIPOBJ *pco, 209 _In_opt_ XFORMOBJ *pxo, 210 _In_ BRUSHOBJ *pbo, 211 _In_ POINTL *pptlBrushOrg, 212 _In_ LINEATTRS *plineattrs, 213 _In_ MIX mix) 214 { 215 PPDEVOBJ ppdev = (PPDEVOBJ)pso->hdev; 216 ASSERT(FALSE); 217 return 0; 218 } 219 220 BOOL 221 APIENTRY 222 DbgDrvFillPath( 223 _Inout_ SURFOBJ *pso, 224 _In_ PATHOBJ *ppo, 225 _In_ CLIPOBJ *pco, 226 _In_ BRUSHOBJ *pbo, 227 _In_ POINTL *pptlBrushOrg, 228 _In_ MIX mix, 229 _In_ FLONG flOptions) 230 { 231 PPDEVOBJ ppdev = (PPDEVOBJ)pso->hdev; 232 ASSERT(FALSE); 233 return 0; 234 } 235 236 BOOL 237 APIENTRY 238 DbgDrvStrokeAndFillPath( 239 _Inout_ SURFOBJ *pso, 240 _Inout_ PATHOBJ *ppo, 241 _In_ CLIPOBJ *pco, 242 _In_opt_ XFORMOBJ *pxo, 243 _In_ BRUSHOBJ *pboStroke, 244 _In_ LINEATTRS *plineattrs, 245 _In_ BRUSHOBJ *pboFill, 246 _In_ POINTL *pptlBrushOrg, 247 _In_ MIX mixFill, 248 _In_ FLONG flOptions) 249 { 250 PPDEVOBJ ppdev = (PPDEVOBJ)pso->hdev; 251 ASSERT(FALSE); 252 return 0; 253 } 254 255 BOOL 256 APIENTRY 257 DbgDrvPaint( 258 IN SURFOBJ *pso, 259 IN CLIPOBJ *pco, 260 IN BRUSHOBJ *pbo, 261 IN POINTL *pptlBrushOrg, 262 IN MIX mix) 263 { 264 PPDEVOBJ ppdev = (PPDEVOBJ)pso->hdev; 265 return 0; 266 } 267 268 BOOL 269 APIENTRY 270 DbgDrvBitBlt( 271 _Inout_ SURFOBJ *psoTrg, 272 _In_opt_ SURFOBJ *psoSrc, 273 _In_opt_ SURFOBJ *psoMask, 274 _In_opt_ CLIPOBJ *pco, 275 _In_opt_ XLATEOBJ *pxlo, 276 _In_ RECTL *prclTrg, 277 _When_(psoSrc, _In_) POINTL *pptlSrc, 278 _When_(psoMask, _In_) POINTL *pptlMask, 279 _In_opt_ BRUSHOBJ *pbo, 280 _When_(pbo, _In_) POINTL *pptlBrush, 281 _In_ ROP4 rop4) 282 { 283 PSURFACE psurfTrg = CONTAINING_RECORD(psoTrg, SURFACE, SurfObj); 284 PSURFACE psurfSrc = CONTAINING_RECORD(psoSrc, SURFACE, SurfObj); 285 PPDEVOBJ ppdev; 286 287 /* Get the right BitBlt function */ 288 if (psurfTrg->flags & HOOK_BITBLT) 289 { 290 ppdev = (PPDEVOBJ)psoTrg->hdev; 291 } 292 else 293 { 294 ASSERT(ROP4_USES_SOURCE(rop4)); 295 ASSERT(psurfSrc->flags & HOOK_BITBLT); 296 ppdev = (PPDEVOBJ)psoSrc->hdev; 297 } 298 299 /* Sanity checks */ 300 ASSERT(IS_VALID_ROP4(rop4)); 301 ASSERT(psoTrg); 302 ASSERT(psoTrg->iBitmapFormat >= BMF_1BPP); 303 ASSERT(psoTrg->iBitmapFormat <= BMF_32BPP); 304 ASSERT(prclTrg); 305 ASSERT(prclTrg->left >= 0); 306 ASSERT(prclTrg->top >= 0); 307 ASSERT(prclTrg->right <= psoTrg->sizlBitmap.cx); 308 ASSERT(prclTrg->bottom <= psoTrg->sizlBitmap.cy); 309 ASSERT(RECTL_bIsWellOrdered(prclTrg)); 310 ASSERT(pco); 311 ASSERT(pco->iDComplexity != DC_RECT); 312 313 if (ROP4_USES_SOURCE(rop4)) 314 { 315 ASSERT(psoSrc); 316 ASSERT(psoSrc->iBitmapFormat >= BMF_1BPP); 317 ASSERT(psoSrc->iBitmapFormat <= BMF_8RLE); 318 ASSERT(pptlSrc); 319 ASSERT(pptlSrc->x >= 0); 320 ASSERT(pptlSrc->y >= 0); 321 ASSERT(pptlSrc->x <= psoTrg->sizlBitmap.cx); 322 ASSERT(pptlSrc->y <= psoTrg->sizlBitmap.cy); 323 } 324 325 if (ROP4_USES_MASK(rop4)) 326 { 327 ASSERT(psoMask); 328 ASSERT(psoMask->iBitmapFormat == BMF_1BPP); 329 ASSERT(pptlMask); 330 ASSERT(pptlMask->x >= 0); 331 ASSERT(pptlMask->y >= 0); 332 ASSERT(pptlMask->x <= psoMask->sizlBitmap.cx); 333 ASSERT(pptlMask->y <= psoMask->sizlBitmap.cy); 334 335 } 336 337 if (ROP4_USES_PATTERN(rop4)) 338 { 339 ASSERT(pbo); 340 ASSERT(pptlBrush); 341 } 342 343 344 return ppdev->pldev->pfn.BitBlt(psoTrg, 345 psoSrc, 346 psoMask, 347 pco, 348 pxlo, 349 prclTrg, 350 pptlSrc, 351 pptlMask, 352 pbo, 353 pptlBrush, 354 rop4); 355 } 356 357 BOOL 358 APIENTRY 359 DbgDrvCopyBits( 360 SURFOBJ *psoTrg, 361 SURFOBJ *psoSrc, 362 CLIPOBJ *pco, 363 XLATEOBJ *pxlo, 364 RECTL *prclTrg, 365 POINTL *pptlSrc) 366 { 367 PSURFACE psurfTrg = CONTAINING_RECORD(psoTrg, SURFACE, SurfObj); 368 PSURFACE psurfSrc = CONTAINING_RECORD(psoSrc, SURFACE, SurfObj); 369 PPDEVOBJ ppdev; 370 371 /* Get the right BitBlt function */ 372 if (psurfTrg->flags & HOOK_COPYBITS) 373 { 374 ppdev = (PPDEVOBJ)psoTrg->hdev; 375 } 376 else 377 { 378 ASSERT(psurfSrc->flags & HOOK_COPYBITS); 379 ppdev = (PPDEVOBJ)psoSrc->hdev; 380 } 381 382 return ppdev->pldev->pfn.CopyBits(psoTrg, 383 psoSrc, 384 pco, 385 pxlo, 386 prclTrg, 387 pptlSrc); 388 389 } 390 391 BOOL 392 APIENTRY 393 DbgDrvStretchBlt( 394 _Inout_ SURFOBJ *psoTrg, 395 _Inout_ SURFOBJ *psoSrc, 396 _In_opt_ SURFOBJ *psoMask, 397 _In_ CLIPOBJ *pco, 398 _In_opt_ XLATEOBJ *pxlo, 399 _In_opt_ COLORADJUSTMENT *pca, 400 _In_ POINTL *pptlHTOrg, 401 _In_ RECTL *prclDest, 402 _In_ RECTL *prclSrc, 403 _In_opt_ POINTL *pptlMask, 404 _In_ ULONG iMode) 405 { 406 PSURFACE psurfTrg = CONTAINING_RECORD(psoTrg, SURFACE, SurfObj); 407 PSURFACE psurfSrc = CONTAINING_RECORD(psoSrc, SURFACE, SurfObj); 408 409 return 0; 410 } 411 412 BOOL 413 APIENTRY 414 DbgDrvSetPalette( 415 DHPDEV dhpdev, 416 PALOBJ *ppalo, 417 FLONG fl, 418 ULONG iStart, 419 ULONG cColors) 420 { 421 PPDEVOBJ ppdev = DbgLookupDHPDEV(dhpdev); 422 423 ASSERT(ppdev); 424 425 return ppdev->pldev->pfn.SetPalette(dhpdev, ppalo, fl, iStart, cColors); 426 } 427 428 BOOL 429 APIENTRY 430 DbgDrvTextOut( 431 SURFOBJ *pso, 432 STROBJ *pstro, 433 FONTOBJ *pfo, 434 CLIPOBJ *pco, 435 RECTL *prclExtra , 436 RECTL *prclOpaque, 437 BRUSHOBJ *pboFore, 438 BRUSHOBJ *pboOpaque, 439 POINTL *pptlOrg, 440 MIX mix) 441 { 442 PPDEVOBJ ppdev = (PPDEVOBJ)pso->hdev; 443 return 0; 444 } 445 446 ULONG 447 APIENTRY 448 DbgDrvEscape( 449 _In_ SURFOBJ *pso, 450 _In_ ULONG iEsc, 451 _In_ ULONG cjIn, 452 _In_ PVOID pvIn, 453 _In_ ULONG cjOut, 454 _Out_ PVOID pvOut) 455 { 456 PPDEVOBJ ppdev = (PPDEVOBJ)pso->hdev; 457 return 0; 458 } 459 460 ULONG 461 APIENTRY 462 DbgDrvDrawEscape( 463 _In_ SURFOBJ *pso, 464 _In_ ULONG iEsc, 465 _In_ CLIPOBJ *pco, 466 _In_ RECTL *prcl, 467 _In_ ULONG cjIn, 468 _In_ PVOID pvIn) 469 { 470 PPDEVOBJ ppdev = (PPDEVOBJ)pso->hdev; 471 return 0; 472 } 473 474 PIFIMETRICS 475 APIENTRY 476 DbgDrvQueryFont( 477 DHPDEV dhpdev, 478 ULONG_PTR iFile, 479 ULONG iFace, 480 ULONG_PTR *pid) 481 { 482 PPDEVOBJ ppdev = DbgLookupDHPDEV(dhpdev); 483 484 ASSERT(ppdev); 485 486 return ppdev->pldev->pfn.QueryFont(dhpdev, iFile, iFace, pid); 487 } 488 489 PVOID 490 APIENTRY 491 DbgDrvQueryFontTree( 492 DHPDEV dhpdev, 493 ULONG_PTR iFile, 494 ULONG iFace, 495 ULONG iMode, 496 ULONG_PTR *pid) 497 { 498 return 0; 499 } 500 501 LONG 502 APIENTRY 503 DbgDrvQueryFontData( 504 DHPDEV dhpdev, 505 FONTOBJ *pfo, 506 ULONG iMode, 507 HGLYPH hg, 508 GLYPHDATA *pgd, 509 _Out_ PVOID pv, 510 ULONG cjSize) 511 { 512 PPDEVOBJ ppdev = DbgLookupDHPDEV(dhpdev); 513 514 ASSERT(ppdev); 515 516 return ppdev->pldev->pfn.QueryFontData(dhpdev, pfo, iMode, hg, pgd, pv, cjSize); 517 } 518 519 ULONG 520 APIENTRY 521 DbgDrvSetPointerShape( 522 _In_ SURFOBJ *pso, 523 _In_ SURFOBJ *psoMask, 524 _In_ SURFOBJ *psoColor, 525 _In_ XLATEOBJ *pxlo, 526 _In_ LONG xHot, 527 _In_ LONG yHot, 528 _In_ LONG x, 529 _In_ LONG y, 530 _In_ RECTL *prcl, 531 _In_ FLONG fl) 532 { 533 PPDEVOBJ ppdev = (PPDEVOBJ)pso->hdev; 534 return 0; 535 } 536 537 VOID 538 APIENTRY 539 DbgDrvMovePointer( 540 _In_ SURFOBJ *pso, 541 _In_ LONG x, 542 _In_ LONG y, 543 _In_ RECTL *prcl) 544 { 545 PPDEVOBJ ppdev = (PPDEVOBJ)pso->hdev; 546 } 547 548 BOOL 549 APIENTRY 550 DbgDrvLineTo( 551 SURFOBJ *pso, 552 CLIPOBJ *pco, 553 BRUSHOBJ *pbo, 554 LONG x1, 555 LONG y1, 556 LONG x2, 557 LONG y2, 558 RECTL *prclBounds, 559 MIX mix) 560 { 561 PPDEVOBJ ppdev = (PPDEVOBJ)pso->hdev; 562 return 0; 563 } 564 565 BOOL 566 APIENTRY 567 DbgDrvSendPage( 568 _In_ SURFOBJ *pso) 569 { 570 PPDEVOBJ ppdev = (PPDEVOBJ)pso->hdev; 571 return 0; 572 } 573 574 BOOL 575 APIENTRY 576 DbgDrvStartPage( 577 _In_ SURFOBJ *pso) 578 { 579 PPDEVOBJ ppdev = (PPDEVOBJ)pso->hdev; 580 return 0; 581 } 582 583 BOOL 584 APIENTRY 585 DbgDrvEndDoc( 586 _In_ SURFOBJ *pso, 587 _In_ FLONG fl) 588 { 589 PPDEVOBJ ppdev = (PPDEVOBJ)pso->hdev; 590 return 0; 591 } 592 593 BOOL 594 APIENTRY 595 DbgDrvStartDoc( 596 _In_ SURFOBJ *pso, 597 _In_ LPWSTR pwszDocName, 598 _In_ DWORD dwJobId) 599 { 600 PPDEVOBJ ppdev = (PPDEVOBJ)pso->hdev; 601 return 0; 602 } 603 604 ULONG 605 APIENTRY 606 DbgDrvGetGlyphMode( 607 _In_ DHPDEV dhpdev, 608 _In_ FONTOBJ *pfo) 609 { 610 PPDEVOBJ ppdev = DbgLookupDHPDEV(dhpdev); 611 612 ASSERT(ppdev); 613 614 return ppdev->pldev->pfn.GetGlyphMode(dhpdev, pfo); 615 } 616 617 VOID 618 APIENTRY 619 DbgDrvSynchronize( 620 DHPDEV dhpdev, 621 RECTL *prcl) 622 { 623 PPDEVOBJ ppdev = DbgLookupDHPDEV(dhpdev); 624 625 ASSERT(ppdev); 626 627 ppdev->pldev->pfn.Synchronize(dhpdev, prcl); 628 } 629 630 ULONG_PTR 631 APIENTRY 632 DbgDrvSaveScreenBits( 633 SURFOBJ *pso, 634 ULONG iMode, 635 ULONG_PTR ident, 636 RECTL *prcl) 637 { 638 PPDEVOBJ ppdev = (PPDEVOBJ)pso->hdev; 639 return 0; 640 } 641 642 ULONG 643 APIENTRY 644 DbgDrvGetModes( 645 _In_ HANDLE hDriver, 646 ULONG cjSize, 647 _Out_opt_ DEVMODEW *pdm) 648 { 649 return 0; 650 } 651 652 VOID 653 APIENTRY 654 DbgDrvFree( 655 PVOID pv, 656 ULONG_PTR id) 657 { 658 } 659 660 VOID 661 APIENTRY 662 DbgDrvDestroyFont( 663 FONTOBJ *pfo) 664 { 665 } 666 667 LONG 668 APIENTRY 669 DbgDrvQueryFontCaps( 670 ULONG culCaps, 671 ULONG *pulCaps) 672 { 673 return 0; 674 } 675 676 ULONG_PTR 677 APIENTRY 678 DbgDrvLoadFontFile( 679 ULONG cFiles, 680 ULONG_PTR *piFile, 681 PVOID *ppvView, 682 ULONG *pcjView, 683 DESIGNVECTOR *pdv, 684 ULONG ulLangID, 685 ULONG ulFastCheckSum) 686 { 687 return 0; 688 } 689 690 BOOL 691 APIENTRY 692 DbgDrvUnloadFontFile( 693 ULONG_PTR iFile) 694 { 695 return 0; 696 } 697 698 ULONG 699 APIENTRY 700 DbgDrvFontManagement( 701 _In_ SURFOBJ *pso, 702 _In_opt_ FONTOBJ *pfo, 703 _In_ ULONG iMode, 704 _In_ ULONG cjIn, 705 _In_ PVOID pvIn, 706 _In_ ULONG cjOut, 707 _Out_ PVOID pvOut) 708 { 709 return 0; 710 } 711 712 LONG 713 APIENTRY 714 DbgDrvQueryTrueTypeTable( 715 ULONG_PTR iFile, 716 ULONG ulFont, 717 ULONG ulTag, 718 PTRDIFF dpStart, 719 ULONG cjBuf, 720 BYTE *pjBuf, 721 PBYTE *ppjTable, 722 ULONG *pcjTable) 723 { 724 return 0; 725 } 726 727 LONG 728 APIENTRY 729 DbgDrvQueryTrueTypeOutline( 730 DHPDEV dhpdev, 731 FONTOBJ *pfo, 732 HGLYPH hglyph, 733 BOOL bMetricsOnly, 734 GLYPHDATA *pgldt, 735 ULONG cjBuf, 736 TTPOLYGONHEADER *ppoly) 737 { 738 PPDEVOBJ ppdev = DbgLookupDHPDEV(dhpdev); 739 return 0; 740 } 741 742 PVOID 743 APIENTRY 744 DbgDrvGetTrueTypeFile( 745 ULONG_PTR iFile, 746 ULONG *pcj) 747 { 748 return 0; 749 } 750 751 LONG 752 APIENTRY 753 DbgDrvQueryFontFile( 754 ULONG_PTR iFile, 755 ULONG ulMode, 756 ULONG cjBuf, 757 ULONG *pulBuf) 758 { 759 return 0; 760 } 761 762 VOID 763 APIENTRY 764 DbgDrvMovePanning( 765 LONG x, 766 LONG y, 767 FLONG fl) 768 { 769 ERR("Obsolete driver function %s called!\n", __FUNCTION__); 770 ASSERT(FALSE); 771 } 772 773 BOOL 774 APIENTRY 775 DbgDrvQueryAdvanceWidths( 776 DHPDEV dhpdev, 777 FONTOBJ *pfo, 778 ULONG iMode, 779 _In_ HGLYPH *phg, 780 _Out_ PVOID pvWidths, 781 ULONG cGlyphs) 782 { 783 PPDEVOBJ ppdev = DbgLookupDHPDEV(dhpdev); 784 return 0; 785 } 786 787 BOOL 788 APIENTRY 789 DbgDrvSetPixelFormat( 790 SURFOBJ *pso, 791 LONG iPixelFormat, 792 HWND hwnd) 793 { 794 PPDEVOBJ ppdev = (PPDEVOBJ)pso->hdev; 795 return 0; 796 } 797 798 LONG 799 APIENTRY 800 DbgDrvDescribePixelFormat( 801 DHPDEV dhpdev, 802 LONG iPixelFormat, 803 ULONG cjpfd, 804 PIXELFORMATDESCRIPTOR *ppfd) 805 { 806 PPDEVOBJ ppdev = DbgLookupDHPDEV(dhpdev); 807 808 ASSERT(ppdev); 809 810 return ppdev->pldev->pfn.DescribePixelFormat(dhpdev, iPixelFormat, cjpfd, ppfd); 811 } 812 813 BOOL 814 APIENTRY 815 DbgDrvSwapBuffers( 816 SURFOBJ *pso, 817 WNDOBJ *pwo) 818 { 819 PPDEVOBJ ppdev = (PPDEVOBJ)pso->hdev; 820 return 0; 821 } 822 823 BOOL 824 APIENTRY 825 DbgDrvStartBanding( 826 _In_ SURFOBJ *pso, 827 _In_ POINTL *pptl) 828 { 829 PPDEVOBJ ppdev = (PPDEVOBJ)pso->hdev; 830 return 0; 831 } 832 833 BOOL 834 APIENTRY 835 DbgDrvNextBand( 836 _In_ SURFOBJ *pso, 837 _In_ POINTL *pptl) 838 { 839 PPDEVOBJ ppdev = (PPDEVOBJ)pso->hdev; 840 return 0; 841 } 842 843 BOOL 844 APIENTRY 845 DbgDrvGetDirectDrawInfo( 846 DHPDEV dhpdev, 847 DD_HALINFO *pHalInfo, 848 DWORD *pdwNumHeaps, 849 VIDEOMEMORY *pvmList, 850 DWORD *pdwNumFourCCCodes, 851 DWORD *pdwFourCC) 852 { 853 PPDEVOBJ ppdev = DbgLookupDHPDEV(dhpdev); 854 855 ASSERT(ppdev); 856 857 return ppdev->pldev->pfn.GetDirectDrawInfo(dhpdev, 858 pHalInfo, 859 pdwNumHeaps, 860 pvmList, 861 pdwNumFourCCCodes, 862 pdwFourCC); 863 } 864 865 BOOL 866 APIENTRY 867 DbgDrvEnableDirectDraw( 868 DHPDEV dhpdev, 869 DD_CALLBACKS *pCallBacks, 870 DD_SURFACECALLBACKS *pSurfaceCallBacks, 871 DD_PALETTECALLBACKS *pPaletteCallBacks) 872 { 873 PPDEVOBJ ppdev = DbgLookupDHPDEV(dhpdev); 874 875 ASSERT(ppdev); 876 877 return ppdev->pldev->pfn.EnableDirectDraw(dhpdev, 878 pCallBacks, 879 pSurfaceCallBacks, 880 pPaletteCallBacks); 881 } 882 883 VOID 884 APIENTRY 885 DbgDrvDisableDirectDraw( 886 DHPDEV dhpdev) 887 { 888 PPDEVOBJ ppdev = DbgLookupDHPDEV(dhpdev); 889 890 ASSERT(ppdev); 891 892 ppdev->pldev->pfn.DisableDirectDraw(dhpdev); 893 } 894 895 BOOL 896 APIENTRY 897 DbgDrvQuerySpoolType(DHPDEV PDev, LPWSTR SpoolType) 898 { 899 ERR("Obsolete driver function %s called!\n", __FUNCTION__); 900 ASSERT(FALSE); 901 return 0; 902 } 903 904 HANDLE 905 APIENTRY 906 DbgDrvIcmCreateColorTransform( 907 _In_ DHPDEV dhpdev, 908 _In_ LPLOGCOLORSPACEW pLogColorSpace, 909 _In_opt_ PVOID pvSourceProfile, 910 _In_ ULONG cjSourceProfile, 911 _In_ PVOID pvDestProfile, 912 _In_ ULONG cjDestProfile, 913 _In_opt_ PVOID pvTargetProfile, 914 _In_ ULONG cjTargetProfile, 915 _In_ DWORD dwReserved) 916 { 917 PPDEVOBJ ppdev = DbgLookupDHPDEV(dhpdev); 918 919 ASSERT(ppdev); 920 921 return ppdev->pldev->pfn.IcmCreateColorTransform(dhpdev, 922 pLogColorSpace, 923 pvSourceProfile, 924 cjSourceProfile, 925 pvDestProfile, 926 cjDestProfile, 927 pvTargetProfile, 928 cjTargetProfile, 929 dwReserved); 930 } 931 932 BOOL 933 APIENTRY 934 DbgDrvIcmDeleteColorTransform( 935 _In_ DHPDEV dhpdev, 936 _In_ HANDLE hcmXform) 937 { 938 PPDEVOBJ ppdev = DbgLookupDHPDEV(dhpdev); 939 940 ASSERT(ppdev); 941 942 return ppdev->pldev->pfn.IcmDeleteColorTransform(dhpdev, hcmXform); 943 } 944 945 BOOL 946 APIENTRY 947 DbgDrvIcmCheckBitmapBits( 948 DHPDEV dhpdev, 949 HANDLE hColorTransform, 950 SURFOBJ *pso, 951 PBYTE paResults) 952 { 953 PPDEVOBJ ppdev = DbgLookupDHPDEV(dhpdev); 954 955 ASSERT(ppdev); 956 957 return ppdev->pldev->pfn.IcmCheckBitmapBits(dhpdev, 958 hColorTransform, 959 pso, 960 paResults); 961 } 962 963 BOOL 964 APIENTRY 965 DbgDrvIcmSetDeviceGammaRamp( 966 DHPDEV dhpdev, 967 ULONG iFormat, 968 LPVOID lpRamp) 969 { 970 PPDEVOBJ ppdev = DbgLookupDHPDEV(dhpdev); 971 972 ASSERT(ppdev); 973 974 return ppdev->pldev->pfn.IcmSetDeviceGammaRamp(dhpdev, iFormat, lpRamp); 975 } 976 977 BOOL 978 APIENTRY 979 DbgDrvGradientFill( 980 _Inout_ SURFOBJ *psoTrg, 981 _In_ CLIPOBJ *pco, 982 _In_opt_ XLATEOBJ *pxlo, 983 _In_ TRIVERTEX *pVertex, 984 _In_ ULONG nVertex, 985 _In_ PVOID pMesh, 986 _In_ ULONG nMesh, 987 _In_ RECTL *prclExtents, 988 _In_ POINTL *pptlDitherOrg, 989 _In_ ULONG ulMode) 990 { 991 PPDEVOBJ ppdev = (PPDEVOBJ)psoTrg->hdev; 992 return 0; 993 } 994 995 BOOL 996 APIENTRY 997 DbgDrvStretchBltROP( 998 _Inout_ SURFOBJ *psoTrg, 999 _Inout_ SURFOBJ *psoSrc, 1000 _In_opt_ SURFOBJ *psoMask, 1001 _In_ CLIPOBJ *pco, 1002 _In_opt_ XLATEOBJ *pxlo, 1003 _In_opt_ COLORADJUSTMENT *pca, 1004 _In_ POINTL *pptlHTOrg, 1005 _In_ RECTL *prclDest, 1006 _In_ RECTL *prclSrc, 1007 _In_opt_ POINTL *pptlMask, 1008 _In_ ULONG iMode, 1009 _In_ BRUSHOBJ *pbo, 1010 _In_ DWORD rop4) 1011 { 1012 PPDEVOBJ ppdev = (PPDEVOBJ)psoTrg->hdev; 1013 return 0; 1014 } 1015 1016 BOOL 1017 APIENTRY 1018 DbgDrvPlgBlt( 1019 _Inout_ SURFOBJ *psoTrg, 1020 _Inout_ SURFOBJ *psoSrc, 1021 _In_opt_ SURFOBJ *psoMsk, 1022 _In_ CLIPOBJ *pco, 1023 _In_opt_ XLATEOBJ *pxlo, 1024 _In_opt_ COLORADJUSTMENT *pca, 1025 _In_opt_ POINTL *pptlBrushOrg, 1026 _In_ POINTFIX *pptfx, 1027 _In_ RECTL *prcl, 1028 _In_opt_ POINTL *pptl, 1029 _In_ ULONG iMode) 1030 { 1031 PPDEVOBJ ppdev = (PPDEVOBJ)psoTrg->hdev; 1032 return 0; 1033 } 1034 1035 BOOL 1036 APIENTRY 1037 DbgDrvAlphaBlend( 1038 _Inout_ SURFOBJ *psoDest, 1039 _In_ SURFOBJ *psoSrc, 1040 _In_ CLIPOBJ *pco, 1041 _In_opt_ XLATEOBJ *pxlo, 1042 _In_ RECTL *prclDest, 1043 _In_ RECTL *prclSrc, 1044 _In_ BLENDOBJ *pBlendObj) 1045 { 1046 return 0; 1047 } 1048 1049 VOID 1050 APIENTRY 1051 DbgSynthesizeFont(void) 1052 { 1053 ASSERT(FALSE); 1054 } 1055 1056 VOID 1057 APIENTRY 1058 DbgGetSynthesizedFontFiles(void) 1059 { 1060 ASSERT(FALSE); 1061 } 1062 1063 BOOL 1064 APIENTRY 1065 DbgDrvTransparentBlt( 1066 _Inout_ SURFOBJ *psoTrg, 1067 _In_ SURFOBJ *psoSrc, 1068 _In_ CLIPOBJ *pco, 1069 _In_opt_ XLATEOBJ *pxlo, 1070 _In_ RECTL *prclDst, 1071 _In_ RECTL *prclSrc, 1072 _In_ ULONG iTransColor, 1073 _In_ ULONG ulReserved) 1074 { 1075 PPDEVOBJ ppdev = (PPDEVOBJ)psoTrg->hdev; 1076 return 0; 1077 } 1078 1079 ULONG 1080 APIENTRY 1081 DbgDrvQueryPerBandInfo( 1082 _In_ SURFOBJ *pso, 1083 _Inout_ PERBANDINFO *pbi) 1084 { 1085 PPDEVOBJ ppdev = (PPDEVOBJ)pso->hdev; 1086 return 0; 1087 } 1088 1089 BOOL 1090 APIENTRY 1091 DbgDrvQueryDeviceSupport( 1092 SURFOBJ *pso, 1093 XLATEOBJ *pxlo, 1094 XFORMOBJ *pxo, 1095 ULONG iType, 1096 ULONG cjIn, 1097 _In_ PVOID pvIn, 1098 ULONG cjOut, 1099 _Out_ PVOID pvOut) 1100 { 1101 PPDEVOBJ ppdev = (PPDEVOBJ)pso->hdev; 1102 ASSERT(ppdev); 1103 1104 return ppdev->pldev->pfn.QueryDeviceSupport(pso, 1105 pxlo, 1106 (PVOID)pxo, // FIXME!!! 1107 iType, 1108 cjIn, 1109 pvIn, 1110 cjOut, 1111 pvOut); 1112 } 1113 1114 HBITMAP 1115 APIENTRY 1116 DbgDrvDeriveSurface( 1117 DD_DIRECTDRAW_GLOBAL *pDirectDraw, 1118 DD_SURFACE_LOCAL *pSurface) 1119 { 1120 return 0; 1121 } 1122 1123 PFD_GLYPHATTR 1124 APIENTRY 1125 DbgDrvQueryGlyphAttrs( 1126 _In_ FONTOBJ *pfo, 1127 _In_ ULONG iMode) 1128 { 1129 return 0; 1130 } 1131 1132 VOID 1133 APIENTRY 1134 DbgDrvNotify( 1135 SURFOBJ *pso, 1136 ULONG iType, 1137 PVOID pvData) 1138 { 1139 PPDEVOBJ ppdev = (PPDEVOBJ)pso->hdev; 1140 ASSERT(ppdev); 1141 1142 ppdev->pldev->pfn.Notify(pso, iType, pvData); 1143 } 1144 1145 VOID 1146 APIENTRY 1147 DbgDrvSynchronizeSurface( 1148 SURFOBJ *pso, 1149 RECTL *prcl, 1150 FLONG fl) 1151 { 1152 PPDEVOBJ ppdev = (PPDEVOBJ)pso->hdev; 1153 ASSERT(ppdev); 1154 1155 ppdev->pldev->pfn.SynchronizeSurface(pso, prcl, fl); 1156 } 1157 1158 ULONG 1159 APIENTRY 1160 DbgDrvResetDevice( 1161 DHPDEV dhpdev, 1162 PVOID Reserved) 1163 { 1164 PPDEVOBJ ppdev = DbgLookupDHPDEV(dhpdev); 1165 ASSERT(ppdev); 1166 1167 return ppdev->pldev->pfn.ResetDevice(dhpdev, Reserved); 1168 } 1169 1170 PVOID 1171 apfnDbgDrvFunctions[] = 1172 { 1173 DbgDrvEnablePDEV, 1174 DbgDrvCompletePDEV, 1175 DbgDrvDisablePDEV, 1176 DbgDrvEnableSurface, 1177 DbgDrvDisableSurface, 1178 DbgDrvAssertMode, 1179 DbgDrvOffset, 1180 DbgDrvResetPDEV, 1181 NULL, //DbgDrvDisableDriver, 1182 DbgDrvReserved, // Unknown1 1183 DbgDrvCreateDeviceBitmap, 1184 NULL, //DbgDrvDeleteDeviceBitmap, 1185 DbgDrvRealizeBrush, 1186 DbgDrvDitherColor, 1187 DbgDrvStrokePath, 1188 DbgDrvFillPath, 1189 DbgDrvStrokeAndFillPath, 1190 DbgDrvPaint, 1191 DbgDrvBitBlt, 1192 NULL, //DbgDrvCopyBits, 1193 NULL, //DbgDrvStretchBlt, 1194 DbgDrvReserved, 1195 DbgDrvSetPalette, 1196 NULL, //DbgDrvTextOut, 1197 NULL, //DbgDrvEscape, 1198 NULL, //DbgDrvDrawEscape, 1199 DbgDrvQueryFont, 1200 NULL, //DbgDrvQueryFontTree, 1201 DbgDrvQueryFontData, 1202 NULL, //DbgDrvSetPointerShape, 1203 NULL, //DbgDrvMovePointer, 1204 NULL, //DbgDrvLineTo, 1205 NULL, //DbgDrvSendPage, 1206 NULL, //DbgDrvStartPage, 1207 NULL, //DbgDrvEndDoc, 1208 NULL, //DbgDrvStartDoc, 1209 DbgDrvReserved, 1210 DbgDrvGetGlyphMode, 1211 DbgDrvSynchronize, 1212 DbgDrvReserved, 1213 NULL, //DbgDrvSaveScreenBits, 1214 NULL, //DbgDrvGetModes, 1215 NULL, //DbgDrvFree, 1216 NULL, //DbgDrvDestroyFont, 1217 NULL, //DbgDrvQueryFontCaps, 1218 NULL, //DbgDrvLoadFontFile, 1219 NULL, //DbgDrvUnloadFontFile, 1220 NULL, //DbgDrvFontManagement, 1221 NULL, //DbgDrvQueryTrueTypeTable, 1222 NULL, //DbgDrvQueryTrueTypeOutline, 1223 NULL, //DbgDrvGetTrueTypeFile, 1224 NULL, //DbgDrvQueryFontFile, 1225 DbgDrvMovePanning, 1226 NULL, //DbgDrvQueryAdvanceWidths, 1227 NULL, //DbgDrvSetPixelFormat, 1228 DbgDrvDescribePixelFormat, 1229 NULL, //DbgDrvSwapBuffers, 1230 NULL, //DbgDrvStartBanding, 1231 NULL, //DbgDrvNextBand, 1232 DbgDrvGetDirectDrawInfo, 1233 DbgDrvEnableDirectDraw, 1234 DbgDrvDisableDirectDraw, 1235 DbgDrvQuerySpoolType, 1236 DbgDrvReserved, 1237 DbgDrvIcmCreateColorTransform, 1238 DbgDrvIcmDeleteColorTransform, 1239 DbgDrvIcmCheckBitmapBits, 1240 DbgDrvIcmSetDeviceGammaRamp, 1241 NULL, //DbgDrvGradientFill, 1242 NULL, //DbgDrvStretchBltROP, 1243 NULL, //DbgDrvPlgBlt, 1244 NULL, //DbgDrvAlphaBlend, 1245 NULL, //DbgSynthesizeFont, 1246 NULL, //DbgGetSynthesizedFontFiles, 1247 NULL, //DbgDrvTransparentBlt, 1248 NULL, //DbgDrvQueryPerBandInfo, 1249 DbgDrvQueryDeviceSupport, 1250 DbgDrvReserved, 1251 DbgDrvReserved, 1252 DbgDrvReserved, 1253 DbgDrvReserved, 1254 DbgDrvReserved, 1255 DbgDrvReserved, 1256 DbgDrvReserved, 1257 DbgDrvReserved, 1258 NULL, //DbgDrvDeriveSurface, 1259 NULL, //DbgDrvQueryGlyphAttrs, 1260 DbgDrvNotify, 1261 DbgDrvSynchronizeSurface, 1262 DbgDrvResetDevice, 1263 DbgDrvReserved, 1264 DbgDrvReserved, 1265 DbgDrvReserved 1266 }; 1267