diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/ecore/src/lib/ecore_win32/ecore_win32_dnd_drop_target.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/libraries/ecore/src/lib/ecore_win32/ecore_win32_dnd_drop_target.h b/libraries/ecore/src/lib/ecore_win32/ecore_win32_dnd_drop_target.h new file mode 100644 index 0000000..24c3de3 --- /dev/null +++ b/libraries/ecore/src/lib/ecore_win32/ecore_win32_dnd_drop_target.h | |||
@@ -0,0 +1,47 @@ | |||
1 | #ifndef __ECORE_WIN32_DND_DROP_TARGET_H__ | ||
2 | #define __ECORE_WIN32_DND_DROP_TARGET_H__ | ||
3 | |||
4 | |||
5 | #define WIN32_LEAN_AND_MEAN | ||
6 | #include <windows.h> | ||
7 | #undef WIN32_LEAN_AND_MEAN | ||
8 | #include <ole2.h> | ||
9 | |||
10 | #include "Ecore_Win32.h" | ||
11 | |||
12 | |||
13 | class DropTarget : public IDropTarget | ||
14 | { | ||
15 | private: | ||
16 | |||
17 | LONG ref_count_; | ||
18 | HWND window_; | ||
19 | bool allow_drop_; | ||
20 | Ecore_Win32_Dnd_DropTarget_Callback drop_callback_; | ||
21 | void *drop_callback_ptr_; | ||
22 | |||
23 | private: // internal helper function | ||
24 | |||
25 | DWORD DropEffect(DWORD grfKeyState, POINTL pt, DWORD dwAllowed); | ||
26 | bool QueryDataObject(IDataObject *pDataObject); | ||
27 | |||
28 | public: // structors | ||
29 | |||
30 | DropTarget(HWND hwnd, Ecore_Win32_Dnd_DropTarget_Callback callback, void *window_obj_ptr); | ||
31 | |||
32 | public: // IUnknown | ||
33 | |||
34 | HRESULT __stdcall QueryInterface(REFIID iid, void ** ppvObject); | ||
35 | ULONG __stdcall AddRef(); | ||
36 | ULONG __stdcall Release(); | ||
37 | |||
38 | public: // IDropTarget | ||
39 | |||
40 | HRESULT __stdcall DragEnter(IDataObject * pDataObject, DWORD grfKeyState, POINTL pt, DWORD * pdwEffect); | ||
41 | HRESULT __stdcall DragOver(DWORD grfKeyState, POINTL pt, DWORD * pdwEffect); | ||
42 | HRESULT __stdcall DragLeave(); | ||
43 | HRESULT __stdcall Drop(IDataObject * pDataObject, DWORD grfKeyState, POINTL pt, DWORD * pdwEffect); | ||
44 | }; | ||
45 | |||
46 | |||
47 | #endif /* __ECORE_WIN32_DND_DROP_TARGET_H__ */ | ||