Removed trailing whitespace.
[wine] / include / wine / 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  * Copyright (C) 1999 Paul Quinn
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21  */
22
23 #ifndef __WINE_WINE_OBJ_PICTURE_H
24 #define __WINE_WINE_OBJ_PICTURE_H
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif /* defined(__cplusplus) */
29
30 /*****************************************************************************
31  * Predeclare the structures
32  */
33 typedef UINT OLE_HANDLE;
34 typedef LONG OLE_XPOS_HIMETRIC;
35 typedef LONG OLE_YPOS_HIMETRIC;
36 typedef LONG OLE_XSIZE_HIMETRIC;
37 typedef LONG OLE_YSIZE_HIMETRIC;
38
39 typedef enum tagPicture { /* bitmasks */
40     PICTURE_SCALABLE    = 0x1,
41     PICTURE_TRANSPARENT = 0x2
42 } PICTUREATTRIBUTES;
43
44 /*****************************************************************************
45  * Predeclare the interfaces
46  */
47 DEFINE_GUID(IID_IPicture, 0x7bf80980, 0xbf32, 0x101a, 0x8b, 0xbb, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB);
48 typedef struct IPicture IPicture, *LPPICTURE;
49
50 DEFINE_GUID(IID_IPictureDisp, 0x7bf80981, 0xbf32, 0x101a, 0x8b, 0xbb, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB);
51 typedef struct IPictureDisp IPictureDisp, *LPPICTUREDISP;
52
53 /*****************************************************************************
54  * IPicture interface
55  */
56 #define ICOM_INTERFACE IPicture
57 #define IPicture_METHODS \
58   ICOM_METHOD1(HRESULT,get_Handle, OLE_HANDLE*,pHandle) \
59   ICOM_METHOD1(HRESULT,get_hPal, OLE_HANDLE*,phPal) \
60   ICOM_METHOD1(HRESULT,get_Type, SHORT*,pType) \
61   ICOM_METHOD1(HRESULT,get_Width, OLE_XSIZE_HIMETRIC*,pWidth) \
62   ICOM_METHOD1(HRESULT,get_Height, OLE_YSIZE_HIMETRIC*,pHeight) \
63   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) \
64   ICOM_METHOD1(HRESULT,set_hPal, OLE_HANDLE,hPal) \
65   ICOM_METHOD1(HRESULT,get_CurDC, HDC*,phDC) \
66   ICOM_METHOD3(HRESULT,SelectPicture, HDC,hDCIn, HDC*,phDCOut, OLE_HANDLE*,phBmpOut) \
67   ICOM_METHOD1(HRESULT,get_KeepOriginalFormat, BOOL*,pKeep) \
68   ICOM_METHOD1(HRESULT,put_KeepOriginalFormat, BOOL,Keep) \
69   ICOM_METHOD (HRESULT,PictureChanged) \
70   ICOM_METHOD3(HRESULT,SaveAsFile, LPSTREAM,pStream, BOOL,fSaveMemCopy, LONG*,pCbSize) \
71   ICOM_METHOD1(HRESULT,get_Attributes, DWORD*,pDwAttr)
72 #define IPicture_IMETHODS \
73         IUnknown_IMETHODS \
74         IPicture_METHODS
75 ICOM_DEFINE(IPicture,IUnknown)
76 #undef ICOM_INTERFACE
77
78 /*** IUnknown methods ***/
79 #define IPicture_QueryInterface(p,a,b)         ICOM_CALL2(QueryInterface,p,a,b)
80 #define IPicture_AddRef(p)                     ICOM_CALL (AddRef,p)
81 #define IPicture_Release(p)                    ICOM_CALL (Release,p)
82 /*** IPicture methods ***/
83 #define IPicture_get_Handle(p,a)               ICOM_CALL1(get_Handle,p,a)
84 #define IPicture_get_hPal(p,a)                 ICOM_CALL1(get_hPal,p,a)
85 #define IPicture_get_Type(p,a)                 ICOM_CALL1(get_Type,p,a)
86 #define IPicture_get_Width(p,a)                ICOM_CALL1(get_Width,p,a)
87 #define IPicture_get_Height(p,a)               ICOM_CALL1(get_Height,p,a)
88 #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)
89 #define IPicture_set_hPal(p,a)                 ICOM_CALL1(set_hPal,p,a)
90 #define IPicture_get_CurDC(p,a)                ICOM_CALL1(get_CurDC,p,a)
91 #define IPicture_SelectPicture(p,a,b,c)        ICOM_CALL3(SelectPicture,p,a,b,c)
92 #define IPicture_get_KeepOriginalFormat(p,a)   ICOM_CALL1(get_KeepOriginalFormat,p,a)
93 #define IPicture_put_KeepOriginalFormat(p,a)   ICOM_CALL1(put_KeepOriginalFormat,p,a)
94 #define IPicture_PictureChanged(p)             ICOM_CALL (PictureChanged,p)
95 #define IPicture_SaveAsFile(p,a,b,c)           ICOM_CALL3(SaveAsFile,p,a,b,c)
96 #define IPicture_get_Attributes(p,a)           ICOM_CALL1(get_Attributes,p,a)
97
98
99 /*****************************************************************************
100  * IPictureDisp interface
101  */
102 #define ICOM_INTERFACE IPictureDisp
103 #define IPictureDisp_METHODS
104 #define IPictureDisp_IMETHODS \
105                                 IDispatch_IMETHODS \
106                                 IPictureDisp_METHODS
107 ICOM_DEFINE(IPictureDisp,IDispatch)
108 #undef ICOM_INTERFACE
109
110 /*** IUnknown methods ***/
111 #define IPictureDisp_QueryInterface(p,a,b)      ICOM_CALL2(QueryInterface,p,a,b)
112 #define IPictureDisp_AddRef(p)                  ICOM_CALL (AddRef,p)
113 #define IPictureDisp_Release(p)                 ICOM_CALL (Release,p)
114 /*** IDispatch methods ***/
115 #define IPictureDisp_GetTypeInfoCount(p,a)      ICOM_CALL1 (GetTypeInfoCount,p,a)
116 #define IPictureDisp_GetTypeInfo(p,a,b,c)       ICOM_CALL3 (GetTypeInfo,p,b,c)
117 #define IPictureDisp_GetIDsOfNames(p,a,b,c,d,e) ICOM_CALL5 (GetIDsOfNames,p,a,b,c,d,e)
118 #define IPictureDisp_Invoke(p,a,b,c,d,e,f,g,h)  ICOM_CALL8 (Invoke,p,a,b,c,d,e,f,g,h)
119 /*** IPictureDisp methods ***/
120
121 #ifdef __cplusplus
122 } /* extern "C" */
123 #endif /* defined(__cplusplus) */
124
125 #endif /* __WINE_WINE_OBJ_PICTURE_H */
126
127