Use proper return values in amstream stub functions.
[wine.git] / include / olectl.h
blob2d571af36652c41f048d7876c3eb9b931c7cfecd
1 /*
2 * Copyright (C) the Wine project
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef __WINE_OLECTL_H
20 #define __WINE_OLECTL_H
22 #if !defined(__midl) && !defined(__WIDL__)
24 #include <ocidl.h>
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
33 * Ole Control Interfaces
35 DEFINE_GUID(CLSID_ConvertVBX,
36 0xfb8f0822,0x0164,0x101b,0x84,0xed,0x08,0x00,0x2b,0x2e,0xc7,0x13);
37 DEFINE_GUID(CLSID_PersistPropset,
38 0xfb8f0821,0x0164,0x101b,0x84,0xed,0x08,0x00,0x2b,0x2e,0xc7,0x13);
40 DEFINE_GUID(CLSID_StdFont,
41 0x0be35203,0x8f91,0x11ce,0x9d,0xe3,0x00,0xaa,0x00,0x4b,0xb8,0x51);
42 DEFINE_GUID(CLSID_StdPicture,
43 0x0be35204,0x8f91,0x11ce,0x9d,0xe3,0x00,0xaa,0x00,0x4b,0xb8,0x51);
45 DEFINE_GUID(CLSID_CFontPropPage,
46 0x0be35200,0x8f91,0x11ce,0x9d,0xe3,0x00,0xaa,0x00,0x4b,0xb8,0x51);
47 DEFINE_GUID(CLSID_CColorPropPage,
48 0x0be35201,0x8f91,0x11ce,0x9d,0xe3,0x00,0xaa,0x00,0x4b,0xb8,0x51);
49 DEFINE_GUID(CLSID_CPicturePropPage,
50 0x0be35202,0x8f91,0x11ce,0x9d,0xe3,0x00,0xaa,0x00,0x4b,0xb8,0x51);
52 DEFINE_GUID(GUID_HIMETRIC,
53 0x66504300,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
54 DEFINE_GUID(GUID_COLOR,
55 0x66504301,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
56 DEFINE_GUID(GUID_XPOSPIXEL,
57 0x66504302,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
58 DEFINE_GUID(GUID_YPOSPIXEL,
59 0x66504303,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
60 DEFINE_GUID(GUID_XSIZEPIXEL,
61 0x66504304,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
62 DEFINE_GUID(GUID_YSIZEPIXEL,
63 0x66504305,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
64 DEFINE_GUID(GUID_XPOS,
65 0x66504306,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
66 DEFINE_GUID(GUID_YPOS,
67 0x66504307,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
68 DEFINE_GUID(GUID_XSIZE,
69 0x66504308,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
70 DEFINE_GUID(GUID_YSIZE,
71 0x66504309,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
73 typedef struct tagOCPFIPARAMS
75 ULONG cbStructSize;
76 HWND hWndOwner;
77 int x;
78 int y;
79 LPCOLESTR lpszCaption;
80 ULONG cObjects;
81 LPUNKNOWN *lplpUnk;
82 ULONG cPages;
83 CLSID *lpPages;
84 LCID lcid;
85 DISPID dispidInitialProperty;
86 } OCPFIPARAMS, *LPOCPFIPARAMS;
89 * FONTDESC is used as an OLE encapsulation of the GDI fonts
91 typedef struct tagFONTDESC {
92 UINT cbSizeofstruct;
93 LPOLESTR lpstrName;
94 CY cySize;
95 SHORT sWeight;
96 SHORT sCharset;
97 BOOL fItalic;
98 BOOL fUnderline;
99 BOOL fStrikethrough;
100 } FONTDESC, *LPFONTDESC;
102 #define FONTSIZE(n) { n##0000, 0 }
104 #define PICTYPE_UNINITIALIZED (-1)
105 #define PICTYPE_NONE 0
106 #define PICTYPE_BITMAP 1
107 #define PICTYPE_METAFILE 2
108 #define PICTYPE_ICON 3
109 #define PICTYPE_ENHMETAFILE 4
111 typedef struct tagPICTDESC {
112 UINT cbSizeofstruct;
113 UINT picType;
114 union {
115 struct {
116 HBITMAP hbitmap;
117 HPALETTE hpal;
118 } bmp;
119 struct {
120 HMETAFILE hmeta;
121 int xExt;
122 int yExt;
123 } wmf;
124 struct {
125 HICON hicon;
126 } icon;
127 struct {
128 HENHMETAFILE hemf;
129 } emf;
130 } DUMMYUNIONNAME;
131 } PICTDESC, *LPPICTDESC;
133 typedef long OLE_XPOS_PIXELS;
134 typedef long OLE_YPOS_PIXELS;
135 typedef long OLE_XSIZE_PIXELS;
136 typedef long OLE_YSIZE_PIXELS;
137 typedef float OLE_XPOS_CONTAINER;
138 typedef float OLE_YPOS_CONTAINER;
139 typedef float OLE_XSIZE_CONTAINER;
140 typedef float OLE_YSIZE_CONTAINER;
142 typedef enum
144 triUnchecked = 0,
145 triChecked = 1,
146 triGray = 2
147 } OLE_TRISTATE;
149 typedef VARIANT_BOOL OLE_OPTEXCLUSIVE;
150 typedef VARIANT_BOOL OLE_CANCELBOOL;
151 typedef VARIANT_BOOL OLE_ENABLEDEFAULTBOOL;
153 HCURSOR WINAPI OleIconToCursor( HINSTANCE hinstExe, HICON hicon);
155 HRESULT WINAPI OleCreatePropertyFrameIndirect( LPOCPFIPARAMS lpParams);
157 HRESULT WINAPI OleCreatePropertyFrame(
158 HWND hwndOwner, UINT x, UINT y,
159 LPCOLESTR lpszCaption, ULONG cObjects, LPUNKNOWN* ppUnk,
160 ULONG cPages, LPCLSID pPageClsID, LCID lcid, DWORD dwReserved,
161 LPVOID pvReserved );
163 HRESULT WINAPI OleLoadPicture( LPSTREAM lpstream, LONG lSize, BOOL fRunmode,
164 REFIID reed, LPVOID *lplpvObj );
166 HRESULT WINAPI OleLoadPicturePath( LPOLESTR szURLorPath, LPUNKNOWN punkCaller,
167 DWORD dwReserved, OLE_COLOR clrReserved, REFIID riid,
168 LPVOID *ppvRet );
170 HRESULT WINAPI OleCreatePictureIndirect(LPPICTDESC lpPictDesc, REFIID riid,
171 BOOL fOwn, LPVOID * lplpvObj );
173 HRESULT WINAPI OleCreateFontIndirect(LPFONTDESC lpFontDesc, REFIID riid,
174 LPVOID* lplpvObj);
176 HRESULT WINAPI OleTranslateColor( OLE_COLOR clr, HPALETTE hpal,
177 COLORREF* lpcolorref);
179 /* Reflected Window Message IDs */
180 #define OCM__BASE (WM_USER+0x1c00)
181 #define OCM_COMMAND (OCM__BASE + WM_COMMAND)
183 #define OCM_CTLCOLORBTN (OCM__BASE + WM_CTLCOLORBTN)
184 #define OCM_CTLCOLOREDIT (OCM__BASE + WM_CTLCOLOREDIT)
185 #define OCM_CTLCOLORDLG (OCM__BASE + WM_CTLCOLORDLG)
186 #define OCM_CTLCOLORLISTBOX (OCM__BASE + WM_CTLCOLORLISTBOX)
187 #define OCM_CTLCOLORMSGBOX (OCM__BASE + WM_CTLCOLORMSGBOX)
188 #define OCM_CTLCOLORSCROLLBAR (OCM__BASE + WM_CTLCOLORSCROLLBAR)
189 #define OCM_CTLCOLORSTATIC (OCM__BASE + WM_CTLCOLORSTATIC)
191 #define OCM_DRAWITEM (OCM__BASE + WM_DRAWITEM)
192 #define OCM_MEASUREITEM (OCM__BASE + WM_MEASUREITEM)
193 #define OCM_DELETEITEM (OCM__BASE + WM_DELETEITEM)
194 #define OCM_VKEYTOITEM (OCM__BASE + WM_VKEYTOITEM)
195 #define OCM_CHARTOITEM (OCM__BASE + WM_CHARTOITEM)
196 #define OCM_COMPAREITEM (OCM__BASE + WM_COMPAREITEM)
197 #define OCM_HSCROLL (OCM__BASE + WM_HSCROLL)
198 #define OCM_VSCROLL (OCM__BASE + WM_VSCROLL)
199 #define OCM_PARENTNOTIFY (OCM__BASE + WM_PARENTNOTIFY)
200 #define OCM_NOTIFY (OCM__BASE + WM_NOTIFY)
202 #define CONNECT_E_FIRST MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0200)
203 #define CONNECT_E_LAST MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x020F)
204 #define CONNECT_S_FIRST MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0200)
205 #define CONNECT_S_LAST MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x020F)
207 #define CONNECT_E_NOCONNECTION (CONNECT_E_FIRST+0)
208 #define CONNECT_E_ADVISELIMIT (CONNECT_E_FIRST+1)
209 #define CONNECT_E_CANNOTCONNECT (CONNECT_E_FIRST+2)
210 #define CONNECT_E_OVERRIDDEN (CONNECT_E_FIRST+3)
212 #define SELFREG_E_FIRST MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0200)
213 #define SELFREG_E_LAST MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x020F)
214 #define SELFREG_S_FIRST MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0200)
215 #define SELFREG_S_LAST MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x020F)
216 #define SELFREG_E_TYPELIB (SELFREG_E_FIRST+0)
217 #define SELFREG_E_CLASS (SELFREG_E_FIRST+1)
219 #ifndef FACILITY_CONTROL
220 #define FACILITY_CONTROL 0xa
221 #endif
222 #define STD_CTL_SCODE(n) MAKE_SCODE(SEVERITY_ERROR, FACILITY_CONTROL, n)
223 #define CTL_E_ILLEGALFUNCTIONCALL STD_CTL_SCODE(5)
224 #define CTL_E_OVERFLOW STD_CTL_SCODE(6)
225 #define CTL_E_OUTOFMEMORY STD_CTL_SCODE(7)
226 #define CTL_E_DIVISIONBYZERO STD_CTL_SCODE(11)
227 #define CTL_E_OUTOFSTRINGSPACE STD_CTL_SCODE(14)
228 #define CTL_E_OUTOFSTACKSPACE STD_CTL_SCODE(28)
229 #define CTL_E_BADFILENAMEORNUMBER STD_CTL_SCODE(52)
230 #define CTL_E_FILENOTFOUND STD_CTL_SCODE(53)
231 #define CTL_E_BADFILEMODE STD_CTL_SCODE(54)
232 #define CTL_E_FILEALREADYOPEN STD_CTL_SCODE(55)
233 #define CTL_E_DEVICEIOERROR STD_CTL_SCODE(57)
234 #define CTL_E_FILEALREADYEXISTS STD_CTL_SCODE(58)
235 #define CTL_E_BADRECORDLENGTH STD_CTL_SCODE(59)
236 #define CTL_E_DISKFULL STD_CTL_SCODE(61)
237 #define CTL_E_BADRECORDNUMBER STD_CTL_SCODE(63)
238 #define CTL_E_BADFILENAME STD_CTL_SCODE(64)
239 #define CTL_E_TOOMANYFILES STD_CTL_SCODE(67)
240 #define CTL_E_DEVICEUNAVAILABLE STD_CTL_SCODE(68)
241 #define CTL_E_PERMISSIONDENIED STD_CTL_SCODE(70)
242 #define CTL_E_DISKNOTREADY STD_CTL_SCODE(71)
243 #define CTL_E_PATHFILEACCESSERROR STD_CTL_SCODE(75)
244 #define CTL_E_PATHNOTFOUND STD_CTL_SCODE(76)
245 #define CTL_E_INVALIDPATTERNSTRING STD_CTL_SCODE(93)
246 #define CTL_E_INVALIDUSEOFNULL STD_CTL_SCODE(94)
247 #define CTL_E_INVALIDFILEFORMAT STD_CTL_SCODE(321)
248 #define CTL_E_INVALIDPROPERTYVALUE STD_CTL_SCODE(380)
249 #define CTL_E_INVALIDPROPERTYARRAYINDEX STD_CTL_SCODE(381)
250 #define CTL_E_SETNOTSUPPORTEDATRUNTIME STD_CTL_SCODE(382)
251 #define CTL_E_SETNOTSUPPORTED STD_CTL_SCODE(383)
252 #define CTL_E_NEEDPROPERTYARRAYINDEX STD_CTL_SCODE(385)
253 #define CTL_E_SETNOTPERMITTED STD_CTL_SCODE(387)
254 #define CTL_E_GETNOTSUPPORTEDATRUNTIME STD_CTL_SCODE(393)
255 #define CTL_E_GETNOTSUPPORTED STD_CTL_SCODE(394)
256 #define CTL_E_PROPERTYNOTFOUND STD_CTL_SCODE(422)
257 #define CTL_E_INVALIDCLIPBOARDFORMAT STD_CTL_SCODE(460)
258 #define CTL_E_INVALIDPICTURE STD_CTL_SCODE(481)
259 #define CTL_E_PRINTERERROR STD_CTL_SCODE(482)
260 #define CTL_E_CANTSAVEFILETOTEMP STD_CTL_SCODE(735)
261 #define CTL_E_SEARCHTEXTNOTFOUND STD_CTL_SCODE(744)
262 #define CTL_E_REPLACEMENTSTOOLONG STD_CTL_SCODE(746)
264 #define VT_COLOR VT_I4
265 #define VT_FONT VT_DISPATCH
266 #define VT_STREAMED_PROPSET 73 /* [P] Stream contains a property set */
267 #define VT_STORED_PROPSET 74 /* [P] Storage contains a property set */
268 #define VT_BLOB_PROPSET 75 /* [P] Blob contains a property set */
269 #define VT_VERBOSE_ENUM 76 /* [P] Enum value with text string */
271 #define PERPROP_E_FIRST MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0200)
272 #define PERPROP_E_LAST MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x020F)
273 #define PERPROP_S_FIRST MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0200)
274 #define PERPROP_S_LAST MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x020F)
276 #define PERPROP_E_NOPAGEAVAILABLE (PERPROP_E_FIRST+0)
279 #ifdef __cplusplus
281 #endif
283 #endif /* !__midl && !__WIDL__ */
285 /* standard dispatch ID's */
286 #define DISPID_AUTOSIZE (-500)
287 #define DISPID_BACKCOLOR (-501)
288 #define DISPID_BACKSTYLE (-502)
289 #define DISPID_BORDERCOLOR (-503)
290 #define DISPID_BORDERSTYLE (-504)
291 #define DISPID_BORDERWIDTH (-505)
292 #define DISPID_DRAWMODE (-507)
293 #define DISPID_DRAWSTYLE (-508)
294 #define DISPID_DRAWWIDTH (-509)
295 #define DISPID_FILLCOLOR (-510)
296 #define DISPID_FILLSTYLE (-511)
297 #define DISPID_FONT (-512)
298 #define DISPID_FORECOLOR (-513)
299 #define DISPID_ENABLED (-514)
300 #define DISPID_HWND (-515)
301 #define DISPID_TABSTOP (-516)
302 #define DISPID_TEXT (-517)
303 #define DISPID_CAPTION (-518)
304 #define DISPID_BORDERVISIBLE (-519)
305 #define DISPID_APPEARANCE (-520)
306 #define DISPID_MOUSEPOINTER (-521)
307 #define DISPID_MOUSEICON (-522)
308 #define DISPID_PICTURE (-523)
309 #define DISPID_VALID (-524)
310 #define DISPID_READYSTATE (-525)
312 #define DISPID_REFRESH (-550)
313 #define DISPID_DOCLICK (-551)
314 #define DISPID_ABOUTBOX (-552)
316 #define DISPID_CLICK (-600)
317 #define DISPID_DBLCLICK (-601)
318 #define DISPID_KEYDOWN (-602)
319 #define DISPID_KEYPRESS (-603)
320 #define DISPID_KEYUP (-604)
321 #define DISPID_MOUSEDOWN (-605)
322 #define DISPID_MOUSEMOVE (-606)
323 #define DISPID_MOUSEUP (-607)
324 #define DISPID_ERROREVENT (-608)
325 #define DISPID_READYSTATECHANGE (-609)
327 #define DISPID_AMBIENT_BACKCOLOR (-701)
328 #define DISPID_AMBIENT_DISPLAYNAME (-702)
329 #define DISPID_AMBIENT_FONT (-703)
330 #define DISPID_AMBIENT_FORECOLOR (-704)
331 #define DISPID_AMBIENT_LOCALEID (-705)
332 #define DISPID_AMBIENT_MESSAGEREFLECT (-706)
333 #define DISPID_AMBIENT_SCALEUNITS (-707)
334 #define DISPID_AMBIENT_TEXTALIGN (-708)
335 #define DISPID_AMBIENT_USERMODE (-709)
336 #define DISPID_AMBIENT_UIDEAD (-710)
337 #define DISPID_AMBIENT_SHOWGRABHANDLES (-711)
338 #define DISPID_AMBIENT_SHOWHATCHING (-712)
339 #define DISPID_AMBIENT_DISPLAYASDEFAULT (-713)
340 #define DISPID_AMBIENT_SUPPORTSMNEMONICS (-714)
341 #define DISPID_AMBIENT_AUTOCLIP (-715)
342 #define DISPID_AMBIENT_APPEARANCE (-716)
343 #define DISPID_AMBIENT_PALETTE (-726)
344 #define DISPID_AMBIENT_TRANSFERPRIORITY (-728)
346 #define DISPID_Name (-800)
347 #define DISPID_Delete (-801)
348 #define DISPID_Object (-802)
349 #define DISPID_Parent (-803)
351 #define DISPID_FONT_NAME 0
352 #define DISPID_FONT_SIZE 2
353 #define DISPID_FONT_BOLD 3
354 #define DISPID_FONT_ITALIC 4
355 #define DISPID_FONT_UNDER 5
356 #define DISPID_FONT_STRIKE 6
357 #define DISPID_FONT_WEIGHT 7
358 #define DISPID_FONT_CHARSET 8
360 /* IPicture */
361 #define DISPID_PICT_HANDLE 0
362 #define DISPID_PICT_HPAL 2
363 #define DISPID_PICT_TYPE 3
364 #define DISPID_PICT_WIDTH 4
365 #define DISPID_PICT_HEIGHT 5
366 #define DISPID_PICT_RENDER 6
368 #endif /* __WINE_OLECTL_H */