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.

244 lines
9.6 KiB

  1. #ifndef _DESKTOP2_H
  2. #define _DESKTOP2_H
  3. #include "uxtheme.h"
  4. #include "tmschema.h"
  5. #define WC_USERPANE TEXT("Desktop User Pane")
  6. #define WC_LOGOFF TEXT("DesktopLogoffPane")
  7. #define WC_SFTBARHOST TEXT("DesktopSFTBarHost")
  8. #define WC_MOREPROGRAMS TEXT("Desktop More Programs Pane")
  9. /*
  10. This is the new Start Panel layout model.
  11. Each pane in the following diagram will contain a 9Grid and a control offset w/in 9grid.
  12. STARTPANELMETRICS structure should be able to be initialized from a static.
  13. in the non-theme case, that static is what we'll use, otherwise we'll over-ride it with theme settings
  14. *************************
  15. * *
  16. * User *
  17. *************************
  18. * * *
  19. * * *
  20. * MFU * Places *
  21. * * *
  22. * * *
  23. * * *
  24. ************* *
  25. * MoreProg * *
  26. *************************
  27. * *
  28. * Logoff *
  29. *************************
  30. */
  31. #define SMPANETYPE_USER 0
  32. #define SMPANETYPE_MFU 1
  33. #define SMPANETYPE_MOREPROG 2
  34. #define SMPANETYPE_PLACES 3
  35. #define SMPANETYPE_LOGOFF 4
  36. #define SMPANE_MAX SMPANETYPE_LOGOFF+1
  37. // Common data which every pane will specify
  38. typedef struct {
  39. LPCTSTR pszClassName; // (const) window class name
  40. DWORD dwStyle; // (const) window style
  41. int iPartId; // (const) theme part id
  42. SIZE size; // (default) initial size of this pane
  43. HTHEME hTheme; // (runtime) theme to pass to the control
  44. HWND hwnd; // (runtime) filled in at runtime
  45. } SMPANEDATA;
  46. typedef struct {
  47. SIZE sizPanel; // Initial size of panel
  48. SMPANEDATA panes[SMPANE_MAX];
  49. } STARTPANELMETRICS;
  50. //
  51. // For communication between the New Start Menu and the controls it hosts.
  52. // Note that these are positive numbers (app-specific).
  53. //
  54. // Some of these notifications go from child to parent; others from parent
  55. // to child. They will be indicated (c2p) or (p2c) accordingly.
  56. #define SMN_FIRST 200 // 200 - 299
  57. #define SMN_INITIALUPDATE (SMN_FIRST+0) // p2c - Start Menu is being built
  58. #define SMN_APPLYREGION (SMN_FIRST+1) // p2c - make the window regional again
  59. #define SMN_HAVENEWITEMS (SMN_FIRST+2) // c2p - new items are here
  60. // lParam -> SMNMBOOL (fNewInstall)
  61. #define SMN_MODIFYSMINFO (SMN_FIRST+3) // p2c - allow flags to be set (psminfo->dwFlags)
  62. #define SMN_COMMANDINVOKED (SMN_FIRST+4) // c2p - user executed a command
  63. #define SMN_FILTEROPTIONS (SMN_FIRST+5) // c2p - turn off options not supported
  64. #define SMN_GETMINSIZE (SMN_FIRST+6) // p2c - allow client to specify minimum size
  65. #define SMN_SEENNEWITEMS (SMN_FIRST+7) // p2c - user has seen new items; don't need balloon tip
  66. #define SMN_POSTPOPUP (SMN_FIRST+8) // p2c - Start Menu is has just popped up
  67. #define SMN_NEEDREPAINT (SMN_FIRST+9) // c2p - There was a change in a list, we need to repaint
  68. // This used to keep the cached bitmap up to date
  69. //
  70. // SMN_FINDITEM - find/select an item (used in dialog navigation)
  71. //
  72. // SMNDIALOGMESSAGE.flags member describes what type of search
  73. // is requested. If SMNDM_SELECT is set, then the found item is
  74. // also selected.
  75. //
  76. // If a match was found, set SMNDIALOGMESSAGE.itemID to a
  77. // value that uniquely identifies the item within the control,
  78. // and return TRUE.
  79. //
  80. // If no match was found, set pt = coordinates of current selection,
  81. // set one of the orientation flags SMNDM_VERTICAL/SMNDM_HORIZONTAL,
  82. // and return FALSE.
  83. //
  84. #define SMN_FINDITEM (SMN_FIRST+7) // p2c - find/select an item
  85. #define SMN_TRACKSHELLMENU (SMN_FIRST+8) // c2p - display a popup menu
  86. #define SMN_SHOWNEWAPPSTIP (SMN_FIRST+9) // p2c - show the "More Programs" tip
  87. // lParam -> SMNMBOOL (fShow)
  88. #define SMN_DISMISS (SMN_FIRST+10)// p2c - Start Menu is being dismissed
  89. #define SMN_CANCELSHELLMENU (SMN_FIRST+11)// c2p - cancel the popup menu
  90. #define SMN_BLOCKMENUMODE (SMN_FIRST+12)// c2p - lParam -> SMNMBOOL (fBlock)
  91. #define SMN_REFRESHLOGOFF (SMN_FIRST+13)// p2c - indicates a WM_DEVICECHANGE or a session change
  92. #define SMN_SHELLMENUDISMISSED (SMN_FIRST+14)// p2c - notification that the menu has dismissed
  93. // Formerly used by SMN_LINKCOMMAND to specify which command we want
  94. #define SMNLC_LOGOFF 0
  95. #define SMNLC_TURNOFF 1
  96. #define SMNLC_DISCONNECT 2
  97. // REUSE ME 3
  98. #define SMNLC_EJECT 4
  99. #define SMNLC_MAX 5
  100. typedef struct SMNMMODIFYSMINFO {
  101. NMHDR hdr;
  102. struct tagSMDATA *psmd; // IN
  103. struct tagSMINFO *psminfo; // IN OUT
  104. } SMNMMODIFYSMINFO, *PSMNMMODIFYSMINFO;
  105. typedef struct SMNMBOOL {
  106. NMHDR hdr;
  107. BOOL f;
  108. } SMNMBOOL, *PSMNMBOOL;
  109. typedef struct SMNMAPPLYREGION {
  110. NMHDR hdr;
  111. HRGN hrgn;
  112. } SMNMAPPLYREGION, *PSMNMAPPLYREGION;
  113. typedef struct SMNHAVENEWITEMS {
  114. NMHDR hdr;
  115. FILETIME ftNewestApp;
  116. } SMNMHAVENEWITEMS, *PSMNMHAVENEWITEMS;
  117. typedef struct SMNMCOMMANDINVOKED {
  118. NMHDR hdr;
  119. RECT rcItem;
  120. } SMNMCOMMANDINVOKED, *PSMNMCOMMANDINVOKED;
  121. //
  122. // Options for SMN_FILTEROPTIONS.
  123. //
  124. #define SMNOP_LOGOFF (1 << SMNLC_LOGOFF) // 0x01
  125. #define SMNOP_TURNOFF (1 << SMNLC_TURNOFF) // 0x02
  126. #define SMNOP_DISCONNECT (1 << SMNLC_DISCONNECT) // 0x04
  127. // REUSE ME (1 << SMNLC_????????????) // 0x08
  128. #define SMNOP_EJECT (1 << SMNLC_EJECT) // 0x10
  129. typedef struct SMNFILTEROPTIONS {
  130. NMHDR hdr;
  131. UINT smnop; // IN OUT
  132. } SMNFILTEROPTIONS, *PSMNFILTEROPTIONS;
  133. typedef struct SMNGETMINSIZE {
  134. NMHDR hdr;
  135. SIZE siz; // IN OUT
  136. } SMNGETMINSIZE, *PSMNGETMINSIZE;
  137. typedef struct SMNDIALOGMESSAGE {
  138. NMHDR hdr;
  139. MSG *pmsg; // IN
  140. LPARAM itemID; // IN OUT
  141. POINT pt; // IN OUT
  142. UINT flags; // IN
  143. } SMNDIALOGMESSAGE, *PSMNDIALOGMESSAGE;
  144. // Values for "flags" in SMNDIALOGMESSAGE
  145. #define SMNDM_FINDFIRSTMATCH 0x0000 // Find first matching item (char)
  146. #define SMNDM_FINDNEXTMATCH 0x0001 // Find next matching item (char)
  147. #define SMNDM_FINDNEAREST 0x0002 // Find item nearest point
  148. #define SMNDM_FINDFIRST 0x0003 // Find the first item
  149. #define SMNDM_FINDLAST 0x0004 // Find the last item
  150. #define SMNDM_FINDNEXTARROW 0x0005 // Find next in direction of arrow
  151. #define SMNDM_INVOKECURRENTITEM 0x0006 // Invoke the current item
  152. #define SMNDM_HITTEST 0x0007 // Find item under point
  153. #define SMNDM_OPENCASCADE 0x0008 // Invoke current item if it cascade
  154. #define SMNDM_FINDITEMID 0x0009 // Find the specied item (itemID)
  155. #define SMNDM_FINDMASK 0x000F // What type of search?
  156. #define SMNDM_SELECT 0x0100 // Select found item?
  157. #define SMNDM_TRYCASCADE 0x0200 // Attempt to open cascading menu before navigatin
  158. #define SMNDM_KEYBOARD 0x0400 // Initiated from keyboard
  159. // Output flags
  160. #define SMNDM_VERTICAL 0x4000 // Client is vertically-oriented
  161. #define SMNDM_HORIZONTAL 0x8000 // Client is horizontally-oriented
  162. typedef struct SMNTRACKSHELLMENU {
  163. NMHDR hdr;
  164. struct IShellMenu *psm;
  165. RECT rcExclude;
  166. LPARAM itemID; // Which item is being tracked?
  167. DWORD dwFlags; // MPPF_* values
  168. } SMNTRACKSHELLMENU, *PSMNTRACKSHELLMENU;
  169. #define REGSTR_PATH_STARTPANE \
  170. TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\StartPage")
  171. #define REGSTR_PATH_STARTPANE_SETTINGS \
  172. TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced")
  173. #define REGSTR_VAL_DV2_SHOWMC TEXT("Start_ShowMyComputer")
  174. #define REGSTR_VAL_DV2_SHOWNETPL TEXT("Start_ShowNetPlaces")
  175. #define REGSTR_VAL_DV2_SHOWNETCONN TEXT("Start_ShowNetConn")
  176. #define REGSTR_VAL_DV2_SHOWRUN TEXT("Start_ShowRun")
  177. #define REGSTR_VAL_DV2_SHOWRECDOCS TEXT("Start_ShowRecentDocs")
  178. #define REGSTR_VAL_DV2_SHOWMYDOCS TEXT("Start_ShowMyDocs")
  179. #define REGSTR_VAL_DV2_SHOWMYPICS TEXT("Start_ShowMyPics")
  180. #define REGSTR_VAL_DV2_SHOWMYMUSIC TEXT("Start_ShowMyMusic")
  181. #define REGSTR_VAL_DV2_SHOWCPL TEXT("Start_ShowControlPanel")
  182. #define REGSTR_VAL_DV2_SHOWPRINTERS TEXT("Start_ShowPrinters")
  183. #define REGSTR_VAL_DV2_SHOWHELP TEXT("Start_ShowHelp")
  184. #define REGSTR_VAL_DV2_SHOWSEARCH TEXT("Start_ShowSearch")
  185. #define REGSTR_VAL_DV2_FAVORITES TEXT("StartMenuFavorites") // shared with classic SM
  186. #define REGSTR_VAL_DV2_LARGEICONS TEXT("Start_LargeMFUIcons")
  187. #define REGSTR_VAL_DV2_MINMFU TEXT("Start_MinMFU")
  188. #define REGSTR_VAL_DV2_SHOWOEM TEXT("Start_ShowOEMLink")
  189. #define REGSTR_VAL_DV2_AUTOCASCADE TEXT("Start_AutoCascade")
  190. #define REGSTR_VAL_DV2_NOTIFYNEW TEXT("Start_NotifyNewApps")
  191. #define REGSTR_VAL_DV2_ADMINTOOLSROOT TEXT("Start_AdminToolsRoot")
  192. #define REGSTR_VAL_DV2_MINMFU_DEFAULT 6
  193. #define DV2_REGPATH TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\StartPage")
  194. #define DV2_SYSTEM_START_TIME TEXT("StartMenu_Start_Time")
  195. #define DV2_NEWAPP_BALLOON_TIME TEXT("StartMenu_Balloon_Time")
  196. #define STARTPANELTHEME L"StartPanel"
  197. #define PROP_DV2_BALLOONTIP L"StartMenuBalloonTip"
  198. #define DV2_BALLOONTIP_MOREPROG LongToHandle(1)
  199. #define DV2_BALLOONTIP_CLIP LongToHandle(2)
  200. #define DV2_BALLOONTIP_STARTBUTTON LongToHandle(3)
  201. // protypes of functions which live in specfldr.cpp but trayprop needs access too
  202. BOOL ShouldShowNetPlaces();
  203. BOOL ShouldShowConnectTo();
  204. #endif // _DESKTOP2_H