Fixed crash in font browsing for raster fonts.
[wine] / include / exdisp.idl
1 /*
2  * Defines the COM interfaces and APIs related to the IE Web browser
3  *
4  * Copyright (C) 2001 John R. Sheets (for CodeWeavers)
5  * Copyright (C) 2003 Alexandre Julliard
6  * Copuright (C) 2004 Jacek Caban
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 import "ocidl.idl";
24 import "docobj.idl";
25
26 #include <olectl.h>
27 #include <exdispid.h>
28
29 /*****************************************************************************
30  * IWebBrowser interface
31  */
32 [
33     object,
34     oleautomation,
35     uuid(eab22ac1-30c1-11cf-a7eb-0000c05bae0b)
36 ]
37 interface IWebBrowser : IDispatch
38 {
39     typedef enum BrowserNavConstants
40     {
41         navOpenInNewWindow   = 0x1,
42         navNoHistory         = 0x2,
43         navNoReadFromCache   = 0x4,
44         navNoWriteToCache    = 0x8,
45         navAllowAutosearch   = 0x10,
46         navBrowserBar        = 0x20,
47         navHyperlink         = 0x40,
48         navEnforceRestricted = 0x80
49     } BrowserNavConstants;
50
51     typedef enum RefreshConstants
52     {
53         REFRESH_NORMAL     = 0,
54         REFRESH_IFEXPIRED  = 1,
55         REFRESH_COMPLETELY = 3
56     } RefreshConstants;
57
58     [id(100)] HRESULT GoBack();
59     [id(101)] HRESULT GoForward();
60     [id(102)] HRESULT GoHome();
61     [id(103)] HRESULT GoSearch();
62
63     [id(104)]
64     HRESULT Navigate(
65         [in] BSTR URL,
66         [in, optional] VARIANT *Flags,
67         [in, optional] VARIANT *TargetFrameName,
68         [in, optional] VARIANT *PostData,
69         [in, optional] VARIANT *Headers);
70
71     [id(DISPID_REFRESH)] HRESULT Refresh();
72     [id(105)] HRESULT Refresh2([in, optional] VARIANT *Level);
73     [id(106)] HRESULT Stop();
74     [id(200), propget] HRESULT Application([out, retval] IDispatch** ppDisp);
75     [id(201), propget] HRESULT Parent([out, retval] IDispatch** ppDisp);
76     [id(202), propget] HRESULT Container([out, retval] IDispatch** ppDisp);
77     [id(203), propget] HRESULT Document([out] IDispatch** ppDisp);
78     [id(204), propget] HRESULT TopLevelContainer([out, retval] VARIANT_BOOL* pBool);
79     [id(205), propget] HRESULT Type([out, retval] BSTR* Type);
80     [id(206), propget] HRESULT Left([out, retval] long *pl);
81     [id(206), propput] HRESULT Left([in] long Left);
82     [id(207), propget] HRESULT Top([out, retval] long *pl);
83     [id(207), propput] HRESULT Top([in] long Top);
84     [id(208), propget] HRESULT Width([out, retval] long *pl);
85     [id(208), propput] HRESULT Width([in] long Width);
86     [id(209), propget] HRESULT Height([out, retval] long *pl);
87     [id(209), propput] HRESULT Height([in] long Height);
88     [id(210), propget] HRESULT LocationName([out, retval] BSTR *LocationName);
89     [id(211), propget] HRESULT LocationURL([out, retval] BSTR * LocationURL);
90     [id(212), propget] HRESULT Busy([out, retval] VARIANT_BOOL *pBool);
91 }
92
93
94 /*****************************************************************************
95  * IWebBrowserApp interface
96  */
97 [
98     object,
99     oleautomation,
100     uuid(0002df05-0000-0000-c000-000000000046)
101 ]
102 interface IWebBrowserApp : IWebBrowser
103 {
104     [id(300)] HRESULT Quit();
105     [id(301)] HRESULT ClientToWindow([in,out] int* pcx, [in,out] int* pcy);
106     [id(302)] HRESULT PutProperty([in] BSTR szProperty, [in] VARIANT vtValue);
107     [id(303)] HRESULT GetProperty([in] BSTR szProperty, [out, retval] VARIANT *pvtValue);
108     [id(0), propget] HRESULT Name([out, retval] BSTR* Name);
109     [id(DISPID_HWND), propget] HRESULT HWND([out, retval] long *pHWND);
110     [id(400), propget] HRESULT FullName([out, retval] BSTR* FullName);
111     [id(401), propget] HRESULT Path([out, retval] BSTR* Path);
112     [id(402), propget] HRESULT Visible([out, retval] VARIANT_BOOL* pBool);
113     [id(402), propput] HRESULT Visible([in] VARIANT_BOOL Value);
114     [id(403), propget] HRESULT StatusBar([out, retval] VARIANT_BOOL* pBool);
115     [id(403), propput] HRESULT StatusBar([in] VARIANT_BOOL Value);
116     [id(404), propget] HRESULT StatusText([out, retval] BSTR *StatusText);
117     [id(404), propput] HRESULT StatusText([in] BSTR StatusText);
118     [id(405), propget] HRESULT ToolBar([out, retval] int * Value);
119     [id(405), propput] HRESULT ToolBar([in] int Value);
120     [id(406), propget] HRESULT MenuBar([out, retval] VARIANT_BOOL * Value);
121     [id(406), propput] HRESULT MenuBar([in] VARIANT_BOOL Value);
122     [id(407), propget] HRESULT FullScreen([out, retval] VARIANT_BOOL * pbFullScreen);
123     [id(407), propput] HRESULT FullScreen([in] VARIANT_BOOL bFullScreen);
124 }
125
126 /*****************************************************************************
127  * IWebBrowser2 interface
128  */
129 [
130     object,
131     oleautomation,
132     uuid(d30c1661-cdaf-11d0-8a3e-00c04fc9e26e)
133 ]
134 interface IWebBrowser2 : IWebBrowserApp
135 {
136     [id(500)] HRESULT Navigate2(
137         [in] VARIANT *URL,
138         [in, optional] VARIANT *Flags,
139         [in, optional] VARIANT *TargetFrameName,
140         [in, optional] VARIANT *PostData,
141         [in, optional] VARIANT *Headers);
142
143     [id(501)] HRESULT QueryStatusWB(
144         [in] OLECMDID cmdID,
145         [out, retval] OLECMDF *pcmdf);
146
147     [id(502)] HRESULT ExecWB(
148         [in] OLECMDID cmdID,
149         [in] OLECMDEXECOPT cmdexecopt,
150         [in, optional] VARIANT *pvaIn,
151         [out, in, optional] VARIANT *pvaOut);
152
153     [id(503)] HRESULT ShowBrowserBar(
154         [in] VARIANT *pvaClsid,
155         [in, optional] VARIANT *pvarShow,
156         [in, optional] VARIANT *pvarSize);
157
158     [id(DISPID_READYSTATE), propget] HRESULT ReadyState([out, retval] READYSTATE *plReadyState);
159     [id(550), propget] HRESULT Offline([out, retval] VARIANT_BOOL *pbOffline);
160     [id(550), propput] HRESULT Offline([in] VARIANT_BOOL bOffline);
161     [id(551), propget] HRESULT Silent([out, retval] VARIANT_BOOL *pbSilent);
162     [id(551), propput] HRESULT Silent([in] VARIANT_BOOL bSilent);
163     [id(552), propget] HRESULT RegisterAsBrowser([out, retval] VARIANT_BOOL *pbRegister);
164     [id(552), propput] HRESULT RegisterAsBrowser([in] VARIANT_BOOL bRegister);
165     [id(553), propget] HRESULT RegisterAsDropTarget([out, retval] VARIANT_BOOL *pbRegister);
166     [id(553), propput] HRESULT RegisterAsDropTarget([in] VARIANT_BOOL bRegister);
167     [id(554), propget] HRESULT TheaterMode([out, retval] VARIANT_BOOL *pbRegister);
168     [id(554), propput] HRESULT TheaterMode([in] VARIANT_BOOL bRegister);
169     [id(555), propget] HRESULT AddressBar([out, retval] VARIANT_BOOL *Value);
170     [id(555), propput] HRESULT AddressBar([in] VARIANT_BOOL Value);
171     [id(556), propget] HRESULT Resizable([out, retval] VARIANT_BOOL *Value);
172     [id(556), propput] HRESULT Resizable([in] VARIANT_BOOL Value);
173 }
174
175 [
176     uuid(eab22ac2-30c1-11CF-a7eb-0000C05bae0b)
177 ]
178 dispinterface DWebBrowserEvents
179 {
180     properties:
181     methods:
182     [id(DISPID_BEFORENAVIGATE)]
183     void BeforeNavigate(
184         [in] BSTR URL,
185         [in] long Flags,
186         [in] BSTR TargetFrameName,
187         [in] VARIANT *PostData,
188         [in] BSTR Headers,
189         [in, out] VARIANT_BOOL *Cancel);
190
191     [id(DISPID_NAVIGATECOMPLETE)]
192     void NavigateComplete([in] BSTR URL);
193
194     [id(DISPID_STATUSTEXTCHANGE)]
195     void StatusTextChange([in] BSTR Text);
196
197     [id(DISPID_PROGRESSCHANGE)]
198     void ProgressChange([in] long Progress, [in] long ProgressMax);
199
200     [id(DISPID_DOWNLOADCOMPLETE)]
201     void DownloadComplete();
202
203     [id(DISPID_COMMANDSTATECHANGE)]
204     void CommandStateChange([in] long Command, [in]VARIANT_BOOL Enable);
205
206     [id(DISPID_DOWNLOADBEGIN)]
207     void DownloadBegin();
208
209     [id(DISPID_NEWWINDOW)]
210     void NewWindow(
211         [in] BSTR URL,
212         [in] long Flags,
213         [in] BSTR TargetFrameName,
214         [in] VARIANT *PostData,
215         [in] BSTR Headers,
216         [in,out] VARIANT_BOOL *Processed);
217
218     [id(DISPID_TITLECHANGE)]
219     void TitleChange([in] BSTR Text);
220
221     [id(DISPID_FRAMEBEFORENAVIGATE)]
222     void FrameBeforeNavigate(
223         [in] BSTR URL,
224         [in] long Flags,
225         [in] BSTR TargetFrameName,
226         [in] VARIANT *PostData,
227         [in] BSTR Headers,
228         [in, out]VARIANT_BOOL *Cancel);
229
230     [id(DISPID_FRAMENAVIGATECOMPLETE)]
231     void FrameNavigateComplete([in] BSTR URL);
232
233     [id(DISPID_FRAMENEWWINDOW)]
234     void FrameNewWindow(
235         [in] BSTR URL,
236         [in] long Flags,
237         [in] BSTR TargetFrameName,
238         [in] VARIANT *PostData,
239         [in] BSTR Headers,
240         [in,out] VARIANT_BOOL *Processed);
241
242     [id(DISPID_QUIT)]
243     void Quit([in, out] VARIANT_BOOL *Cancel);
244
245     [id(DISPID_WINDOWMOVE)]
246     void WindowMove();
247
248     [id(DISPID_WINDOWRESIZE)]
249     void WindowResize();
250
251     [id(DISPID_WINDOWACTIVATE)]
252     void WindowActivate();
253
254     [id(DISPID_PROPERTYCHANGE)]
255     void PropertyChange([in] BSTR Property);
256 }
257
258 [
259     uuid(34a715a0-6587-11d0-924a-0020afc7ac4d)
260 ]
261 dispinterface DWebBrowserEvents2
262 {
263     properties:
264     methods:
265     [id(DISPID_STATUSTEXTCHANGE)]
266     void StatusTextChange([in] BSTR Text);
267
268     [id(DISPID_PROGRESSCHANGE)]
269     void ProgressChange([in] long Progress, [in] long ProgressMax);
270
271     [id(DISPID_COMMANDSTATECHANGE)]
272     void CommandStateChange([in] long Command, [in] VARIANT_BOOL Enable);
273
274     [id(DISPID_DOWNLOADBEGIN)]
275     void DownloadBegin();
276
277     [id(DISPID_DOWNLOADCOMPLETE)]
278     void DownloadComplete();
279
280     [id(DISPID_TITLECHANGE)]
281     void TitleChange([in] BSTR szProperty);
282
283     [id(DISPID_PROPERTYCHANGE)]
284     void PropertyChange([in] BSTR szProperty);
285
286     [id(DISPID_BEFORENAVIGATE2)]
287     void BeforeNavigate2(
288         [in] IDispatch *pDisp,
289         [in] VARIANT *URL,
290         [in] VARIANT *Flags,
291         [in] VARIANT *TargetFrameName,
292         [in] VARIANT *PostData,
293         [in] VARIANT *Headers,
294         [in, out] VARIANT_BOOL *Cancel);
295
296     [id(DISPID_NEWWINDOW2)]
297     void NewWindow2([in, out] IDispatch **ppDisp, [in, out] VARIANT_BOOL *Cancel);
298
299     [id(DISPID_NAVIGATECOMPLETE2)]
300     void NavigateComplete2([in] IDispatch *pDisp, [in] VARIANT *URL);
301
302     [id(DISPID_DOCUMENTCOMPLETE)]
303     void DocumentComplete([in] IDispatch *pDisp, [in] VARIANT *URL);
304
305     [id(DISPID_ONQUIT)]
306     void OnQuit();
307
308     [id(DISPID_ONVISIBLE)]
309     void OnVisible([in] VARIANT_BOOL Visible);
310
311     [id(DISPID_ONTOOLBAR)]
312     void OnToolBar([in] VARIANT_BOOL ToolBar);
313
314     [id(DISPID_ONMENUBAR)]
315     void OnMenuBar([in] VARIANT_BOOL MenuBar);
316
317     [id(DISPID_ONSTATUSBAR)]
318     void OnStatusBar([in] VARIANT_BOOL StatusBar);
319
320     [id(DISPID_ONFULLSCREEN)]
321     void OnFullScreen([in] VARIANT_BOOL FullScreen);
322
323     [id(DISPID_ONTHEATERMODE)]
324     void OnTheaterMode([in] VARIANT_BOOL TheaterMode);
325 }
326
327 [
328     uuid(8856f961-340a-11d0-a96b-00c04fd705a2)
329 ]
330 coclass WebBrowser
331 {
332     [default] interface IWebBrowser2;
333     interface IWebBrowser;
334     [default, source] dispinterface DWebBrowserEvents2;
335     [source] dispinterface DWebBrowserEvents;
336 }
337
338 [
339     object,
340     oleautomation,
341     uuid(85cb6900-4d95-11cf-960c-0080c7f4ee85)
342 ]
343 interface IShellWindows : IDispatch
344 {
345     [propget] HRESULT Count( [out] long *Count );
346     [id(0)] HRESULT Item( [in] VARIANT index, [out] IDispatch **Folder );
347     [id(-4)] HRESULT _NewEnum( [out] IUnknown **ppunk );
348     [hidden] HRESULT Register( [in] IDispatch *pid, [in] long hWnd, [in] int swClass,
349                 [out] long *plCookie );
350     [hidden] HRESULT RegisterPending( [in] long lThread, [in] VARIANT *pvarloc,
351                 [in] VARIANT *varlocRoot, [in] int swClass, [out] long *plCookie );
352     [hidden] HRESULT Revoke( [in] long Cookie );
353     [hidden] HRESULT OnNavigate( [in] long Cookie, [out] VARIANT *pvarLoc );
354     [hidden] HRESULT OnActivated( [in] long Cookie, [in] VARIANT fActive );
355     [hidden] HRESULT FindWindowSW( [in] VARIANT *pvarLoc, [in] VARIANT *pvarLocRoot, 
356                 [in] int swClass, [out] long *phwnd, int swfwOptions,
357                 IDispatch **ppdispOut );
358     [hidden] HRESULT OnCreated( [in] long lCookie, [in] IUnknown *punk );
359     [hidden] HRESULT ProcessAttachDetach( [in] VARIANT_BOOL fAttach );
360 }
361
362 [
363     uuid(9ba05972-f6a8-11cf-a442-00a0c90a8f39)
364 ]
365 coclass ShellWindows
366 {
367     [default] interface IShellWindows;
368     [default, source] dispinterface DShellWindowsEvents;
369 }