1*004e0838SKatayama Hirofumi MZ /*
2*004e0838SKatayama Hirofumi MZ  * PROJECT:     sendmail
3*004e0838SKatayama Hirofumi MZ  * LICENSE:     LGPL-2.1+ (https://spdx.org/licenses/LGPL-2.1+)
4*004e0838SKatayama Hirofumi MZ  * PURPOSE:     DeskLink implementation
5*004e0838SKatayama Hirofumi MZ  * COPYRIGHT:   Copyright 2019 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
6*004e0838SKatayama Hirofumi MZ  */
7*004e0838SKatayama Hirofumi MZ 
8*004e0838SKatayama Hirofumi MZ #ifndef _CDESKLINKDROPHANDLER_HPP_
9*004e0838SKatayama Hirofumi MZ #define _CDESKLINKDROPHANDLER_HPP_
10*004e0838SKatayama Hirofumi MZ 
11*004e0838SKatayama Hirofumi MZ #include "resource.h"
12*004e0838SKatayama Hirofumi MZ 
13*004e0838SKatayama Hirofumi MZ class CDeskLinkDropHandler :
14*004e0838SKatayama Hirofumi MZ     public CComCoClass<CDeskLinkDropHandler, &CLSID_DeskLinkDropHandler>,
15*004e0838SKatayama Hirofumi MZ     public CComObjectRootEx<CComMultiThreadModelNoCS>,
16*004e0838SKatayama Hirofumi MZ     public IDropTarget,
17*004e0838SKatayama Hirofumi MZ     public IPersistFile
18*004e0838SKatayama Hirofumi MZ {
19*004e0838SKatayama Hirofumi MZ public:
20*004e0838SKatayama Hirofumi MZ     CDeskLinkDropHandler();
21*004e0838SKatayama Hirofumi MZ     ~CDeskLinkDropHandler();
22*004e0838SKatayama Hirofumi MZ 
23*004e0838SKatayama Hirofumi MZ     // IDropTarget
24*004e0838SKatayama Hirofumi MZ     STDMETHODIMP DragEnter(IDataObject *pDataObject, DWORD dwKeyState,
25*004e0838SKatayama Hirofumi MZ                            POINTL pt, DWORD *pdwEffect);
26*004e0838SKatayama Hirofumi MZ     STDMETHODIMP DragOver(DWORD dwKeyState, POINTL pt, DWORD *pdwEffect);
27*004e0838SKatayama Hirofumi MZ     STDMETHODIMP DragLeave();
28*004e0838SKatayama Hirofumi MZ     STDMETHODIMP Drop(IDataObject *pDataObject, DWORD dwKeyState, POINTL pt,
29*004e0838SKatayama Hirofumi MZ                       DWORD *pdwEffect);
30*004e0838SKatayama Hirofumi MZ 
31*004e0838SKatayama Hirofumi MZ     // IPersist
32*004e0838SKatayama Hirofumi MZ     STDMETHODIMP GetClassID(CLSID *lpClassId);
33*004e0838SKatayama Hirofumi MZ 
34*004e0838SKatayama Hirofumi MZ     // IPersistFile
35*004e0838SKatayama Hirofumi MZ     STDMETHODIMP GetCurFile(LPOLESTR *ppszFileName);
36*004e0838SKatayama Hirofumi MZ     STDMETHODIMP IsDirty();
37*004e0838SKatayama Hirofumi MZ     STDMETHODIMP Load(LPCOLESTR pszFileName, DWORD dwMode);
38*004e0838SKatayama Hirofumi MZ     STDMETHODIMP Save(LPCOLESTR pszFileName, BOOL fRemember);
39*004e0838SKatayama Hirofumi MZ     STDMETHODIMP SaveCompleted(LPCOLESTR pszFileName);
40*004e0838SKatayama Hirofumi MZ 
41*004e0838SKatayama Hirofumi MZ     DECLARE_REGISTRY_RESOURCEID(IDR_DESKLINK)
42*004e0838SKatayama Hirofumi MZ     DECLARE_NOT_AGGREGATABLE(CDeskLinkDropHandler)
43*004e0838SKatayama Hirofumi MZ 
44*004e0838SKatayama Hirofumi MZ     DECLARE_PROTECT_FINAL_CONSTRUCT()
45*004e0838SKatayama Hirofumi MZ 
46*004e0838SKatayama Hirofumi MZ     BEGIN_COM_MAP(CDeskLinkDropHandler)
47*004e0838SKatayama Hirofumi MZ         COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist)
48*004e0838SKatayama Hirofumi MZ         COM_INTERFACE_ENTRY_IID(IID_IPersistFile, IPersistFile)
49*004e0838SKatayama Hirofumi MZ         COM_INTERFACE_ENTRY_IID(IID_IDropTarget, IDropTarget)
50*004e0838SKatayama Hirofumi MZ     END_COM_MAP()
51*004e0838SKatayama Hirofumi MZ };
52*004e0838SKatayama Hirofumi MZ 
53*004e0838SKatayama Hirofumi MZ #endif /* _CDESKLINKDROPHANDLER_HPP_ */
54