Commit a3d0877e authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

shell32: Add a stub IShellFolderView for IShellView.

parent 9e80570a
......@@ -542,6 +542,34 @@ static void test_GetItemObject(void)
IShellFolder_Release(desktop);
}
static void test_IShellFolderView(void)
{
IShellFolderView *folderview;
IShellFolder *desktop;
IShellView *view;
HRESULT hr;
hr = SHGetDesktopFolder(&desktop);
ok(hr == S_OK, "got (0x%08x)\n", hr);
hr = IShellFolder_CreateViewObject(desktop, NULL, &IID_IShellView, (void**)&view);
ok(hr == S_OK, "got (0x%08x)\n", hr);
hr = IShellView_QueryInterface(view, &IID_IShellFolderView, (void**)&folderview);
if (hr != S_OK)
{
win_skip("IShellView doesn't provide IShellFolderView on this platform\n");
IShellView_Release(view);
IShellFolder_Release(desktop);
return;
}
IShellFolderView_Release(folderview);
IShellView_Release(view);
IShellFolder_Release(desktop);
}
START_TEST(shlview)
{
OleInitialize(NULL);
......@@ -551,6 +579,7 @@ START_TEST(shlview)
test_IShellView_CreateViewWindow();
test_IFolderView();
test_GetItemObject();
test_IShellFolderView();
OleUninitialize();
}
......@@ -24,6 +24,10 @@
#include <prsht.h>
#include <shlguid.h>
#ifdef WINE_NO_UNICODE_MACROS
#undef GetObject
#endif
#ifdef __cplusplus
extern "C" {
#endif /* defined(__cplusplus) */
......@@ -539,6 +543,95 @@ DECLARE_INTERFACE_(IShellFolderViewCB,IUnknown)
#define IShellFolderViewCB_MessageSFVCB(p,a,b,c) (p)->lpVtbl->MessageSFVCB(p,a,b,c)
#endif
/****************************************************************************
* IShellFolderView interface
*/
typedef struct _ITEMSPACING
{
int cxSmall;
int cySmall;
int cxLarge;
int cyLarge;
} ITEMSPACING;
#define INTERFACE IShellFolderView
DEFINE_GUID(IID_IShellFolderView,0x37a378c0,0xf82d,0x11ce,0xae,0x65,0x08,0x00,0x2b,0x2e,0x12,0x62);
DECLARE_INTERFACE_(IShellFolderView, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD_(HRESULT,QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IShellFolderView methods ***/
STDMETHOD(Rearrange) (THIS_ LPARAM lParamSort) PURE;
STDMETHOD(GetArrangeParam) (THIS_ LPARAM *plParamSort) PURE;
STDMETHOD(ArrangeGrid) (THIS) PURE;
STDMETHOD(AutoArrange) (THIS) PURE;
STDMETHOD(GetAutoArrange) (THIS) PURE;
STDMETHOD(AddObject) (THIS_ PITEMID_CHILD pidl, UINT *puItem) PURE;
STDMETHOD(GetObject) (THIS_ PITEMID_CHILD *ppidl, UINT uItem) PURE;
STDMETHOD(RemoveObject) (THIS_ PITEMID_CHILD pidl, UINT *puItem) PURE;
STDMETHOD(GetObjectCount) (THIS_ UINT *puCount) PURE;
STDMETHOD(SetObjectCount) (THIS_ UINT uCount, UINT dwFlags) PURE;
STDMETHOD(UpdateObject) (THIS_ PITEMID_CHILD pidlOld, PITEMID_CHILD pidlNew, UINT *puItem) PURE;
STDMETHOD(RefreshObject) (THIS_ PITEMID_CHILD pidl, UINT *puItem) PURE;
STDMETHOD(SetRedraw) (THIS_ BOOL bRedraw) PURE;
STDMETHOD(GetSelectedCount) (THIS_ UINT *puSelected) PURE;
STDMETHOD(GetSelectedObjects) (THIS_ PCITEMID_CHILD **pppidl, UINT *puItems) PURE;
STDMETHOD(IsDropOnSource) (THIS_ IDropTarget *pDropTarget) PURE;
STDMETHOD(GetDragPoint) (THIS_ POINT *ppt) PURE;
STDMETHOD(GetDropPoint) (THIS_ POINT *ppt) PURE;
STDMETHOD(MoveIcons) (THIS_ IDataObject *pDataObject) PURE;
STDMETHOD(SetItemPos) (THIS_ PCUITEMID_CHILD pidl, POINT *ppt) PURE;
STDMETHOD(IsBkDropTarget) (THIS_ IDropTarget *pDropTarget) PURE;
STDMETHOD(SetClipboard) (THIS_ BOOL bMove) PURE;
STDMETHOD(SetPoints) (THIS_ IDataObject *pDataObject) PURE;
STDMETHOD(GetItemSpacing) (THIS_ ITEMSPACING *pSpacing) PURE;
STDMETHOD(SetCallback) (THIS_ IShellFolderViewCB* pNewCB, IShellFolderViewCB** ppOldCB) PURE;
STDMETHOD(Select) ( THIS_ UINT dwFlags ) PURE;
STDMETHOD(QuerySupport) (THIS_ UINT * pdwSupport ) PURE;
STDMETHOD(SetAutomationObject)(THIS_ IDispatch* pdisp) PURE;
};
#undef INTERFACE
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
#define IShellFolderView_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IShellFolderView_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IShellFolderView_Release(p) (p)->lpVtbl->Release(p)
/*** IShellFolderView methods ***/
#define IShellFolderView_Rearrange(p,a) (p)->lpVtbl->Rearrange(p,a)
#define IShellFolderView_GetArrangeParam(p,a) (p)->lpVtbl->GetArrangeParam(p,a)
#define IShellFolderView_ArrangeGrid(p) (p)->lpVtbl->ArrangeGrid(p)
#define IShellFolderView_AutoArrange(p) (p)->lpVtbl->AutoArrange(p)
#define IShellFolderView_GetAutoArrange(p) (p)->lpVtbl->GetAutoArrange(p)
#define IShellFolderView_AddObject(p,a,b) (p)->lpVtbl->AddObject(p,a,b)
#define IShellFolderView_GetObject(p,a,b) (p)->lpVtbl->GetObject(p,a,b)
#define IShellFolderView_RemoveObject(p,a,b) (p)->lpVtbl->RemoveObject(p,a,b)
#define IShellFolderView_GetObjectCount(p,a) (p)->lpVtbl->GetObjectCount(p,a)
#define IShellFolderView_SetObjectCount(p,a,b) (p)->lpVtbl->SetObjectCount(p,a,b)
#define IShellFolderView_UpdateObject(p,a,b,c) (p)->lpVtbl->UpdateObject(p,a,b,c)
#define IShellFolderView_RefreshObject(p,a,b) (p)->lpVtbl->RefreshObject(p,a,b)
#define IShellFolderView_SetRedraw(p,a) (p)->lpVtbl->SetRedraw(p,a)
#define IShellFolderView_GetSelectedCount(p,a) (p)->lpVtbl->GetSelectedCount(p,a)
#define IShellFolderView_GetSelectedObjects(p,a,b) (p)->lpVtbl->GetSelectedObjects(p,a,b)
#define IShellFolderView_IsDropOnSource(p,a) (p)->lpVtbl->IsDropOnSource(p,a)
#define IShellFolderView_GetDragPoint(p,a) (p)->lpVtbl->GetDragPoint(p,a)
#define IShellFolderView_GetDropPoint(p,a) (p)->lpVtbl->GetDropPoint(p,a)
#define IShellFolderView_MoveIcons(p,a) (p)->lpVtbl->MoveIcons(p,a)
#define IShellFolderView_SetItemPos(p,a,b) (p)->lpVtbl->SetItemPos(p,a,b)
#define IShellFolderView_DropTarget(p,a) (p)->lpVtbl->DropTarget(p,a)
#define IShellFolderView_SetClipboard(p,a) (p)->lpVtbl->SetClipboard(p,a)
#define IShellFolderView_SetPoints(p,a) (p)->lpVtbl->SetPoints(p,a)
#define IShellFolderView_GetItemSpacing(p,a) (p)->lpVtbl->GetItemSpacing(p,a)
#define IShellFolderView_SetCallback(p,a) (p)->lpVtbl->SetCallback(p,a)
#define IShellFolderView_Select(p,a) (p)->lpVtbl->Select(p,a)
#define IShellFolderView_QuerySupport(p,a) (p)->lpVtbl->QuerySupport(p,a)
#define IShellFolderView_SetAutomationObject(p,a) (p)->lpVtbl->SetAutomationObject(p,a)
#endif
/* IProgressDialog interface */
#define PROGDLG_NORMAL 0x00000000
#define PROGDLG_MODAL 0x00000001
......
......@@ -35,6 +35,7 @@ typedef struct _ITEMIDLIST
} ITEMIDLIST,*LPITEMIDLIST;
typedef const ITEMIDLIST *LPCITEMIDLIST;
typedef LPITEMIDLIST PITEMID_CHILD;
typedef const PITEMID_CHILD PCITEMID_CHILD;
typedef LPCITEMIDLIST PCUITEMID_CHILD;
typedef LPCITEMIDLIST *PCUITEMID_CHILD_ARRAY;
cpp_quote("#include <poppack.h>")
......
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