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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #include "wine/port.h"
34 #include "wine/obj_dragdrophelper.h"
35 #include "wine/debug.h"
38 WINE_DEFAULT_DEBUG_CHANNEL (shell
);
40 /***********************************************************************
41 * IDropTargetHelper implementation
45 ICOM_VFIELD (IDropTargetHelper
);
47 } IDropTargetHelperImpl
;
49 static struct ICOM_VTABLE (IDropTargetHelper
) vt_IDropTargetHelper
;
51 #define _IUnknown_(This) (IUnknown*)&(This->lpVtbl)
52 #define _IDropTargetHelper_(This) (IDropTargetHelper*)&(This->lpVtbl)
54 /**************************************************************************
55 * IDropTargetHelper_Constructor
57 HRESULT WINAPI
IDropTargetHelper_Constructor (IUnknown
* pUnkOuter
, REFIID riid
, LPVOID
* ppv
)
59 IDropTargetHelperImpl
*dth
;
61 TRACE ("unkOut=%p %s\n", pUnkOuter
, shdebugstr_guid (riid
));
66 return CLASS_E_NOAGGREGATION
;
68 dth
= (IDropTargetHelperImpl
*) LocalAlloc (GMEM_ZEROINIT
, sizeof (IDropTargetHelperImpl
));
69 if (!dth
) return E_OUTOFMEMORY
;
72 ICOM_VTBL (dth
) = &vt_IDropTargetHelper
;
74 if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (dth
), riid
, ppv
))) {
75 IUnknown_Release (_IUnknown_ (dth
));
79 TRACE ("--(%p)\n", dth
);
83 /**************************************************************************
84 * IDropTargetHelper_fnQueryInterface
86 static HRESULT WINAPI
IDropTargetHelper_fnQueryInterface (IDropTargetHelper
* iface
, REFIID riid
, LPVOID
* ppvObj
)
88 ICOM_THIS (IDropTargetHelperImpl
, iface
);
90 TRACE ("(%p)->(%s,%p)\n", This
, shdebugstr_guid (riid
), ppvObj
);
94 if (IsEqualIID (riid
, &IID_IUnknown
) || IsEqualIID (riid
, &IID_IDropTargetHelper
)) {
99 IUnknown_AddRef ((IUnknown
*) (*ppvObj
));
100 TRACE ("-- Interface: (%p)->(%p)\n", ppvObj
, *ppvObj
);
103 FIXME ("-- Interface: E_NOINTERFACE\n");
104 return E_NOINTERFACE
;
107 static ULONG WINAPI
IDropTargetHelper_fnAddRef (IDropTargetHelper
* iface
)
109 ICOM_THIS (IDropTargetHelperImpl
, iface
);
111 TRACE ("(%p)->(count=%lu)\n", This
, This
->ref
);
113 return ++(This
->ref
);
116 static ULONG WINAPI
IDropTargetHelper_fnRelease (IDropTargetHelper
* iface
)
118 ICOM_THIS (IDropTargetHelperImpl
, iface
);
120 TRACE ("(%p)->(count=%lu)\n", This
, This
->ref
);
122 if (!--(This
->ref
)) {
123 TRACE("-- destroying (%p)\n", This
);
124 LocalFree ((HLOCAL
) This
);
130 static HRESULT WINAPI
IDropTargetHelper_fnDragEnter (
131 IDropTargetHelper
* iface
,
133 IDataObject
* pDataObject
,
137 ICOM_THIS (IDropTargetHelperImpl
, iface
);
138 FIXME ("(%p)->(%p %p %p 0x%08lx)\n", This
,hwndTarget
, pDataObject
, ppt
, dwEffect
);
142 static HRESULT WINAPI
IDropTargetHelper_fnDragLeave (IDropTargetHelper
* iface
)
144 ICOM_THIS (IDropTargetHelperImpl
, iface
);
145 FIXME ("(%p)->()\n", This
);
149 static HRESULT WINAPI
IDropTargetHelper_fnDragOver (IDropTargetHelper
* iface
, POINT
* ppt
, DWORD dwEffect
)
151 ICOM_THIS (IDropTargetHelperImpl
, iface
);
152 FIXME ("(%p)->(%p 0x%08lx)\n", This
, ppt
, dwEffect
);
156 static HRESULT WINAPI
IDropTargetHelper_fnDrop (IDropTargetHelper
* iface
, IDataObject
* pDataObject
, POINT
* ppt
, DWORD dwEffect
)
158 ICOM_THIS (IDropTargetHelperImpl
, iface
);
159 FIXME ("(%p)->(%p %p 0x%08lx)\n", This
, pDataObject
, ppt
, dwEffect
);
163 static HRESULT WINAPI
IDropTargetHelper_fnShow (IDropTargetHelper
* iface
, BOOL fShow
)
165 ICOM_THIS (IDropTargetHelperImpl
, iface
);
166 FIXME ("(%p)->(%u)\n", This
, fShow
);
170 static ICOM_VTABLE (IDropTargetHelper
) vt_IDropTargetHelper
=
172 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
173 IDropTargetHelper_fnQueryInterface
,
174 IDropTargetHelper_fnAddRef
,
175 IDropTargetHelper_fnRelease
,
176 IDropTargetHelper_fnDragEnter
,
177 IDropTargetHelper_fnDragLeave
,
178 IDropTargetHelper_fnDragOver
,
179 IDropTargetHelper_fnDrop
,
180 IDropTargetHelper_fnShow