Module: wine Branch: master Commit: 6419969c386ef4103e20290b2846275967022b5c URL: http://source.winehq.org/git/wine.git/?a=commit;h=6419969c386ef4103e20290b28...
Author: Michael Stefaniuc mstefani@redhat.de Date: Wed Aug 31 14:16:37 2011 +0200
shell32: Move ISvBgCm_Constructor() to avoid a forward declaration.
---
dlls/shell32/shv_bg_cmenu.c | 36 +++++++++++++++--------------------- 1 files changed, 15 insertions(+), 21 deletions(-)
diff --git a/dlls/shell32/shv_bg_cmenu.c b/dlls/shell32/shv_bg_cmenu.c index 7b9e6c6..b67dc4d 100644 --- a/dlls/shell32/shv_bg_cmenu.c +++ b/dlls/shell32/shv_bg_cmenu.c @@ -49,33 +49,12 @@ typedef struct UINT verb_offset; } BgCmImpl;
- -static const IContextMenu2Vtbl cmvt; - static inline BgCmImpl *impl_from_IContextMenu2(IContextMenu2 *iface) { return CONTAINING_RECORD(iface, BgCmImpl, IContextMenu2_iface); }
/************************************************************************** -* ISVBgCm_Constructor() -*/ -IContextMenu2 *ISvBgCm_Constructor(IShellFolder* pSFParent, BOOL bDesktop) -{ - BgCmImpl* cm; - - cm = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(BgCmImpl)); - cm->IContextMenu2_iface.lpVtbl = &cmvt; - cm->ref = 1; - cm->pSFParent = pSFParent; - cm->bDesktop = bDesktop; - if(pSFParent) IShellFolder_AddRef(pSFParent); - - TRACE("(%p)->()\n",cm); - return &cm->IContextMenu2_iface; -} - -/************************************************************************** * ISVBgCm_fnQueryInterface */ static HRESULT WINAPI ISVBgCm_fnQueryInterface(IContextMenu2 *iface, REFIID riid, LPVOID *ppvObj) @@ -461,3 +440,18 @@ static const IContextMenu2Vtbl cmvt = ISVBgCm_fnGetCommandString, ISVBgCm_fnHandleMenuMsg }; + +IContextMenu2 *ISvBgCm_Constructor(IShellFolder *pSFParent, BOOL bDesktop) +{ + BgCmImpl *cm; + + cm = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*cm)); + cm->IContextMenu2_iface.lpVtbl = &cmvt; + cm->ref = 1; + cm->pSFParent = pSFParent; + cm->bDesktop = bDesktop; + if(pSFParent) IShellFolder_AddRef(pSFParent); + + TRACE("(%p)->()\n", cm); + return &cm->IContextMenu2_iface; +}