2 * Defines the COM interfaces and APIs related to OLE Drag and Drop.
5 #ifndef __WINE_WINE_OBJ_DRAGDROP_H
6 #define __WINE_WINE_OBJ_DRAGDROP_H
10 #include "wine/obj_base.h"
11 #include "wine/obj_dataobject.h"
13 /*****************************************************************************
14 * Predeclare the interfaces
16 DEFINE_OLEGUID(IID_IDropSource, 0x00000121L, 0, 0);
17 typedef struct IDropSource IDropSource,*LPDROPSOURCE;
19 DEFINE_OLEGUID(IID_IDropTarget, 0x00000122L, 0, 0);
20 typedef struct IDropTarget IDropTarget,*LPDROPTARGET;
22 /*****************************************************************************
23 * DROPEFFECT enumeration
26 #define DROPEFFECT_NONE 0
27 #define DROPEFFECT_COPY 1
28 #define DROPEFFECT_MOVE 2
29 #define DROPEFFECT_LINK 4
30 #define DROPEFFECT_SCROLL 0x80000000
31 #define DD_DEFSCROLLINSET 11
32 #define DD_DEFSCROLLDELAY 50
33 #define DD_DEFSCROLLINTERVAL 50
34 #define DD_DEFDRAGDELAY 50
35 #define DD_DEFDRAGMINDIST 2
37 /*****************************************************************************
38 * IDropSource interface
40 #define ICOM_INTERFACE IDropSource
41 #define IDropSource_METHODS \
42 ICOM_METHOD2(HRESULT, QueryContinueDrag, BOOL, fEscapePressed, DWORD, grfKeyState) \
43 ICOM_METHOD1(HRESULT, GiveFeedback, DWORD, dwEffect)
44 #define IDropSource_IMETHODS \
45 ICOM_INHERITS(IDropSource,IUnknown)
46 ICOM_DEFINE(IDropSource,IUnknown)
49 #ifdef ICOM_CINTERFACE
50 /*** IUnknown methods ***/
51 #define IDropSource_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
52 #define IDropSource_AddRef(p) ICOM_CALL (AddRef,p)
53 #define IDropSource_Release(p) ICOM_CALL (Release,p)
54 /*** IDropTarget methods ***/
55 #define IDropSource_QueryContinueDrag(p,a,b) ICOM_CALL2(QueryContinueDrag,p,a,b)
56 #define IDropSource_GiveFeedback(p,a) ICOM_CALL1(GiveFeedback,p,a)
59 /*****************************************************************************
60 * IDropTarget interface
62 #define ICOM_INTERFACE IDropTarget
63 #define IDropTarget_METHODS \
64 ICOM_METHOD4(HRESULT, DragEnter, IDataObject*, pDataObject, DWORD, grfKeyState, POINTL, pt, DWORD*, pdwEffect) \
65 ICOM_METHOD3(HRESULT, DragOver, DWORD, grfKeyState, POINTL, pt, DWORD*, pdwEffect) \
66 ICOM_METHOD(HRESULT, DragLeave) \
67 ICOM_METHOD4(HRESULT, Drop, IDataObject*, pDataObject, DWORD, grfKeyState, POINTL, pt, DWORD*, pdwEffect)
68 #define IDropTarget_IMETHODS \
69 ICOM_INHERITS(IDropTarget,IUnknown)
70 ICOM_DEFINE(IDropTarget,IUnknown)
73 #ifdef ICOM_CINTERFACE
74 /*** IUnknown methods ***/
75 #define IDropTarget_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
76 #define IDropTarget_AddRef(p) ICOM_CALL (AddRef,p)
77 #define IDropTarget_Release(p) ICOM_CALL (Release,p)
78 /*** IDropTarget methods ***/
79 #define IDropTarget_DragEnter(p,a,b,c,d) ICOM_CALL4(DragEnter,p,a,b,c,d)
80 #define IDropTarget_DragOver(p,a,b,c) ICOM_CALL3(DragOver,p,a,b,c)
81 #define IDropTarget_DragLeave(p) ICOM_CALL(DragLeave,p)
82 #define IDropTarget_Drop(p,a,b,c,d) ICOM_CALL4(Drop,p,a,b,c,d)
85 #endif /* __WINE_WINE_OBJ_DRAGDROP_H */