| 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 | #include "windows.h"
|
|---|
| 11 | #include "windef.h"
|
|---|
| 12 |
|
|---|
| 13 | #ifdef __cplusplus
|
|---|
| 14 | extern "C" {
|
|---|
| 15 | #endif /* defined(__cplusplus) */
|
|---|
| 16 |
|
|---|
| 17 | /*****************************************************************************
|
|---|
| 18 | * Predeclare the structures
|
|---|
| 19 | */
|
|---|
| 20 | typedef UINT OLE_HANDLE;
|
|---|
| 21 | typedef LONG OLE_XPOS_HIMETRIC;
|
|---|
| 22 | typedef LONG OLE_YPOS_HIMETRIC;
|
|---|
| 23 | typedef LONG OLE_XSIZE_HIMETRIC;
|
|---|
| 24 | typedef LONG OLE_YSIZE_HIMETRIC;
|
|---|
| 25 |
|
|---|
| 26 | typedef enum tagPicture { /* bitmasks */
|
|---|
| 27 | PICTURE_SCALABLE = 0x1,
|
|---|
| 28 | PICTURE_TRANSPARENT = 0x2
|
|---|
| 29 | } PICTUREATTRIBUTES;
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 | /*****************************************************************************
|
|---|
| 33 | * Predeclare the interfaces
|
|---|
| 34 | */
|
|---|
| 35 | DEFINE_GUID(IID_IPicture, 0x7bf80980, 0xbf32, 0x101a, 0x8b, 0xbb, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB);
|
|---|
| 36 | typedef struct IPicture IPicture, *LPPICTURE;
|
|---|
| 37 |
|
|---|
| 38 | DEFINE_GUID(IID_IPictureDisp, 0x7bf80981, 0xbf32, 0x101a, 0x8b, 0xbb, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB);
|
|---|
| 39 | typedef struct IPictureDisp IPictureDisp, *LPPICTUREDISP;
|
|---|
| 40 |
|
|---|
| 41 | /*****************************************************************************
|
|---|
| 42 | * IPicture interface
|
|---|
| 43 | */
|
|---|
| 44 | #define ICOM_INTERFACE IPicture
|
|---|
| 45 | #define IPicture_METHODS \
|
|---|
| 46 | ICOM_METHOD1(HRESULT,get_Handle, OLE_HANDLE*,pHandle) \
|
|---|
| 47 | ICOM_METHOD1(HRESULT,get_hPal, OLE_HANDLE*,phPal) \
|
|---|
| 48 | ICOM_METHOD1(HRESULT,get_Type, SHORT*,pType) \
|
|---|
| 49 | ICOM_METHOD1(HRESULT,get_Width, OLE_XSIZE_HIMETRIC*,pWidth) \
|
|---|
| 50 | ICOM_METHOD1(HRESULT,get_Height, OLE_YSIZE_HIMETRIC*,pHeight) \
|
|---|
| 51 | 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) \
|
|---|
| 52 | ICOM_METHOD1(HRESULT,set_hPal, OLE_HANDLE,hPal) \
|
|---|
| 53 | ICOM_METHOD1(HRESULT,get_CurDC, HDC*,phDC) \
|
|---|
| 54 | ICOM_METHOD3(HRESULT,SelectPicture, HDC,hDCIn, HDC*,phDCOut, OLE_HANDLE*,phBmpOut) \
|
|---|
| 55 | ICOM_METHOD1(HRESULT,get_KeepOriginalFormat, BOOL*,pKeep) \
|
|---|
| 56 | ICOM_METHOD1(HRESULT,put_KeepOriginalFormat, BOOL,Keep) \
|
|---|
| 57 | ICOM_METHOD (HRESULT,PictureChanged) \
|
|---|
| 58 | ICOM_METHOD3(HRESULT,SaveAsFile, LPSTREAM,pStream, BOOL,fSaveMemCopy, LONG*,pCbSize) \
|
|---|
| 59 | ICOM_METHOD1(HRESULT,get_Attributes, DWORD*,pDwAttr)
|
|---|
| 60 | #define IPicture_IMETHODS \
|
|---|
| 61 | IUnknown_IMETHODS \
|
|---|
| 62 | IPicture_METHODS
|
|---|
| 63 | ICOM_DEFINE(IPicture,IUnknown)
|
|---|
| 64 | #undef ICOM_INTERFACE
|
|---|
| 65 |
|
|---|
| 66 | #ifdef ICOM_CINTERFACE
|
|---|
| 67 | /*** IUnknown methods ***/
|
|---|
| 68 | #define IPicture_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
|
|---|
| 69 | #define IPicture_AddRef(p) ICOM_CALL (AddRef,p)
|
|---|
| 70 | #define IPicture_Release(p) ICOM_CALL (Release,p)
|
|---|
| 71 | /*** IPicture methods ***/
|
|---|
| 72 | #define IPicture_get_Handle(p,a) ICOM_CALL1(get_Handle,p,a)
|
|---|
| 73 | #define IPicture_get_hPal(p,a) ICOM_CALL1(get_hPal,p,a)
|
|---|
| 74 | #define IPicture_get_Type(p,a) ICOM_CALL1(get_Type,p,a)
|
|---|
| 75 | #define IPicture_get_Width(p,a) ICOM_CALL1(get_Width,p,a)
|
|---|
| 76 | #define IPicture_get_Height(p,a) ICOM_CALL1(get_Height,p,a)
|
|---|
| 77 | #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)
|
|---|
| 78 | #define IPicture_set_hPal(p,a) ICOM_CALL1(set_hPal,p,a)
|
|---|
| 79 | #define IPicture_get_CurDC(p,a) ICOM_CALL1(get_CurDC,p,a)
|
|---|
| 80 | #define IPicture_SelectPicture(p,a,b,c) ICOM_CALL3(SelectPicture,p,a,b,c)
|
|---|
| 81 | #define IPicture_get_KeepOriginalFormat(p,a) ICOM_CALL1(get_KeepOriginalFormat,p,a)
|
|---|
| 82 | #define IPicture_put_KeepOriginalFormat(p,a) ICOM_CALL1(put_KeepOriginalFormat,p,a)
|
|---|
| 83 | #define IPicture_PictureChanged(p) ICOM_CALL (PictureChanged,p)
|
|---|
| 84 | #define IPicture_SaveAsFile(p,a,b,c) ICOM_CALL3(SaveAsFile,p,a,b,c)
|
|---|
| 85 | #define IPicture_get_Attributes(p,a) ICOM_CALL1(get_Attributes,p,a)
|
|---|
| 86 | #endif
|
|---|
| 87 |
|
|---|
| 88 |
|
|---|
| 89 | /*****************************************************************************
|
|---|
| 90 | * IPictureDisp interface
|
|---|
| 91 | */
|
|---|
| 92 | #define ICOM_INTERFACE IPictureDisp
|
|---|
| 93 | #define IPictureDisp_METHODS
|
|---|
| 94 | #define IPictureDisp_IMETHODS \
|
|---|
| 95 | IDispatch_IMETHODS \
|
|---|
| 96 | IPictureDisp_METHODS
|
|---|
| 97 | ICOM_DEFINE(IPictureDisp,IDispatch)
|
|---|
| 98 | #undef ICOM_INTERFACE
|
|---|
| 99 |
|
|---|
| 100 | #ifdef ICOM_CINTERFACE
|
|---|
| 101 | /*** IUnknown methods ***/
|
|---|
| 102 | #define IPictureDisp_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
|
|---|
| 103 | #define IPictureDisp_AddRef(p) ICOM_CALL (AddRef,p)
|
|---|
| 104 | #define IPictureDisp_Release(p) ICOM_CALL (Release,p)
|
|---|
| 105 | /*** IDispatch methods ***/
|
|---|
| 106 | #define IPictureDisp_GetTypeInfoCount(p,a) ICOM_CALL1 (GetTypeInfoCount,p,a)
|
|---|
| 107 | #define IPictureDisp_GetTypeInfo(p,a,b,c) ICOM_CALL3 (GetTypeInfo,p,b,c)
|
|---|
| 108 | #define IPictureDisp_GetIDsOfNames(p,a,b,c,d,e) ICOM_CALL5 (GetIDsOfNames,p,a,b,c,d,e)
|
|---|
| 109 | #define IPictureDisp_Invoke(p,a,b,c,d,e,f,g,h) ICOM_CALL8 (Invoke,p,a,b,c,d,e,f,g,h)
|
|---|
| 110 | /*** IPictureDisp methods ***/
|
|---|
| 111 | #endif
|
|---|
| 112 |
|
|---|
| 113 | #ifdef __cplusplus
|
|---|
| 114 | } /* extern "C" */
|
|---|
| 115 | #endif /* defined(__cplusplus) */
|
|---|
| 116 |
|
|---|
| 117 | #endif /* __WINE_WINE_OBJ_PICTURE_H */
|
|---|
| 118 |
|
|---|
| 119 |
|
|---|