]> git.sesse.net Git - vlc/blob - modules/gui/skins2/win32/win32_dragdrop.hpp
add_bool: remove callback parameter
[vlc] / modules / gui / skins2 / win32 / win32_dragdrop.hpp
1 /*****************************************************************************
2  * win32_dragdrop.hpp
3  *****************************************************************************
4  * Copyright (C) 2003 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
8  *          Olivier Teulière <ipkiss@via.ecp.fr>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License along
21  * with this program; if not, write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23  *****************************************************************************/
24
25 #ifndef WIN32_DRAGDROP_HPP
26 #define WIN32_DRAGDROP_HPP
27
28 #include <shellapi.h>
29 #include <ole2.h>
30 #include "../src/skin_common.hpp"
31
32
33 class Win32DragDrop: public SkinObject, public IDropTarget
34 {
35 public:
36    Win32DragDrop( intf_thread_t *pIntf, bool playOnDrop );
37    virtual ~Win32DragDrop() { }
38
39 protected:
40     // IUnknown methods
41     STDMETHOD(QueryInterface)( REFIID riid, void FAR* FAR* ppvObj );
42     STDMETHOD_(ULONG, AddRef)();
43     STDMETHOD_(ULONG, Release)();
44
45     // IDropTarget methods
46     STDMETHOD(DragEnter)( LPDATAOBJECT pDataObj, DWORD grfKeyState,
47                           POINTL pt, DWORD *pdwEffect );
48     STDMETHOD(DragOver)( DWORD grfKeyState, POINTL pt, DWORD *pdwEffect );
49     STDMETHOD(DragLeave)();
50     STDMETHOD(Drop)( LPDATAOBJECT pDataObj, DWORD grfKeyState,
51                      POINTL pt, DWORD *pdwEffect );
52
53 private:
54     /// Internal reference counter
55     unsigned long m_references;
56     /// Indicates whether the file(s) must be played immediately
57     bool m_playOnDrop;
58
59     /// Helper function
60     void HandleDrop( HDROP HDrop );
61 };
62
63
64 #endif