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