Implemented timer related functions in ntdll and make the kernel32
[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 INTERFACE IPicture
57 #define IPicture_METHODS \
58   IUnknown_METHODS \
59   STDMETHOD(get_Handle)(THIS_ OLE_HANDLE *pHandle) PURE; \
60   STDMETHOD(get_hPal)(THIS_ OLE_HANDLE *phPal) PURE; \
61   STDMETHOD(get_Type)(THIS_ SHORT *pType) PURE; \
62   STDMETHOD(get_Width)(THIS_ OLE_XSIZE_HIMETRIC *pWidth) PURE; \
63   STDMETHOD(get_Height)(THIS_ OLE_YSIZE_HIMETRIC *pHeight) PURE; \
64   STDMETHOD(Render)(THIS_ 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) PURE; \
65   STDMETHOD(set_hPal)(THIS_ OLE_HANDLE hPal) PURE; \
66   STDMETHOD(get_CurDC)(THIS_ HDC *phDC) PURE; \
67   STDMETHOD(SelectPicture)(THIS_ HDC hDCIn, HDC *phDCOut, OLE_HANDLE *phBmpOut) PURE; \
68   STDMETHOD(get_KeepOriginalFormat)(THIS_ BOOL *pKeep) PURE; \
69   STDMETHOD(put_KeepOriginalFormat)(THIS_ BOOL Keep) PURE; \
70   STDMETHOD(PictureChanged)(THIS) PURE; \
71   STDMETHOD(SaveAsFile)(THIS_ LPSTREAM pStream, BOOL fSaveMemCopy, LONG *pCbSize) PURE; \
72   STDMETHOD(get_Attributes)(THIS_ DWORD *pDwAttr) PURE;
73 ICOM_DEFINE(IPicture,IUnknown)
74 #undef INTERFACE
75
76 #ifdef COBJMACROS
77 /*** IUnknown methods ***/
78 #define IPicture_QueryInterface(p,a,b)         (p)->lpVtbl->QueryInterface(p,a,b)
79 #define IPicture_AddRef(p)                     (p)->lpVtbl->AddRef(p)
80 #define IPicture_Release(p)                    (p)->lpVtbl->Release(p)
81 /*** IPicture methods ***/
82 #define IPicture_get_Handle(p,a)               (p)->lpVtbl->get_Handle(p,a)
83 #define IPicture_get_hPal(p,a)                 (p)->lpVtbl->get_hPal(p,a)
84 #define IPicture_get_Type(p,a)                 (p)->lpVtbl->get_Type(p,a)
85 #define IPicture_get_Width(p,a)                (p)->lpVtbl->get_Width(p,a)
86 #define IPicture_get_Height(p,a)               (p)->lpVtbl->get_Height(p,a)
87 #define IPicture_Render(p,a,b,c,d,e,f,g,h,i,j) (p)->lpVtbl->Render(p,a,b,c,d,e,f,g,h,i,j)
88 #define IPicture_set_hPal(p,a)                 (p)->lpVtbl->set_hPal(p,a)
89 #define IPicture_get_CurDC(p,a)                (p)->lpVtbl->get_CurDC(p,a)
90 #define IPicture_SelectPicture(p,a,b,c)        (p)->lpVtbl->SelectPicture(p,a,b,c)
91 #define IPicture_get_KeepOriginalFormat(p,a)   (p)->lpVtbl->get_KeepOriginalFormat(p,a)
92 #define IPicture_put_KeepOriginalFormat(p,a)   (p)->lpVtbl->put_KeepOriginalFormat(p,a)
93 #define IPicture_PictureChanged(p)             (p)->lpVtbl->PictureChanged(p)
94 #define IPicture_SaveAsFile(p,a,b,c)           (p)->lpVtbl->SaveAsFile(p,a,b,c)
95 #define IPicture_get_Attributes(p,a)           (p)->lpVtbl->get_Attributes(p,a)
96 #endif
97
98
99 /*****************************************************************************
100  * IPictureDisp interface
101  */
102 #define INTERFACE IPictureDisp
103 #define IPictureDisp_METHODS \
104      IDispatch_METHODS
105 ICOM_DEFINE(IPictureDisp,IDispatch)
106 #undef INTERFACE
107
108 #ifdef COBJMACROS
109 /*** IUnknown methods ***/
110 #define IPictureDisp_QueryInterface(p,a,b)      (p)->lpVtbl->QueryInterface(p,a,b)
111 #define IPictureDisp_AddRef(p)                  (p)->lpVtbl->AddRef(p)
112 #define IPictureDisp_Release(p)                 (p)->lpVtbl->Release(p)
113 /*** IDispatch methods ***/
114 #define IPictureDisp_GetTypeInfoCount(p,a)      (p)->lpVtbl->GetTypeInfoCount(p,a)
115 #define IPictureDisp_GetTypeInfo(p,a,b,c)       (p)->lpVtbl->GetTypeInfo(p,b,c)
116 #define IPictureDisp_GetIDsOfNames(p,a,b,c,d,e) (p)->lpVtbl->GetIDsOfNames(p,a,b,c,d,e)
117 #define IPictureDisp_Invoke(p,a,b,c,d,e,f,g,h)  (p)->lpVtbl->Invoke(p,a,b,c,d,e,f,g,h)
118 /*** IPictureDisp methods ***/
119 #endif
120
121 #ifdef __cplusplus
122 } /* extern "C" */
123 #endif /* defined(__cplusplus) */
124
125 #endif /* __WINE_WINE_OBJ_PICTURE_H */