mirror of
https://github.com/reactos/wine.git
synced 2025-02-08 21:27:31 +00:00
shell32: Stub IFolderView implementation for IShellView instance.
This commit is contained in:
parent
f4bce098ea
commit
8032ae7047
@ -57,6 +57,7 @@
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "shlobj.h"
|
||||
#include "shobjidl.h"
|
||||
#include "undocshell.h"
|
||||
#include "shresdef.h"
|
||||
#include "wine/debug.h"
|
||||
@ -84,6 +85,7 @@ typedef struct
|
||||
const IDropTargetVtbl* lpvtblDropTarget;
|
||||
const IDropSourceVtbl* lpvtblDropSource;
|
||||
const IViewObjectVtbl* lpvtblViewObject;
|
||||
const IFolderViewVtbl* lpvtblFolderView;
|
||||
IShellFolder* pSFParent;
|
||||
IShellFolder2* pSF2Parent;
|
||||
IShellBrowser* pShellBrowser;
|
||||
@ -114,7 +116,7 @@ static const IOleCommandTargetVtbl ctvt;
|
||||
static const IDropTargetVtbl dtvt;
|
||||
static const IDropSourceVtbl dsvt;
|
||||
static const IViewObjectVtbl vovt;
|
||||
|
||||
static const IFolderViewVtbl fviewvt;
|
||||
|
||||
static inline IShellViewImpl *impl_from_IOleCommandTarget( IOleCommandTarget *iface )
|
||||
{
|
||||
@ -136,6 +138,11 @@ static inline IShellViewImpl *impl_from_IViewObject( IViewObject *iface )
|
||||
return (IShellViewImpl *)((char*)iface - FIELD_OFFSET(IShellViewImpl, lpvtblViewObject));
|
||||
}
|
||||
|
||||
static inline IShellViewImpl *impl_from_IFolderView( IFolderView *iface )
|
||||
{
|
||||
return (IShellViewImpl *)((char*)iface - FIELD_OFFSET(IShellViewImpl, lpvtblFolderView));
|
||||
}
|
||||
|
||||
/* ListView Header ID's */
|
||||
#define LISTVIEW_COLUMN_NAME 0
|
||||
#define LISTVIEW_COLUMN_SIZE 1
|
||||
@ -192,6 +199,7 @@ IShellView * IShellView_Constructor( IShellFolder * pFolder)
|
||||
sv->lpvtblDropTarget=&dtvt;
|
||||
sv->lpvtblDropSource=&dsvt;
|
||||
sv->lpvtblViewObject=&vovt;
|
||||
sv->lpvtblFolderView=&fviewvt;
|
||||
|
||||
sv->pSFParent = pFolder;
|
||||
if(pFolder) IShellFolder_AddRef(pFolder);
|
||||
@ -1692,6 +1700,10 @@ static HRESULT WINAPI IShellView_fnQueryInterface(IShellView2 * iface,REFIID rii
|
||||
{
|
||||
*ppvObj = This;
|
||||
}
|
||||
else if(IsEqualIID(riid, &IID_IFolderView))
|
||||
{
|
||||
*ppvObj = &This->lpvtblFolderView;
|
||||
}
|
||||
else if(IsEqualIID(riid, &IID_IOleCommandTarget))
|
||||
{
|
||||
*ppvObj = &This->lpvtblOleCommandTarget;
|
||||
@ -2658,3 +2670,148 @@ static const IViewObjectVtbl vovt =
|
||||
ISVViewObject_SetAdvise,
|
||||
ISVViewObject_GetAdvise
|
||||
};
|
||||
|
||||
/* IFolderView */
|
||||
static HRESULT WINAPI IFView_QueryInterface(
|
||||
IFolderView *iface,
|
||||
REFIID riid,
|
||||
LPVOID *ppvObj)
|
||||
{
|
||||
IShellViewImpl *This = impl_from_IFolderView(iface);
|
||||
TRACE("(%p)->(IID:%s,%p)\n", This, debugstr_guid(riid), ppvObj);
|
||||
return IShellView2_QueryInterface((IShellView2*)This, riid, ppvObj);
|
||||
}
|
||||
|
||||
static ULONG WINAPI IFView_AddRef( IFolderView *iface)
|
||||
{
|
||||
IShellViewImpl *This = impl_from_IFolderView(iface);
|
||||
TRACE("(%p)->(count=%u)\n", This, This->ref);
|
||||
return IShellView2_AddRef((IShellView2*)This);
|
||||
}
|
||||
|
||||
static ULONG WINAPI IFView_Release( IFolderView *iface)
|
||||
{
|
||||
IShellViewImpl *This = impl_from_IFolderView(iface);
|
||||
TRACE("(%p)->(count=%u)\n", This, This->ref);
|
||||
return IShellView2_Release((IShellView2*)This);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IFView_GetCurrentViewMode(IFolderView *iface, UINT *mode)
|
||||
{
|
||||
IShellViewImpl *This = impl_from_IFolderView(iface);
|
||||
FIXME("(%p)->(%p), stub\n", This, mode);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IFView_SetCurrentViewMode(IFolderView *iface, UINT mode)
|
||||
{
|
||||
IShellViewImpl *This = impl_from_IFolderView(iface);
|
||||
FIXME("(%p)->(%u), stub\n", This, mode);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IFView_GetFolder(IFolderView *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
IShellViewImpl *This = impl_from_IFolderView(iface);
|
||||
FIXME("(%p)->(%s, %p), stub\n", This, debugstr_guid(riid), ppv);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IFView_Item(IFolderView *iface, int index, PITEMID_CHILD *ppidl)
|
||||
{
|
||||
IShellViewImpl *This = impl_from_IFolderView(iface);
|
||||
FIXME("(%p)->(%d %p), stub\n", This, index, ppidl);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IFView_ItemCount(IFolderView *iface, UINT flags, int *items)
|
||||
{
|
||||
IShellViewImpl *This = impl_from_IFolderView(iface);
|
||||
FIXME("(%p)->(%u %p), stub\n", This, flags, items);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IFView_Items(IFolderView *iface, UINT flags, REFIID riid, void **ppv)
|
||||
{
|
||||
IShellViewImpl *This = impl_from_IFolderView(iface);
|
||||
FIXME("(%p)->(%u %s %p), stub\n", This, flags, debugstr_guid(riid), ppv);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IFView_GetSelectionMarkedItem(IFolderView *iface, int *item)
|
||||
{
|
||||
IShellViewImpl *This = impl_from_IFolderView(iface);
|
||||
FIXME("(%p)->(%p), stub\n", This, item);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IFView_GetFocusedItem(IFolderView *iface, int *item)
|
||||
{
|
||||
IShellViewImpl *This = impl_from_IFolderView(iface);
|
||||
FIXME("(%p)->(%p), stub\n", This, item);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IFView_GetItemPosition(IFolderView *iface, PCUITEMID_CHILD pidl, POINT *ppt)
|
||||
{
|
||||
IShellViewImpl *This = impl_from_IFolderView(iface);
|
||||
FIXME("(%p)->(%p %p), stub\n", This, pidl, ppt);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IFView_GetSpacing(IFolderView *iface, POINT *pt)
|
||||
{
|
||||
IShellViewImpl *This = impl_from_IFolderView(iface);
|
||||
FIXME("(%p)->(%p), stub\n", This, pt);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IFView_GetDefaultSpacing(IFolderView *iface, POINT *pt)
|
||||
{
|
||||
IShellViewImpl *This = impl_from_IFolderView(iface);
|
||||
FIXME("(%p)->(%p), stub\n", This, pt);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IFView_GetAutoArrange(IFolderView *iface)
|
||||
{
|
||||
IShellViewImpl *This = impl_from_IFolderView(iface);
|
||||
FIXME("(%p), stub\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IFView_SelectItem(IFolderView *iface, int item, DWORD flags)
|
||||
{
|
||||
IShellViewImpl *This = impl_from_IFolderView(iface);
|
||||
FIXME("(%p)->(%d, %x), stub\n", This, item, flags);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IFView_SelectAndPositionItems(IFolderView *iface, UINT cidl,
|
||||
PCUITEMID_CHILD_ARRAY apidl, POINT *apt, DWORD flags)
|
||||
{
|
||||
IShellViewImpl *This = impl_from_IFolderView(iface);
|
||||
FIXME("(%p)->(%u %p %p %x), stub\n", This, cidl, apidl, apt, flags);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const IFolderViewVtbl fviewvt =
|
||||
{
|
||||
IFView_QueryInterface,
|
||||
IFView_AddRef,
|
||||
IFView_Release,
|
||||
IFView_GetCurrentViewMode,
|
||||
IFView_SetCurrentViewMode,
|
||||
IFView_GetFolder,
|
||||
IFView_Item,
|
||||
IFView_ItemCount,
|
||||
IFView_Items,
|
||||
IFView_GetSelectionMarkedItem,
|
||||
IFView_GetFocusedItem,
|
||||
IFView_GetItemPosition,
|
||||
IFView_GetSpacing,
|
||||
IFView_GetDefaultSpacing,
|
||||
IFView_GetAutoArrange,
|
||||
IFView_SelectItem,
|
||||
IFView_SelectAndPositionItems
|
||||
};
|
||||
|
@ -535,6 +535,52 @@ cpp_quote("#include <poppack.h>")
|
||||
);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* IFolderView interface
|
||||
*/
|
||||
[
|
||||
uuid(cde725b0-ccc9-4519-917e-325d72fab4ce),
|
||||
object,
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IFolderView : IUnknown
|
||||
{
|
||||
HRESULT GetCurrentViewMode( [out] UINT *mode );
|
||||
HRESULT SetCurrentViewMode( [in] UINT mode );
|
||||
HRESULT GetFolder( [in] REFIID riid, [out, iid_is(riid)] void **ppv );
|
||||
HRESULT Item(
|
||||
[in] int index,
|
||||
[out] PITEMID_CHILD *ppidl
|
||||
);
|
||||
HRESULT ItemCount(
|
||||
[in] UINT flags,
|
||||
[out] int *items
|
||||
);
|
||||
HRESULT Items(
|
||||
[in] UINT flags,
|
||||
[in] REFIID riid,
|
||||
[out, iid_is(riid)] void **ppv
|
||||
);
|
||||
HRESULT GetSelectionMarkedItem( [out] int *item );
|
||||
HRESULT GetFocusedItem( [out] int *item );
|
||||
HRESULT GetItemPosition(
|
||||
[in] PCUITEMID_CHILD pidl,
|
||||
[out] POINT* ppt
|
||||
);
|
||||
HRESULT GetSpacing( [in, out, unique] POINT* pt );
|
||||
HRESULT GetDefaultSpacing( [out] POINT* pt );
|
||||
HRESULT GetAutoArrange();
|
||||
HRESULT SelectItem(
|
||||
[in] int item,
|
||||
[in] DWORD flags
|
||||
);
|
||||
HRESULT SelectAndPositionItems(
|
||||
[in] UINT cidl,
|
||||
[in, size_is(cidl)] PCUITEMID_CHILD_ARRAY apidl,
|
||||
[in, unique, size_is(cidl)] POINT* apt,
|
||||
[in] DWORD flags
|
||||
);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* IShellBrowser interface
|
||||
|
@ -34,6 +34,9 @@ typedef struct _ITEMIDLIST
|
||||
SHITEMID mkid; /* first itemid in list */
|
||||
} ITEMIDLIST,*LPITEMIDLIST;
|
||||
typedef const ITEMIDLIST *LPCITEMIDLIST;
|
||||
typedef LPITEMIDLIST PITEMID_CHILD;
|
||||
typedef LPCITEMIDLIST PCUITEMID_CHILD;
|
||||
typedef LPCITEMIDLIST *PCUITEMID_CHILD_ARRAY;
|
||||
cpp_quote("#include <poppack.h>")
|
||||
|
||||
#ifndef MAX_PATH
|
||||
|
Loading…
x
Reference in New Issue
Block a user