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"
36 #include "wine/obj_dragdrophelper.h"
37 #include "wine/debug.h"
40 WINE_DEFAULT_DEBUG_CHANNEL (shell
);
42 /***********************************************************************
43 * IDropTargetHelper implementation
47 ICOM_VFIELD (IDropTargetHelper
);
49 } IDropTargetHelperImpl
;
51 static struct ICOM_VTABLE (IDropTargetHelper
) vt_IDropTargetHelper
;
53 #define _IUnknown_(This) (IUnknown*)&(This->lpVtbl)
54 #define _IDropTargetHelper_(This) (IDropTargetHelper*)&(This->lpVtbl)
56 /**************************************************************************
57 * IDropTargetHelper_Constructor
59 HRESULT WINAPI
IDropTargetHelper_Constructor (IUnknown
* pUnkOuter
, REFIID riid
, LPVOID
* ppv
)
61 IDropTargetHelperImpl
*dth
;
63 TRACE ("unkOut=%p %s\n", pUnkOuter
, shdebugstr_guid (riid
));
68 return CLASS_E_NOAGGREGATION
;
70 dth
= (IDropTargetHelperImpl
*) LocalAlloc (GMEM_ZEROINIT
, sizeof (IDropTargetHelperImpl
));
71 if (!dth
) return E_OUTOFMEMORY
;
74 ICOM_VTBL (dth
) = &vt_IDropTargetHelper
;
76 if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (dth
), riid
, ppv
))) {
77 IUnknown_Release (_IUnknown_ (dth
));
81 TRACE ("--(%p)\n", dth
);
85 /**************************************************************************
86 * IDropTargetHelper_fnQueryInterface
88 static HRESULT WINAPI
IDropTargetHelper_fnQueryInterface (IDropTargetHelper
* iface
, REFIID riid
, LPVOID
* ppvObj
)
90 ICOM_THIS (IDropTargetHelperImpl
, iface
);
92 TRACE ("(%p)->(%s,%p)\n", This
, shdebugstr_guid (riid
), ppvObj
);
96 if (IsEqualIID (riid
, &IID_IUnknown
) || IsEqualIID (riid
, &IID_IDropTargetHelper
)) {
101 IUnknown_AddRef ((IUnknown
*) (*ppvObj
));
102 TRACE ("-- Interface: (%p)->(%p)\n", ppvObj
, *ppvObj
);
105 FIXME ("-- Interface: E_NOINTERFACE\n");
106 return E_NOINTERFACE
;
109 static ULONG WINAPI
IDropTargetHelper_fnAddRef (IDropTargetHelper
* iface
)
111 ICOM_THIS (IDropTargetHelperImpl
, iface
);
113 TRACE ("(%p)->(count=%lu)\n", This
, This
->ref
);
115 return ++(This
->ref
);
118 static ULONG WINAPI
IDropTargetHelper_fnRelease (IDropTargetHelper
* iface
)
120 ICOM_THIS (IDropTargetHelperImpl
, iface
);
122 TRACE ("(%p)->(count=%lu)\n", This
, This
->ref
);
124 if (!--(This
->ref
)) {
125 TRACE ("-- destroying (%p)\n", This
);
126 LocalFree ((HLOCAL
) This
);
131 static HRESULT WINAPI
IDropTargetHelper_fnDragEnter (
132 IDropTargetHelper
* iface
,
134 IDataObject
* pDataObject
,
138 ICOM_THIS (IDropTargetHelperImpl
, iface
);
139 FIXME ("(%p)->(0x%x %p %p 0x%08lx)\n", This
,hwndTarget
, pDataObject
, ppt
, dwEffect
);
143 static HRESULT WINAPI
IDropTargetHelper_fnDragLeave (IDropTargetHelper
* iface
)
145 ICOM_THIS (IDropTargetHelperImpl
, iface
);
146 FIXME ("(%p)->()\n", This
);
150 static HRESULT WINAPI
IDropTargetHelper_fnDragOver (IDropTargetHelper
* iface
, POINT
* ppt
, DWORD dwEffect
)
152 ICOM_THIS (IDropTargetHelperImpl
, iface
);
153 FIXME ("(%p)->(%p 0x%08lx)\n", This
, ppt
, dwEffect
);
157 static HRESULT WINAPI
IDropTargetHelper_fnDrop (IDropTargetHelper
* iface
, IDataObject
* pDataObject
, POINT
* ppt
, DWORD dwEffect
)
159 ICOM_THIS (IDropTargetHelperImpl
, iface
);
160 FIXME ("(%p)->(%p %p 0x%08lx)\n", This
, pDataObject
, ppt
, dwEffect
);
164 static HRESULT WINAPI
IDropTargetHelper_fnShow (IDropTargetHelper
* iface
, BOOL fShow
)
166 ICOM_THIS (IDropTargetHelperImpl
, iface
);
167 FIXME ("(%p)->(%u)\n", This
, fShow
);
171 static ICOM_VTABLE (IDropTargetHelper
) vt_IDropTargetHelper
=
173 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
174 IDropTargetHelper_fnQueryInterface
,
175 IDropTargetHelper_fnAddRef
,
176 IDropTargetHelper_fnRelease
,
177 IDropTargetHelper_fnDragEnter
,
178 IDropTargetHelper_fnDragLeave
,
179 IDropTargetHelper_fnDragOver
,
180 IDropTargetHelper_fnDrop
,
181 IDropTargetHelper_fnShow