1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef _IDROPTARGET_HXX_ 24 #define _IDROPTARGET_HXX_ 25 26 #include "target.hxx" 27 28 class IDropTargetImpl: public IDropTarget 29 { 30 LONG m_nRefCount; 31 // Calls to IDropTarget functions are delegated to a DropTarget. 32 DropTarget& m_rDropTarget; 33 34 virtual ~IDropTargetImpl(); // delete is only called by IUnknown::Release 35 IDropTargetImpl( const IDropTargetImpl& ); 36 IDropTargetImpl& operator=( const IDropTargetImpl& ); 37 public: 38 IDropTargetImpl( DropTarget& pTarget); 39 40 // IDropTarget 41 virtual HRESULT STDMETHODCALLTYPE QueryInterface( 42 /* [in] */ REFIID riid, 43 /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); 44 45 virtual ULONG STDMETHODCALLTYPE AddRef( ); 46 47 virtual ULONG STDMETHODCALLTYPE Release( ); 48 49 virtual HRESULT STDMETHODCALLTYPE DragEnter( 50 /* [unique][in] */ IDataObject __RPC_FAR *pDataObj, 51 /* [in] */ DWORD grfKeyState, 52 /* [in] */ POINTL pt, 53 /* [out][in] */ DWORD __RPC_FAR *pdwEffect); 54 55 virtual HRESULT STDMETHODCALLTYPE DragOver( 56 /* [in] */ DWORD grfKeyState, 57 /* [in] */ POINTL pt, 58 /* [out][in] */ DWORD __RPC_FAR *pdwEffect); 59 60 virtual HRESULT STDMETHODCALLTYPE DragLeave( ) ; 61 62 virtual HRESULT STDMETHODCALLTYPE Drop( 63 /* [unique][in] */ IDataObject __RPC_FAR *pDataObj, 64 /* [in] */ DWORD grfKeyState, 65 /* [in] */ POINTL pt, 66 /* [out][in] */ DWORD __RPC_FAR *pdwEffect); 67 68 69 }; 70 #endif 71