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.

127 lines
2.0 KiB

  1. //
  2. // HET.C
  3. // Hosted Entity Tracker
  4. //
  5. // Copyright(c) Microsoft 1997-
  6. //
  7. #include <as16.h>
  8. /////
  9. //
  10. // DISPLAY DRIVER functionality
  11. //
  12. /////
  13. //
  14. // HET_DDInit()
  15. //
  16. BOOL HET_DDInit(void)
  17. {
  18. return(TRUE);
  19. }
  20. //
  21. // HET_DDTerm()
  22. //
  23. void HET_DDTerm(void)
  24. {
  25. DebugEntry(HET_DDTerm);
  26. //
  27. // Make sure we stop hosting
  28. //
  29. g_hetDDDesktopIsShared = FALSE;
  30. DebugExitVOID(HET_DDTerm);
  31. }
  32. //
  33. // HET_DDProcessRequest()
  34. // Handles HET escapes
  35. //
  36. BOOL HET_DDProcessRequest
  37. (
  38. UINT fnEscape,
  39. LPOSI_ESCAPE_HEADER pResult,
  40. DWORD cbResult
  41. )
  42. {
  43. BOOL rc = TRUE;
  44. DebugEntry(HET_DDProcessRequest);
  45. switch (fnEscape)
  46. {
  47. //
  48. // NOTE:
  49. // Unlike NT, we have no need of keeping a duplicated list of
  50. // shared windows. We can make window calls directly, and can use
  51. // GetProp to find out.
  52. //
  53. case HET_ESC_UNSHARE_ALL:
  54. {
  55. // Nothing to do
  56. }
  57. break;
  58. case HET_ESC_SHARE_DESKTOP:
  59. {
  60. ASSERT(!g_hetDDDesktopIsShared);
  61. g_hetDDDesktopIsShared = TRUE;
  62. }
  63. break;
  64. case HET_ESC_UNSHARE_DESKTOP:
  65. {
  66. ASSERT(g_hetDDDesktopIsShared);
  67. g_hetDDDesktopIsShared = FALSE;
  68. HETDDViewing(FALSE);
  69. }
  70. break;
  71. case HET_ESC_VIEWER:
  72. {
  73. HETDDViewing(((LPHET_VIEWER)pResult)->viewersPresent != 0);
  74. break;
  75. }
  76. default:
  77. {
  78. ERROR_OUT(("Unrecognized HET escape"));
  79. rc = FALSE;
  80. }
  81. break;
  82. }
  83. DebugExitBOOL(HET_DDProcessRequest, rc);
  84. return(rc);
  85. }
  86. //
  87. // HETDDViewing()
  88. //
  89. // Called when viewing of our shared apps starts/stops. Naturally, no longer
  90. // sharing anything stops viewing also.
  91. //
  92. void HETDDViewing(BOOL fViewers)
  93. {
  94. DebugEntry(HETDDViewing);
  95. if (g_oeViewers != fViewers)
  96. {
  97. g_oeViewers = fViewers;
  98. OE_DDViewing(fViewers);
  99. }
  100. DebugExitVOID(HETDDViewing);
  101. }