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.

157 lines
6.1 KiB

  1. /****************************************************************************/
  2. // noedata.c
  3. //
  4. // RDP Order Encoder data definitions
  5. //
  6. // Copyright (C) 1997-2000 Microsoft Corporation
  7. /****************************************************************************/
  8. #include <ndcgdata.h>
  9. #include <aordprot.h>
  10. #include <noedisp.h>
  11. // Are non-solid brushes supported?
  12. DC_DATA(BOOLEAN, oeSendSolidPatternBrushOnly, FALSE);
  13. // Flag that indicates support for color indices rather than RGBs.
  14. DC_DATA(BOOLEAN, oeColorIndexSupported, FALSE);
  15. // Flag set and tested by DrvStretchBlt, cleared by DrvBitBlt. It
  16. // indicates whether StretchBlt output has been drawn (and hence
  17. // accumulated) by DrvBitBlt.
  18. DC_DATA(BOOLEAN, oeAccumulateStretchBlt, FALSE);
  19. // Array of supported orders.
  20. DC_DATA_ARRAY_NULL(BYTE, oeOrderSupported, TS_MAX_ORDERS, DC_STRUCT1(0));
  21. #ifdef DRAW_NINEGRID
  22. // Translation table, indexed by TS_ENC_XXX_ORDER, values are corresponding
  23. // TS_NEG_XXX_INDEX. Orders we do not support for sending are given the
  24. // value 0xFF to force an error.
  25. DC_CONST_DATA_ARRAY(BYTE, oeEncToNeg, TS_MAX_ORDERS,
  26. DC_STRUCT32(
  27. TS_NEG_DSTBLT_INDEX,
  28. TS_NEG_PATBLT_INDEX,
  29. TS_NEG_SCRBLT_INDEX,
  30. 0xFF, // TS_NEG_MEMBLT_INDEX (historical, never encoded)
  31. 0xFF, // TS_NEG_MEM3BLT_INDEX (historical, never encoded)
  32. 0xFF, // TS_NEG_ATEXTOUT_INDEX (no longer supported)
  33. 0xFF, // TS_NEG_AEXTTEXTOUT_INDEX (no longer supported)
  34. TS_NEG_DRAWNINEGRID_INDEX,
  35. TS_NEG_MULTI_DRAWNINEGRID_INDEX,
  36. TS_NEG_LINETO_INDEX,
  37. TS_NEG_OPAQUERECT_INDEX,
  38. TS_NEG_SAVEBITMAP_INDEX,
  39. 0xFF,
  40. TS_NEG_MEMBLT_INDEX, // Actually TS_NEG_MEM(3)BLT_R2_ORDER, but
  41. TS_NEG_MEM3BLT_INDEX, // the caps are specified with non-R2 bits.
  42. TS_NEG_MULTIDSTBLT_INDEX,
  43. TS_NEG_MULTIPATBLT_INDEX,
  44. TS_NEG_MULTISCRBLT_INDEX,
  45. TS_NEG_MULTIOPAQUERECT_INDEX,
  46. TS_NEG_FAST_INDEX_INDEX,
  47. TS_NEG_POLYGON_SC_INDEX,
  48. TS_NEG_POLYGON_CB_INDEX,
  49. TS_NEG_POLYLINE_INDEX,
  50. 0xFF, // Unused 0x17
  51. TS_NEG_FAST_GLYPH_INDEX,
  52. TS_NEG_ELLIPSE_SC_INDEX,
  53. TS_NEG_ELLIPSE_CB_INDEX,
  54. TS_NEG_INDEX_INDEX,
  55. 0xFF, // TS_NEG_WTEXTOUT_INDEX (no longer supported)
  56. 0xFF, // TS_NEG_WEXTTEXTOUT_INDEX (no longer supported)
  57. 0xFF, // TS_NEG_WLONGTEXTOUT_INDEX (no longer supported)
  58. 0xFF // TS_NEG_WLONGEXTTEXTOUT_INDEX (no longer supported)
  59. ));
  60. #else
  61. // Translation table, indexed by TS_ENC_XXX_ORDER, values are corresponding
  62. // TS_NEG_XXX_INDEX. Orders we do not support for sending are given the
  63. // value 0xFF to force an error.
  64. DC_CONST_DATA_ARRAY(BYTE, oeEncToNeg, TS_MAX_ORDERS,
  65. DC_STRUCT32(
  66. TS_NEG_DSTBLT_INDEX,
  67. TS_NEG_PATBLT_INDEX,
  68. TS_NEG_SCRBLT_INDEX,
  69. 0xFF, // TS_NEG_MEMBLT_INDEX (historical, never encoded)
  70. 0xFF, // TS_NEG_MEM3BLT_INDEX (historical, never encoded)
  71. 0xFF, // TS_NEG_ATEXTOUT_INDEX (no longer supported)
  72. 0xFF, // TS_NEG_AEXTTEXTOUT_INDEX (no longer supported)
  73. 0xFF,
  74. 0xFF,
  75. TS_NEG_LINETO_INDEX,
  76. TS_NEG_OPAQUERECT_INDEX,
  77. TS_NEG_SAVEBITMAP_INDEX,
  78. 0xFF,
  79. TS_NEG_MEMBLT_INDEX, // Actually TS_NEG_MEM(3)BLT_R2_ORDER, but
  80. TS_NEG_MEM3BLT_INDEX, // the caps are specified with non-R2 bits.
  81. TS_NEG_MULTIDSTBLT_INDEX,
  82. TS_NEG_MULTIPATBLT_INDEX,
  83. TS_NEG_MULTISCRBLT_INDEX,
  84. TS_NEG_MULTIOPAQUERECT_INDEX,
  85. TS_NEG_FAST_INDEX_INDEX,
  86. TS_NEG_POLYGON_SC_INDEX,
  87. TS_NEG_POLYGON_CB_INDEX,
  88. TS_NEG_POLYLINE_INDEX,
  89. 0xFF, // Unused 0x17
  90. TS_NEG_FAST_GLYPH_INDEX,
  91. TS_NEG_ELLIPSE_SC_INDEX,
  92. TS_NEG_ELLIPSE_CB_INDEX,
  93. TS_NEG_INDEX_INDEX,
  94. 0xFF, // TS_NEG_WTEXTOUT_INDEX (no longer supported)
  95. 0xFF, // TS_NEG_WEXTTEXTOUT_INDEX (no longer supported)
  96. 0xFF, // TS_NEG_WLONGTEXTOUT_INDEX (no longer supported)
  97. 0xFF // TS_NEG_WLONGEXTTEXTOUT_INDEX (no longer supported)
  98. ));
  99. #endif
  100. // Storage space to create a temporary solid brush for BitBlt orders.
  101. DC_DATA_NULL(OE_BRUSH_DATA, oeBrushData, DC_STRUCT1(0));
  102. // Running font ID.
  103. DC_DATA(UINT32, oeFontId, 0);
  104. // Running TextOut ID.
  105. DC_DATA(UINT32, oeTextOut, 0);
  106. // Last drawing surface
  107. DC_DATA(PDD_DSURF, oeLastDstSurface, 0);
  108. // Current offscreen bitmap cache size
  109. DC_DATA(UINT32, oeCurrentOffscreenCacheSize, 0);
  110. // Encoding temp buffer to assemble the intermediate format prior to field
  111. // encoding and clipping.
  112. DC_DATA_ARRAY_UNINIT(BYTE, oeTempOrderBuffer, MAX_ORDER_INTFMT_SIZE);
  113. // Temp intermediate workspace for Mem(3)Blt order creation.
  114. DC_DATA(MEM3BLT_R2_ORDER, oeTempMemBlt, DC_STRUCT1(0));
  115. // Order encoding states.
  116. DC_DATA(MEMBLT_R2_ORDER, PrevMemBlt, DC_STRUCT1(0));
  117. DC_DATA(MEM3BLT_R2_ORDER, PrevMem3Blt, DC_STRUCT1(0));
  118. DC_DATA(DSTBLT_ORDER, PrevDstBlt, DC_STRUCT1(0));
  119. DC_DATA(MULTI_DSTBLT_ORDER, PrevMultiDstBlt, DC_STRUCT1(0));
  120. DC_DATA(PATBLT_ORDER, PrevPatBlt, DC_STRUCT1(0));
  121. DC_DATA(MULTI_PATBLT_ORDER, PrevMultiPatBlt, DC_STRUCT1(0));
  122. DC_DATA(SCRBLT_ORDER, PrevScrBlt, DC_STRUCT1(0));
  123. DC_DATA(MULTI_SCRBLT_ORDER, PrevMultiScrBlt, DC_STRUCT1(0));
  124. DC_DATA(OPAQUERECT_ORDER, PrevOpaqueRect, DC_STRUCT1(0));
  125. DC_DATA(MULTI_OPAQUERECT_ORDER, PrevMultiOpaqueRect, DC_STRUCT1(0));
  126. DC_DATA(LINETO_ORDER, PrevLineTo, DC_STRUCT1(0));
  127. DC_DATA(POLYLINE_ORDER, PrevPolyLine, DC_STRUCT1(0));
  128. DC_DATA(POLYGON_SC_ORDER, PrevPolygonSC, DC_STRUCT1(0));
  129. DC_DATA(POLYGON_CB_ORDER, PrevPolygonCB, DC_STRUCT1(0));
  130. DC_DATA(ELLIPSE_SC_ORDER, PrevEllipseSC, DC_STRUCT1(0));
  131. DC_DATA(ELLIPSE_CB_ORDER, PrevEllipseCB, DC_STRUCT1(0));
  132. DC_DATA(FAST_INDEX_ORDER, PrevFastIndex, DC_STRUCT1(0));
  133. DC_DATA(FAST_GLYPH_ORDER, PrevFastGlyph, DC_STRUCT1(0));
  134. DC_DATA(INDEX_ORDER, PrevGlyphIndex, DC_STRUCT1(0));
  135. #ifdef DRAW_NINEGRID
  136. DC_DATA(DRAWNINEGRID_ORDER, PrevDrawNineGrid, DC_STRUCT1(0));
  137. DC_DATA(MULTI_DRAWNINEGRID_ORDER, PrevMultiDrawNineGrid, DC_STRUCT1(0));
  138. #endif