Commit a3b7a40f authored by Juergen Schmied's avatar Juergen Schmied Committed by Alexandre Julliard

- IShellFolder and IEnumIDList are using the new COM headers

- fixed sort order for folders and drives
parent 587729f7
...@@ -15,10 +15,12 @@ ...@@ -15,10 +15,12 @@
#include "commctrl.h" #include "commctrl.h"
#include "spy.h" #include "spy.h"
#include "shlobj.h"
#include "wine/obj_base.h" #include "wine/obj_base.h"
#include "wine/obj_enumidlist.h"
#include "wine/obj_shellfolder.h"
#include "shell.h" #include "shell.h"
#include "pidl.h" #include "pidl.h"
#include "shlobj.h"
#include "shell32_main.h" #include "shell32_main.h"
#include "shlguid.h" #include "shlguid.h"
...@@ -33,7 +35,7 @@ static void FillTreeView(LPSHELLFOLDER lpsf, LPITEMIDLIST lpifq, HTREEITEM hPar ...@@ -33,7 +35,7 @@ static void FillTreeView(LPSHELLFOLDER lpsf, LPITEMIDLIST lpifq, HTREEITEM hPar
static void InitializeTreeView(HWND hwndParent) static void InitializeTreeView(HWND hwndParent)
{ {
HIMAGELIST hImageList; HIMAGELIST hImageList;
LPSHELLFOLDER lpsf; IShellFolder * lpsf;
HRESULT hr; HRESULT hr;
hwndTreeView = GetDlgItem (hwndParent, IDD_TREEVIEW); hwndTreeView = GetDlgItem (hwndParent, IDD_TREEVIEW);
...@@ -45,7 +47,7 @@ static void InitializeTreeView(HWND hwndParent) ...@@ -45,7 +47,7 @@ static void InitializeTreeView(HWND hwndParent)
{ TreeView_SetImageList(hwndTreeView, hImageList, 0); { TreeView_SetImageList(hwndTreeView, hImageList, 0);
} }
hr=SHGetDesktopFolder(&lpsf); hr = SHGetDesktopFolder(&lpsf);
if (SUCCEEDED(hr) && hwndTreeView) if (SUCCEEDED(hr) && hwndTreeView)
{ TreeView_DeleteAllItems(hwndTreeView); { TreeView_DeleteAllItems(hwndTreeView);
...@@ -53,7 +55,7 @@ static void InitializeTreeView(HWND hwndParent) ...@@ -53,7 +55,7 @@ static void InitializeTreeView(HWND hwndParent)
} }
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ lpsf->lpvtbl->fnRelease(lpsf); { IShellFolder_Release(lpsf);
} }
} }
...@@ -85,7 +87,7 @@ static BOOL GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi, DWORD dwFlags, LPSTR l ...@@ -85,7 +87,7 @@ static BOOL GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi, DWORD dwFlags, LPSTR l
STRRET str; STRRET str;
TRACE(shell,"%p %p %lx %p\n", lpsf, lpi, dwFlags, lpFriendlyName); TRACE(shell,"%p %p %lx %p\n", lpsf, lpi, dwFlags, lpFriendlyName);
if (SUCCEEDED(lpsf->lpvtbl->fnGetDisplayNameOf(lpsf, lpi, dwFlags, &str))) if (SUCCEEDED(IShellFolder_GetDisplayNameOf(lpsf, lpi, dwFlags, &str)))
{ bSuccess = StrRetToStrN (lpFriendlyName, MAX_PATH, &str, lpi); { bSuccess = StrRetToStrN (lpFriendlyName, MAX_PATH, &str, lpi);
} }
else else
...@@ -95,12 +97,12 @@ static BOOL GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi, DWORD dwFlags, LPSTR l ...@@ -95,12 +97,12 @@ static BOOL GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi, DWORD dwFlags, LPSTR l
return bSuccess; return bSuccess;
} }
static void FillTreeView(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl, HTREEITEM hParent) static void FillTreeView(IShellFolder * lpsf, LPITEMIDLIST pidl, HTREEITEM hParent)
{ {
TVITEMA tvi; TVITEMA tvi;
TVINSERTSTRUCTA tvins; TVINSERTSTRUCTA tvins;
HTREEITEM hPrev = 0; HTREEITEM hPrev = 0;
LPENUMIDLIST lpe=0; LPENUMIDLIST lpe=0;
LPITEMIDLIST pidlTemp=0; LPITEMIDLIST pidlTemp=0;
LPTV_ITEMDATA lptvid=0; LPTV_ITEMDATA lptvid=0;
ULONG ulFetched; ULONG ulFetched;
...@@ -113,12 +115,12 @@ static void FillTreeView(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl, HTREEITEM hPare ...@@ -113,12 +115,12 @@ static void FillTreeView(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl, HTREEITEM hPare
SetCapture(GetParent(hwndTreeView)); SetCapture(GetParent(hwndTreeView));
SetCursor(LoadCursorA(0, IDC_WAITA)); SetCursor(LoadCursorA(0, IDC_WAITA));
hr=lpsf->lpvtbl->fnEnumObjects(lpsf,hwnd, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS,&lpe); hr=IShellFolder_EnumObjects(lpsf,hwnd, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS,&lpe);
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ while (NOERROR == lpe->lpvtbl->fnNext(lpe,1,&pidlTemp,&ulFetched)) { while (NOERROR == lpe->lpvtbl->fnNext(lpe,1,&pidlTemp,&ulFetched))
{ ULONG ulAttrs = SFGAO_HASSUBFOLDER | SFGAO_FOLDER; { ULONG ulAttrs = SFGAO_HASSUBFOLDER | SFGAO_FOLDER;
lpsf->lpvtbl->fnGetAttributesOf(lpsf, 1, &pidlTemp, &ulAttrs); IShellFolder_GetAttributesOf(lpsf, 1, &pidlTemp, &ulAttrs);
if (ulAttrs & (SFGAO_HASSUBFOLDER | SFGAO_FOLDER)) if (ulAttrs & (SFGAO_HASSUBFOLDER | SFGAO_FOLDER))
{ if (ulAttrs & SFGAO_FOLDER) { if (ulAttrs & SFGAO_FOLDER)
{ tvi.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM; { tvi.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM;
...@@ -138,7 +140,7 @@ static void FillTreeView(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl, HTREEITEM hPare ...@@ -138,7 +140,7 @@ static void FillTreeView(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl, HTREEITEM hPare
tvi.cchTextMax = MAX_PATH; tvi.cchTextMax = MAX_PATH;
tvi.lParam = (LPARAM)lptvid; tvi.lParam = (LPARAM)lptvid;
lpsf->lpvtbl->fnAddRef(lpsf); IShellFolder_AddRef(lpsf);
lptvid->lpsfParent = lpsf; lptvid->lpsfParent = lpsf;
lptvid->lpi = ILClone(pidlTemp); lptvid->lpi = ILClone(pidlTemp);
lptvid->lpifq = ILCombine(pidl, pidlTemp); lptvid->lpifq = ILCombine(pidl, pidlTemp);
...@@ -161,15 +163,17 @@ Done: ...@@ -161,15 +163,17 @@ Done:
ReleaseCapture(); ReleaseCapture();
SetCursor(LoadCursorA(0, IDC_ARROWA)); SetCursor(LoadCursorA(0, IDC_ARROWA));
if (lpe) lpe->lpvtbl->fnRelease(lpe); if (lpe)
if (pidlTemp ) SHFree(pidlTemp); lpe->lpvtbl->fnRelease(lpe);
if (pidlTemp )
SHFree(pidlTemp);
} }
static LRESULT MsgNotify(HWND hWnd, UINT CtlID, LPNMHDR lpnmh) static LRESULT MsgNotify(HWND hWnd, UINT CtlID, LPNMHDR lpnmh)
{ {
NMTREEVIEWA *pnmtv = (NMTREEVIEWA *)lpnmh; NMTREEVIEWA *pnmtv = (NMTREEVIEWA *)lpnmh;
LPTV_ITEMDATA lptvid; //Long pointer to TreeView item data LPTV_ITEMDATA lptvid; //Long pointer to TreeView item data
LPSHELLFOLDER lpsf2=0; IShellFolder * lpsf2=0;
TRACE(shell,"%x %x %p msg=%x\n", hWnd, CtlID, lpnmh, pnmtv->hdr.code); TRACE(shell,"%x %x %p msg=%x\n", hWnd, CtlID, lpnmh, pnmtv->hdr.code);
...@@ -180,7 +184,7 @@ static LRESULT MsgNotify(HWND hWnd, UINT CtlID, LPNMHDR lpnmh) ...@@ -180,7 +184,7 @@ static LRESULT MsgNotify(HWND hWnd, UINT CtlID, LPNMHDR lpnmh)
{ case TVN_DELETEITEM: { case TVN_DELETEITEM:
{ FIXME(shell,"TVN_DELETEITEM\n"); { FIXME(shell,"TVN_DELETEITEM\n");
lptvid=(LPTV_ITEMDATA)pnmtv->itemOld.lParam; lptvid=(LPTV_ITEMDATA)pnmtv->itemOld.lParam;
lptvid->lpsfParent->lpvtbl->fnRelease(lptvid->lpsfParent); IShellFolder_Release(lptvid->lpsfParent);
SHFree(lptvid->lpi); SHFree(lptvid->lpi);
SHFree(lptvid->lpifq); SHFree(lptvid->lpifq);
SHFree(lptvid); SHFree(lptvid);
...@@ -193,7 +197,7 @@ static LRESULT MsgNotify(HWND hWnd, UINT CtlID, LPNMHDR lpnmh) ...@@ -193,7 +197,7 @@ static LRESULT MsgNotify(HWND hWnd, UINT CtlID, LPNMHDR lpnmh)
break; break;
lptvid=(LPTV_ITEMDATA)pnmtv->itemNew.lParam; lptvid=(LPTV_ITEMDATA)pnmtv->itemNew.lParam;
if (SUCCEEDED(lptvid->lpsfParent->lpvtbl->fnBindToObject(lptvid->lpsfParent, lptvid->lpi,0,(REFIID)&IID_IShellFolder,(LPVOID *)&lpsf2))) if (SUCCEEDED(IShellFolder_BindToObject(lptvid->lpsfParent, lptvid->lpi,0,(REFIID)&IID_IShellFolder,(LPVOID *)&lpsf2)))
{ FillTreeView( lpsf2, lptvid->lpifq, pnmtv->itemNew.hItem ); { FillTreeView( lpsf2, lptvid->lpifq, pnmtv->itemNew.hItem );
} }
TreeView_SortChildren(hwndTreeView, pnmtv->itemNew.hItem, FALSE); TreeView_SortChildren(hwndTreeView, pnmtv->itemNew.hItem, FALSE);
......
...@@ -266,8 +266,8 @@ static HRESULT WINAPI IContextMenu_fnInvokeCommand(IContextMenu *iface, LPCMINVO ...@@ -266,8 +266,8 @@ static HRESULT WINAPI IContextMenu_fnInvokeCommand(IContextMenu *iface, LPCMINVO
break; break;
} }
pidlTemp = ILCombine(This->pSFParent->mpidl, This->aPidls[i]); pidlTemp = ILCombine(((IGenericSFImpl*)(This->pSFParent))->mpidl, This->aPidls[i]);
pidlFQ = ILCombine(This->pSFParent->pMyPidl, pidlTemp); pidlFQ = ILCombine(((IGenericSFImpl*)(This->pSFParent))->pMyPidl, pidlTemp);
SHFree(pidlTemp); SHFree(pidlTemp);
ZeroMemory(&sei, sizeof(sei)); ZeroMemory(&sei, sizeof(sei));
......
...@@ -177,6 +177,7 @@ static HRESULT WINAPI IEnumFORMATETC_fnClone(LPENUMFORMATETC iface, LPENUMFORMAT ...@@ -177,6 +177,7 @@ static HRESULT WINAPI IEnumFORMATETC_fnClone(LPENUMFORMATETC iface, LPENUMFORMAT
/*********************************************************************** /***********************************************************************
* IDataObject implementation * IDataObject implementation
*/ */
typedef struct typedef struct
{ {
/* IUnknown fields */ /* IUnknown fields */
...@@ -229,7 +230,7 @@ LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPSHELLFOLDER psf, LPITEMID ...@@ -229,7 +230,7 @@ LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPSHELLFOLDER psf, LPITEMID
dto->ref=1; dto->ref=1;
dto->lpvtbl=&dtovt; dto->lpvtbl=&dtovt;
dto->psf=psf; dto->psf=psf;
dto->pidl=ILClone(psf->pMyPidl); /* FIXME:add a reference and don't copy*/ dto->pidl=ILClone(((IGenericSFImpl*)psf)->pMyPidl); /* FIXME:add a reference and don't copy*/
/* fill the ItemID List List */ /* fill the ItemID List List */
dto->lpill = IDLList_Constructor (8); dto->lpill = IDLList_Constructor (8);
...@@ -326,7 +327,7 @@ static BOOL32 DATAOBJECT_InitFileGroupDesc(void) ...@@ -326,7 +327,7 @@ static BOOL32 DATAOBJECT_InitFileGroupDesc(void)
{ return(TRUE); { return(TRUE);
} }
cfFileGroupDesc = RegisterClipboardFormat32A(CFSTR_FILEDESCRIPTORA); cfFileGroupDesc = RegisterClipboardFormatA(CFSTR_FILEDESCRIPTORA);
return(cfFileGroupDesc != 0); return(cfFileGroupDesc != 0);
} }
*/ */
...@@ -342,7 +343,7 @@ static BOOL32 DATAOBJECT_InitFileContents(void) ...@@ -342,7 +343,7 @@ static BOOL32 DATAOBJECT_InitFileContents(void)
{ return(TRUE); { return(TRUE);
} }
cfFileContents = RegisterClipboardFormat32A(CFSTR_FILECONTENTS); cfFileContents = RegisterClipboardFormatA(CFSTR_FILECONTENTS);
return(cfFileContents != 0); return(cfFileContents != 0);
} }
*/ */
......
...@@ -74,7 +74,6 @@ HANDLE WINAPI SHFreeShared(HANDLE hmem, DWORD procID); ...@@ -74,7 +74,6 @@ HANDLE WINAPI SHFreeShared(HANDLE hmem, DWORD procID);
/**************************************************************************** /****************************************************************************
* Class constructors * Class constructors
*/ */
#ifdef __WINE__
extern LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPSHELLFOLDER psf, LPITEMIDLIST * apidl, UINT cidl); extern LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPSHELLFOLDER psf, LPITEMIDLIST * apidl, UINT cidl);
extern LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT, const FORMATETC []); extern LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT, const FORMATETC []);
...@@ -83,12 +82,23 @@ extern LPCLASSFACTORY IShellLinkW_CF_Constructor(void); ...@@ -83,12 +82,23 @@ extern LPCLASSFACTORY IShellLinkW_CF_Constructor(void);
extern LPCLASSFACTORY IClassFactory_Constructor(void); extern LPCLASSFACTORY IClassFactory_Constructor(void);
extern LPCONTEXTMENU IContextMenu_Constructor(LPSHELLFOLDER, LPCITEMIDLIST *, UINT); extern LPCONTEXTMENU IContextMenu_Constructor(LPSHELLFOLDER, LPCITEMIDLIST *, UINT);
extern LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER,LPITEMIDLIST);
extern LPSHELLVIEW IShellView_Constructor(LPSHELLFOLDER, LPCITEMIDLIST); extern LPSHELLVIEW IShellView_Constructor(LPSHELLFOLDER, LPCITEMIDLIST);
extern LPSHELLLINK IShellLink_Constructor(void); extern LPSHELLLINK IShellLink_Constructor(void);
extern LPSHELLLINKW IShellLinkW_Constructor(void); extern LPSHELLLINKW IShellLinkW_Constructor(void);
extern LPENUMIDLIST IEnumIDList_Constructor(LPCSTR,DWORD); extern LPENUMIDLIST IEnumIDList_Constructor(LPCSTR,DWORD);
extern LPEXTRACTICON IExtractIcon_Constructor(LPITEMIDLIST); extern LPEXTRACTICON IExtractIcon_Constructor(LPITEMIDLIST);
#endif
/* elements of this structure are accessed directly from within shell32 */
typedef struct
{
ICOM_VTABLE(IShellFolder)* lpvtbl;
DWORD ref;
ICOM_VTABLE(IPersistFolder)* lpvtblPersistFolder;
LPSTR sMyPath;
LPITEMIDLIST pMyPidl;
LPITEMIDLIST mpidl;
} IGenericSFImpl;
extern LPSHELLFOLDER IShellFolder_Constructor(IGenericSFImpl*,LPITEMIDLIST);
#endif #endif
...@@ -7,4 +7,17 @@ ...@@ -7,4 +7,17 @@
* *
*/ */
#define INITGUID #define INITGUID
#include "shlguid.h"
/* #include "shlguid.h" */
/*
* Francis Beaudet <francis@macadamian.com>
*
* I moved the contents of this file to the ole/guid.c file.
*
* I know that the purpose of this file being here is that it would
* separate the definitions reserved to the shell DLL into one place. *
However, until the shell DLL is a real DLL, as long as it is *
statically linked with the rest of wine, the initializer of it's * GUIDs
will have to be in the same place as everybody else. This is * the same
problem as with "real" Windows programs. */
...@@ -20,22 +20,18 @@ DEFINE_SHLGUID(IID_IShellBrowser, 0x000214E2L, 0, 0); ...@@ -20,22 +20,18 @@ DEFINE_SHLGUID(IID_IShellBrowser, 0x000214E2L, 0, 0);
DEFINE_SHLGUID(IID_IShellView, 0x000214E3L, 0, 0); DEFINE_SHLGUID(IID_IShellView, 0x000214E3L, 0, 0);
DEFINE_SHLGUID(IID_IContextMenu, 0x000214E4L, 0, 0); DEFINE_SHLGUID(IID_IContextMenu, 0x000214E4L, 0, 0);
DEFINE_SHLGUID(IID_IShellIcon, 0x000214E5L, 0, 0); DEFINE_SHLGUID(IID_IShellIcon, 0x000214E5L, 0, 0);
DEFINE_SHLGUID(IID_IShellFolder, 0x000214E6L, 0, 0);
DEFINE_SHLGUID(IID_IShellExtInit, 0x000214E8L, 0, 0); DEFINE_SHLGUID(IID_IShellExtInit, 0x000214E8L, 0, 0);
DEFINE_SHLGUID(IID_IShellPropSheetExt, 0x000214E9L, 0, 0); DEFINE_SHLGUID(IID_IShellPropSheetExt, 0x000214E9L, 0, 0);
DEFINE_SHLGUID(IID_IExtractIcon, 0x000214EBL, 0, 0); DEFINE_SHLGUID(IID_IExtractIcon, 0x000214EBL, 0, 0);
DEFINE_SHLGUID(IID_IShellLink, 0x000214EEL, 0, 0);
DEFINE_SHLGUID(IID_IShellCopyHook, 0x000214EFL, 0, 0); DEFINE_SHLGUID(IID_IShellCopyHook, 0x000214EFL, 0, 0);
DEFINE_SHLGUID(IID_IFileViewer, 0x000214F0L, 0, 0); DEFINE_SHLGUID(IID_IFileViewer, 0x000214F0L, 0, 0);
DEFINE_SHLGUID(IID_ICommDlgBrowser, 0x000214F1L, 0, 0); DEFINE_SHLGUID(IID_ICommDlgBrowser, 0x000214F1L, 0, 0);
DEFINE_SHLGUID(IID_IEnumIDList, 0x000214F2L, 0, 0);
DEFINE_SHLGUID(IID_IFileViewerSite, 0x000214F3L, 0, 0); DEFINE_SHLGUID(IID_IFileViewerSite, 0x000214F3L, 0, 0);
DEFINE_SHLGUID(IID_IContextMenu2, 0x000214F4L, 0, 0); DEFINE_SHLGUID(IID_IContextMenu2, 0x000214F4L, 0, 0);
DEFINE_SHLGUID(IID_IShellExecuteHookA, 0x000214F5L, 0, 0); DEFINE_SHLGUID(IID_IShellExecuteHookA, 0x000214F5L, 0, 0);
DEFINE_SHLGUID(IID_IPropSheetPage, 0x000214F6L, 0, 0); DEFINE_SHLGUID(IID_IPropSheetPage, 0x000214F6L, 0, 0);
DEFINE_SHLGUID(IID_INewShortcutHookW, 0x000214F7L, 0, 0); DEFINE_SHLGUID(IID_INewShortcutHookW, 0x000214F7L, 0, 0);
DEFINE_SHLGUID(IID_IFileViewerW, 0x000214F8L, 0, 0); DEFINE_SHLGUID(IID_IFileViewerW, 0x000214F8L, 0, 0);
DEFINE_SHLGUID(IID_IShellLinkW, 0x000214F9L, 0, 0);
DEFINE_SHLGUID(IID_IExtractIconW, 0x000214FAL, 0, 0); DEFINE_SHLGUID(IID_IExtractIconW, 0x000214FAL, 0, 0);
DEFINE_SHLGUID(IID_IShellExecuteHookW, 0x000214FBL, 0, 0); DEFINE_SHLGUID(IID_IShellExecuteHookW, 0x000214FBL, 0, 0);
DEFINE_SHLGUID(IID_IShellCopyHookW, 0x000214FCL, 0, 0); DEFINE_SHLGUID(IID_IShellCopyHookW, 0x000214FCL, 0, 0);
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "winbase.h" /* WIN32_FIND_* */ #include "winbase.h" /* WIN32_FIND_* */
#include "wine/obj_base.h" #include "wine/obj_base.h"
#include "wine/obj_shelllink.h" #include "wine/obj_shelllink.h"
#include "wine/obj_shellfolder.h"
#include "ole2.h" #include "ole2.h"
#include "shell.h" #include "shell.h"
#include "commctrl.h" #include "commctrl.h"
...@@ -26,36 +27,12 @@ DWORD WINAPI SHELL32_DllGetClassObject(REFCLSID,REFIID,LPVOID*); ...@@ -26,36 +27,12 @@ DWORD WINAPI SHELL32_DllGetClassObject(REFCLSID,REFIID,LPVOID*);
/* foreward declaration of the objects*/ /* foreward declaration of the objects*/
typedef struct IContextMenu IContextMenu, *LPCONTEXTMENU; typedef struct IContextMenu IContextMenu, *LPCONTEXTMENU;
typedef struct tagSHELLEXTINIT *LPSHELLEXTINIT,IShellExtInit; typedef struct tagSHELLEXTINIT *LPSHELLEXTINIT,IShellExtInit;
typedef struct tagENUMIDLIST *LPENUMIDLIST, IEnumIDList;
typedef struct tagSHELLFOLDER *LPSHELLFOLDER, IShellFolder;
typedef struct tagSHELLVIEW *LPSHELLVIEW, IShellView; typedef struct tagSHELLVIEW *LPSHELLVIEW, IShellView;
typedef struct tagSHELLBROWSER *LPSHELLBROWSER,IShellBrowser; typedef struct tagSHELLBROWSER *LPSHELLBROWSER,IShellBrowser;
typedef struct tagSHELLICON *LPSHELLICON, IShellIcon; typedef struct tagSHELLICON *LPSHELLICON, IShellIcon;
typedef struct tagDOCKINGWINDOWFRAME *LPDOCKINGWINDOWFRAME, IDockingWindowFrame; typedef struct tagDOCKINGWINDOWFRAME *LPDOCKINGWINDOWFRAME, IDockingWindowFrame;
typedef struct tagCOMMDLGBROWSER *LPCOMMDLGBROWSER, ICommDlgBrowser; typedef struct tagCOMMDLGBROWSER *LPCOMMDLGBROWSER, ICommDlgBrowser;
/****************************************************************************
* STRRET
*/
#define STRRET_WSTR 0x0000
#define STRRET_OFFSETA 0x0001
#define STRRET_CSTRA 0x0002
#define STRRET_ASTR 0X0003
#define STRRET_OFFSETW 0X0004
#define STRRET_CSTRW 0X0005
typedef struct _STRRET
{ UINT uType; /* STRRET_xxx */
union
{ LPWSTR pOleStr; /* OLESTR that will be freed */
LPSTR pStr;
UINT uOffset; /* OffsetINT32o SHITEMID (ANSI) */
char cStr[MAX_PATH]; /* Buffer to fill in */
WCHAR cStrW[MAX_PATH];
}u;
} STRRET,*LPSTRRET;
/***************************************************************************** /*****************************************************************************
* IContextMenu interface * IContextMenu interface
...@@ -270,46 +247,6 @@ struct tagSHELLEXTINIT ...@@ -270,46 +247,6 @@ struct tagSHELLEXTINIT
#undef THIS #undef THIS
/*****************************************************************************
* IEnumIDList interface
*/
#define THIS LPENUMIDLIST me
typedef struct tagENUMLIST
{ struct tagENUMLIST *pNext;
LPITEMIDLIST pidl;
} ENUMLIST, *LPENUMLIST;
typedef struct IEnumIDList_VTable
{ /* *** IUnknown methods *** */
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* *** IEnumIDList methods *** */
STDMETHOD(Next) (THIS_ ULONG celt,
LPITEMIDLIST *rgelt,
ULONG *pceltFetched) PURE;
STDMETHOD(Skip) (THIS_ ULONG celt) PURE;
STDMETHOD(Reset) (THIS) PURE;
STDMETHOD(Clone) (THIS_ IEnumIDList **ppenum) PURE;
/* *** private methods *** */
STDMETHOD_(BOOL,CreateEnumList)(THIS_ LPCSTR, DWORD) PURE;
STDMETHOD_(BOOL,AddToEnumList)(THIS_ LPITEMIDLIST) PURE;
STDMETHOD_(BOOL,DeleteList)(THIS) PURE;
} IEnumIDList_VTable,*LPENUMIDLIST_VTABLE;
struct tagENUMIDLIST
{ LPENUMIDLIST_VTABLE lpvtbl;
DWORD ref;
LPENUMLIST mpFirst;
LPENUMLIST mpLast;
LPENUMLIST mpCurrent;
};
#undef THIS
/*-------------------------------------------------------------------------- */ /*-------------------------------------------------------------------------- */
/* */ /* */
/* FOLDERSETTINGS */ /* FOLDERSETTINGS */
...@@ -357,86 +294,6 @@ typedef struct ...@@ -357,86 +294,6 @@ typedef struct
typedef const FOLDERSETTINGS * LPCFOLDERSETTINGS; typedef const FOLDERSETTINGS * LPCFOLDERSETTINGS;
/************************************************************************
* IShellFolder interface
*/
#define THIS LPSHELLFOLDER me
/* IShellFolder::GetDisplayNameOf/SetNameOf uFlags */
typedef enum
{ SHGDN_NORMAL = 0, /* default (display purpose) */
SHGDN_INFOLDER = 1, /* displayed under a folder (relative)*/
SHGDN_FORPARSING = 0x8000 /* for ParseDisplayName or path */
} SHGNO;
/* IShellFolder::EnumObjects */
typedef enum tagSHCONTF
{ SHCONTF_FOLDERS = 32, /* for shell browser */
SHCONTF_NONFOLDERS = 64, /* for default view */
SHCONTF_INCLUDEHIDDEN = 128 /* for hidden/system objects */
} SHCONTF;
/* IShellFolder::GetAttributesOf flags */
#define SFGAO_CANCOPY DROPEFFECT_COPY /* Objects can be copied */
#define SFGAO_CANMOVE DROPEFFECT_MOVE /* Objects can be moved */
#define SFGAO_CANLINK DROPEFFECT_LINK /* Objects can be linked */
#define SFGAO_CANRENAME 0x00000010L /* Objects can be renamed */
#define SFGAO_CANDELETE 0x00000020L /* Objects can be deleted */
#define SFGAO_HASPROPSHEET 0x00000040L /* Objects have property sheets */
#define SFGAO_DROPTARGET 0x00000100L /* Objects are drop target */
#define SFGAO_CAPABILITYMASK 0x00000177L
#define SFGAO_LINK 0x00010000L /* Shortcut (link) */
#define SFGAO_SHARE 0x00020000L /* shared */
#define SFGAO_READONLY 0x00040000L /* read-only */
#define SFGAO_GHOSTED 0x00080000L /* ghosted icon */
#define SFGAO_DISPLAYATTRMASK 0x000F0000L
#define SFGAO_FILESYSANCESTOR 0x10000000L /* It contains file system folder */
#define SFGAO_FOLDER 0x20000000L /* It's a folder. */
#define SFGAO_FILESYSTEM 0x40000000L /* is a file system thing (file/folder/root) */
#define SFGAO_HASSUBFOLDER 0x80000000L /* Expandable in the map pane */
#define SFGAO_CONTENTSMASK 0x80000000L
#define SFGAO_VALIDATE 0x01000000L /* invalidate cached information */
#define SFGAO_REMOVABLE 0x02000000L /* is this removeable media? */
typedef struct IShellFolder_VTable {
/* *** IUnknown methods *** */
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* *** IShellFolder methods *** */
STDMETHOD(ParseDisplayName) (THIS_ HWND hwndOwner,LPBC pbcReserved, LPOLESTR lpszDisplayName,ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
STDMETHOD(EnumObjects)( THIS_ HWND hwndOwner, DWORD grfFlags, LPENUMIDLIST * ppenumIDList) PURE;
STDMETHOD(BindToObject)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvOut) PURE;
STDMETHOD(BindToStorage)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD(CompareIDs)(THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
STDMETHOD(CreateViewObject)(THIS_ HWND hwndOwner, REFIID riid, LPVOID * ppvOut) PURE;
STDMETHOD(GetAttributesOf)(THIS_ UINT cidl, LPCITEMIDLIST * apidl,ULONG * rgfInOut) PURE;
STDMETHOD(GetUIObjectOf)(THIS_ HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl,REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) PURE;
STDMETHOD(GetDisplayNameOf)(THIS_ LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
STDMETHOD(SetNameOf)(THIS_ HWND hwndOwner, LPCITEMIDLIST pidl,LPCOLESTR lpszName, DWORD uFlags,LPITEMIDLIST * ppidlOut) PURE;
/* utility functions */
STDMETHOD_(BOOL,GetFolderPath)(THIS_ LPSTR, DWORD);
} *LPSHELLFOLDER_VTABLE,IShellFolder_VTable;
struct tagSHELLFOLDER {
LPSHELLFOLDER_VTABLE lpvtbl;
DWORD ref;
LPSTR sMyPath;
LPITEMIDLIST pMyPidl;
LPITEMIDLIST mpidl;
};
extern LPSHELLFOLDER pdesktopfolder;
/************************
* Shellfolder API
*/
DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *);
#undef THIS
/************************************************************************ /************************************************************************
* IShellBrowser interface * IShellBrowser interface
......
/*
* Defines the COM interfaces and APIs related to EnumIDList
*
* Depends on 'obj_base.h'.
*/
#ifndef __WINE_WINE_OBJ_ENUMIDLIST_H
#define __WINE_WINE_OBJ_ENUMIDLIST_H
#include "wine/obj_base.h"
#include "shell.h"
#include "winbase.h"
/*****************************************************************************
* Predeclare the interfaces
*/
DEFINE_SHLGUID(IID_IEnumIDList, 0x000214F2L, 0, 0);
typedef struct IEnumIDList IEnumIDList, *LPENUMIDLIST;
#define ICOM_INTERFACE IEnumIDList
#define IEnumIDList_METHODS \
ICOM_METHOD3(HRESULT, Next, ULONG, celt, LPITEMIDLIST*, rgelt, ULONG*, pceltFetched) \
ICOM_METHOD1(HRESULT, Skip, ULONG, celt) \
ICOM_METHOD (HRESULT, Reset) \
ICOM_METHOD1(HRESULT, Clone, IEnumIDList**, ppenum) \
ICOM_METHOD2(BOOL, CreateEnumList, LPCSTR,, DWORD,) \
ICOM_METHOD1(BOOL, AddToEnumList, LPITEMIDLIST,) \
ICOM_METHOD (BOOL, DeleteList)
#define IEnumIDList_IMETHODS \
IUnknown_IMETHODS \
IEnumIDList_METHODS
ICOM_DEFINE(IEnumIDList,IUnknown)
#undef ICOM_INTERFACE
#ifdef ICOM_CINTERFACE
/*** IUnknown methods ***/
#define IEnumIDList_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
#define IEnumIDList_AddRef(p) ICOM_CALL (AddRef,p)
#define IEnumIDList_Release(p) ICOM_CALL (Release,p)
/*** IEnumIDList methods ***/
#define IEnumIDList_Next(p,a,b,c) ICOM_CALL3(Next,p,a,b,c)
#define IEnumIDList_Skip(p,a) ICOM_CALL1(Skip,p,a)
#define IEnumIDList_Reset(p) ICOM_CALL(Reset,p)
#define IEnumIDList_Clone(p,a) ICOM_CALL1(Clone,p,a)
#define IEnumIDList_CreateEnumList(p,a,b) ICOM_CALL2(CreateEnumList,p,a,b)
#define IEnumIDList_AddToEnumList(p,a) ICOM_CALL1(AddToEnumList,p,a)
#define IEnumIDList_DeleteList(p) ICOM_CALL(DeleteList,p)
#endif
#endif /* __WINE_WINE_OBJ_ENUMIDLIST_H */
/*
* Defines the COM interfaces and APIs related to IShellFolder
*
* Depends on 'obj_base.h'.
*/
#ifndef __WINE_WINE_OBJ_SHELLFOLDER_H
#define __WINE_WINE_OBJ_SHELLFOLDER_H
#include "wine/obj_base.h"
#include "wine/obj_moniker.h" /* for LPBC */
#include "wine/obj_enumidlist.h"
#include "winbase.h"
#include "shell.h"
/****************************************************************************
* STRRET (temporary, move it away)
*/
#define STRRET_WSTR 0x0000
#define STRRET_OFFSETA 0x0001
#define STRRET_CSTRA 0x0002
#define STRRET_ASTR 0X0003
#define STRRET_OFFSETW 0X0004
#define STRRET_CSTRW 0X0005
typedef struct _STRRET
{ UINT uType; /* STRRET_xxx */
union
{ LPWSTR pOleStr; /* OLESTR that will be freed */
LPSTR pStr;
UINT uOffset; /* OffsetINT32o SHITEMID (ANSI) */
char cStr[MAX_PATH]; /* Buffer to fill in */
WCHAR cStrW[MAX_PATH];
}u;
} STRRET,*LPSTRRET;
/*****************************************************************************
* Predeclare the interfaces
*/
DEFINE_SHLGUID(IID_IShellFolder, 0x000214E6L, 0, 0);
typedef struct IShellFolder IShellFolder, *LPSHELLFOLDER;
DEFINE_SHLGUID(IID_IPersistFolder, 0x000214EAL, 0, 0);
typedef struct IPersistFolder IPersistFolder, *LPPERSISTFOLDER;
/*****************************************************************************
* IShellFolder::GetDisplayNameOf/SetNameOf uFlags
*/
typedef enum
{ SHGDN_NORMAL = 0, /* default (display purpose) */
SHGDN_INFOLDER = 1, /* displayed under a folder (relative)*/
SHGDN_FORPARSING = 0x8000 /* for ParseDisplayName or path */
} SHGNO;
/*****************************************************************************
* IShellFolder::EnumObjects
*/
typedef enum tagSHCONTF
{ SHCONTF_FOLDERS = 32, /* for shell browser */
SHCONTF_NONFOLDERS = 64, /* for default view */
SHCONTF_INCLUDEHIDDEN = 128 /* for hidden/system objects */
} SHCONTF;
/*****************************************************************************
* IShellFolder::GetAttributesOf flags
*/
#define SFGAO_CANCOPY DROPEFFECT_COPY /* Objects can be copied */
#define SFGAO_CANMOVE DROPEFFECT_MOVE /* Objects can be moved */
#define SFGAO_CANLINK DROPEFFECT_LINK /* Objects can be linked */
#define SFGAO_CANRENAME 0x00000010L /* Objects can be renamed */
#define SFGAO_CANDELETE 0x00000020L /* Objects can be deleted */
#define SFGAO_HASPROPSHEET 0x00000040L /* Objects have property sheets */
#define SFGAO_DROPTARGET 0x00000100L /* Objects are drop target */
#define SFGAO_CAPABILITYMASK 0x00000177L
#define SFGAO_LINK 0x00010000L /* Shortcut (link) */
#define SFGAO_SHARE 0x00020000L /* shared */
#define SFGAO_READONLY 0x00040000L /* read-only */
#define SFGAO_GHOSTED 0x00080000L /* ghosted icon */
#define SFGAO_DISPLAYATTRMASK 0x000F0000L
#define SFGAO_FILESYSANCESTOR 0x10000000L /* It contains file system folder */
#define SFGAO_FOLDER 0x20000000L /* It's a folder. */
#define SFGAO_FILESYSTEM 0x40000000L /* is a file system thing (file/folder/root) */
#define SFGAO_HASSUBFOLDER 0x80000000L /* Expandable in the map pane */
#define SFGAO_CONTENTSMASK 0x80000000L
#define SFGAO_VALIDATE 0x01000000L /* invalidate cached information */
#define SFGAO_REMOVABLE 0x02000000L /* is this removeable media? */
/************************************************************************
* Desktopfolder
*/
extern IShellFolder * pdesktopfolder;
DWORD WINAPI SHGetDesktopFolder(IShellFolder * *);
/*****************************************************************************
* IShellFolder interface
*/
#define ICOM_INTERFACE IShellFolder
#define IShellFolder_METHODS \
ICOM_METHOD6( HRESULT, ParseDisplayName, HWND, hwndOwner,LPBC, pbcReserved, LPOLESTR, lpszDisplayName, ULONG *, pchEaten, LPITEMIDLIST *, ppidl, ULONG *, pdwAttributes) \
ICOM_METHOD3( HRESULT, EnumObjects, HWND, hwndOwner, DWORD, grfFlags, LPENUMIDLIST *, ppenumIDList)\
ICOM_METHOD4( HRESULT, BindToObject, LPCITEMIDLIST, pidl, LPBC, pbcReserved, REFIID, riid, LPVOID *, ppvOut)\
ICOM_METHOD4( HRESULT, BindToStorage, LPCITEMIDLIST, pidl, LPBC, pbcReserved, REFIID, riid, LPVOID *, ppvObj)\
ICOM_METHOD3( HRESULT, CompareIDs, LPARAM, lParam, LPCITEMIDLIST, pidl1, LPCITEMIDLIST, pidl2)\
ICOM_METHOD3( HRESULT, CreateViewObject, HWND, hwndOwner, REFIID, riid, LPVOID *, ppvOut)\
ICOM_METHOD3( HRESULT, GetAttributesOf, UINT, cidl, LPCITEMIDLIST *, apidl, ULONG *, rgfInOut)\
ICOM_METHOD6( HRESULT, GetUIObjectOf, HWND, hwndOwner, UINT, cidl, LPCITEMIDLIST *, apidl, REFIID, riid, UINT *, prgfInOut, LPVOID *, ppvOut)\
ICOM_METHOD3( HRESULT, GetDisplayNameOf, LPCITEMIDLIST, pidl, DWORD, uFlags, LPSTRRET, lpName)\
ICOM_METHOD5( HRESULT, SetNameOf, HWND, hwndOwner, LPCITEMIDLIST, pidl,LPCOLESTR, lpszName, DWORD, uFlags,LPITEMIDLIST *, ppidlOut)\
ICOM_METHOD2( HRESULT, GetFolderPath, LPSTR, lpszOut, DWORD, dwOutSize)
#define IShellFolder_IMETHODS \
IUnknown_IMETHODS \
IShellFolder_METHODS
ICOM_DEFINE(IShellFolder,IUnknown)
#undef ICOM_INTERFACE
#ifdef ICOM_CINTERFACE
/*** IUnknown methods ***/
#define IShellFolder_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
#define IShellFolder_AddRef(p) ICOM_CALL (AddRef,p)
#define IShellFolder_Release(p) ICOM_CALL (Release,p)
/*** IShellFolder methods ***/
#define IShellFolder_ParseDisplayName(p,a,b,c,d,e,f) ICOM_CALL6(ParseDisplayName,p,a,b,c,d,e,f)
#define IShellFolder_EnumObjects(p,a,b,c) ICOM_CALL3(EnumObjects,p,a,b,c)
#define IShellFolder_BindToObject(p,a,b,c,d) ICOM_CALL4(BindToObject,p,a,b,c,d)
#define IShellFolder_BindToStorage(p,a,b,c,d) ICOM_CALL4(BindToStorage,p,a,b,c,d)
#define IShellFolder_CompareIDs(p,a,b,c) ICOM_CALL3(CompareIDs,p,a,b,c)
#define IShellFolder_CreateViewObject(p,a,b,c) ICOM_CALL3(CreateViewObject,p,a,b,c)
#define IShellFolder_GetAttributesOf(p,a,b,c) ICOM_CALL3(GetAttributesOf,p,a,b,c)
#define IShellFolder_GetUIObjectOf(p,a,b,c,d,e,f) ICOM_CALL6(GetUIObjectOf,p,a,b,c,d,e,f)
#define IShellFolder_GetDisplayNameOf(p,a,b,c) ICOM_CALL3(GetDisplayNameOf,p,a,b,c)
#define IShellFolder_SetNameOf(p,a,b,c,d,e) ICOM_CALL5(SetNameOf,p,a,b,c,d,e)
#define IShellFolder_GetFolderPath(p,a,b) ICOM_CALL2(GetDisplayNameOf,p,a,b)
#endif
/*****************************************************************************
* IPersistFolder interface
*/
#define ICOM_INTERFACE IPersistFolder
#define IPersistFolder_METHODS \
ICOM_METHOD1( HRESULT, Initialize, LPCITEMIDLIST, pidl)
#define IPersistFolder_IMETHODS \
IPersist_IMETHODS \
IPersistFolder_METHODS
ICOM_DEFINE(IPersistFolder, IPersist)
#undef ICOM_INTERFACE
#ifdef ICOM_CINTERFACE
/*** IUnknown methods ***/
#define IPersistFolder_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
#define IPersistFolder_AddRef(p) ICOM_CALL (AddRef,p)
#define IPersistFolder_Release(p) ICOM_CALL (Release,p)
/*** IPersist methods ***/
#define IPersistFolder_GetClassID(p,a) ICOM_CALL1(GetClassID,p,a)
/*** IPersistFolder methods ***/
#define IPersistFolder_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
#endif
#endif /* __WINE_WINE_OBJ_SHELLLINK_H */
...@@ -18,5 +18,7 @@ ...@@ -18,5 +18,7 @@
#include "dsound.h" #include "dsound.h"
#include "dplay.h" #include "dplay.h"
#include "vfw.h" #include "vfw.h"
#include "shlguid.h"
#include "shlobj.h"
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment