aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_win32/ecore_win32_dnd_data_object.h
blob: 4350bc5b7e1f1681a35d65b4fd47b65d37334c69 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef __ECORE_WIN32_DND_DATA_OBJECT_H__
#define __ECORE_WIN32_DND_DATA_OBJECT_H__


#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
#include <objbase.h>


class DataObject : public IDataObject
{
 private:

   LONG       ref_count_;
   int        formats_num_;
   FORMATETC *format_etc_;
   STGMEDIUM *stg_medium_;

 private: // internal helper function

   int lookup_format_etc(FORMATETC *format_etc);

 public: // structors

   DataObject(FORMATETC *fmtetc, STGMEDIUM *stgmed, int count);
   virtual ~DataObject();

 public: // IUnknown

   HRESULT __stdcall QueryInterface(REFIID iid, void **ppvObject);
   ULONG   __stdcall AddRef();
   ULONG   __stdcall Release();

 public: // IDataObject

   HRESULT __stdcall GetData(FORMATETC *pFormatEtc, STGMEDIUM *pmedium);
   HRESULT __stdcall GetDataHere(FORMATETC *pFormatEtc, STGMEDIUM *pmedium);
   HRESULT __stdcall QueryGetData(FORMATETC *pFormatEtc);
   HRESULT __stdcall GetCanonicalFormatEtc(FORMATETC *pFormatEct, FORMATETC *pFormatEtcOut);
   HRESULT __stdcall SetData(FORMATETC *pFormatEtc, STGMEDIUM *pMedium,  BOOL fRelease);
   HRESULT __stdcall EnumFormatEtc(DWORD dwDirection, IEnumFORMATETC **ppEnumFormatEtc);
   HRESULT __stdcall DAdvise(FORMATETC *pFormatEtc,  DWORD advf, IAdviseSink *, DWORD *);
   HRESULT __stdcall DUnadvise(DWORD dwConnection);
   HRESULT __stdcall EnumDAdvise(IEnumSTATDATA **ppEnumAdvise);
};


#endif /* __ECORE_WIN32_DND_DATA_OBJECT_H__ */