*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_SHELL_MAIN_H
#include "undocshell.h"
#include "shlobj.h"
#include "shellapi.h"
-#include "wine/windef16.h"
#include "wine/unicode.h"
/*******************************************
extern HIMAGELIST ShellSmallIconList;
extern HIMAGELIST ShellBigIconList;
-BOOL WINAPI Shell_GetImageList(HIMAGELIST * lpBigList, HIMAGELIST * lpSmallList);
-
/* Iconcache */
#define INVALID_INDEX -1
BOOL SIC_Initialize(void);
void SIC_Destroy(void);
BOOL PidlToSicIndex (IShellFolder * sh, LPCITEMIDLIST pidl, BOOL bBigIcon, UINT uFlags, int * pIndex);
-INT SIC_GetIconIndex (LPCWSTR sSourceFile, INT dwSourceIndex );
+INT SIC_GetIconIndex (LPCWSTR sSourceFile, INT dwSourceIndex, DWORD dwFlags );
/* Classes Root */
-BOOL HCR_MapTypeToValueW(LPCWSTR szExtension, LPWSTR szFileType, DWORD len, BOOL bPrependDot);
+BOOL HCR_MapTypeToValueW(LPCWSTR szExtension, LPWSTR szFileType, LONG len, BOOL bPrependDot);
+BOOL HCR_GetDefaultVerbW( HKEY hkeyClass, LPCWSTR szVerb, LPWSTR szDest, DWORD len );
BOOL HCR_GetExecuteCommandW( HKEY hkeyClass, LPCWSTR szClass, LPCWSTR szVerb, LPWSTR szDest, DWORD len );
-BOOL HCR_GetDefaultIconW(LPCWSTR szClass, LPWSTR szDest, DWORD len, LPDWORD dwNr);
-BOOL HCR_GetDefaultIconFromGUIDW(REFIID riid, LPWSTR szDest, DWORD len, LPDWORD dwNr);
+BOOL HCR_GetDefaultIconW(LPCWSTR szClass, LPWSTR szDest, DWORD len, int* picon_idx);
BOOL HCR_GetClassNameW(REFIID riid, LPWSTR szDest, DWORD len);
/* ANSI versions of above functions, supposed to go away as soon as they are not used anymore */
-BOOL HCR_MapTypeToValueA(LPCSTR szExtension, LPSTR szFileType, DWORD len, BOOL bPrependDot);
-BOOL HCR_GetDefaultIconA(LPCSTR szClass, LPSTR szDest, DWORD len, LPDWORD dwNr);
+BOOL HCR_MapTypeToValueA(LPCSTR szExtension, LPSTR szFileType, LONG len, BOOL bPrependDot);
+BOOL HCR_GetDefaultIconA(LPCSTR szClass, LPSTR szDest, DWORD len, int* picon_idx);
BOOL HCR_GetClassNameA(REFIID riid, LPSTR szDest, DWORD len);
-BOOL HCR_GetFolderAttributes(REFIID riid, LPDWORD szDest);
+BOOL HCR_GetFolderAttributes(LPCITEMIDLIST pidlFolder, LPDWORD dwAttributes);
-INT_PTR CALLBACK AboutDlgProc(HWND,UINT,WPARAM,LPARAM);
DWORD WINAPI ParseFieldA(LPCSTR src, DWORD nField, LPSTR dst, DWORD len);
DWORD WINAPI ParseFieldW(LPCWSTR src, DWORD nField, LPWSTR dst, DWORD len);
+BOOL WINAPI GUIDFromStringW(LPCWSTR, LPGUID);
+
/****************************************************************************
* Class constructors
*/
LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT, const FORMATETC []);
LPCLASSFACTORY IClassFactory_Constructor(REFCLSID);
-IContextMenu2 * ISvItemCm_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST pidl, LPCITEMIDLIST *aPidls, UINT uItemCount);
+IContextMenu2 * ISvItemCm_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST pidl, const LPCITEMIDLIST *aPidls, UINT uItemCount);
IContextMenu2 * ISvBgCm_Constructor(LPSHELLFOLDER pSFParent, BOOL bDesktop);
LPSHELLVIEW IShellView_Constructor(LPSHELLFOLDER);
HRESULT WINAPI IFSFolder_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
+HRESULT WINAPI IShellItem_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
HRESULT WINAPI IShellLink_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
HRESULT WINAPI IShellLink_ConstructFromFile(IUnknown * pUnkOuter, REFIID riid, LPCITEMIDLIST pidl, LPVOID * ppv);
HRESULT WINAPI ISF_Desktop_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
HRESULT WINAPI ISF_MyComputer_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
+HRESULT WINAPI ISF_NetworkPlaces_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
+HRESULT WINAPI Printers_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
HRESULT WINAPI IDropTargetHelper_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
HRESULT WINAPI IFileSystemBindData_Constructor(const WIN32_FIND_DATAW *pfd, LPBC *ppV);
HRESULT WINAPI IControlPanel_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
HRESULT WINAPI UnixFolder_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
-extern HRESULT CPanel_GetIconLocationW(LPITEMIDLIST, LPWSTR, UINT, int*);
+HRESULT WINAPI UnixDosFolder_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv);
+HRESULT WINAPI FolderShortcut_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv);
+HRESULT WINAPI MyDocuments_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv);
+HRESULT WINAPI RecycleBin_Constructor(IUnknown * pUnkOuter, REFIID riif, LPVOID *ppv);
+HRESULT WINAPI QueryAssociations_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppOutput);
+HRESULT WINAPI ExplorerBrowser_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv);
+HRESULT WINAPI KnownFolderManager_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv);
+extern HRESULT CPanel_GetIconLocationW(LPCITEMIDLIST, LPWSTR, UINT, int*);
HRESULT WINAPI CPanel_ExtractIconA(LPITEMIDLIST pidl, LPCSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize);
HRESULT WINAPI CPanel_ExtractIconW(LPITEMIDLIST pidl, LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize);
LPEXTRACTICONA IExtractIconA_Constructor(LPCITEMIDLIST);
LPEXTRACTICONW IExtractIconW_Constructor(LPCITEMIDLIST);
-HRESULT CreateStreamOnFile (LPCWSTR pszFilename, DWORD grfMode, IStream ** ppstm);
-
-/* FIXME: rename the functions when the shell32.dll has it's own exports namespace */
-HRESULT WINAPI SHELL32_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID * ppv);
-HRESULT WINAPI SHELL32_DllCanUnloadNow(void);
-
-
-/* menu merging */
-#define MM_ADDSEPARATOR 0x00000001L
-#define MM_SUBMENUSHAVEIDS 0x00000002L
-HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags);
/* initialisation for FORMATETC */
#define InitFormatEtc(fe, cf, med) \
};
#define KeyStateToDropEffect(kst)\
- (((kst) & MK_CONTROL) ?\
- (((kst) & MK_SHIFT) ? DROPEFFECT_LINK : DROPEFFECT_COPY):\
- DROPEFFECT_MOVE)
-
-/* Systray */
-BOOL SYSTRAY_Init(void);
+ ((((kst)&(MK_CONTROL|MK_SHIFT))==(MK_CONTROL|MK_SHIFT)) ? DROPEFFECT_LINK :\
+ (((kst)&(MK_CONTROL|MK_SHIFT)) ? DROPEFFECT_COPY :\
+ DROPEFFECT_MOVE))
HGLOBAL RenderHDROP(LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl);
HGLOBAL RenderSHELLIDLIST (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl);
-HGLOBAL RenderSHELLIDLISTOFFSET (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl);
-HGLOBAL RenderFILECONTENTS (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl);
-HGLOBAL RenderFILEDESCRIPTOR (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl);
HGLOBAL RenderFILENAMEA (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl);
HGLOBAL RenderFILENAMEW (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl);
-HGLOBAL RenderPREFEREDDROPEFFECT (DWORD dwFlags);
/* Change Notification */
void InitChangeNotifications(void);
#define ASK_DELETE_MULTIPLE_ITEM 3
#define ASK_CREATE_FOLDER 4
#define ASK_OVERWRITE_FILE 5
+#define ASK_DELETE_SELECTED 6
+#define ASK_TRASH_FILE 7
+#define ASK_TRASH_FOLDER 8
+#define ASK_TRASH_MULTIPLE_ITEM 9
+#define ASK_CANT_TRASH_ITEM 10
+#define ASK_OVERWRITE_FOLDER 11
-BOOL SHELL_DeleteDirectoryA(LPCSTR pszDir, BOOL bShowUI);
-BOOL SHELL_DeleteFileA(LPCSTR pszFile, BOOL bShowUI);
-BOOL SHELL_ConfirmDialog(int nKindOfDialog, LPCSTR szDir);
-
-/* 16-bit functions */
-void WINAPI DragAcceptFiles16(HWND16 hWnd, BOOL16 b);
-UINT16 WINAPI DragQueryFile16(HDROP16 hDrop, WORD wFile, LPSTR lpszFile, WORD wLength);
-void WINAPI DragFinish16(HDROP16 h);
-BOOL16 WINAPI DragQueryPoint16(HDROP16 hDrop, POINT16 *p);
-HINSTANCE16 WINAPI ShellExecute16(HWND16,LPCSTR,LPCSTR,LPCSTR,LPCSTR,INT16);
-HICON16 WINAPI ExtractIcon16(HINSTANCE16,LPCSTR,UINT16);
-HICON16 WINAPI ExtractAssociatedIcon16(HINSTANCE16,LPSTR,LPWORD);
-HICON16 WINAPI ExtractIconEx16 ( LPCSTR, INT16, HICON16 *, HICON16 *, UINT16 );
-HINSTANCE16 WINAPI FindExecutable16(LPCSTR,LPCSTR,LPSTR);
-HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16,LPCSTR,UINT16,WORD);
-BOOL16 WINAPI ShellAbout16(HWND16,LPCSTR,LPCSTR,HICON16);
-BOOL16 WINAPI AboutDlgProc16(HWND16,UINT16,WPARAM16,LPARAM);
-
-inline static BOOL SHELL_OsIsUnicode(void)
+BOOL SHELL_ConfirmYesNoW(HWND hWnd, int nKindOfDialog, LPCWSTR szDir);
+
+static inline BOOL SHELL_OsIsUnicode(void)
{
/* if high-bit of version is 0, we are emulating NT */
return !(GetVersion() & 0x80000000);
SHFree(*ptr); \
*ptr = NULL; \
};
-inline static void __SHCloneStrA(char ** target,const char * source)
+static inline void __SHCloneStrA(char ** target,const char * source)
{
*target = SHAlloc(strlen(source)+1);
strcpy(*target, source);
}
-inline static void __SHCloneStrWtoA(char ** target, const WCHAR * source)
+static inline void __SHCloneStrWtoA(char ** target, const WCHAR * source)
{
int len = WideCharToMultiByte(CP_ACP, 0, source, -1, NULL, 0, NULL, NULL);
*target = SHAlloc(len);
WideCharToMultiByte(CP_ACP, 0, source, -1, *target, len, NULL, NULL);
}
-inline static void __SHCloneStrW(WCHAR ** target, const WCHAR * source)
+static inline void __SHCloneStrW(WCHAR ** target, const WCHAR * source)
{
- *target = SHAlloc( (strlenW(source)+1) * sizeof(WCHAR) );
- strcpyW(*target, source);
+ *target = SHAlloc( (lstrlenW(source)+1) * sizeof(WCHAR) );
+ lstrcpyW(*target, source);
}
-inline static WCHAR * __SHCloneStrAtoW(WCHAR ** target, const char * source)
+static inline WCHAR * __SHCloneStrAtoW(WCHAR ** target, const char * source)
{
int len = MultiByteToWideChar(CP_ACP, 0, source, -1, NULL, 0);
*target = SHAlloc(len*sizeof(WCHAR));
return *target;
}
-/* handle conversions */
-#define HICON_16(h32) (LOWORD(h32))
-#define HICON_32(h16) ((HICON)(ULONG_PTR)(h16))
-#define HINSTANCE_32(h16) ((HINSTANCE)(ULONG_PTR)(h16))
-#define HINSTANCE_16(h32) (LOWORD(h32))
-
-typedef UINT (*SHELL_ExecuteW32)(const WCHAR *lpCmd, WCHAR *env, BOOL shWait,
- LPSHELLEXECUTEINFOW sei, LPSHELLEXECUTEINFOW sei_out);
-
-BOOL WINAPI ShellExecuteExW32(LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc);
-
-UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOperation,
- LPWSTR lpResult, int resultLen, LPWSTR key, WCHAR **env, LPITEMIDLIST pidl, LPCWSTR args);
extern WCHAR swShell32Name[MAX_PATH];
+BOOL UNIXFS_is_rooted_at_desktop(void);
extern const GUID CLSID_UnixFolder;
+extern const GUID CLSID_UnixDosFolder;
+
+extern BOOL run_winemenubuilder( const WCHAR *args );
/* Default shell folder value registration */
HRESULT SHELL_RegisterShellFolders(void);
+/* Detect Shell Links */
+BOOL SHELL_IsShortcut(LPCITEMIDLIST);
+
#endif