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 #endif /* defined(__cplusplus) */
12 /*****************************************************************************
13 * Predeclare the interfaces
15 DEFINE_OLEGUID(IID_IDropSource, 0x00000121L, 0, 0);
16 typedef struct IDropSource IDropSource,*LPDROPSOURCE;
18 DEFINE_OLEGUID(IID_IDropTarget, 0x00000122L, 0, 0);
19 typedef struct IDropTarget IDropTarget,*LPDROPTARGET;
21 /*****************************************************************************
22 * DROPEFFECT enumeration
25 #define DROPEFFECT_NONE 0
26 #define DROPEFFECT_COPY 1
27 #define DROPEFFECT_MOVE 2
28 #define DROPEFFECT_LINK 4
29 #define DROPEFFECT_SCROLL 0x80000000
30 #define DD_DEFSCROLLINSET 11
31 #define DD_DEFSCROLLDELAY 50
32 #define DD_DEFSCROLLINTERVAL 50
33 #define DD_DEFDRAGDELAY 50
34 #define DD_DEFDRAGMINDIST 2
36 /*****************************************************************************
37 * IDropSource interface
39 #define ICOM_INTERFACE IDropSource
40 #define IDropSource_METHODS \
41 ICOM_METHOD2(HRESULT, QueryContinueDrag, BOOL, fEscapePressed, DWORD, grfKeyState) \
42 ICOM_METHOD1(HRESULT, GiveFeedback, DWORD, dwEffect)
43 #define IDropSource_IMETHODS \
46 ICOM_DEFINE(IDropSource,IUnknown)
49 /*** IUnknown methods ***/
50 #define IDropSource_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
51 #define IDropSource_AddRef(p) ICOM_CALL (AddRef,p)
52 #define IDropSource_Release(p) ICOM_CALL (Release,p)
53 /*** IDropSource methods ***/
54 #define IDropSource_QueryContinueDrag(p,a,b) ICOM_CALL2(QueryContinueDrag,p,a,b)
55 #define IDropSource_GiveFeedback(p,a) ICOM_CALL1(GiveFeedback,p,a)
57 /*****************************************************************************
58 * IDropTarget interface
60 #define ICOM_INTERFACE IDropTarget
61 #define IDropTarget_METHODS \
62 ICOM_METHOD4(HRESULT, DragEnter, IDataObject*, pDataObject, DWORD, grfKeyState, POINTL, pt, DWORD*, pdwEffect) \
63 ICOM_METHOD3(HRESULT, DragOver, DWORD, grfKeyState, POINTL, pt, DWORD*, pdwEffect) \
64 ICOM_METHOD(HRESULT, DragLeave) \
65 ICOM_METHOD4(HRESULT, Drop, IDataObject*, pDataObject, DWORD, grfKeyState, POINTL, pt, DWORD*, pdwEffect)
66 #define IDropTarget_IMETHODS \
69 ICOM_DEFINE(IDropTarget,IUnknown)
72 /*** IUnknown methods ***/
73 #define IDropTarget_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
74 #define IDropTarget_AddRef(p) ICOM_CALL (AddRef,p)
75 #define IDropTarget_Release(p) ICOM_CALL (Release,p)
76 /*** IDropTarget methods ***/
77 #define IDropTarget_DragEnter(p,a,b,c,d) ICOM_CALL4(DragEnter,p,a,b,c,d)
78 #define IDropTarget_DragOver(p,a,b,c) ICOM_CALL3(DragOver,p,a,b,c)
79 #define IDropTarget_DragLeave(p) ICOM_CALL(DragLeave,p)
80 #define IDropTarget_Drop(p,a,b,c,d) ICOM_CALL4(Drop,p,a,b,c,d)
82 #if _WIN32_IE >= 0x0500
90 HBITMAP hbmpDragImage;
92 } SHDRAGIMAGE, *LPSHDRAGIMAGE;
97 #define INTERFACE IDragSourceHelper
99 DECLARE_INTERFACE_(IDragSourceHelper, IUnknown)
101 STDMETHOD (QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
102 STDMETHOD_(ULONG, AddRef) (THIS) PURE;
103 STDMETHOD_(ULONG, Release) (THIS) PURE;
104 STDMETHOD (InitializeFromBitmap)(THIS_ LPSHDRAGIMAGE pshdi, IDataObject* pDataObject) PURE;
105 STDMETHOD (InitializeFromWindow)(THIS_ HWND hwnd, POINT* ppt, IDataObject* pDataObject) PURE;
108 DEFINE_GUID(CLSID_DragDropHelper, 0x4657278AL, 0x411B, 0x11D2, 0x83, 0x9A, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0);
109 DEFINE_GUID(IID_IDropTargetHelper, 0x4657278BL, 0x411B, 0x11D2, 0x83, 0x9A, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0);
110 DEFINE_GUID(IID_IDragSourceHelper, 0xDE5BF786L, 0x477A, 0x11D2, 0x83, 0x9D, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0);
112 #endif /* _WIN32_IE >= 0x0500 */
116 #endif /* defined(__cplusplus) */
118 #endif /* __WINE_WINE_OBJ_DRAGDROP_H */