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.

151 lines
4.0 KiB

  1. //
  2. // Shared Window List
  3. //
  4. #ifndef _H_SWL
  5. #define _H_SWL
  6. //
  7. // Max # of entries we can send in SWL packet; backwards compat thing.
  8. // Also, we keep a bunch of static arrays around so we know if stuff has
  9. // changed.
  10. //
  11. #define SWL_MAX_WINDOWS 100
  12. //
  13. // Return codes.
  14. //
  15. #define SWL_RC_ERROR 0
  16. #define SWL_RC_SENT 1
  17. #define SWL_RC_NOT_SENT 2
  18. //
  19. // CONSTANTS
  20. //
  21. //
  22. // Window property flags
  23. //
  24. #define SWL_PROP_INVALID 0x00000000
  25. #define SWL_PROP_COUNTDOWN_MASK 0x00000003
  26. #define SWL_PROP_INITIAL 0x00000004
  27. #define SWL_PROP_TAGGABLE 0x00000020
  28. #define SWL_PROP_TASKBAR 0x00000040
  29. #define SWL_PROP_SHADOW 0x00000100
  30. #define SWL_PROP_IGNORE 0x00000200
  31. #define SWL_PROP_HOSTED 0x00000400
  32. #define SWL_PROP_TRANSPARENT 0x00000800
  33. #define SWL_PROP_SAVEBITS 0x00001000
  34. //
  35. // We still need this SWL token stuff for backwards compatibility (<= NM 2.1)
  36. // Those systems treat the shared apps from all the different participants
  37. // in a global fashion.
  38. //
  39. // Even so, back level systems may not be able to keep up if a lot of NM 3.0
  40. // systems are sharing--but that happens even among an all 2.1 conference.
  41. // With collisions, zordering, etc. a sharer may back off or drop packets.
  42. //
  43. #define SWL_SAME_ZORDER_INC 1
  44. #define SWL_NEW_ZORDER_INC 2
  45. #define SWL_NEW_ZORDER_ACTIVE_INC 3
  46. #define SWL_NEW_ZORDER_FAKE_WINDOW_INC 4
  47. #define SWL_EXIT_INC 5
  48. #define SWL_MAKE_TOKEN(index, inc) (TSHR_UINT16)(((index) << 4) | (inc))
  49. #define SWL_GET_INDEX(token) ((token) >> 4)
  50. #define SWL_MAX_TOKEN_INDEX 0x0FFF
  51. #define SWL_GET_INCREMENT(token) ((token) & 0x000F)
  52. //
  53. // This is the number of times we must consecutively see a window as
  54. // invisible before we believe it is - see comments in aswlint.c explaining
  55. // why we must do this.
  56. //
  57. #define SWL_BELIEVE_INVISIBLE_COUNT 2
  58. //
  59. // Name of the SWL Global Atom
  60. //
  61. #define SWL_ATOM_NAME "AS_StateInfo"
  62. //
  63. // For each sharer in the conference, we remember the last shared list
  64. // they sent us--the HWNDs (on their machine, no meaning on ours), the
  65. // state information, and the position.
  66. //
  67. // We use this for several purposes:
  68. // (1) 2.x compatibility
  69. // 2.x sharers, when they send SWL lists, do not fill in the position
  70. // of shadows representing other remote app windows. Those will appear
  71. // in the list if they obscure parts of shared windows on the 2.x host. The
  72. // old 2.x code would look up the last position info in the global shared
  73. // list, and use that. We need the position info to accurately compute
  74. // the obscured regions for a particular host. 3.0 sharers don't have
  75. // shadows, they never send incomplete info.
  76. //
  77. // (2) For better UI in the host view
  78. // We can remember where the window on top is, where the active window
  79. // is (if a 3.0 host), if a window is minimized, etc. Since we don't have
  80. // independent fake windows floating with tray buttons you can manipulate
  81. // on a remote to manipulate the host, minimized windows will disappear.
  82. // Only Alt-Tabbing (when controlling) can activate and restore them.
  83. //
  84. //
  85. // DESKTOP types
  86. //
  87. enum
  88. {
  89. DESKTOP_OURS = 0,
  90. DESKTOP_WINLOGON,
  91. DESKTOP_SCREENSAVER,
  92. DESKTOP_OTHER
  93. };
  94. #define NAME_DESKTOP_WINLOGON "Winlogon"
  95. #define NAME_DESKTOP_SCREENSAVER "Screen-saver"
  96. #define NAME_DESKTOP_DEFAULT "Default"
  97. #define SWL_DESKTOPNAME_MAX 64
  98. #ifdef __cplusplus
  99. // Things we need for enumeration of top level windows
  100. typedef struct tagSWLENUMSTRUCT
  101. {
  102. class ASHost * pHost;
  103. BOOL fBailOut;
  104. UINT transparentCount;
  105. UINT count;
  106. LPSTR newWinNames;
  107. PSWLWINATTRIBUTES newFullWinStruct;
  108. }
  109. SWLENUMSTRUCT, * PSWLENUMSTRUCT;
  110. #endif // __cplusplus
  111. BOOL CALLBACK SWLDestroyWindowProperty(HWND, LPARAM);
  112. BOOL CALLBACK SWLEnumProc(HWND hwnd, LPARAM lParam);
  113. #endif // _H_SWL