Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

160 lines
6.5 KiB

  1. /****************************************************************************/
  2. /* nddapi.h */
  3. /* */
  4. /* RDP DD functions. */
  5. /* */
  6. /* Copyright(c) Microsoft 1996-2000 */
  7. /****************************************************************************/
  8. #ifndef _H_NDDAPI
  9. #define _H_NDDAPI
  10. /****************************************************************************/
  11. /* Structure: DD_PDEV */
  12. /* */
  13. /* Contents of the handle that the GDI always passes to the display driver. */
  14. /* This structure is filled in from DrvEnablePDEV. */
  15. /****************************************************************************/
  16. typedef struct tagDD_PDEV
  17. {
  18. ULONG iBitmapFormat; /* Current colour depth as defined */
  19. /* by the BMF_xBPP flags. */
  20. /************************************************************************/
  21. /* Rendering extensions colour information. */
  22. /************************************************************************/
  23. HANDLE hDriver; /* Handle to \Device\Screen */
  24. HDEV hdevEng; /* Engine's handle to PDEV */
  25. HSURF hsurfFrameBuf; /* Frame Buffer surface (bitmap) */
  26. HSURF hsurfDevice; /* Device surface (used by engine) */
  27. SURFOBJ *psoFrameBuf; /* pointer to frame buffer SURFOBJ */
  28. LONG cxScreen; /* Visible screen width */
  29. LONG cyScreen; /* Visible screen height */
  30. LONG cClientBitsPerPel; /* Client display bpp (4,8,15,etc) */
  31. LONG cProtocolBitsPerPel; /* Protocol bpp (8) */
  32. ULONG ulMode; /* Mode the mini-port driver is in. */
  33. FLONG flHooks; /* What we're hooking from GDI */
  34. /************************************************************************/
  35. /* Pointer to the Frame Buffer */
  36. /************************************************************************/
  37. PBYTE pFrameBuf;
  38. HANDLE SectionObject; /* Section Object for Frame Buffer */
  39. /************************************************************************/
  40. /* Palette stuff. */
  41. /************************************************************************/
  42. HPALETTE hpalDefault; /* GDI handle to the default palette*/
  43. FLONG flRed; /* Red mask for bitmask modes */
  44. FLONG flGreen; /* Green mask for bitmask modes */
  45. FLONG flBlue; /* Blue mask for bitmask modes */
  46. // NOTE!! This must be the last entry else the memset(0) code in nddapi.c
  47. // will get messed up.
  48. PALETTEENTRY Palette[256]; /* The palette if palette managed */
  49. } DD_PDEV, * PDD_PDEV;
  50. /****************************************************************************/
  51. // Structure: DD_DSURF
  52. //
  53. // Device surface for the offscreen bitmaps
  54. /****************************************************************************/
  55. typedef struct tagDD_DSURF
  56. {
  57. ULONG bitmapId;
  58. INT shareId;
  59. SIZEL sizl; // size of the offscreen bitmap
  60. ULONG iBitmapFormat; // color depth for the bitmap,
  61. // defined by the BMF_xBPP flags.
  62. PDD_PDEV ppdev; // Need this for deleting the bitmap
  63. SURFOBJ *pso; // points to the backup GDI surface
  64. ULONG flags;
  65. #define DD_NO_OFFSCREEN 0x1 // If this flag is on, it indicates that the bitmap
  66. // has been punt off the offscreen list,
  67. // or there is a client offscreen error.
  68. // Either case, the server has to send the offscreen
  69. // bitmap as regular memory cached bitmap.
  70. } DD_DSURF, * PDD_DSURF;
  71. /****************************************************************************/
  72. /* Number of functions supported by our display driver. */
  73. /****************************************************************************/
  74. #ifdef DRAW_GDIPLUS
  75. #ifdef DRAW_NINEGRID
  76. #define DD_NUM_DRIVER_INTERCEPTS 38
  77. #else
  78. #define DD_NUM_DRIVER_INTERCEPTS 37
  79. #endif
  80. #else // DRAW_GDIPLUS
  81. #ifdef DRAW_NINEGRID
  82. #define DD_NUM_DRIVER_INTERCEPTS 37
  83. #else
  84. #define DD_NUM_DRIVER_INTERCEPTS 36
  85. #endif
  86. #endif //DRAWGDIPLUS
  87. #ifdef DRAW_NINEGRID
  88. #define INDEX_DrvNineGrid 91L
  89. #define GCAPS2_REMOTEDRIVER 0x00000400
  90. typedef struct NINEGRID
  91. {
  92. ULONG flFlags;
  93. LONG ulLeftWidth;
  94. LONG ulRightWidth;
  95. LONG ulTopHeight;
  96. LONG ulBottomHeight;
  97. COLORREF crTransparent;
  98. } NINEGRID, *PNINEGRID;
  99. BOOL DrvNineGrid(
  100. SURFOBJ *psoDst,
  101. SURFOBJ *psoSrc,
  102. CLIPOBJ *pco,
  103. XLATEOBJ *pxlo,
  104. PRECTL prclDst,
  105. PRECTL prclSrc,
  106. PNINEGRID png,
  107. BLENDOBJ *pBlendObj,
  108. PVOID pvReserved
  109. );
  110. BOOL APIENTRY EngNineGrid(
  111. SURFOBJ *psoDst,
  112. SURFOBJ *psoSrc,
  113. CLIPOBJ *pco,
  114. XLATEOBJ *pxlo,
  115. PRECTL prclDst,
  116. PRECTL prclSrc,
  117. PNINEGRID png,
  118. BLENDOBJ *pBlendObj,
  119. PVOID pvReserved
  120. );
  121. #endif
  122. /****************************************************************************/
  123. /* Name of the display driver as passed back in the DEVMODEW structure. */
  124. /****************************************************************************/
  125. #define DD_DLL_NAME L"rdpdd"
  126. /****************************************************************************/
  127. /* Prototypes. */
  128. /****************************************************************************/
  129. #ifdef DC_DEBUG
  130. void DrvDebugPrint(char *, ...);
  131. #endif
  132. #endif /* _H_NDDAPI */