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.

615 lines
28 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (c) Microsoft Corporation. All rights reserved.
  5. //
  6. //--------------------------------------------------------------------------
  7. import "objidl.idl";
  8. import "shtypes.idl";
  9. import "shobjidl.idl";
  10. import "unknwn.idl";
  11. import "wtypes.idl";
  12. import "prsht.idl";
  13. import "msxml.idl";
  14. ///////////////////////////////////////////////////////////////////////////////
  15. //
  16. [
  17. uuid(fe787bcb-0ee8-44fb-8c89-12f508913c40),
  18. helpstring("MRU using a binary data key"),
  19. local
  20. ]
  21. interface IMruDataList : IUnknown
  22. {
  23. typedef int (stdcall *MRUDATALISTCOMPARE)(const BYTE *, const BYTE *, int);
  24. enum
  25. {
  26. MRULISTF_USE_MEMCMP = 0x0000, // default, find uses memcmp()
  27. MRULISTF_USE_STRCMPIW = 0x0001, // find uses StrCmpIW()
  28. MRULISTF_USE_STRCMPW = 0x0002, // find uses StrCmpW()
  29. MRULISTF_USE_ILISEQUAL = 0x0003, // find uses ILIsEqual()
  30. };
  31. typedef DWORD MRULISTF;
  32. HRESULT InitData(
  33. [in] UINT uMax,
  34. [in] MRULISTF flags,
  35. [in] HKEY hKey,
  36. [in, string] LPCWSTR pszSubKey,
  37. [in] MRUDATALISTCOMPARE pfnCompare);
  38. HRESULT AddData(
  39. [in, size_is(cbData)] const BYTE *pData,
  40. [in] DWORD cbData,
  41. [out] DWORD *pdwSlot);
  42. HRESULT FindData(
  43. [in, size_is(cbData)] const BYTE *pData,
  44. [in] DWORD cbData,
  45. [out] int *piIndex);
  46. HRESULT GetData(
  47. [in] int iIndex,
  48. [out, size_is(cbData)] BYTE *pData,
  49. [in] DWORD cbData);
  50. HRESULT QueryInfo(
  51. [in] int iIndex,
  52. [in, out] DWORD *pdwSlot,
  53. [in, out] DWORD *pcbData);
  54. HRESULT Delete([in] int iIndex);
  55. };
  56. [
  57. uuid(47851649-a2ef-4e67-baec-c6a153ac72ec),
  58. helpstring("MRU using a LPITEMIDLIST key"),
  59. local,
  60. ]
  61. interface IMruPidlList : IUnknown
  62. {
  63. HRESULT InitList(
  64. [in] UINT uMax,
  65. [in] HKEY hKey,
  66. [in, string] LPCWSTR pszSubKey);
  67. HRESULT UsePidl(
  68. [in] LPCITEMIDLIST pidl,
  69. [out] DWORD *pdwSlot);
  70. // QueryPidl returns S_OK if rgdwSlots[0] is the pidl queried for
  71. // or S_FALSE if it is one of the parents
  72. // or failure if nothing was inserted in rgdwSlots
  73. HRESULT QueryPidl(
  74. [in] LPCITEMIDLIST pidl,
  75. [in] DWORD cSlots,
  76. [out, size_is(cSlots), length_is(*pcSlotsFetched)] DWORD *rgdwSlots,
  77. [out] DWORD *pcSlotsFetched);
  78. HRESULT PruneKids([in] LPCITEMIDLIST pidl);
  79. };
  80. // INSCTree Behavior flags: (INSCTree::Initialize(..., dwFlags))
  81. cpp_quote("#define NSS_DROPTARGET 0x0001 // register as a drop target")
  82. cpp_quote("#define NSS_BROWSERSELECT 0x0002 // Use the browser style selection (see above)")
  83. cpp_quote("#define NSS_NOHISTSELECT 0x0004 // Do not select the history entry on navigations.")
  84. cpp_quote("#define NSS_MULTISELECT 0x0008")
  85. cpp_quote("#define NSS_BORDER 0x0010")
  86. cpp_quote("#define NSS_NORMALTREEVIEW 0x0020")
  87. cpp_quote("#define NSS_HEADER 0x0040")
  88. // NSCTree Modes: (INSCTree::SetNscMode(nMode))
  89. typedef enum
  90. {
  91. MODE_NORMAL = 0x0000, // Act like a normal tree view
  92. MODE_CONTROL = 0x0001, // Have behaviors specific the being hosted in a control
  93. MODE_HISTORY = 0x0002, // Have behaviors specific to the History pane.
  94. MODE_FAVORITES = 0x0004, // Have behaviors specific to the Favorites pane.
  95. MODE_CUSTOM = 0x0008, // custom behavior defined by flags passed to initialize
  96. } nscTreeMode;
  97. [
  98. uuid(43A8F463-4222-11d2-B641-006097DF5BD4),
  99. helpstring("Private Namespace tree control interface"),
  100. local
  101. ]
  102. interface INSCTree : IUnknown
  103. {
  104. // CreateTree() dwStyles - these are normal window styles.
  105. HRESULT CreateTree([in] HWND hwndParent, [in] DWORD dwStyles, [out] HWND *phwnd);
  106. // Initialize() grfFlags - these are SHCONTF_* flags defined in <shlobj.h>.
  107. // dwFlags - these are NSCTree Behavior flags defined below
  108. // NSS_DROPTARGET - Enable drag and drop
  109. // NSS_BROWSERSELECT - With this on, a selection is different than the standard
  110. // tree view selection in that a box is drawn around the sub heirarchy selected
  111. // and the buttons are turned off.
  112. HRESULT Initialize([in] LPCITEMIDLIST pidlRoot, [in] DWORD grfFlags, [in] DWORD dwFlags);
  113. HRESULT ShowWindow([in] BOOL fShow);
  114. HRESULT Refresh();
  115. HRESULT GetSelectedItem([out] LPITEMIDLIST * ppidl, [in] int nItem);
  116. HRESULT SetSelectedItem([in] LPCITEMIDLIST pidl, [in] BOOL fCreate, [in] BOOL fReinsert, [in] int nItem);
  117. // SetNscMode() nMode - these are modes that inherit general behavior. Defined below
  118. HRESULT GetNscMode([out] UINT * pnMode);
  119. HRESULT SetNscMode([in] UINT nMode);
  120. HRESULT GetSelectedItemName([in, out] LPWSTR pszName, [in] DWORD cchName);
  121. HRESULT BindToSelectedItemParent([in] REFIID riid, [out] void **ppv, [out] LPITEMIDLIST *ppidl);
  122. BOOL InLabelEdit();
  123. };
  124. [
  125. uuid(801C1AD5-C47C-428c-97AF-E991E4857D97),
  126. local
  127. ]
  128. interface INSCTree2 : INSCTree
  129. {
  130. HRESULT RightPaneNavigationStarted([in] LPITEMIDLIST pidl);
  131. HRESULT RightPaneNavigationFinished([in] LPITEMIDLIST pidl);
  132. HRESULT CreateTree2([in] HWND hwndParent, [in] DWORD dwStyle, [in] DWORD dwExStyle, [out] HWND *phwnd);
  133. }
  134. [
  135. uuid(3a77ce00-6f74-4594-9399-c4578aa4a1b6),
  136. helpstring("used to notify browser of application start notifications"),
  137. ]
  138. interface INotifyAppStart : IUnknown
  139. {
  140. HRESULT AppStarting(void);
  141. HRESULT AppStarted(void);
  142. };
  143. [
  144. uuid(e787f2c0-3d21-4d98-85c8-a038195ba649),
  145. local
  146. ]
  147. interface IInitViewLinkedWebOC : IUnknown
  148. {
  149. HRESULT SetViewLinkedWebOC([in] BOOL bValue);
  150. HRESULT IsViewLinkedWebOC([out] BOOL* pbValue);
  151. HRESULT SetViewLinkedWebOCFrame([in] IDispatch * punk);
  152. HRESULT GetViewLinkedWebOCFrame([out] IDispatch ** punk);
  153. HRESULT SetFrameName([in] BSTR bstrFrameName);
  154. };
  155. [
  156. helpstring("Interface to handle nsc specifics for different bands"),
  157. uuid(CF1609EC-FA4B-4818-AB01-55643367E66D),
  158. object,
  159. local
  160. ]
  161. interface INamespaceProxy : IUnknown
  162. {
  163. HRESULT GetNavigateTarget(LPCITEMIDLIST pidl, LPITEMIDLIST * ppidlTarget, ULONG * pulAttrib);
  164. HRESULT Invoke(LPCITEMIDLIST pidl);
  165. HRESULT OnSelectionChanged(LPCITEMIDLIST pidl);
  166. HRESULT RefreshFlags(DWORD *pdwStyle, DWORD *pdwExStyle, DWORD *dwEnum);
  167. HRESULT CacheItem(LPCITEMIDLIST pidl);
  168. }
  169. cpp_quote("// INTERFACE: IBrowserFrameOptions")
  170. cpp_quote("//")
  171. cpp_quote("// This interface was implemented so a browser or host can ask a ShellView/ShelNameSpace what")
  172. cpp_quote("// kind of 'Behavior' is appropriate for that view. These are normally PM type decisions to")
  173. cpp_quote("// refine the user experience.")
  174. cpp_quote("// ")
  175. cpp_quote("// For example, should the IE globe be added to the toolbar")
  176. cpp_quote("// when the view is a HTTP web page? (Yes) When the view is a FTP Folders? When the view")
  177. cpp_quote("// is the file system? (No) When the view is Web Folders? (Maybe, did you as a PM?)")
  178. cpp_quote("// It's very important for the view to ask the NSE if it does or doesn't want the behavior instead of")
  179. cpp_quote("// trying to sniff the pidl and guess. An example of this kind of bad coding style is all the")
  180. cpp_quote("// code that calls IsURLChild(). Currently we have a lot of hacky code that says turn such-and-such")
  181. cpp_quote("// behavior on for HTTP and FTP URLs but not Web Folders and not ABOUT URLs, so it's very important to")
  182. cpp_quote("// use this interface to do the work for you. This will also allow Web Folders to fix a lot of bugs because")
  183. cpp_quote("// the code hasn't yet been 'tweaked' to give the behavior Web Folders wants.")
  184. cpp_quote("//")
  185. cpp_quote("// IBrowserFrameOptions::GetBrowserOptions()")
  186. cpp_quote("// dwMask is the logical OR of bits to look for. pdwOptions is not optional and")
  187. cpp_quote("// it's return value will always equal or will be a subset of dwMask.")
  188. cpp_quote("// If the function succeeds, the return value must be S_OK and pdwOptions needs to be filled in.")
  189. cpp_quote("// If the function fails, pdwOptions needs to be filled in with BFO_NONE.")
  190. cpp_quote("//")
  191. cpp_quote("// NOTE: The definition of the bit needs to be OFF for the most common NSE. This way shell name space")
  192. cpp_quote("// extensions that don't implement this interface or haven't been updated to handle this bit will")
  193. cpp_quote("// default to behavior that is the most common. An example of this is the BFO_NO_FOLDER_OPTIONS")
  194. cpp_quote("// where this bit off will give the 'Folder Options', which is the most common case. This is especially")
  195. cpp_quote("// true since this interface is internal only.")
  196. [
  197. uuid(10DF43C8-1DBE-11d3-8B34-006097DF5BD4),
  198. object,
  199. local
  200. ]
  201. interface IBrowserFrameOptions : IUnknown
  202. {
  203. typedef [unique] IBrowserFrameOptions * LPBROWSERFRAMEOPTIONS;
  204. enum
  205. {
  206. BFO_NONE = 0x00000000, // Do nothing.
  207. BFO_BROWSER_PERSIST_SETTINGS = 0x00000001, // Does this item want the browser stream? (Same window position as IE browser windows?)
  208. BFO_RENAME_FOLDER_OPTIONS_TOINTERNET = 0x00000002, // Rename "Folder Options" to "Internet Options" in the Tools or View menu?
  209. BFO_BOTH_OPTIONS = 0x00000004, // Keep both "Folder Options" and "Internet Options" in the Tools or View menu?
  210. BIF_PREFER_INTERNET_SHORTCUT = 0x00000008, // NSE would prefer a .url shortcut over a .lnk shortcut
  211. BFO_BROWSE_NO_IN_NEW_PROCESS = 0x00000010, // Specify this flag if you don't want the "Browse in New Process" via invoking a shortcut.
  212. BFO_ENABLE_HYPERLINK_TRACKING = 0x00000020, // Does this NSE want it's display name tracked to determine when hyperlinks should be tagged as previously used?
  213. BFO_USE_IE_OFFLINE_SUPPORT = 0x00000040, // Use "Internet Explorer"'s offline support?
  214. BFO_SUBSTITUE_INTERNET_START_PAGE = 0x00000080, // Does this NSE want to use the Start Page support?
  215. BFO_USE_IE_LOGOBANDING = 0x00000100, // Use the Brand block in the Toolbar. (Spinning globe or whatever it is this year)
  216. BFO_ADD_IE_TOCAPTIONBAR = 0x00000200, // Should " - Internet Explorer" be appended to display name in the Captionbar
  217. BFO_USE_DIALUP_REF = 0x00000400, // Should the DialUp ref count get a ref while the browse is navigated to this location? This will also enable the ICW and Software update.
  218. BFO_USE_IE_TOOLBAR = 0x00000800, // Should the IE toolbar be used?
  219. BFO_NO_PARENT_FOLDER_SUPPORT = 0x00001000, // Can you NOT navigate to a parent folder? Used for Backspace button to parent folder or the View.GoTo.ParentFolder feature.
  220. BFO_NO_REOPEN_NEXT_RESTART = 0x00002000, // Browser windows are NOT reopened the next time the shell boots if the windows were left open on the previous logoff. Does this NSE want the same feature?
  221. BFO_GO_HOME_PAGE = 0x00004000, // Add "Home Page" to menu (Go).
  222. BFO_PREFER_IEPROCESS = 0x00008000, // prefers to use IEXPLORE.EXE over EXPLORER.EXE
  223. BFO_SHOW_NAVIGATION_CANCELLED = 0x00010000, // If navigation is aborted, show the "Action Cancelled" HTML page.
  224. BFO_QUERY_ALL = 0xFFFFFFFF, // Return all values set.
  225. };
  226. typedef DWORD BROWSERFRAMEOPTIONS;
  227. HRESULT GetFrameOptions([in] BROWSERFRAMEOPTIONS dwMask, [out] BROWSERFRAMEOPTIONS * pdwOptions);
  228. }
  229. //-----------------------------------------
  230. // Search Companion Info object
  231. //-----------------------------------------
  232. [
  233. uuid(DB5CEF35-BEC6-4762-A1BD-253F5BF67C72),
  234. helpstring("ISearchCompanionInfo Interface"),
  235. pointer_default(unique)
  236. ]
  237. interface ISearchCompanionInfo : IUnknown
  238. {
  239. HRESULT IsSearchCompanionInetAvailable([out] BOOL* pfAvailable);
  240. };
  241. cpp_quote("#include <pshpack8.h>")
  242. typedef struct tagSMDATA
  243. {
  244. DWORD dwMask; // SMDM_* values
  245. DWORD dwFlags; // Not used
  246. HMENU hmenu; // Static HMENU portion.
  247. HWND hwnd; // HWND owning the HMENU
  248. UINT uId; // Id of the item in the menu (-1 for menu itself)
  249. UINT uIdParent; // Id of the item spawning this menu
  250. UINT uIdAncestor; // Id of the very top item in the chain of ShellFolders
  251. IUnknown* punk; // IUnkown of the menuband
  252. LPITEMIDLIST pidlFolder; // pidl of the ShellFolder portion
  253. LPITEMIDLIST pidlItem; // pidl of the item in the ShellFolder portion
  254. IShellFolder* psf; // IShellFolder for the shell folder portion
  255. void* pvUserData; // User defined Data associated with a pane.
  256. } SMDATA, *LPSMDATA;
  257. cpp_quote("// Mask")
  258. cpp_quote("#define SMDM_SHELLFOLDER 0x00000001 // This is for an item in the band")
  259. cpp_quote("#define SMDM_HMENU 0x00000002 // This is for the Band itself")
  260. cpp_quote("#define SMDM_TOOLBAR 0x00000004 // Plain toolbar, not associated with a shell folder or hmenu")
  261. cpp_quote("// Flags (bitmask)")
  262. typedef struct tagSMINFO
  263. {
  264. DWORD dwMask; // SMIM_*
  265. DWORD dwType; // SMIT_*
  266. DWORD dwFlags; // SMIF_*
  267. int iIcon;
  268. } SMINFO, * PSMINFO;
  269. typedef struct tagSHCSCHANGENOTIFYSTRUCT
  270. {
  271. LONG lEvent; // Change notify Event
  272. LPCITEMIDLIST pidl1; // Pidl 1 Passed in from the Change notify
  273. LPCITEMIDLIST pidl2; // Pidl 2 Passed in from the Change notify
  274. } SMCSHCHANGENOTIFYSTRUCT, *PSMCSHCHANGENOTIFYSTRUCT;
  275. cpp_quote("#include <poppack.h>") /* Return to byte packing */
  276. // Mask flags
  277. enum
  278. {
  279. SMIM_TYPE = 0x00000001,
  280. SMIM_FLAGS = 0x00000002,
  281. SMIM_ICON = 0x00000004
  282. };
  283. // Types for mbiinfo.dwType
  284. enum
  285. {
  286. SMIT_SEPARATOR = 0x00000001,
  287. SMIT_STRING = 0x00000002
  288. };
  289. // Flags for mbiinfo.dwFlags
  290. enum
  291. {
  292. SMIF_ICON = 0x00000001, // Show an icon
  293. SMIF_ACCELERATOR = 0x00000002, // Underline the character marked w/ '&'
  294. SMIF_DROPTARGET = 0x00000004, // Item is a drop target
  295. SMIF_SUBMENU = 0x00000008, // Item has a submenu
  296. SMIF_VOLATILE = 0x00000010, // Obsolete.
  297. SMIF_CHECKED = 0x00000020, // Item has a Checkmark
  298. SMIF_DROPCASCADE = 0x00000040, // Item can cascade out during drag/drop
  299. SMIF_HIDDEN = 0x00000080, // Don't display item
  300. SMIF_DISABLED = 0x00000100, // Should be unselectable. Grey.
  301. SMIF_TRACKPOPUP = 0x00000200, // Should be unselectable. Grey.
  302. SMIF_DEMOTED = 0x00000400, // Display item in "Demoted" state.
  303. SMIF_ALTSTATE = 0x00000800, // Displayed in "Altered State"
  304. SMIF_DRAGNDROP = 0x00001000, // If item that is being dragged hovers over an item for long enough then it SMC_EXECs that item
  305. SMIF_NEW = 0x00002000, // Item is newly-installed or otherwise attractive (Whistler)
  306. };
  307. // Messages
  308. //
  309. // SMC_INITMENU Sent when a menu is shown.
  310. //
  311. //
  312. // SMC_GETOBJECT
  313. // wParam = riid
  314. // lParam = ppv
  315. // Sent to get an object that supports riid.
  316. //
  317. cpp_quote("#define SMC_INITMENU 0x00000001 // The callback is called to init a menuband")
  318. cpp_quote("#define SMC_CREATE 0x00000002")
  319. cpp_quote("#define SMC_EXITMENU 0x00000003 // The callback is called when menu is collapsing")
  320. cpp_quote("#define SMC_EXEC 0x00000004 // The callback is called to execute an item")
  321. cpp_quote("#define SMC_GETINFO 0x00000005 // The callback is called to return DWORD values")
  322. cpp_quote("#define SMC_GETSFINFO 0x00000006 // The callback is called to return DWORD values")
  323. cpp_quote("#define SMC_GETOBJECT 0x00000007 // The callback is called to get some object")
  324. cpp_quote("#define SMC_GETSFOBJECT 0x00000008 // The callback is called to get some object")
  325. cpp_quote("#define SMC_SFEXEC 0x00000009 // The callback is called to execute an shell folder item")
  326. cpp_quote("#define SMC_SFSELECTITEM 0x0000000A // The callback is called when an item is selected")
  327. cpp_quote("#define SMC_SELECTITEM 0x0000000B // The callback is called when an item is selected")
  328. cpp_quote("#define SMC_GETSFINFOTIP 0x0000000C // The callback is called to get some object")
  329. cpp_quote("#define SMC_GETINFOTIP 0x0000000D // The callback is called to get some object")
  330. cpp_quote("#define SMC_INSERTINDEX 0x0000000E // New item insert index")
  331. cpp_quote("#define SMC_POPUP 0x0000000F // InitMenu/InitMenuPopup (sort of)")
  332. cpp_quote("#define SMC_REFRESH 0x00000010 // Menus have completely refreshed. Reset your state.")
  333. cpp_quote("#define SMC_DEMOTE 0x00000011 // Demote an item")
  334. cpp_quote("#define SMC_PROMOTE 0x00000012 // Promote an item, wParam = SMINV_* flag")
  335. cpp_quote("#define SMC_BEGINENUM 0x00000013 // tell callback that we are beginning to ENUM the indicated parent")
  336. cpp_quote("#define SMC_ENDENUM 0x00000014 // tell callback that we are ending the ENUM of the indicated paren")
  337. cpp_quote("#define SMC_MAPACCELERATOR 0x00000015 // Called when processing an accelerator.")
  338. cpp_quote("#define SMC_DEFAULTICON 0x00000016 // Returns Default icon location in wParam, index in lParam")
  339. cpp_quote("#define SMC_NEWITEM 0x00000017 // Notifies item is not in the order stream.")
  340. cpp_quote("#define SMC_GETMINPROMOTED 0x00000018 // Returns the minimum number of promoted items")
  341. cpp_quote("#define SMC_CHEVRONEXPAND 0x00000019 // Notifies of a expansion via the chevron")
  342. cpp_quote("#define SMC_DISPLAYCHEVRONTIP 0x0000002A // S_OK display, S_FALSE not.")
  343. cpp_quote("#define SMC_DESTROY 0x0000002B // Called when a pane is being destroyed.")
  344. cpp_quote("#define SMC_SETOBJECT 0x0000002C // Called to save the passed object")
  345. cpp_quote("#define SMC_SETSFOBJECT 0x0000002D // Called to save the passed object")
  346. cpp_quote("#define SMC_SHCHANGENOTIFY 0x0000002E // Called when a Change notify is received. lParam points to SMCSHCHANGENOTIFYSTRUCT")
  347. cpp_quote("#define SMC_CHEVRONGETTIP 0x0000002F // Called to get the chevron tip text. wParam = Tip title, Lparam = TipText Both MAX_PATH")
  348. cpp_quote("#define SMC_SFDDRESTRICTED 0x00000030 // Called requesting if it's ok to drop. wParam = IDropTarget.")
  349. cpp_quote("#define SMC_GETIMAGELISTS 0x00000031 // Called to get the small & large icon image lists, otherwise it will default to shell image list")
  350. cpp_quote("#define SMC_CUSTOMDRAW 0x00000032 // Requires SMINIT_CUSTOMDRAW")
  351. cpp_quote("#define SMC_BEGINDRAG 0x00000033 // Called to get preferred drop effect. wParam = &pdwEffect")
  352. cpp_quote("#define SMC_MOUSEFILTER 0x00000034 // Called to allow host to filter mouse messages. wParam=bRemove, lParam=pmsg")
  353. cpp_quote("#define SMC_DUMPONUPDATE 0x00000035 // S_OK if host wants old trash-everything-on-update behavior (recent docs)")
  354. cpp_quote("")
  355. cpp_quote("#define SMC_FILTERPIDL 0x10000000 // The callback is called to see if an item is visible")
  356. cpp_quote("#define SMC_CALLBACKMASK 0xF0000000 // Mask of comutationally intense messages")
  357. [
  358. uuid(4CA300A1-9B8D-11d1-8B22-00C04FD918D0),
  359. object,
  360. pointer_default(unique),
  361. local // cannot marshal because method has polymorphic parameters
  362. ]
  363. interface IShellMenuCallback : IUnknown
  364. {
  365. // psmd is [in,out] because SMC_MAPACCELERATOR returns a value in uId
  366. HRESULT CallbackSM([in,out] LPSMDATA psmd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  367. };
  368. //-------------------------------------------------------------------------
  369. //
  370. // IShellMenu interface
  371. //
  372. //-------------------------------------------------------------------------
  373. cpp_quote("#define SMINIT_DEFAULT 0x00000000 // No Options")
  374. cpp_quote("#define SMINIT_RESTRICT_CONTEXTMENU 0x00000001 // Don't allow Context Menus")
  375. cpp_quote("#define SMINIT_RESTRICT_DRAGDROP 0x00000002 // Don't allow Drag and Drop")
  376. cpp_quote("#define SMINIT_TOPLEVEL 0x00000004 // This is the top band.")
  377. cpp_quote("#define SMINIT_DEFAULTTOTRACKPOPUP 0x00000008 // When no callback is specified, ")
  378. // default all HMENU items to Trackpopup
  379. cpp_quote("#define SMINIT_CACHED 0x00000010")
  380. cpp_quote("#define SMINIT_USEMESSAGEFILTER 0x00000020")
  381. cpp_quote("#define SMINIT_LEGACYMENU 0x00000040 // Old Menu behaviour.")
  382. cpp_quote("#define SMINIT_CUSTOMDRAW 0x00000080 // Send SMC_CUSTOMDRAW")
  383. // Internal Menuband setting
  384. cpp_quote("#define SMINIT_NOSETSITE 0x00010000 // Internal setting")
  385. // These are mutually Exclusive
  386. cpp_quote("#define SMINIT_VERTICAL 0x10000000 // This is a vertical menu")
  387. cpp_quote("#define SMINIT_HORIZONTAL 0x20000000 // This is a horizontal menu (does not inherit)")
  388. cpp_quote("#define SMINIT_MULTICOLUMN 0x40000000 // this is a multi column menu")
  389. cpp_quote("#define ANCESTORDEFAULT (UINT)-1")
  390. cpp_quote("#define SMSET_TOP 0x10000000 // Bias this namespace to the top of the menu")
  391. cpp_quote("#define SMSET_BOTTOM 0x20000000 // Bias this namespace to the bottom of the menu")
  392. cpp_quote("#define SMSET_DONTOWN 0x00000001 // The Menuband doesn't own the non-ref counted object")
  393. // and should not destroy it.
  394. cpp_quote("#define SMSET_MERGE 0x00000002")
  395. cpp_quote("#define SMSET_NOEMPTY 0x00000004 // Dont show (Empty) on shell folder")
  396. cpp_quote("#define SMSET_USEBKICONEXTRACTION 0x00000008 // Use the background icon extractor")
  397. cpp_quote("#define SMSET_HASEXPANDABLEFOLDERS 0x00000010 // Need to call SHIsExpandableFolder")
  398. cpp_quote("#define SMSET_DONTREGISTERCHANGENOTIFY 0x00000020 // ShellFolder is a discontiguous child of a parent shell folder")
  399. cpp_quote("#define SMSET_COLLAPSEONEMPTY 0x00000040 // When Empty, causes a menus to collapse")
  400. cpp_quote("#define SMSET_USEPAGER 0x00000080 //Enable pagers in static menus")
  401. cpp_quote("#define SMSET_NOPREFIX 0x00000100 //Enable ampersand in static menus")
  402. cpp_quote("#define SMSET_SEPARATEMERGEFOLDER 0x00000200 //Insert separator when MergedFolder host changes")
  403. cpp_quote("#define SMINV_REFRESH 0x00000001")
  404. cpp_quote("#define SMINV_ICON 0x00000002")
  405. cpp_quote("#define SMINV_POSITION 0x00000004")
  406. cpp_quote("#define SMINV_ID 0x00000008")
  407. cpp_quote("#define SMINV_NEXTSHOW 0x00000010 // Does Invalidates on next show.")
  408. cpp_quote("#define SMINV_PROMOTE 0x00000020 // Does Invalidates on next show.")
  409. cpp_quote("#define SMINV_DEMOTE 0x00000040 // Does Invalidates on next show.")
  410. cpp_quote("#define SMINV_FORCE 0x00000080")
  411. cpp_quote("#define SMINV_NOCALLBACK 0x00000100 // Invalidates, but does not call the callback.")
  412. cpp_quote("#define SMINV_INITMENU 0x00000200 // Call callback's SMC_INITMENU as part of invalidate (Whistler)")
  413. [
  414. uuid(EE1F7637-E138-11d1-8379-00C04FD918D0),
  415. object,
  416. pointer_default(unique), /* some of our pointers can be NULL (as noted) */
  417. local
  418. ]
  419. interface IShellMenu : IUnknown
  420. {
  421. HRESULT Initialize([in] IShellMenuCallback* psmc, UINT uId, UINT uIdAncestor, DWORD dwFlags);
  422. HRESULT GetMenuInfo([out] IShellMenuCallback** ppsmc, [out] UINT* puId, [out] UINT* puIdAncestor, [out] DWORD* pdwFlags);
  423. HRESULT SetShellFolder(IShellFolder* psf, [in] LPCITEMIDLIST pidlFolder, HKEY hKey, DWORD dwFlags);
  424. HRESULT GetShellFolder([out] DWORD* pdwFlags, [out] LPITEMIDLIST* ppidl, [in] REFIID riid, [out, iid_is(riid)] void** ppv);
  425. HRESULT SetMenu([in] HMENU hmenu, [in] HWND hwnd, DWORD dwFlags);
  426. HRESULT GetMenu([out /* can be null */] HMENU* phmenu, [out /* can be null */] HWND* phwnd, [out /* can be null */] DWORD* pdwFlags);
  427. HRESULT InvalidateItem([in /* can be null */] LPSMDATA psmd, DWORD dwFlags);
  428. HRESULT GetState([out] LPSMDATA psmd);
  429. HRESULT SetMenuToolbar([in] IUnknown* punk, DWORD dwFlags);
  430. };
  431. // New for Whistler - used by Start Pane to get the Programs submenu
  432. [
  433. uuid(6f51c646-0efe-4370-882a-c1f61cb27c3b),
  434. object,
  435. pointer_default(unique),
  436. local
  437. ]
  438. interface IShellMenu2 : IShellMenu
  439. {
  440. // Retrieves an interface on a submenu.
  441. HRESULT GetSubMenu(UINT idCmd, [in] REFIID riid, [out, iid_is(riid)] void **ppvObj);
  442. HRESULT SetToolbar([in] HWND hwnd, [in] DWORD dwFlags);
  443. HRESULT SetMinWidth([in] int cxMenu);
  444. HRESULT SetNoBorder([in] BOOL fNoBorder);
  445. HRESULT SetTheme([in, string] LPCWSTR pszTheme);
  446. };
  447. [
  448. uuid(8278F932-2A3E-11d2-838F-00C04FD918D0),
  449. object,
  450. pointer_default(unique),
  451. local
  452. ]
  453. interface ITrackShellMenu : IShellMenu
  454. {
  455. HRESULT SetObscured([in] HWND hwndTB, [in] IUnknown* punkBand, DWORD dwSMSetFlags);
  456. HRESULT Popup([in] HWND hwnd, [in] POINTL *ppt, [in] RECTL *prcExclude, DWORD dwFlags);
  457. };
  458. [
  459. uuid(6d45a930-f71a-11d0-9ea7-00805f714772),
  460. helpstring("thumbnail extractor helper object"),
  461. local
  462. ]
  463. interface IThumbnail : IUnknown
  464. {
  465. // ::Init(HWND hwnd, UINT uMsg)
  466. // Must initialize interface before use. The hwnd given will receive the
  467. // uMsg message when the bitmap is computed (cf. GetBitmap()).
  468. //
  469. // ::GetBitmap(LPCWSTR pwszFile, DWORD dwItem, LONG lWidth, LONG lHeight)
  470. // Call this function to actually compute and return the bitmap. pszFile is
  471. // the parsing name (filename) whose bitmap is to be computed. lWidth and lHeight are the
  472. // width and height respectively of the rectangle containing the thumbnail,
  473. // i.e. the size of the resultant bitmap. When the bitmap is computed, the
  474. // uMsg is sent to the hwnd (cf. Init()) where LPARAM is the HBITMAP, and
  475. // WPARAM is dwItem (so it's an ID to identify the bitmap).
  476. // NOTE: Call GetBitmap(NULL,...) to cancel any pending requests.
  477. HRESULT Init(HWND hwnd, UINT uMsg);
  478. HRESULT GetBitmap(LPCWSTR pszFile, DWORD dwItem, LONG lWidth, LONG lHeight);
  479. };
  480. [
  481. uuid(500202A0-731E-11d0-B829-00C04FD706EC),
  482. helpstring("thumbnail extractor helper object, supports pidl"),
  483. local
  484. ]
  485. interface IThumbnail2 : IThumbnail
  486. {
  487. HRESULT GetBitmapFromIDList(LPCITEMIDLIST pidl, DWORD dwItem, LONG lWidth, LONG lHeight);
  488. }
  489. [
  490. helpstring("interface to initialize MRU in auto complete"),
  491. uuid(F729FC5E-8769-4f3e-BDB2-D7B50FD2275B),
  492. object,
  493. local
  494. ]
  495. interface IACLCustomMRU : IUnknown
  496. {
  497. HRESULT Initialize([in, string] LPCWSTR pwszMRURegKey, [in] DWORD dwMax);
  498. HRESULT AddMRUString([in, string] LPCWSTR pwszEntry);
  499. }
  500. cpp_quote("#if _WIN32_IE >= 0x0600")
  501. cpp_quote("// used in both shell32 and browseui")
  502. [
  503. helpstring("IShellBrowserService"),
  504. uuid(1307ee17-ea83-49eb-96b2-3a28e2d7048a), // IID_IShellBrowserService
  505. object,
  506. pointer_default(unique)
  507. ]
  508. interface IShellBrowserService : IUnknown
  509. {
  510. HRESULT GetPropertyBag([in] DWORD dwFlags, [in] REFIID riid, [out, iid_is(riid)] void** ppv);
  511. };
  512. cpp_quote("#endif // _WIN32_IE >= 0x0600")
  513. [
  514. uuid(aba1bbae-8280-4b0c-80a3-39095d68881f)
  515. ]
  516. library IEPrivateObjects
  517. {
  518. // CLSID_HWEventSettings
  519. // CLSID_MruPidlList
  520. [ uuid(42aedc87-2188-41fd-b9a3-0c966feabec1) ] coclass MruPidlList { interface IMruPidlList; }
  521. // CLSID_MruLongList
  522. [ uuid(53bd6b4e-3780-4693-afc3-7161c2f3ee9c) ] coclass MruLongList { interface IMruDataList; }
  523. // CLSID_MruLongList
  524. [ uuid(53bd6b4f-3780-4693-afc3-7161c2f3ee9c) ] coclass MruShortList { interface IMruDataList; }
  525. // CLSID_FolderMarshalStub
  526. [ uuid(bf50b68e-29b8-4386-ae9c-9734d5117cd5) ] coclass FolderMarshalStub { interface IPersist; }
  527. // CLSID_MailRecipient
  528. [ uuid(9E56BE60-C50F-11CF-9A2C-00A0C90A90CE) ] coclass MailRecipient { interface IDropTarget; };
  529. [ uuid(AC1B0D5D-DD59-4ff0-93F8-A84373821606) ] coclass SearchCompanionInfo { interface ISearchCompanionInfo; }
  530. // CLSID_TrackShellMenu
  531. [ uuid(8278F931-2A3E-11d2-838F-00C04FD918D0) ] coclass TrackShellMenu { interface ITrackShellMenu; }
  532. // CLSID_Thumbnail
  533. [ uuid(7487cd30-f71a-11d0-9ea7-00805f714772)] coclass Thumbnail { interface IThumbnail; }
  534. }