gdiplus: Added GdipSetLineBlend stub.
[wine] / include / stdole2.idl
1 /*
2  * Copyright (C) 2003 Robert Shearman
3  *               2005 Huw Davies
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18  *
19  */
20
21 [
22   uuid(00020430-0000-0000-C000-000000000046),
23   version(2.0),
24   helpstring("OLE Automation")
25 ]
26 library stdole
27 {
28         /* typedefs aren't stored in the type library.
29            These type names are known by the type compiler so it
30            doesn't really matter what we define them as. */
31
32     typedef short VARIANT_BOOL;
33     typedef long BSTR;
34     typedef double CURRENCY;
35     typedef unsigned long HRESULT;
36     typedef void *VARIANT;
37     typedef unsigned long SCODE;
38     
39     typedef struct GUID {
40         unsigned long  Data1;
41         unsigned short Data2;
42         unsigned short Data3;
43         unsigned char  Data4[ 8 ];
44     } GUID;
45
46     typedef struct DISPPARAMS {
47         VARIANT *rgvarg;
48         long *rgdispidNamedArgs;
49         unsigned int cArgs;
50         unsigned int cNamedArgs;
51     } DISPPARAMS;
52
53     typedef struct EXCEPINFO {
54         unsigned short wCode;
55         unsigned short wReserved;
56         BSTR  bstrSource;
57         BSTR  bstrDescription;
58         BSTR  bstrHelpFile;
59         unsigned long dwHelpContext;
60         void *pvReserved;
61         void *pfnDeferredFillIn;
62         SCODE scode;
63     } EXCEPINFO;
64
65     [
66         odl,
67         uuid(00000000-0000-0000-C000-000000000046)
68     ]
69     interface IUnknown
70     {
71         [restricted]
72         HRESULT QueryInterface(
73                                [in] GUID *riid,
74                                [out] void **ppvObj);
75
76         [restricted]
77         unsigned long AddRef();
78
79         [restricted]
80         unsigned long Release();
81     }
82
83     [
84         odl,
85         uuid(00020400-0000-0000-C000-000000000046)
86     ]
87     interface IDispatch : IUnknown
88     {
89         [restricted]
90         HRESULT GetTypeInfoCount(
91                                  [out] unsigned int *pctinfo);
92
93         [restricted]
94         HRESULT GetTypeInfo(
95                             [in] unsigned int itinfo,
96                             [in] unsigned long lcid,
97                             [out] void **pptinfo);
98
99         [restricted]
100         HRESULT GetIDsOfNames(
101                               [in] GUID *riid,
102                               [in] char **rgszNames,
103                               [in] unsigned int cNames,
104                               [in] unsigned long lcid,
105                               [out] long *rgdispid);
106
107         [restricted]
108         HRESULT Invoke(
109                        [in] long dispidMember,
110                        [in] GUID *riid,
111                        [in] unsigned long lcid,
112                        [in] unsigned short wFlags,
113                        [in] DISPPARAMS *pdispparams,
114                        [out] VARIANT *pvarResult,
115                        [out] EXCEPINFO *pexcepinfo,
116                        [out] unsigned int *puArgErr);
117
118     }
119
120     [
121         odl,
122         uuid(00020404-0000-0000-C000-000000000046)
123     ]
124     interface IEnumVARIANT : IUnknown
125     {
126         HRESULT Next(
127                      [in] unsigned long celt,
128                      [in] VARIANT *rgvar,
129                      [out] unsigned long *pceltFetched);
130
131         HRESULT Skip(
132                      [in] unsigned long celt);
133
134         HRESULT Reset();
135
136         HRESULT Clone(
137                       [out] IEnumVARIANT **ppenum);
138     }
139
140     typedef [uuid(66504301-BE0F-101A-8BBB-00AA00300CAB), public]
141         unsigned long OLE_COLOR;
142
143     typedef [uuid(66504302-BE0F-101A-8BBB-00AA00300CAB), public]
144         long OLE_XPOS_PIXELS;
145
146     typedef [uuid(66504303-BE0F-101A-8BBB-00AA00300CAB), public]
147         long OLE_YPOS_PIXELS;
148
149     typedef [uuid(66504304-BE0F-101A-8BBB-00AA00300CAB), public]
150         long OLE_XSIZE_PIXELS;
151
152     typedef [uuid(66504305-BE0F-101A-8BBB-00AA00300CAB), public]
153         long OLE_YSIZE_PIXELS;
154
155     typedef [uuid(66504306-BE0F-101A-8BBB-00AA00300CAB), public]
156         long OLE_XPOS_HIMETRIC;
157
158     typedef [uuid(66504307-BE0F-101A-8BBB-00AA00300CAB), public]
159         long OLE_YPOS_HIMETRIC;
160
161     typedef [uuid(66504308-BE0F-101A-8BBB-00AA00300CAB), public]
162         long OLE_XSIZE_HIMETRIC;
163
164     typedef [uuid(66504309-BE0F-101A-8BBB-00AA00300CAB), public]
165         long OLE_YSIZE_HIMETRIC;
166
167     typedef [uuid(BF030640-9069-101B-AE2D-08002B2EC713), public]
168         float OLE_XPOS_CONTAINER;
169
170     typedef [uuid(BF030641-9069-101B-AE2D-08002B2EC713), public]
171         float OLE_YPOS_CONTAINER;
172
173     typedef [uuid(BF030642-9069-101B-AE2D-08002B2EC713), public]
174         float OLE_XSIZE_CONTAINER;
175
176     typedef [uuid(BF030643-9069-101B-AE2D-08002B2EC713), public]
177         float OLE_YSIZE_CONTAINER;
178
179     typedef [uuid(66504313-BE0F-101A-8BBB-00AA00300CAB), public]
180         int OLE_HANDLE;
181
182     typedef [uuid(6650430B-BE0F-101A-8BBB-00AA00300CAB), public]
183         VARIANT_BOOL OLE_OPTEXCLUSIVE;
184
185     typedef [uuid(BF030644-9069-101B-AE2D-08002B2EC713), public]
186         VARIANT_BOOL OLE_CANCELBOOL;
187
188     typedef [uuid(BF030645-9069-101B-AE2D-08002B2EC713), public]
189         VARIANT_BOOL OLE_ENABLEDEFAULTBOOL;
190
191     /* FIXME: widl can't cope with enum attributes yet */
192     /*
193     [
194      uuid(6650430A-BE0F-101A-8BBB-00AA00300CAB)
195     ]
196     */
197     enum OLE_TRISTATE {
198         Unchecked = 0,
199         Checked = 1,
200         Gray = 2
201     };
202
203     typedef [uuid(6650430D-BE0F-101A-8BBB-00AA00300CAB), public]
204         BSTR FONTNAME;
205
206     typedef [uuid(6650430E-BE0F-101A-8BBB-00AA00300CAB), public]
207         CURRENCY FONTSIZE;
208
209     typedef [uuid(6650430F-BE0F-101A-8BBB-00AA00300CAB), public]
210         VARIANT_BOOL FONTBOLD;
211
212     typedef [uuid(66504310-BE0F-101A-8BBB-00AA00300CAB), public]
213         VARIANT_BOOL FONTITALIC;
214
215     typedef [uuid(66504311-BE0F-101A-8BBB-00AA00300CAB), public]
216         VARIANT_BOOL FONTUNDERSCORE;
217
218     typedef [uuid(66504312-BE0F-101A-8BBB-00AA00300CAB), public]
219         VARIANT_BOOL FONTSTRIKETHROUGH;
220
221
222     [
223      odl,
224      uuid(BEF6E002-A874-101A-8BBA-00AA00300CAB),
225      helpstring("Font Object"),
226      hidden
227     ]
228     interface IFont {
229         [propget] HRESULT Name([out, retval] BSTR *pname);
230         [propput] HRESULT Name([in] BSTR pname);
231
232         [propget] HRESULT Size([out, retval] CURRENCY *psize);
233         [propput] HRESULT Size([in] BSTR psize);
234
235         [propget] HRESULT Bold([out, retval] VARIANT_BOOL *pbold);
236         [propput] HRESULT Bold([in] VARIANT_BOOL pbold);
237
238         [propget] HRESULT Italic([out, retval] VARIANT_BOOL *pitalic);
239         [propput] HRESULT Italic([in] VARIANT_BOOL pitalic);
240
241         [propget] HRESULT Underline([out, retval] VARIANT_BOOL *punderline);
242         [propput] HRESULT Underline([in] VARIANT_BOOL punderline);
243
244         [propget] HRESULT Strikethrough([out, retval] VARIANT_BOOL *pstrikethrough);
245         [propput] HRESULT Strikethrough([in] VARIANT_BOOL pstrikethrough);
246
247         [propget] HRESULT Weight([out, retval] short *pweight);
248         [propput] HRESULT Weight([in] short pweight);
249
250         [propget] HRESULT Charset([out, retval] short *pcharset);
251         [propput] HRESULT Charset([in] short pcharset);
252
253         [propget] HRESULT hFont([out, retval] OLE_HANDLE *phfont);
254         
255         HRESULT Clone([out] IFont **ppfont);
256
257         HRESULT IsEqual([in] IFont *pfontOther);
258
259         HRESULT SetRatio([in] long cyLogical, [in] long cyHimetric);
260
261         HRESULT AddRefHfont([in] OLE_HANDLE hFont);
262
263         HRESULT ReleaseHfont([in] OLE_HANDLE hFont);
264     };
265
266
267     [
268      odl,
269      uuid(BEF6E003-A874-101A-8BBA-00AA00300CAB)
270     ]
271     dispinterface Font {
272     properties:
273         [id(0x0)] BSTR Name;
274         [id(0x2)] CURRENCY Size;
275         [id(0x3)] VARIANT_BOOL Bold;
276         [id(0x4)] VARIANT_BOOL Italic;
277         [id(0x5)] VARIANT_BOOL Underline;
278         [id(0x6)] VARIANT_BOOL Strikethrough;
279         [id(0x7)] short Weight;
280         [id(0x8)] short Charset;
281     methods:
282     }
283
284     typedef [public] Font IFontDisp;
285
286     [
287      uuid(0BE35203-8F91-11CE-9DE3-00AA004BB851)
288     ]
289     coclass StdFont {
290         [default] dispinterface Font;
291         /* FIXME: We can't reference dispinterface FontEvents here because we need it to
292            appear at the end of the typelib. */
293 /*      [default, source] dispinterface FontEvents;*/
294         interface IFont;
295     };
296
297     [
298      odl,
299      uuid(7BF80980-BF32-101A-8BBB-00AA00300CAB),
300      helpstring("Picture Object"),
301      hidden
302     ]
303         interface IPicture /*: IUnknown*/ {
304         [propget] HRESULT Handle([out, retval] OLE_HANDLE *phandle);
305
306         [propget] HRESULT hPal([out, retval] OLE_HANDLE *phpal);
307         
308         [propget] HRESULT Type([out, retval] short *ptype);
309
310         [propget] HRESULT Width([out, retval] OLE_XSIZE_HIMETRIC *pwidth);
311
312         [propget] HRESULT Height([out, retval] OLE_YSIZE_HIMETRIC *pheight);
313
314         HRESULT Render([in] int hdc,
315                        [in] long x,
316                        [in] long y,
317                        [in] long cx,
318                        [in] long cy,
319                        [in] OLE_XPOS_HIMETRIC xSrc,
320                        [in] OLE_YPOS_HIMETRIC ySrc,
321                        [in] OLE_XSIZE_HIMETRIC cxSrc,
322                        [in] OLE_YSIZE_HIMETRIC cySrc,
323                        [in] void *prcWBounds);
324
325         [propput] HRESULT hPal([in] OLE_HANDLE phpal);
326
327         [propget] HRESULT CurDC([out, retval] int *phdcOut);
328
329         HRESULT SelectPicture([in] int hdcIn,
330                               [out] int *phdcOut,
331                               [out] OLE_HANDLE *phbmpOut);
332         
333         [propget] HRESULT KeepOriginalFormat([out, retval] VARIANT_BOOL *pfkeep);
334         [propput] HRESULT KeepOriginalFormat([in] VARIANT_BOOL pfkeep);
335
336         HRESULT PictureChanged();
337
338         HRESULT SaveAsFile([in] void *pstm,
339                            [in] VARIANT_BOOL fSaveMemCopy,
340                            [out] long *pcbSize);
341
342         [propget] HRESULT Attributes([out, retval] long *pdwAttr);
343
344         HRESULT SetHdc([in] OLE_HANDLE hdc);
345     };
346
347     [
348      uuid(7BF80981-BF32-101A-8BBB-00AA00300CAB)
349     ]
350     dispinterface Picture {
351     properties:
352         [id(0x0), readonly] OLE_HANDLE Handle;
353         [id(0x2)] OLE_HANDLE hPal;
354         [id(0x3), readonly] short Type; 
355         [id(0x4), readonly] OLE_XSIZE_HIMETRIC Width;
356         [id(0x5), readonly] OLE_XSIZE_HIMETRIC Height;
357     methods:
358         [id(0x6)] void Render(int hdc,
359                               long x,
360                               long y,
361                               long cx,
362                               long cy,
363                               OLE_XPOS_HIMETRIC xSrc,
364                               OLE_YPOS_HIMETRIC ySrc,
365                               OLE_XSIZE_HIMETRIC cxSrc,
366                               OLE_YSIZE_HIMETRIC cySrc,
367                               void *prcWBounds);
368     };
369     
370     typedef [public] Picture IPictureDisp;
371
372     [
373      uuid(0BE35204-8F91-11CE-9DE3-00AA004BB851)
374     ]
375     coclass StdPicture {
376         [default] dispinterface Picture;
377         interface IPicture;
378     };
379
380     /* FIXME: widl can't cope with enum attributes yet */
381     /*
382     [
383      uuid(E6C8FA08-BD9F-11D0-985E-00C04FC29993)
384     ]
385     */
386     enum LoadPictureConstants {
387         Default = 0,
388         Monochrome = 1,
389         VgaColor = 2,
390         Color = 4
391     };
392
393     [
394      dllname("oleaut32.dll"),
395      uuid(91209AC0-60F6-11CF-9C5D-00AA00C1489E),
396      helpstring("Functions for Standard OLE Objects"),
397      helpcontext(0x2775)
398     ]
399     module StdFunctions{
400         [
401          entry("OleLoadPictureFileEx"),
402          helpstring("Loads a picture from a file"),
403          helpcontext(0x2775)
404         ]
405         HRESULT LoadPicture([in, optional] VARIANT filename,
406                             [in, optional, defaultvalue(0)] int widthDesired,
407                             [in, optional, defaultvalue(0)] int heightDesired,
408                             [in, optional, defaultvalue(Default)] enum LoadPictureConstants flags,
409                             [out, retval] IPictureDisp **retval);
410         [
411          entry("OleSavePictureFile"),
412          helpstring("Saves a picture to a file"),
413          helpcontext(0x2775)
414         ]
415         HRESULT SavePicture([in] IPictureDisp *Picture,
416                             [in] BSTR filename);
417     };
418
419
420     [
421      uuid(4EF6100A-AF88-11D0-9846-00C04FC29993),
422      helpstring("Event Interface for the Font Object"),
423      hidden
424     ]
425     dispinterface FontEvents {
426     properties:
427     methods:
428         [id(0x9)] void FontChanged([in] BSTR PropertyName);
429     };
430
431     typedef [public] FontEvents IFontEventsDisp;
432
433
434 };