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