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.

254 lines
5.1 KiB

  1. //
  2. // Hosting (local or remote)
  3. //
  4. #ifndef _H_HET
  5. #define _H_HET
  6. //
  7. // DC-Share includes
  8. //
  9. #include <osi.h>
  10. BOOL HET_Init(void);
  11. void HET_Term(void);
  12. #if defined(DLL_CORE)
  13. typedef struct tagGUIEFFECTS
  14. {
  15. BOOL hetAdvanced;
  16. BOOL hetCursorShadow;
  17. ANIMATIONINFO hetAnimation;
  18. }
  19. GUIEFFECTS;
  20. void HET_SetGUIEffects(BOOL fOn, GUIEFFECTS * pEffects);
  21. #endif // DLL_CORE or DLL_HOOK
  22. //
  23. // Define escape codes
  24. //
  25. // These are normal
  26. enum
  27. {
  28. // These are normal
  29. HET_ESC_SHARE_DESKTOP = OSI_HET_ESC_FIRST,
  30. HET_ESC_UNSHARE_DESKTOP,
  31. HET_ESC_VIEWER
  32. };
  33. // These are WNDOBJ_SETUP
  34. enum
  35. {
  36. HET_ESC_SHARE_WINDOW = OSI_HET_WO_ESC_FIRST,
  37. HET_ESC_UNSHARE_WINDOW,
  38. HET_ESC_UNSHARE_ALL
  39. };
  40. //
  41. // Structure passed with a HET_ESC_SHARE_WINDOW request
  42. //
  43. typedef struct tagHET_SHARE_WINDOW
  44. {
  45. OSI_ESCAPE_HEADER header;
  46. DWORD winID; // window to share
  47. DWORD result; // Return code from HET_DDShareWindow
  48. }
  49. HET_SHARE_WINDOW;
  50. typedef HET_SHARE_WINDOW FAR * LPHET_SHARE_WINDOW;
  51. //
  52. // Structure passed with a HET_ESC_UNSHARE_WINDOW request
  53. //
  54. typedef struct tagHET_UNSHARE_WINDOW
  55. {
  56. OSI_ESCAPE_HEADER header;
  57. DWORD winID; // window to unshare
  58. }
  59. HET_UNSHARE_WINDOW;
  60. typedef HET_UNSHARE_WINDOW FAR * LPHET_UNSHARE_WINDOW;
  61. //
  62. // Structure passed with a HET_ESC_UNSHARE_ALL request
  63. //
  64. typedef struct tagHET_UNSHARE_ALL
  65. {
  66. OSI_ESCAPE_HEADER header;
  67. }
  68. HET_UNSHARE_ALL;
  69. typedef HET_UNSHARE_ALL FAR * LPHET_UNSHARE_ALL;
  70. //
  71. // Structure passed with HET_ESC_SHARE_DESKTOP
  72. //
  73. typedef struct tagHET_SHARE_DESKTOP
  74. {
  75. OSI_ESCAPE_HEADER header;
  76. }
  77. HET_SHARE_DESKTOP;
  78. typedef HET_SHARE_DESKTOP FAR * LPHET_SHARE_DESKTOP;
  79. //
  80. // Structure passed with HET_ESC_UNSHARE_DESKTOP
  81. //
  82. typedef struct tagHET_UNSHARE_DESKTOP
  83. {
  84. OSI_ESCAPE_HEADER header;
  85. }
  86. HET_UNSHARE_DESKTOP;
  87. typedef HET_UNSHARE_DESKTOP FAR * LPHET_UNSHARE_DESKTOP;
  88. //
  89. // Structure passed with HET_ESC_VIEWER
  90. //
  91. typedef struct tagHET_VIEWER
  92. {
  93. OSI_ESCAPE_HEADER header;
  94. LONG viewersPresent;
  95. }
  96. HET_VIEWER;
  97. typedef HET_VIEWER FAR * LPHET_VIEWER;
  98. #ifdef DLL_DISP
  99. #ifndef IS_16
  100. //
  101. // Number of rectangles allocated per window structure. If a visible
  102. // region exceeds that number, we will merge rects together and end up
  103. // trapping a bit more output than necessary.
  104. //
  105. #define HET_WINDOW_RECTS 10
  106. //
  107. // HET's version of ENUMRECTS. This is the same as Windows', except that
  108. // it has HET_WINDOW_RECTS rectangles, not 1
  109. //
  110. typedef struct tagHET_ENUM_RECTS
  111. {
  112. ULONG c; // count of rectangles in use
  113. RECTL arcl[HET_WINDOW_RECTS]; // rectangles
  114. } HET_ENUM_RECTS;
  115. typedef HET_ENUM_RECTS FAR * LPHET_ENUM_RECTS;
  116. //
  117. // The Window Structure kept for each tracked window
  118. //
  119. typedef struct tagHET_WINDOW_STRUCT
  120. {
  121. BASEDLIST chain; // list chaining info
  122. HWND hwnd; // hwnd of this window
  123. WNDOBJ * wndobj; // WNDOBJ for this window
  124. HET_ENUM_RECTS rects; // rectangles
  125. } HET_WINDOW_STRUCT;
  126. typedef HET_WINDOW_STRUCT FAR * LPHET_WINDOW_STRUCT;
  127. //
  128. // Initial number of windows for which space is allocated
  129. // We alloc about 1 page for each block of windows. Need to account for
  130. // the BASEDLIST at the front of HET_WINDOW_MEMORY.
  131. //
  132. #define HET_WINDOW_COUNT ((0x1000 - sizeof(BASEDLIST)) / sizeof(HET_WINDOW_STRUCT))
  133. //
  134. // Layout of memory ued to hold window structures
  135. //
  136. typedef struct tagHET_WINDOW_MEMORY
  137. {
  138. BASEDLIST chain;
  139. HET_WINDOW_STRUCT wnd[HET_WINDOW_COUNT];
  140. } HET_WINDOW_MEMORY;
  141. typedef HET_WINDOW_MEMORY FAR * LPHET_WINDOW_MEMORY;
  142. #endif // !IS_16
  143. #ifdef IS_16
  144. void HETDDViewing(BOOL fViewers);
  145. #else
  146. void HETDDViewing(SURFOBJ *pso, BOOL fViewers);
  147. BOOL HETDDShareWindow(SURFOBJ *pso, LPHET_SHARE_WINDOW pReq);
  148. void HETDDUnshareWindow(LPHET_UNSHARE_WINDOW pReq);
  149. void HETDDUnshareAll(void);
  150. BOOL HETDDAllocWndMem(void);
  151. void HETDDDeleteAndFreeWnd(LPHET_WINDOW_STRUCT pWnd);
  152. VOID CALLBACK HETDDVisRgnCallback(WNDOBJ *pwo, FLONG fl);
  153. #endif
  154. #endif // DLL_DISP
  155. #ifdef DLL_DISP
  156. //
  157. // INIT, TERM. TERM is used to free the window list blocks when NetMeeting
  158. // shuts down. Otherwise that memory will stay allocated in the display
  159. // driver forever.
  160. //
  161. void HET_DDTerm(void);
  162. //
  163. //
  164. // Name: HET_DDProcessRequest
  165. //
  166. // Description: Handle a DrvEscape request for HET
  167. //
  168. // Params: pso - pointer to a SURFOBJ
  169. // cjIn - size of input buffer
  170. // pvIn - input buffer
  171. // cjOut - size of output buffer
  172. // pvOut - output buffer
  173. //
  174. //
  175. #ifdef IS_16
  176. BOOL HET_DDProcessRequest(UINT fnEscape, LPOSI_ESCAPE_HEADER pResult,
  177. DWORD cbResult);
  178. #else
  179. ULONG HET_DDProcessRequest(SURFOBJ *pso,
  180. UINT cjIn,
  181. void * pvIn,
  182. UINT cjOut,
  183. void * pvOut);
  184. #endif // IS_16
  185. #endif // DLL_DISP
  186. #endif // _H_HET