Use exception handling to implement the IsBad* functions.
[wine] / include / wine / obj_dragdrop.h
1 /*
2  * Defines the COM interfaces and APIs related to OLE Drag and Drop.
3  */
4
5 #ifndef __WINE_WINE_OBJ_DRAGDROP_H
6 #define __WINE_WINE_OBJ_DRAGDROP_H
7
8 #include "winnt.h"
9 #include "windef.h"
10 #include "wine/obj_base.h"
11 #include "wine/obj_dataobject.h"
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif /* defined(__cplusplus) */
16
17 /*****************************************************************************
18  * Predeclare the interfaces
19  */
20 DEFINE_OLEGUID(IID_IDropSource, 0x00000121L, 0, 0);
21 typedef struct IDropSource IDropSource,*LPDROPSOURCE;
22
23 DEFINE_OLEGUID(IID_IDropTarget, 0x00000122L, 0, 0);
24 typedef struct IDropTarget IDropTarget,*LPDROPTARGET;
25
26 /*****************************************************************************
27  * DROPEFFECT enumeration
28  */
29 #define MK_ALT (0x20)
30 #define DROPEFFECT_NONE         0
31 #define DROPEFFECT_COPY         1
32 #define DROPEFFECT_MOVE         2
33 #define DROPEFFECT_LINK         4
34 #define DROPEFFECT_SCROLL       0x80000000
35 #define DD_DEFSCROLLINSET 11
36 #define DD_DEFSCROLLDELAY 50
37 #define DD_DEFSCROLLINTERVAL 50
38 #define DD_DEFDRAGDELAY   50
39 #define DD_DEFDRAGMINDIST  2
40
41 /*****************************************************************************
42  * IDropSource interface
43  */
44 #define ICOM_INTERFACE IDropSource
45 #define IDropSource_METHODS \
46     ICOM_METHOD2(HRESULT, QueryContinueDrag, BOOL, fEscapePressed, DWORD, grfKeyState) \
47     ICOM_METHOD1(HRESULT, GiveFeedback, DWORD, dwEffect)
48 #define IDropSource_IMETHODS \
49         IUnknown_IMETHODS \
50         IDropSource_METHODS
51 ICOM_DEFINE(IDropSource,IUnknown)
52 #undef ICOM_INTERFACE
53
54 /*** IUnknown methods ***/
55 #define IDropSource_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
56 #define IDropSource_AddRef(p)             ICOM_CALL (AddRef,p)
57 #define IDropSource_Release(p)            ICOM_CALL (Release,p)
58 /*** IDropSource methods ***/
59 #define IDropSource_QueryContinueDrag(p,a,b) ICOM_CALL2(QueryContinueDrag,p,a,b)
60 #define IDropSource_GiveFeedback(p,a)        ICOM_CALL1(GiveFeedback,p,a)
61
62 /*****************************************************************************
63  * IDropTarget interface
64  */
65 #define ICOM_INTERFACE IDropTarget
66 #define IDropTarget_METHODS \
67     ICOM_METHOD4(HRESULT, DragEnter, IDataObject*, pDataObject, DWORD, grfKeyState, POINTL, pt, DWORD*, pdwEffect) \
68     ICOM_METHOD3(HRESULT, DragOver, DWORD, grfKeyState, POINTL, pt, DWORD*, pdwEffect) \
69     ICOM_METHOD(HRESULT, DragLeave) \
70     ICOM_METHOD4(HRESULT, Drop, IDataObject*, pDataObject, DWORD, grfKeyState, POINTL, pt, DWORD*, pdwEffect)
71 #define IDropTarget_IMETHODS \
72         IUnknown_IMETHODS \
73         IDropTarget_METHODS
74 ICOM_DEFINE(IDropTarget,IUnknown)
75 #undef ICOM_INTERFACE
76
77 /*** IUnknown methods ***/
78 #define IDropTarget_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
79 #define IDropTarget_AddRef(p)             ICOM_CALL (AddRef,p)
80 #define IDropTarget_Release(p)            ICOM_CALL (Release,p)
81 /*** IDropTarget methods ***/
82 #define IDropTarget_DragEnter(p,a,b,c,d)  ICOM_CALL4(DragEnter,p,a,b,c,d)
83 #define IDropTarget_DragOver(p,a,b,c)     ICOM_CALL3(DragOver,p,a,b,c)
84 #define IDropTarget_DragLeave(p)          ICOM_CALL(DragLeave,p)
85 #define IDropTarget_Drop(p,a,b,c,d)       ICOM_CALL4(Drop,p,a,b,c,d)
86
87 #ifdef __cplusplus
88 } /* extern "C" */
89 #endif /* defined(__cplusplus) */
90
91 #endif /*  __WINE_WINE_OBJ_DRAGDROP_H */
92
93
94
95
96