2 * Defines the COM interfaces and APIs related to OLE picture support.
4 * Depends on 'obj_base.h'.
7 #ifndef __WINE_WINE_OBJ_PICTURE_H
8 #define __WINE_WINE_OBJ_PICTURE_H
12 #endif /* defined(__cplusplus) */
14 /*****************************************************************************
15 * Predeclare the structures
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
;
23 typedef enum tagPicture
{ /* bitmasks */
24 PICTURE_SCALABLE
= 0x1,
25 PICTURE_TRANSPARENT
= 0x2
28 /*****************************************************************************
29 * Predeclare the interfaces
31 DEFINE_GUID(IID_IPicture
, 0x7bf80980, 0xbf32, 0x101a, 0x8b, 0xbb, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB);
32 typedef struct IPicture IPicture
, *LPPICTURE
;
34 DEFINE_GUID(IID_IPictureDisp
, 0x7bf80981, 0xbf32, 0x101a, 0x8b, 0xbb, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB);
35 typedef struct IPictureDisp IPictureDisp
, *LPPICTUREDISP
;
37 /*****************************************************************************
40 #define ICOM_INTERFACE IPicture
41 #define IPicture_METHODS \
42 ICOM_METHOD1(HRESULT,get_Handle, OLE_HANDLE*,pHandle) \
43 ICOM_METHOD1(HRESULT,get_hPal, OLE_HANDLE*,phPal) \
44 ICOM_METHOD1(HRESULT,get_Type, SHORT*,pType) \
45 ICOM_METHOD1(HRESULT,get_Width, OLE_XSIZE_HIMETRIC*,pWidth) \
46 ICOM_METHOD1(HRESULT,get_Height, OLE_YSIZE_HIMETRIC*,pHeight) \
47 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) \
48 ICOM_METHOD1(HRESULT,set_hPal, OLE_HANDLE,hPal) \
49 ICOM_METHOD1(HRESULT,get_CurDC, HDC*,phDC) \
50 ICOM_METHOD3(HRESULT,SelectPicture, HDC,hDCIn, HDC*,phDCOut, OLE_HANDLE*,phBmpOut) \
51 ICOM_METHOD1(HRESULT,get_KeepOriginalFormat, BOOL*,pKeep) \
52 ICOM_METHOD1(HRESULT,put_KeepOriginalFormat, BOOL,Keep) \
53 ICOM_METHOD (HRESULT,PictureChanged) \
54 ICOM_METHOD3(HRESULT,SaveAsFile, LPSTREAM,pStream, BOOL,fSaveMemCopy, LONG*,pCbSize) \
55 ICOM_METHOD1(HRESULT,get_Attributes, DWORD*,pDwAttr)
56 #define IPicture_IMETHODS \
59 ICOM_DEFINE(IPicture
,IUnknown
)
62 /*** IUnknown methods ***/
63 #define IPicture_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
64 #define IPicture_AddRef(p) ICOM_CALL (AddRef,p)
65 #define IPicture_Release(p) ICOM_CALL (Release,p)
66 /*** IPicture methods ***/
67 #define IPicture_get_Handle(p,a) ICOM_CALL1(get_Handle,p,a)
68 #define IPicture_get_hPal(p,a) ICOM_CALL1(get_hPal,p,a)
69 #define IPicture_get_Type(p,a) ICOM_CALL1(get_Type,p,a)
70 #define IPicture_get_Width(p,a) ICOM_CALL1(get_Width,p,a)
71 #define IPicture_get_Height(p,a) ICOM_CALL1(get_Height,p,a)
72 #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)
73 #define IPicture_set_hPal(p,a) ICOM_CALL1(set_hPal,p,a)
74 #define IPicture_get_CurDC(p,a) ICOM_CALL1(get_CurDC,p,a)
75 #define IPicture_SelectPicture(p,a,b,c) ICOM_CALL3(SelectPicture,p,a,b,c)
76 #define IPicture_get_KeepOriginalFormat(p,a) ICOM_CALL1(get_KeepOriginalFormat,p,a)
77 #define IPicture_put_KeepOriginalFormat(p,a) ICOM_CALL1(put_KeepOriginalFormat,p,a)
78 #define IPicture_PictureChanged(p) ICOM_CALL (PictureChanged,p)
79 #define IPicture_SaveAsFile(p,a,b,c) ICOM_CALL3(SaveAsFile,p,a,b,c)
80 #define IPicture_get_Attributes(p,a) ICOM_CALL1(get_Attributes,p,a)
83 /*****************************************************************************
84 * IPictureDisp interface
86 #define ICOM_INTERFACE IPictureDisp
87 #define IPictureDisp_METHODS
88 #define IPictureDisp_IMETHODS \
91 ICOM_DEFINE(IPictureDisp
,IDispatch
)
94 /*** IUnknown methods ***/
95 #define IPictureDisp_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
96 #define IPictureDisp_AddRef(p) ICOM_CALL (AddRef,p)
97 #define IPictureDisp_Release(p) ICOM_CALL (Release,p)
98 /*** IDispatch methods ***/
99 #define IPictureDisp_GetTypeInfoCount(p,a) ICOM_CALL1 (GetTypeInfoCount,p,a)
100 #define IPictureDisp_GetTypeInfo(p,a,b,c) ICOM_CALL3 (GetTypeInfo,p,b,c)
101 #define IPictureDisp_GetIDsOfNames(p,a,b,c,d,e) ICOM_CALL5 (GetIDsOfNames,p,a,b,c,d,e)
102 #define IPictureDisp_Invoke(p,a,b,c,d,e,f,g,h) ICOM_CALL8 (Invoke,p,a,b,c,d,e,f,g,h)
103 /*** IPictureDisp methods ***/
107 #endif /* defined(__cplusplus) */
109 #endif /* __WINE_WINE_OBJ_PICTURE_H */