]> git.sesse.net Git - vlc/blob - modules/gui/win32/dragdrop.h
* compilation fix
[vlc] / modules / gui / win32 / dragdrop.h
1 /*****************************************************************************\r
2  * dragdrop.h: drag and drop management\r
3  *****************************************************************************\r
4  * Copyright (C) 2002 VideoLAN\r
5  *\r
6  * Authors: Olivier Teuliere <ipkiss@via.ecp.fr>\r
7  *\r
8  * This program is free software; you can redistribute it and/or modify\r
9  * it under the terms of the GNU General Public License as published by\r
10  * the Free Software Foundation; either version 2 of the License, or\r
11  * (at your option) any later version.\r
12  *\r
13  * This program is distributed in the hope that it will be useful,\r
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
16  * GNU General Public License for more details.\r
17  *\r
18  * You should have received a copy of the GNU General Public License\r
19  * along with this program; if not, write to the Free Software\r
20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.\r
21  *****************************************************************************/\r
22 \r
23 #ifndef dragdropH\r
24 #define dragdropH\r
25 //---------------------------------------------------------------------------\r
26 #include <ole2.h>\r
27 \r
28 #define WM_OLEDROP WM_USER + 1\r
29 //---------------------------------------------------------------------------\r
30 \r
31 class TDropTarget : public IDropTarget\r
32 {\r
33 public:\r
34    __fastcall TDropTarget( HWND HForm );\r
35    __fastcall ~TDropTarget();\r
36 \r
37 protected:\r
38     /* IUnknown methods */\r
39     STDMETHOD(QueryInterface)( REFIID riid, void FAR* FAR* ppvObj );\r
40     STDMETHOD_(ULONG, AddRef)();\r
41     STDMETHOD_(ULONG, Release)();\r
42 \r
43     /* IDropTarget methods */\r
44     STDMETHOD(DragEnter)( LPDATAOBJECT pDataObj, DWORD grfKeyState,\r
45                           POINTL pt, DWORD *pdwEffect );\r
46     STDMETHOD(DragOver)( DWORD grfKeyState, POINTL pt, DWORD *pdwEffect );\r
47     STDMETHOD(DragLeave)();\r
48     STDMETHOD(Drop)( LPDATAOBJECT pDataObj, DWORD grfKeyState,\r
49                      POINTL pt, DWORD *pdwEffect );\r
50 \r
51 private:\r
52     unsigned long References;\r
53     HWND FormHandle;\r
54 \r
55     /* helper function */\r
56     void __fastcall HandleDrop( HDROP HDrop );\r
57 };\r
58 //---------------------------------------------------------------------------\r
59 #endif\r