:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git] / include / ole32 / obj_picture.h
1 /*
2  * Defines the COM interfaces and APIs related to OLE picture support.
3  *
4  * Depends on 'obj_base.h'.
5  */
6
7 #ifndef __WINE_WINE_OBJ_PICTURE_H
8 #define __WINE_WINE_OBJ_PICTURE_H
9
10 #ifdef __cplusplus
11 extern "C" {
12 #endif /* defined(__cplusplus) */
13
14 /*****************************************************************************
15  * Predeclare the structures
16  */
17 typedef UINT OLE_HANDLE;
18 typedef LONG OLE_XPOS_HIMETRIC;
19 typedef LONG OLE_YPOS_HIMETRIC;
20 typedef LONG OLE_XSIZE_HIMETRIC;
21 typedef LONG OLE_YSIZE_HIMETRIC;
22
23
24
25 /*****************************************************************************
26  * Predeclare the interfaces
27  */
28 DEFINE_GUID(IID_IPicture, 0x7bf80980, 0xbf32, 0x101a, 0x8b, 0xbb, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB);
29 typedef struct IPicture IPicture, *LPPICTURE;
30
31 DEFINE_GUID(IID_IPictureDisp, 0x7bf80981, 0xbf32, 0x101a, 0x8b, 0xbb, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB);
32 typedef struct IPictureDisp IPictureDisp, *LPPICTUREDISP;
33
34 /*****************************************************************************
35  * IPicture interface
36  */
37 #define ICOM_INTERFACE IPicture
38 #define IPicture_METHODS \
39   ICOM_METHOD1(HRESULT,get_Handle, OLE_HANDLE*,pHandle) \
40   ICOM_METHOD1(HRESULT,get_hPal, OLE_HANDLE*,phPal) \
41   ICOM_METHOD1(HRESULT,get_Type, SHORT*,pType) \
42   ICOM_METHOD1(HRESULT,get_Width, OLE_XSIZE_HIMETRIC*,pWidth) \
43   ICOM_METHOD1(HRESULT,get_Height, OLE_YSIZE_HIMETRIC*,pHeight) \
44   ICOM_METHOD10(HRESULT,Render, HDC,hdc, LONG,x, LONG,y, LONG,cx, LONG,cy, OLE_XPOS_HIMETRIC,xSrc, OLE_YPOS_HIMETRIC,ySrc, OLE_XSIZE_HIMETRIC,cxSrc, OLE_YSIZE_HIMETRIC,cySrc, LPCRECT,pRcWBounds) \
45   ICOM_METHOD1(HRESULT,set_hPal, OLE_HANDLE,hPal) \
46   ICOM_METHOD1(HRESULT,get_CurDC, HDC*,phDC) \
47   ICOM_METHOD3(HRESULT,SelectPicture, HDC,hDCIn, HDC*,phDCOut, OLE_HANDLE*,phBmpOut) \
48   ICOM_METHOD1(HRESULT,get_KeepOriginalFormat, BOOL*,pKeep) \
49   ICOM_METHOD1(HRESULT,put_KeepOriginalFormat, BOOL,Keep) \
50   ICOM_METHOD (HRESULT,PictureChanged) \
51   ICOM_METHOD3(HRESULT,SaveAsFile, LPSTREAM,pStream, BOOL,fSaveMemCopy, LONG*,pCbSize) \
52   ICOM_METHOD1(HRESULT,get_Attributes, DWORD*,pDwAttr) 
53 #define IPicture_IMETHODS \
54         IUnknown_IMETHODS \
55         IPicture_METHODS
56 ICOM_DEFINE(IPicture,IUnknown)
57 #undef ICOM_INTERFACE
58
59 /*** IUnknown methods ***/
60 #define IPicture_QueryInterface(p,a,b)         ICOM_CALL2(QueryInterface,p,a,b)
61 #define IPicture_AddRef(p)                     ICOM_CALL (AddRef,p)
62 #define IPicture_Release(p)                    ICOM_CALL (Release,p)
63 /*** IPicture methods ***/
64 #define IPicture_get_Handle(p,a)               ICOM_CALL1(get_Handle,p,a)
65 #define IPicture_get_hPal(p,a)                 ICOM_CALL1(get_hPal,p,a)
66 #define IPicture_get_Type(p,a)                 ICOM_CALL1(get_Type,p,a)
67 #define IPicture_get_Width(p,a)                ICOM_CALL1(get_Width,p,a)
68 #define IPicture_get_Height(p,a)               ICOM_CALL1(get_Height,p,a)
69 #define IPicture_Render(p,a,b,c,d,e,f,g,h,i,j) ICOM_CALL10(Render,p,a,b,c,d,e,f,g,h,i,j)
70 #define IPicture_set_hPal(p,a)                 ICOM_CALL1(set_hPal,p,a)
71 #define IPicture_get_CurDC(p,a)                ICOM_CALL1(get_CurDC,p,a)
72 #define IPicture_SelectPicture(p,a,b,c)        ICOM_CALL3(SelectPicture,p,a,b,c)
73 #define IPicture_get_KeepOriginalFormat(p,a)   ICOM_CALL1(get_KeepOriginalFormat,p,a)
74 #define IPicture_put_KeepOriginalFormat(p,a)   ICOM_CALL1(put_KeepOriginalFormat,p,a)
75 #define IPicture_PictureChanged(p)             ICOM_CALL (PictureChanged,p)
76 #define IPicture_SaveAsFile(p,a,b,c)           ICOM_CALL3(SaveAsFile,p,a,b,c)
77 #define IPicture_get_Attributes(p,a)           ICOM_CALL1(get_Attributes,p,a)
78
79
80 /*****************************************************************************
81  * IPictureDisp interface
82  */
83 #define ICOM_INTERFACE IPictureDisp
84 #define IPictureDisp_METHODS 
85 #define IPictureDisp_IMETHODS \
86                                 IDispatch_IMETHODS \
87                                 IPictureDisp_METHODS
88 ICOM_DEFINE(IPictureDisp,IDispatch)
89 #undef ICOM_INTERFACE
90
91 /*** IUnknown methods ***/
92 #define IPictureDisp_QueryInterface(p,a,b)      ICOM_CALL2(QueryInterface,p,a,b)
93 #define IPictureDisp_AddRef(p)                  ICOM_CALL (AddRef,p)
94 #define IPictureDisp_Release(p)                 ICOM_CALL (Release,p)
95 /*** IDispatch methods ***/
96 #define IPictureDisp_GetTypeInfoCount(p,a)      ICOM_CALL1 (GetTypeInfoCount,p,a)
97 #define IPictureDisp_GetTypeInfo(p,a,b,c)       ICOM_CALL3 (GetTypeInfo,p,b,c)
98 #define IPictureDisp_GetIDsOfNames(p,a,b,c,d,e) ICOM_CALL5 (GetIDsOfNames,p,a,b,c,d,e)
99 #define IPictureDisp_Invoke(p,a,b,c,d,e,f,g,h)  ICOM_CALL8 (Invoke,p,a,b,c,d,e,f,g,h)
100 /*** IPictureDisp methods ***/
101
102 #ifdef __cplusplus
103 } /* extern "C" */
104 #endif /* defined(__cplusplus) */
105
106 #endif /* __WINE_WINE_OBJ_PICTURE_H */
107
108