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.

260 lines
6.0 KiB

  1. //
  2. // GLOBALS.H
  3. // Global variable decls
  4. //
  5. // Copyright(c) Microsoft 1997-
  6. //
  7. #include <osi.h>
  8. #include <shm.h>
  9. #include <oa.h>
  10. #include <ba.h>
  11. #include <cm.h>
  12. #include <host.h>
  13. #include <fh.h>
  14. #include <ssi.h>
  15. #include <oe.h>
  16. #include <sbc.h>
  17. //
  18. // Debug stuff
  19. //
  20. #if defined(DEBUG) || defined(INIT_TRACE)
  21. DC_DATA_VAL ( char, g_szAssertionFailure[], "Assertion failure!" );
  22. DC_DATA_ARRAY ( char, g_szDbgBuf, CCH_DEBUG_MAX );
  23. DC_DATA_VAL ( UINT, g_trcConfig, ZONE_INIT );
  24. #endif // DEBUG or INIT_TRACE
  25. //
  26. // Driver
  27. //
  28. //
  29. // Shared Memory Manager
  30. //
  31. DC_DATA ( LPSHM_SHARED_MEMORY, g_asSharedMemory );
  32. DC_DATA_ARRAY ( LPOA_SHARED_DATA, g_poaData, 2 );
  33. //
  34. // Shared memory.
  35. //
  36. DC_DATA ( UINT, g_shmSharedMemorySize );
  37. DC_DATA ( LPVOID, g_shmMappedMemory ); // user mode ptr
  38. //
  39. // Bounds Accumulator
  40. //
  41. DC_DATA ( UINT, g_baFirstRect );
  42. DC_DATA ( UINT, g_baLastRect );
  43. DC_DATA ( UINT, g_baRectsUsed );
  44. DC_DATA_ARRAY ( DD_BOUNDS, g_baBounds, BA_NUM_RECTS+1);
  45. //
  46. // A local copy of the bounding rectangles which the share core is
  47. // currently processing. These are used when accumulating orders which
  48. // rely on the contents of the destination.
  49. //
  50. DC_DATA ( UINT, g_baNumSpoilingRects);
  51. DC_DATA_ARRAY ( RECT, g_baSpoilingRects, BA_NUM_RECTS);
  52. //
  53. // Is the spoiling of existing orders when adding screen data allowed at
  54. // the moment, or temporarily disabled ? To do the spoiling, both
  55. // baSpoilByNewSDA and baSpoilByNewSDAEnabled must be TRUE.
  56. //
  57. DC_DATA_VAL ( BOOL, g_baSpoilByNewSDAEnabled, TRUE);
  58. //
  59. // Cursor Manager
  60. //
  61. DC_DATA (HBITMAP, g_cmWorkBitmap );
  62. DC_DATA (DWORD, g_cmNextCursorStamp );
  63. DC_DATA (BOOL, g_cmCursorHidden );
  64. //
  65. // Hosted Entity Tracker
  66. //
  67. DC_DATA ( BASEDLIST, g_hetWindowList ); // Anchor for hosted wnd list
  68. DC_DATA ( BASEDLIST, g_hetFreeWndList ); // Anchor for free list
  69. DC_DATA ( BASEDLIST, g_hetMemoryList ); // Anchor for memory block list
  70. //
  71. // Flag which indicates if the desktop is shared.
  72. //
  73. DC_DATA ( BOOL, g_hetDDDesktopIsShared );
  74. //
  75. // Order Accumulator
  76. //
  77. // Throughput
  78. DC_DATA ( UINT, g_oaFlow );
  79. //
  80. // Flag to indicate whether we are allowed to purge the order heap.
  81. //
  82. DC_DATA_VAL ( BOOL, g_oaPurgeAllowed, TRUE);
  83. //
  84. // Order Encoder
  85. //
  86. //
  87. // Are we supporting all ROPS in a conference, or do we disallow ROPS which
  88. // involve the destination bits.
  89. //
  90. DC_DATA ( BOOL, g_oeSendOrders );
  91. //
  92. // Are text orders allowed?
  93. //
  94. DC_DATA ( BOOL, g_oeTextEnabled );
  95. //
  96. // Array of supported orders
  97. //
  98. DC_DATA_ARRAY ( BYTE, g_oeOrderSupported, ORD_NUM_INTERNAL_ORDERS );
  99. //
  100. // Temporary buffer to store the memblt and mem3blt orders which are
  101. // initially created by the display driver interception code. This buffer
  102. // is used because the subsequent logic for these orders breaks down the
  103. // original order into smaller tiled orders and then throws the original
  104. // away. So to keep a coherent order heap, we do not allocate the
  105. // temporary order off the heap.
  106. //
  107. DC_DATA_ARRAY(BYTE,
  108. g_oeTmpOrderBuffer,
  109. sizeof(INT_ORDER) +
  110. max( max( max(sizeof(MEMBLT_ORDER),
  111. sizeof(MEMBLT_R2_ORDER) ),
  112. sizeof(MEM3BLT_ORDER) ),
  113. sizeof(MEM3BLT_R2_ORDER) ));
  114. //
  115. // Storage space to create a temporary solid brush for BitBlt orders.
  116. //
  117. DC_DATA ( OE_BRUSH_DATA, g_oeBrushData );
  118. //
  119. // Local font matching data - this is passed from the share core
  120. //
  121. DC_DATA ( LPLOCALFONT, g_poeLocalFonts );
  122. //
  123. // Local font index. This is an array of bookmarks that indicate the first
  124. // entry in the local font table that starts with a particular character.
  125. // For example, g_oeLocalFontIndex[65] gives the first index in g_oeLocalFonts
  126. // that starts with the character 'A'.
  127. //
  128. DC_DATA_ARRAY( WORD, g_oeLocalFontIndex, FH_LOCAL_INDEX_SIZE );
  129. //
  130. // Number of local fonts
  131. //
  132. DC_DATA ( UINT, g_oeNumFonts );
  133. //
  134. // Capabilities - from PROTCAPS_ORDERS
  135. //
  136. DC_DATA ( UINT, g_oeFontCaps );
  137. //
  138. // Do we support baseline text orders for this conference?
  139. //
  140. DC_DATA ( BOOL, g_oeBaselineTextEnabled );
  141. //
  142. // Local font matching data - this is passed from the share core
  143. //
  144. DC_DATA_ARRAY ( WCHAR, g_oeTempString, (ORD_MAX_STRING_LEN_WITHOUT_DELTAS+1));
  145. DC_DATA ( BOOL, g_oeViewers ); // Accumulate graphics
  146. //
  147. // Send Bitmap Cache
  148. //
  149. //
  150. // BPP for bitmap data sent over the wire
  151. //
  152. DC_DATA ( UINT, g_sbcSendingBPP );
  153. //
  154. // Cache info
  155. //
  156. DC_DATA_ARRAY( SBC_SHM_CACHE_INFO, g_asbcCacheInfo, NUM_BMP_CACHES );
  157. //
  158. // Array of structures holding the info required to get the bitmap bits
  159. // from the source surface into the shunt buffer.
  160. //
  161. DC_DATA_ARRAY (SBC_TILE_WORK_INFO, g_asbcWorkInfo, SBC_NUM_TILE_SIZES );
  162. //
  163. // The Id to use for the next tile passed to the share core in a shunt
  164. // buffer.
  165. //
  166. DC_DATA ( WORD, g_sbcNextTileId );
  167. //
  168. // This is the number of ticks per second which the performance timer
  169. // generates. We store this rather than making lots of calls to
  170. // EngQueryPerformanceFrequency.
  171. //
  172. DC_DATA ( LONGLONG, g_sbcPerfFrequency );
  173. //
  174. // Array of structures containing info about bitmap cache thrashers
  175. //
  176. DC_DATA_ARRAY (SBC_THRASHERS, g_sbcThrashers, SBC_NUM_THRASHERS );
  177. //
  178. // Save Screenbits Interceptor
  179. //
  180. //
  181. // Remote status for SSB
  182. //
  183. DC_DATA ( REMOTE_SSB_STATE, g_ssiRemoteSSBState );
  184. //
  185. // Local status for SSB
  186. //
  187. DC_DATA ( LOCAL_SSB_STATE, g_ssiLocalSSBState );
  188. //
  189. // Current max for save screen bitmap size
  190. //
  191. DC_DATA ( DWORD, g_ssiSaveBitmapSize );