Simplified COM interface declarations, removing the need to define
[wine] / include / wine / obj_dragdrop.h
1 /*
2  * Defines the COM interfaces and APIs related to OLE Drag and Drop.
3  *
4  * Copyright (C) 1999 Francis Beaudet
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #ifndef __WINE_WINE_OBJ_DRAGDROP_H
22 #define __WINE_WINE_OBJ_DRAGDROP_H
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif /* defined(__cplusplus) */
27
28 /*****************************************************************************
29  * Predeclare the interfaces
30  */
31 DEFINE_OLEGUID(IID_IDropSource, 0x00000121L, 0, 0);
32 typedef struct IDropSource IDropSource,*LPDROPSOURCE;
33
34 DEFINE_OLEGUID(IID_IDropTarget, 0x00000122L, 0, 0);
35 typedef struct IDropTarget IDropTarget,*LPDROPTARGET;
36
37 /*****************************************************************************
38  * DROPEFFECT enumeration
39  */
40 #define MK_ALT (0x20)
41 #define DROPEFFECT_NONE         0
42 #define DROPEFFECT_COPY         1
43 #define DROPEFFECT_MOVE         2
44 #define DROPEFFECT_LINK         4
45 #define DROPEFFECT_SCROLL       0x80000000
46 #define DD_DEFSCROLLINSET 11
47 #define DD_DEFSCROLLDELAY 50
48 #define DD_DEFSCROLLINTERVAL 50
49 #define DD_DEFDRAGDELAY   50
50 #define DD_DEFDRAGMINDIST  2
51
52 /*****************************************************************************
53  * IDropSource interface
54  */
55 #define INTERFACE IDropSource
56 #define IDropSource_METHODS \
57     IUnknown_METHODS \
58     STDMETHOD(QueryContinueDrag)(THIS_ BOOL  fEscapePressed, DWORD  grfKeyState) PURE; \
59     STDMETHOD(GiveFeedback)(THIS_ DWORD  dwEffect) PURE;
60 ICOM_DEFINE(IDropSource,IUnknown)
61 #undef INTERFACE
62
63 #ifdef COBJMACROS
64 /*** IUnknown methods ***/
65 #define IDropSource_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
66 #define IDropSource_AddRef(p)             (p)->lpVtbl->AddRef(p)
67 #define IDropSource_Release(p)            (p)->lpVtbl->Release(p)
68 /*** IDropSource methods ***/
69 #define IDropSource_QueryContinueDrag(p,a,b) (p)->lpVtbl->QueryContinueDrag(p,a,b)
70 #define IDropSource_GiveFeedback(p,a)        (p)->lpVtbl->GiveFeedback(p,a)
71 #endif
72
73 /*****************************************************************************
74  * IDropTarget interface
75  */
76 #define INTERFACE IDropTarget
77 #define IDropTarget_METHODS \
78     IUnknown_METHODS \
79     STDMETHOD(DragEnter)(THIS_ IDataObject * pDataObject, DWORD  grfKeyState, POINTL  pt, DWORD * pdwEffect) PURE; \
80     STDMETHOD(DragOver)(THIS_ DWORD  grfKeyState, POINTL  pt, DWORD * pdwEffect) PURE; \
81     STDMETHOD(DragLeave)(THIS) PURE; \
82     STDMETHOD(Drop)(THIS_ IDataObject * pDataObject, DWORD  grfKeyState, POINTL  pt, DWORD * pdwEffect) PURE;
83 ICOM_DEFINE(IDropTarget,IUnknown)
84 #undef INTERFACE
85
86 #ifdef COBJMACROS
87 /*** IUnknown methods ***/
88 #define IDropTarget_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
89 #define IDropTarget_AddRef(p)             (p)->lpVtbl->AddRef(p)
90 #define IDropTarget_Release(p)            (p)->lpVtbl->Release(p)
91 /*** IDropTarget methods ***/
92 #define IDropTarget_DragEnter(p,a,b,c,d)  (p)->lpVtbl->DragEnter(p,a,b,c,d)
93 #define IDropTarget_DragOver(p,a,b,c)     (p)->lpVtbl->DragOver(p,a,b,c)
94 #define IDropTarget_DragLeave(p)          (p)->lpVtbl->DragLeave(p)
95 #define IDropTarget_Drop(p,a,b,c,d)       (p)->lpVtbl->Drop(p,a,b,c,d)
96 #endif
97
98 #ifdef __cplusplus
99 } /* extern "C" */
100 #endif /* defined(__cplusplus) */
101
102 #endif /*  __WINE_WINE_OBJ_DRAGDROP_H */