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.

151 lines
6.3 KiB

  1. // #include <shlobj.h> or <shellapi.h> before this to get the right
  2. // BROWSEUIAPI macro definitions.
  3. #ifdef BROWSEUIAPI
  4. #ifndef _BROWSEUI_H_
  5. #define _BROWSEUI_H_
  6. #include <iethread.h>
  7. #include "fldset.h"
  8. BROWSEUIAPI SHOpenNewFrame(LPITEMIDLIST pidlNew, ITravelLog *ptl, DWORD dwBrowserIndex, UINT uFlags);
  9. BROWSEUIAPI_(BOOL) SHOpenFolderWindow(IETHREADPARAM* pieiIn);
  10. BROWSEUIAPI_(BOOL) SHParseIECommandLine(LPCWSTR * ppszCmdLine, IETHREADPARAM * piei);
  11. BROWSEUIAPI_(IETHREADPARAM*) SHCreateIETHREADPARAM(LPCWSTR pszCmdLineIn, int nCmdShowIn, ITravelLog *ptlIn, IEFreeThreadedHandShake* piehsIn);
  12. BROWSEUIAPI_(IETHREADPARAM*) SHCloneIETHREADPARAM(IETHREADPARAM* pieiIn);
  13. BROWSEUIAPI_(void) SHDestroyIETHREADPARAM(IETHREADPARAM* piei);
  14. #ifndef _SHELL32_ // shell32 has its own implementation of this function
  15. BROWSEUIAPI_(BOOL) SHCreateFromDesktop(PNEWFOLDERINFO pfi);
  16. #endif // _SHELL32_
  17. // Exported from browseui, but also in shell\lib\brutil.cpp -- why?
  18. STDAPI SHPidlFromDataObject(IDataObject *pdtobj, LPITEMIDLIST *ppidl, LPWSTR pszDisplayNameW, DWORD cchDisplayName);
  19. //
  20. // The following four apis are exported for use by the channel oc (shdocvw).
  21. // If the channel oc is moved into browseui these protoypes can be removed.
  22. //
  23. BROWSEUIAPI_(LPITEMIDLIST) Channel_GetFolderPidl(void);
  24. BROWSEUIAPI_(IDeskBand *) ChannelBand_Create(LPCITEMIDLIST pidlDefault);
  25. #ifndef _SHELL32_ // shell32 has its own implementation these functions
  26. BROWSEUIAPI_(void) Channels_SetBandInfoSFB(IUnknown* punkBand);
  27. BROWSEUIAPI IUnknown_SetBandInfoSFB(IUnknown *punkBand, BANDINFOSFB *pbi);
  28. #endif // _SHELL32_
  29. //
  30. // Exported to support IE4 channel quick launch button.
  31. //
  32. BROWSEUIAPI_(HRESULT) Channel_QuickLaunch(void);
  33. // NOTE: this export is new to IE5, so it can move to browseui
  34. // along with the rest of this proxy desktop code
  35. BROWSEUIAPI_(BOOL) SHOnCWMCommandLine(LPARAM lParam);
  36. BROWSEUIAPI_(void) SHCreateSavedWindows(void);
  37. BROWSEUIAPI SHCreateBandForPidl(LPCITEMIDLIST pidl, IUnknown** ppunk, BOOL fAllowBrowserBand);
  38. BROWSEUIAPI_(DWORD) IDataObject_GetDeskBandState(IDataObject *pdtobj);
  39. //-------------------------------------------------------------------------
  40. //
  41. // Default folder settings
  42. //
  43. // Make sure to keep INIT_DEFFOLDERSETTINGS in sync.
  44. //
  45. // dwDefRevCount is used to make sure that "set as settings for all new
  46. // folders" works. When settings are loaded from the cache, we check
  47. // the dwDefRevCount. If it's different from the one stored as the
  48. // global settings then it means that somebody changed the global settings
  49. // since we saved our settings, so we chuck our settings and use the
  50. // global settings.
  51. typedef struct {
  52. BOOL bDefStatusBar : 1; // win95
  53. BOOL bDefToolBarSingle : 1; // win95
  54. BOOL bDefToolBarMulti : 1; // win95
  55. BOOL bUseVID : 1; // nash.1
  56. UINT uDefViewMode; // win95
  57. UINT fFlags; // nash.0 - additional flags that get or'ed in
  58. SHELLVIEWID vid; // nash.1
  59. DWORD dwStructVersion; // nash.2
  60. DWORD dwDefRevCount; // nash.3 - Rev count of the default folder settings
  61. DWORD dwViewPriority; // whistler - view priority so we can tell the difference between "all like this" and "reset"
  62. } DEFFOLDERSETTINGS;
  63. typedef struct {
  64. BOOL bDefStatusBar : 1; // win95
  65. BOOL bDefToolBarSingle : 1; // win95
  66. BOOL bDefToolBarMulti : 1; // win95
  67. BOOL bUseVID : 1; // nash.1
  68. UINT uDefViewMode; // win95
  69. UINT fFlags; // nash.0 - additional flags that get or'ed in
  70. SHELLVIEWID vid; // nash.1
  71. DWORD dwStructVersion; // nash.2
  72. DWORD dwDefRevCount; // nash.3 - Rev count of the default folder settings
  73. } DEFFOLDERSETTINGS_W2K;
  74. #define DFS_NASH_VER 3
  75. #define DFS_WHISTLER_VER 4
  76. #define DFS_CURRENT_VER 4
  77. #define DFS_VID_Default VID_WebView
  78. //
  79. // This macro is used to initialize the default `default folder settings'.
  80. //
  81. #define INIT_DEFFOLDERSETTINGS \
  82. { \
  83. !(IsOS(OS_WHISTLERORGREATER) && (IsOS(OS_PERSONAL) || IsOS(OS_PROFESSIONAL))), /* bDefStatusBar */ \
  84. TRUE, /* bDefToolBarSingle */ \
  85. FALSE, /* bDefToolBarMulti */ \
  86. TRUE, /* bUseVID */ \
  87. FVM_ICON, /* uDefViewMode */ \
  88. 0 ,/* fFlags */ \
  89. { 0, 0, 0, { 0, 0, 0, 0, 0, 0, 0, 0 } }, /* vid */ \
  90. DFS_CURRENT_VER,/* dwStructVersion */ \
  91. 0, /* dwDefRevCount */ \
  92. VIEW_PRIORITY_CACHEMISS /*dwViewPriority*/ \
  93. } \
  94. #undef INTERFACE
  95. #define INTERFACE IGlobalFolderSettings
  96. DECLARE_INTERFACE_(IGlobalFolderSettings, IUnknown)
  97. {
  98. // *** IUnknown methods ***
  99. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  100. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  101. STDMETHOD_(ULONG,Release) (THIS) PURE;
  102. // *** IGlobalFolderSettings methods ***
  103. STDMETHOD(Get)(THIS_ DEFFOLDERSETTINGS *pdfs, int cbDfs) PURE;
  104. STDMETHOD(Set)(THIS_ const DEFFOLDERSETTINGS *pdfs, int cbDfs, UINT flags) PURE;
  105. };
  106. //
  107. // Flags for IGlobalFolderSettings::Set
  108. //
  109. #define GFSS_SETASDEFAULT 0x0001 // These settings become default
  110. #define GFSS_VALID 0x0001 // Logical-or of all valid flags
  111. #ifndef _SHELL32_ // shell32 has its own implementation these functions
  112. // FEATURE these two are TEMPORARILY exported for the favorites to shdocvw split
  113. BROWSEUIAPI_(HRESULT) SHGetNavigateTarget(IShellFolder *psf, LPCITEMIDLIST pidl, LPITEMIDLIST *ppidl, DWORD *pdwAttribs);
  114. BROWSEUIAPI_(BOOL) GetInfoTip(IShellFolder* psf, LPCITEMIDLIST pidl, LPTSTR pszText, int cchTextMax);
  115. #endif // _SHELL32_
  116. int SHDosDateTimeToVariantTime(unsigned short wDosDate, unsigned short wDosTime, VARIANT * pvtime);
  117. int SHVariantTimeToDosDateTime(const VARIANT * pvtime, unsigned short * pwDosDate, unsigned short * pwDosTime);
  118. int SHVariantTimeToSystemTime(const VARIANT * pvtime, SYSTEMTIME * pst);
  119. #define REG_MEDIA_STR TEXT("Software\\Microsoft\\Internet Explorer\\Media")
  120. #define REG_WMP8_STR TEXT("Software\\Microsoft\\Active Setup\\Installed Components\\{6BF52A52-394A-11d3-B153-00C04F79FAA6}")
  121. #endif // _BROWSEUI_H_
  122. #endif // BROWSEUIAPI