Source code of Windows XP (NT5)
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.

224 lines
6.1 KiB

  1. //
  2. // GLOBALS.H
  3. // Global Variable Decls
  4. //
  5. // Copyright(c) Microsoft 1997-
  6. //
  7. //
  8. // Debug stuff
  9. //
  10. #ifdef DEBUG
  11. DC_DATA_VAL ( char, g_szAssertionFailure[], "Assertion failure!" );
  12. DC_DATA_VAL ( char, g_szNewline[], "\n" );
  13. DC_DATA_ARRAY ( char, g_szDbgBuf, CCH_DEBUG_MAX );
  14. DC_DATA ( UINT, g_dbgRet );
  15. DC_DATA ( UINT, g_trcConfig );
  16. #endif // DEBUG
  17. //
  18. // DLL/Driver stuff
  19. //
  20. DC_DATA ( HINSTANCE, g_hInstAs16 );
  21. DC_DATA ( UINT, g_cProcesses );
  22. DC_DATA ( HTASK, g_hCoreTask );
  23. DC_DATA ( HINSTANCE, g_hInstKrnl16 );
  24. DC_DATA ( HMODULE, g_hModKrnl16 );
  25. DC_DATA ( DWORD, g_hInstKrnl32 );
  26. DC_DATA ( HINSTANCE, g_hInstKrnl32MappedTo16 );
  27. DC_DATA ( ANSITOUNIPROC, g_lpfnAnsiToUni );
  28. DC_DATA ( HINSTANCE, g_hInstGdi16 );
  29. DC_DATA ( HMODULE, g_hModGdi16 );
  30. DC_DATA ( DWORD, g_hInstGdi32 );
  31. DC_DATA ( REALPATBLTPROC, g_lpfnRealPatBlt );
  32. DC_DATA ( EXTTEXTOUTWPROC, g_lpfnExtTextOutW );
  33. DC_DATA ( TEXTOUTWPROC, g_lpfnTextOutW );
  34. DC_DATA ( POLYLINETOPROC, g_lpfnPolylineTo );
  35. DC_DATA ( POLYPOLYLINEPROC, g_lpfnPolyPolyline );
  36. DC_DATA ( HINSTANCE, g_hInstUser16 );
  37. DC_DATA ( HMODULE, g_hModUser16 );
  38. DC_DATA ( DWORD, g_hInstUser32 );
  39. DC_DATA ( GETWINDOWTHREADPROCESSIDPROC, g_lpfnGetWindowThreadProcessId );
  40. DC_DATA ( HDC, g_osiScreenDC );
  41. DC_DATA ( HDC, g_osiMemoryDC );
  42. DC_DATA ( HBITMAP, g_osiMemoryBMP );
  43. DC_DATA ( HBITMAP, g_osiMemoryOld );
  44. DC_DATA ( RECT, g_osiScreenRect );
  45. DC_DATA ( UINT, g_osiScreenBitsPlane );
  46. DC_DATA ( UINT, g_osiScreenPlanes );
  47. DC_DATA ( UINT, g_osiScreenBPP );
  48. DC_DATA ( DWORD, g_osiScreenRedMask );
  49. DC_DATA ( DWORD, g_osiScreenGreenMask );
  50. DC_DATA ( DWORD, g_osiScreenBlueMask );
  51. DC_DATA ( BITMAPINFO_ours, g_osiScreenBMI );
  52. DC_DATA ( HWND, g_osiDesktopWindow );
  53. //
  54. // Shared Memory
  55. //
  56. DC_DATA ( LPSHM_SHARED_MEMORY, g_asSharedMemory );
  57. DC_DATA_ARRAY ( LPOA_SHARED_DATA, g_poaData, 2 );
  58. //
  59. // Window/Task tracking
  60. //
  61. DC_DATA ( HWND, g_asMainWindow );
  62. DC_DATA ( BOOL, g_hetDDDesktopIsShared );
  63. //
  64. // Cursor Manager
  65. //
  66. DC_DATA ( LPCURSORSHAPE, g_cmMungedCursor ); // Holds <= color cursor bits
  67. DC_DATA ( LPBYTE, g_cmXformMono ); // 2x height, mono
  68. DC_DATA ( LPBYTE, g_cmXformColor ); // 2x height, color
  69. DC_DATA ( BOOL, g_cmXformOn );
  70. DC_DATA ( BOOL, g_cmCursorHidden );
  71. DC_DATA ( DWORD, g_cmNextCursorStamp );
  72. DC_DATA ( UINT, g_cxCursor );
  73. DC_DATA ( UINT, g_cyCursor );
  74. DC_DATA ( UINT, g_cmMonoByteSize );
  75. DC_DATA ( UINT, g_cmColorByteSize );
  76. DC_DATA ( SETCURSORPROC, g_lpfnSetCursor );
  77. DC_DATA ( FN_PATCH, g_cmSetCursorPatch );
  78. extern PALETTEENTRY CODESEG g_osiVgaPalette[16];
  79. //
  80. // Order Accumulator
  81. //
  82. DC_DATA ( UINT, g_oaFlow );
  83. DC_DATA_VAL ( BOOL, g_oaPurgeAllowed, TRUE);
  84. //
  85. // Order Encoder
  86. //
  87. DC_DATA ( BOOL, g_oeViewers );
  88. DC_DATA ( UINT, g_oeEnterCount );
  89. DC_DATA ( BOOL, g_oeSendOrders );
  90. DC_DATA ( BOOL, g_oeTextEnabled );
  91. DC_DATA_ARRAY ( BYTE, g_oeOrderSupported, ORD_NUM_INTERNAL_ORDERS );
  92. DC_DATA ( HPALETTE, g_oeStockPalette );
  93. DC_DATA ( TSHR_RECT32, g_oeLastETORect );
  94. //
  95. // Only valid within a single DDI call, saves stack space to use globals
  96. // NOTE:
  97. // We need at most 2 pointers to DCs, the source and dest. So we have
  98. // two allocated selectors.
  99. //
  100. DC_DATA ( OESTATE, g_oeState );
  101. DC_DATA ( UINT, g_oeSelDst );
  102. DC_DATA ( UINT, g_oeSelSrc );
  103. DC_DATA ( BOOL, g_oeBaselineTextEnabled );
  104. DC_DATA ( UINT, g_oeFontCaps );
  105. //
  106. // Local font matching data - this is passed from the share core
  107. // NOTE: it's so large that we allocate it in 16-bit code
  108. //
  109. DC_DATA ( LPLOCALFONT, g_poeLocalFonts );
  110. DC_DATA_ARRAY( WORD, g_oeLocalFontIndex, FH_LOCAL_INDEX_SIZE );
  111. DC_DATA ( UINT, g_oeNumFonts );
  112. DC_DATA ( FH_CACHE, g_oeFhLast );
  113. DC_DATA_ARRAY ( char, g_oeAnsiString, ORD_MAX_STRING_LEN_WITHOUT_DELTAS+1 );
  114. DC_DATA_ARRAY ( WCHAR, g_oeTempString, ORD_MAX_STRING_LEN_WITHOUT_DELTAS+1 );
  115. DC_DATA_ARRAY ( FN_PATCH, g_oeDDPatches, DDI_MAX );
  116. DC_DATA ( FN_PATCH, g_oeDisplaySettingsPatch );
  117. DC_DATA ( FN_PATCH, g_oeDisplaySettingsExPatch );
  118. DC_DATA ( CDSEXPROC, g_lpfnCDSEx );
  119. //
  120. // Bounds Accumulation
  121. //
  122. DC_DATA ( UINT, g_baFirstRect );
  123. DC_DATA ( UINT, g_baLastRect );
  124. DC_DATA ( UINT, g_baRectsUsed );
  125. DC_DATA_ARRAY ( DD_BOUNDS, g_baBounds, BA_NUM_RECTS+1);
  126. //
  127. // A local copy of the bounding rectangles which the share core is
  128. // currently processing. These are used when accumulating orders which
  129. // rely on the contents of the destination.
  130. //
  131. DC_DATA ( UINT, g_baNumSpoilingRects);
  132. DC_DATA_ARRAY ( RECT, g_baSpoilingRects, BA_NUM_RECTS);
  133. //
  134. // Is the spoiling of existing orders when adding screen data allowed at
  135. // the moment, or temporarily disabled ? To do the spoiling, both
  136. // baSpoilByNewSDA and baSpoilByNewSDAEnabled must be TRUE.
  137. //
  138. DC_DATA_VAL ( BOOL, g_baSpoilByNewSDAEnabled, TRUE);
  139. //
  140. // Save Screenbits Interceptor
  141. //
  142. //
  143. // Remote status for SSB
  144. //
  145. DC_DATA ( REMOTE_SSB_STATE, g_ssiRemoteSSBState );
  146. //
  147. // Local status for SSB
  148. //
  149. DC_DATA ( LOCAL_SSB_STATE, g_ssiLocalSSBState );
  150. //
  151. // Current max for save screen bitmap size
  152. //
  153. DC_DATA ( DWORD, g_ssiSaveBitmapSize );
  154. DC_DATA ( SAVEBITSPROC, g_lpfnSaveBits );
  155. DC_DATA ( FN_PATCH, g_ssiSaveBitsPatch );
  156. DC_DATA ( HBITMAP, g_ssiLastSpbBitmap );
  157. //
  158. // IM stuff
  159. //
  160. //
  161. // NOTE:
  162. // Since we smart pagelock our data segment anyway, we don't need to
  163. // put g_imSharedData into a separate block of memory.
  164. //
  165. DC_DATA ( IM_SHARED_DATA, g_imSharedData );
  166. DC_DATA ( IM_WIN95_DATA, g_imWin95Data );
  167. DC_DATA_ARRAY ( FN_PATCH, g_imPatches, IM_MAX );
  168. DC_DATA ( int, g_imMouseDowns );