4 * Copyright 1997 Marcus Meissner
5 * Copyright 1998, 1999, 2002 Juergen Schmied
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #include "wine/port.h"
41 #include "wine/debug.h"
44 WINE_DEFAULT_DEBUG_CHANNEL (shell
);
46 /***********************************************************************
47 * IDropTargetHelper implementation
51 IDropTargetHelper IDropTargetHelper_iface
;
53 } IDropTargetHelperImpl
;
55 static const IDropTargetHelperVtbl vt_IDropTargetHelper
;
57 static inline IDropTargetHelperImpl
*impl_from_IDropTargetHelper(IDropTargetHelper
*iface
)
59 return CONTAINING_RECORD(iface
, IDropTargetHelperImpl
, IDropTargetHelper_iface
);
62 /**************************************************************************
63 * IDropTargetHelper_Constructor
65 HRESULT WINAPI
IDropTargetHelper_Constructor (IUnknown
* pUnkOuter
, REFIID riid
, LPVOID
* ppv
)
67 IDropTargetHelperImpl
*dth
;
69 TRACE ("unkOut=%p %s\n", pUnkOuter
, shdebugstr_guid (riid
));
74 return CLASS_E_NOAGGREGATION
;
76 dth
= LocalAlloc (LMEM_ZEROINIT
, sizeof (IDropTargetHelperImpl
));
77 if (!dth
) return E_OUTOFMEMORY
;
80 dth
->IDropTargetHelper_iface
.lpVtbl
= &vt_IDropTargetHelper
;
82 if (FAILED (IDropTargetHelper_QueryInterface (&dth
->IDropTargetHelper_iface
, riid
, ppv
))) {
87 TRACE ("--(%p)\n", dth
);
91 /**************************************************************************
92 * IDropTargetHelper_fnQueryInterface
94 static HRESULT WINAPI
IDropTargetHelper_fnQueryInterface (IDropTargetHelper
* iface
, REFIID riid
, LPVOID
* ppvObj
)
96 IDropTargetHelperImpl
*This
= impl_from_IDropTargetHelper(iface
);
98 TRACE ("(%p)->(%s,%p)\n", This
, shdebugstr_guid (riid
), ppvObj
);
102 if (IsEqualIID (riid
, &IID_IUnknown
) || IsEqualIID (riid
, &IID_IDropTargetHelper
)) {
103 *ppvObj
= &This
->IDropTargetHelper_iface
;
107 IUnknown_AddRef ((IUnknown
*) (*ppvObj
));
108 TRACE ("-- Interface: (%p)->(%p)\n", ppvObj
, *ppvObj
);
111 FIXME ("-- Interface: E_NOINTERFACE\n");
112 return E_NOINTERFACE
;
115 static ULONG WINAPI
IDropTargetHelper_fnAddRef (IDropTargetHelper
* iface
)
117 IDropTargetHelperImpl
*This
= impl_from_IDropTargetHelper(iface
);
118 ULONG refCount
= InterlockedIncrement(&This
->ref
);
120 TRACE ("(%p)->(count=%u)\n", This
, refCount
- 1);
125 static ULONG WINAPI
IDropTargetHelper_fnRelease (IDropTargetHelper
* iface
)
127 IDropTargetHelperImpl
*This
= impl_from_IDropTargetHelper(iface
);
128 ULONG refCount
= InterlockedDecrement(&This
->ref
);
130 TRACE ("(%p)->(count=%u)\n", This
, refCount
+ 1);
133 TRACE ("-- destroying (%p)\n", This
);
140 static HRESULT WINAPI
IDropTargetHelper_fnDragEnter (
141 IDropTargetHelper
* iface
,
143 IDataObject
* pDataObject
,
147 IDropTargetHelperImpl
*This
= impl_from_IDropTargetHelper(iface
);
148 FIXME ("(%p)->(%p %p %p 0x%08x)\n", This
,hwndTarget
, pDataObject
, ppt
, dwEffect
);
152 static HRESULT WINAPI
IDropTargetHelper_fnDragLeave (IDropTargetHelper
* iface
)
154 IDropTargetHelperImpl
*This
= impl_from_IDropTargetHelper(iface
);
155 FIXME ("(%p)->()\n", This
);
159 static HRESULT WINAPI
IDropTargetHelper_fnDragOver (IDropTargetHelper
* iface
, POINT
* ppt
, DWORD dwEffect
)
161 IDropTargetHelperImpl
*This
= impl_from_IDropTargetHelper(iface
);
162 FIXME ("(%p)->(%p 0x%08x)\n", This
, ppt
, dwEffect
);
166 static HRESULT WINAPI
IDropTargetHelper_fnDrop (IDropTargetHelper
* iface
, IDataObject
* pDataObject
, POINT
* ppt
, DWORD dwEffect
)
168 IDropTargetHelperImpl
*This
= impl_from_IDropTargetHelper(iface
);
169 FIXME ("(%p)->(%p %p 0x%08x)\n", This
, pDataObject
, ppt
, dwEffect
);
173 static HRESULT WINAPI
IDropTargetHelper_fnShow (IDropTargetHelper
* iface
, BOOL fShow
)
175 IDropTargetHelperImpl
*This
= impl_from_IDropTargetHelper(iface
);
176 FIXME ("(%p)->(%u)\n", This
, fShow
);
180 static const IDropTargetHelperVtbl vt_IDropTargetHelper
=
182 IDropTargetHelper_fnQueryInterface
,
183 IDropTargetHelper_fnAddRef
,
184 IDropTargetHelper_fnRelease
,
185 IDropTargetHelper_fnDragEnter
,
186 IDropTargetHelper_fnDragLeave
,
187 IDropTargetHelper_fnDragOver
,
188 IDropTargetHelper_fnDrop
,
189 IDropTargetHelper_fnShow