2 * Defines the COM interfaces and APIs related to the IE Web browser
4 * Copyright (C) 2001 John R. Sheets (for CodeWeavers)
5 * Copyright (C) 2003 Alexandre Julliard
6 * Copuright (C) 2004 Jacek Caban
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.
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.
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
29 /*****************************************************************************
30 * IWebBrowser interface
35 uuid(eab22ac1
-30c1
-11cf
-a7eb
-0000c05bae0b
)
37 interface IWebBrowser
: IDispatch
39 typedef enum BrowserNavConstants
41 navOpenInNewWindow
= 0x1,
43 navNoReadFromCache
= 0x4,
44 navNoWriteToCache
= 0x8,
45 navAllowAutosearch
= 0x10,
48 navEnforceRestricted
= 0x80
49 } BrowserNavConstants
;
51 typedef enum RefreshConstants
54 REFRESH_IFEXPIRED
= 1,
55 REFRESH_COMPLETELY
= 3
58 [id(100)] HRESULT GoBack
();
59 [id(101)] HRESULT GoForward
();
60 [id(102)] HRESULT GoHome
();
61 [id(103)] HRESULT GoSearch
();
66 [in, optional] VARIANT *Flags
,
67 [in, optional] VARIANT *TargetFrameName
,
68 [in, optional] VARIANT *PostData
,
69 [in, optional] VARIANT *Headers
);
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
);
94 /*****************************************************************************
95 * IWebBrowserApp interface
100 uuid(0002df05
-0000-0000-c000
-000000000046)
102 interface IWebBrowserApp
: IWebBrowser
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
);
126 /*****************************************************************************
127 * IWebBrowser2 interface
132 uuid(d30c1661
-cdaf
-11d0
-8a3e
-00c04fc9e26e
)
134 interface IWebBrowser2
: IWebBrowserApp
136 [id(500)] HRESULT Navigate2
(
138 [in, optional] VARIANT *Flags
,
139 [in, optional] VARIANT *TargetFrameName
,
140 [in, optional] VARIANT *PostData
,
141 [in, optional] VARIANT *Headers
);
143 [id(501)] HRESULT QueryStatusWB
(
145 [out, retval] OLECMDF
*pcmdf
);
147 [id(502)] HRESULT ExecWB
(
149 [in] OLECMDEXECOPT cmdexecopt
,
150 [in, optional] VARIANT *pvaIn
,
151 [out, in, optional] VARIANT *pvaOut
);
153 [id(503)] HRESULT ShowBrowserBar
(
154 [in] VARIANT *pvaClsid
,
155 [in, optional] VARIANT *pvarShow
,
156 [in, optional] VARIANT *pvarSize
);
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
);
176 uuid(eab22ac2
-30c1
-11CF
-a7eb
-0000C05bae0b
)
178 dispinterface DWebBrowserEvents
182 [id(DISPID_BEFORENAVIGATE
)]
186 [in] BSTR TargetFrameName
,
187 [in] VARIANT *PostData
,
189 [in, out] VARIANT_BOOL *Cancel
);
191 [id(DISPID_NAVIGATECOMPLETE
)]
192 void NavigateComplete
([in] BSTR URL
);
194 [id(DISPID_STATUSTEXTCHANGE
)]
195 void StatusTextChange
([in] BSTR Text
);
197 [id(DISPID_PROGRESSCHANGE
)]
198 void ProgressChange
([in] long Progress
, [in] long ProgressMax
);
200 [id(DISPID_DOWNLOADCOMPLETE
)]
201 void DownloadComplete
();
203 [id(DISPID_COMMANDSTATECHANGE
)]
204 void CommandStateChange
([in] long Command
, [in]VARIANT_BOOL Enable
);
206 [id(DISPID_DOWNLOADBEGIN
)]
207 void DownloadBegin
();
209 [id(DISPID_NEWWINDOW
)]
213 [in] BSTR TargetFrameName
,
214 [in] VARIANT *PostData
,
216 [in,out] VARIANT_BOOL *Processed
);
218 [id(DISPID_TITLECHANGE
)]
219 void TitleChange
([in] BSTR Text
);
221 [id(DISPID_FRAMEBEFORENAVIGATE
)]
222 void FrameBeforeNavigate
(
225 [in] BSTR TargetFrameName
,
226 [in] VARIANT *PostData
,
228 [in, out]VARIANT_BOOL *Cancel
);
230 [id(DISPID_FRAMENAVIGATECOMPLETE
)]
231 void FrameNavigateComplete
([in] BSTR URL
);
233 [id(DISPID_FRAMENEWWINDOW
)]
237 [in] BSTR TargetFrameName
,
238 [in] VARIANT *PostData
,
240 [in,out] VARIANT_BOOL *Processed
);
243 void Quit
([in, out] VARIANT_BOOL *Cancel
);
245 [id(DISPID_WINDOWMOVE
)]
248 [id(DISPID_WINDOWRESIZE
)]
251 [id(DISPID_WINDOWACTIVATE
)]
252 void WindowActivate
();
254 [id(DISPID_PROPERTYCHANGE
)]
255 void PropertyChange
([in] BSTR Property
);
259 uuid(34a715a0
-6587-11d0
-924a
-0020afc7ac4d
)
261 dispinterface DWebBrowserEvents2
265 [id(DISPID_STATUSTEXTCHANGE
)]
266 void StatusTextChange
([in] BSTR Text
);
268 [id(DISPID_PROGRESSCHANGE
)]
269 void ProgressChange
([in] long Progress
, [in] long ProgressMax
);
271 [id(DISPID_COMMANDSTATECHANGE
)]
272 void CommandStateChange
([in] long Command
, [in] VARIANT_BOOL Enable
);
274 [id(DISPID_DOWNLOADBEGIN
)]
275 void DownloadBegin
();
277 [id(DISPID_DOWNLOADCOMPLETE
)]
278 void DownloadComplete
();
280 [id(DISPID_TITLECHANGE
)]
281 void TitleChange
([in] BSTR szProperty
);
283 [id(DISPID_PROPERTYCHANGE
)]
284 void PropertyChange
([in] BSTR szProperty
);
286 [id(DISPID_BEFORENAVIGATE2
)]
287 void BeforeNavigate2
(
288 [in] IDispatch
*pDisp
,
291 [in] VARIANT *TargetFrameName
,
292 [in] VARIANT *PostData
,
293 [in] VARIANT *Headers
,
294 [in, out] VARIANT_BOOL *Cancel
);
296 [id(DISPID_NEWWINDOW2
)]
297 void NewWindow2
([in, out] IDispatch
**ppDisp
, [in, out] VARIANT_BOOL *Cancel
);
299 [id(DISPID_NAVIGATECOMPLETE2
)]
300 void NavigateComplete2
([in] IDispatch
*pDisp
, [in] VARIANT *URL
);
302 [id(DISPID_DOCUMENTCOMPLETE
)]
303 void DocumentComplete
([in] IDispatch
*pDisp
, [in] VARIANT *URL
);
308 [id(DISPID_ONVISIBLE
)]
309 void OnVisible
([in] VARIANT_BOOL Visible
);
311 [id(DISPID_ONTOOLBAR
)]
312 void OnToolBar
([in] VARIANT_BOOL ToolBar
);
314 [id(DISPID_ONMENUBAR
)]
315 void OnMenuBar
([in] VARIANT_BOOL MenuBar
);
317 [id(DISPID_ONSTATUSBAR
)]
318 void OnStatusBar
([in] VARIANT_BOOL StatusBar
);
320 [id(DISPID_ONFULLSCREEN
)]
321 void OnFullScreen
([in] VARIANT_BOOL FullScreen
);
323 [id(DISPID_ONTHEATERMODE
)]
324 void OnTheaterMode
([in] VARIANT_BOOL TheaterMode
);
328 uuid(8856f961
-340a
-11d0
-a96b
-00c04fd705a2
)
332 [default] interface IWebBrowser2
;
333 interface IWebBrowser
;
334 [default, source] dispinterface DWebBrowserEvents2
;
335 [source] dispinterface DWebBrowserEvents
;
341 uuid(85cb6900
-4d95
-11cf
-960c
-0080c7f4ee85
)
343 interface IShellWindows
: IDispatch
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
);
363 uuid(9ba05972
-f6a8
-11cf
-a442
-00a0c90a8f39
)
367 [default] interface IShellWindows
;
368 [default, source] dispinterface DShellWindowsEvents
;