exdisp.idl 12.3 KB
Newer Older
1 2 3 4 5
/*
 * Defines the COM interfaces and APIs related to the IE Web browser
 *
 * Copyright (C) 2001 John R. Sheets (for CodeWeavers)
 * Copyright (C) 2003 Alexandre Julliard
6
 * Copuright (C) 2004 Jacek Caban
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

import "ocidl.idl";
import "docobj.idl";

Jacek Caban's avatar
Jacek Caban committed
26
#include <olectl.h>
27
#include <exdispid.h>
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57

/*****************************************************************************
 * IWebBrowser interface
 */
[
    object,
    oleautomation,
    uuid(eab22ac1-30c1-11cf-a7eb-0000c05bae0b)
]
interface IWebBrowser : IDispatch
{
    typedef enum BrowserNavConstants
    {
        navOpenInNewWindow   = 0x1,
        navNoHistory         = 0x2,
        navNoReadFromCache   = 0x4,
        navNoWriteToCache    = 0x8,
        navAllowAutosearch   = 0x10,
        navBrowserBar        = 0x20,
        navHyperlink         = 0x40,
        navEnforceRestricted = 0x80
    } BrowserNavConstants;

    typedef enum RefreshConstants
    {
        REFRESH_NORMAL     = 0,
        REFRESH_IFEXPIRED  = 1,
        REFRESH_COMPLETELY = 3
    } RefreshConstants;

Jacek Caban's avatar
Jacek Caban committed
58 59 60 61 62 63
    [id(100)] HRESULT GoBack();
    [id(101)] HRESULT GoForward();
    [id(102)] HRESULT GoHome();
    [id(103)] HRESULT GoSearch();

    [id(104)]
64 65
    HRESULT Navigate(
        [in] BSTR URL,
Jacek Caban's avatar
Jacek Caban committed
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
        [in, optional] VARIANT *Flags,
        [in, optional] VARIANT *TargetFrameName,
        [in, optional] VARIANT *PostData,
        [in, optional] VARIANT *Headers);

    [id(DISPID_REFRESH)] HRESULT Refresh();
    [id(105)] HRESULT Refresh2([in, optional] VARIANT *Level);
    [id(106)] HRESULT Stop();
    [id(200), propget] HRESULT Application([out, retval] IDispatch** ppDisp);
    [id(201), propget] HRESULT Parent([out, retval] IDispatch** ppDisp);
    [id(202), propget] HRESULT Container([out, retval] IDispatch** ppDisp);
    [id(203), propget] HRESULT Document([out] IDispatch** ppDisp);
    [id(204), propget] HRESULT TopLevelContainer([out, retval] VARIANT_BOOL* pBool);
    [id(205), propget] HRESULT Type([out, retval] BSTR* Type);
    [id(206), propget] HRESULT Left([out, retval] long *pl);
    [id(206), propput] HRESULT Left([in] long Left);
    [id(207), propget] HRESULT Top([out, retval] long *pl);
    [id(207), propput] HRESULT Top([in] long Top);
    [id(208), propget] HRESULT Width([out, retval] long *pl);
    [id(208), propput] HRESULT Width([in] long Width);
    [id(209), propget] HRESULT Height([out, retval] long *pl);
    [id(209), propput] HRESULT Height([in] long Height);
    [id(210), propget] HRESULT LocationName([out, retval] BSTR *LocationName);
    [id(211), propget] HRESULT LocationURL([out, retval] BSTR * LocationURL);
    [id(212), propget] HRESULT Busy([out, retval] VARIANT_BOOL *pBool);
91 92 93 94 95 96 97 98 99 100 101 102 103
}


/*****************************************************************************
 * IWebBrowserApp interface
 */
[
    object,
    oleautomation,
    uuid(0002df05-0000-0000-c000-000000000046)
]
interface IWebBrowserApp : IWebBrowser
{
Jacek Caban's avatar
Jacek Caban committed
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
    [id(300)] HRESULT Quit();
    [id(301)] HRESULT ClientToWindow([in,out] int* pcx, [in,out] int* pcy);
    [id(302)] HRESULT PutProperty([in] BSTR szProperty, [in] VARIANT vtValue);
    [id(303)] HRESULT GetProperty([in] BSTR szProperty, [out, retval] VARIANT *pvtValue);
    [id(0), propget] HRESULT Name([out, retval] BSTR* Name);
    [id(DISPID_HWND), propget] HRESULT HWND([out, retval] long *pHWND);
    [id(400), propget] HRESULT FullName([out, retval] BSTR* FullName);
    [id(401), propget] HRESULT Path([out, retval] BSTR* Path);
    [id(402), propget] HRESULT Visible([out, retval] VARIANT_BOOL* pBool);
    [id(402), propput] HRESULT Visible([in] VARIANT_BOOL Value);
    [id(403), propget] HRESULT StatusBar([out, retval] VARIANT_BOOL* pBool);
    [id(403), propput] HRESULT StatusBar([in] VARIANT_BOOL Value);
    [id(404), propget] HRESULT StatusText([out, retval] BSTR *StatusText);
    [id(404), propput] HRESULT StatusText([in] BSTR StatusText);
    [id(405), propget] HRESULT ToolBar([out, retval] int * Value);
    [id(405), propput] HRESULT ToolBar([in] int Value);
    [id(406), propget] HRESULT MenuBar([out, retval] VARIANT_BOOL * Value);
    [id(406), propput] HRESULT MenuBar([in] VARIANT_BOOL Value);
    [id(407), propget] HRESULT FullScreen([out, retval] VARIANT_BOOL * pbFullScreen);
    [id(407), propput] HRESULT FullScreen([in] VARIANT_BOOL bFullScreen);
124 125
}

126 127 128 129 130 131 132 133 134 135
/*****************************************************************************
 * IWebBrowser2 interface
 */
[
    object,
    oleautomation,
    uuid(d30c1661-cdaf-11d0-8a3e-00c04fc9e26e)
]
interface IWebBrowser2 : IWebBrowserApp
{
Jacek Caban's avatar
Jacek Caban committed
136
    [id(500)] HRESULT Navigate2(
137
        [in] VARIANT *URL,
Jacek Caban's avatar
Jacek Caban committed
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
        [in, optional] VARIANT *Flags,
        [in, optional] VARIANT *TargetFrameName,
        [in, optional] VARIANT *PostData,
        [in, optional] VARIANT *Headers);

    [id(501)] HRESULT QueryStatusWB(
        [in] OLECMDID cmdID,
        [out, retval] OLECMDF *pcmdf);

    [id(502)] HRESULT ExecWB(
        [in] OLECMDID cmdID,
        [in] OLECMDEXECOPT cmdexecopt,
        [in, optional] VARIANT *pvaIn,
        [out, in, optional] VARIANT *pvaOut);

    [id(503)] HRESULT ShowBrowserBar(
        [in] VARIANT *pvaClsid,
        [in, optional] VARIANT *pvarShow,
        [in, optional] VARIANT *pvarSize);

    [id(DISPID_READYSTATE), propget] HRESULT ReadyState([out, retval] READYSTATE *plReadyState);
    [id(550), propget] HRESULT Offline([out, retval] VARIANT_BOOL *pbOffline);
    [id(550), propput] HRESULT Offline([in] VARIANT_BOOL bOffline);
    [id(551), propget] HRESULT Silent([out, retval] VARIANT_BOOL *pbSilent);
    [id(551), propput] HRESULT Silent([in] VARIANT_BOOL bSilent);
    [id(552), propget] HRESULT RegisterAsBrowser([out, retval] VARIANT_BOOL *pbRegister);
    [id(552), propput] HRESULT RegisterAsBrowser([in] VARIANT_BOOL bRegister);
    [id(553), propget] HRESULT RegisterAsDropTarget([out, retval] VARIANT_BOOL *pbRegister);
    [id(553), propput] HRESULT RegisterAsDropTarget([in] VARIANT_BOOL bRegister);
    [id(554), propget] HRESULT TheaterMode([out, retval] VARIANT_BOOL *pbRegister);
    [id(554), propput] HRESULT TheaterMode([in] VARIANT_BOOL bRegister);
    [id(555), propget] HRESULT AddressBar([out, retval] VARIANT_BOOL *Value);
    [id(555), propput] HRESULT AddressBar([in] VARIANT_BOOL Value);
    [id(556), propget] HRESULT Resizable([out, retval] VARIANT_BOOL *Value);
    [id(556), propput] HRESULT Resizable([in] VARIANT_BOOL Value);
173 174
}

175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337
[
    uuid(eab22ac2-30c1-11CF-a7eb-0000C05bae0b)
]
dispinterface DWebBrowserEvents
{
    properties:
    methods:
    [id(DISPID_BEFORENAVIGATE)]
    void BeforeNavigate(
        [in] BSTR URL,
        [in] long Flags,
        [in] BSTR TargetFrameName,
        [in] VARIANT *PostData,
        [in] BSTR Headers,
        [in, out] VARIANT_BOOL *Cancel);

    [id(DISPID_NAVIGATECOMPLETE)]
    void NavigateComplete([in] BSTR URL);

    [id(DISPID_STATUSTEXTCHANGE)]
    void StatusTextChange([in] BSTR Text);

    [id(DISPID_PROGRESSCHANGE)]
    void ProgressChange([in] long Progress, [in] long ProgressMax);

    [id(DISPID_DOWNLOADCOMPLETE)]
    void DownloadComplete();

    [id(DISPID_COMMANDSTATECHANGE)]
    void CommandStateChange([in] long Command, [in]VARIANT_BOOL Enable);

    [id(DISPID_DOWNLOADBEGIN)]
    void DownloadBegin();

    [id(DISPID_NEWWINDOW)]
    void NewWindow(
        [in] BSTR URL,
        [in] long Flags,
        [in] BSTR TargetFrameName,
        [in] VARIANT *PostData,
        [in] BSTR Headers,
        [in,out] VARIANT_BOOL *Processed);

    [id(DISPID_TITLECHANGE)]
    void TitleChange([in] BSTR Text);

    [id(DISPID_FRAMEBEFORENAVIGATE)]
    void FrameBeforeNavigate(
        [in] BSTR URL,
        [in] long Flags,
        [in] BSTR TargetFrameName,
        [in] VARIANT *PostData,
        [in] BSTR Headers,
        [in, out]VARIANT_BOOL *Cancel);

    [id(DISPID_FRAMENAVIGATECOMPLETE)]
    void FrameNavigateComplete([in] BSTR URL);

    [id(DISPID_FRAMENEWWINDOW)]
    void FrameNewWindow(
        [in] BSTR URL,
        [in] long Flags,
        [in] BSTR TargetFrameName,
        [in] VARIANT *PostData,
        [in] BSTR Headers,
        [in,out] VARIANT_BOOL *Processed);

    [id(DISPID_QUIT)]
    void Quit([in, out] VARIANT_BOOL *Cancel);

    [id(DISPID_WINDOWMOVE)]
    void WindowMove();

    [id(DISPID_WINDOWRESIZE)]
    void WindowResize();

    [id(DISPID_WINDOWACTIVATE)]
    void WindowActivate();

    [id(DISPID_PROPERTYCHANGE)]
    void PropertyChange([in] BSTR Property);
}

[
    uuid(34a715a0-6587-11d0-924a-0020afc7ac4d)
]
dispinterface DWebBrowserEvents2
{
    properties:
    methods:
    [id(DISPID_STATUSTEXTCHANGE)]
    void StatusTextChange([in] BSTR Text);

    [id(DISPID_PROGRESSCHANGE)]
    void ProgressChange([in] long Progress, [in] long ProgressMax);

    [id(DISPID_COMMANDSTATECHANGE)]
    void CommandStateChange([in] long Command, [in] VARIANT_BOOL Enable);

    [id(DISPID_DOWNLOADBEGIN)]
    void DownloadBegin();

    [id(DISPID_DOWNLOADCOMPLETE)]
    void DownloadComplete();

    [id(DISPID_TITLECHANGE)]
    void TitleChange([in] BSTR szProperty);

    [id(DISPID_PROPERTYCHANGE)]
    void PropertyChange([in] BSTR szProperty);

    [id(DISPID_BEFORENAVIGATE2)]
    void BeforeNavigate2(
        [in] IDispatch *pDisp,
        [in] VARIANT *URL,
        [in] VARIANT *Flags,
        [in] VARIANT *TargetFrameName,
        [in] VARIANT *PostData,
        [in] VARIANT *Headers,
        [in, out] VARIANT_BOOL *Cancel);

    [id(DISPID_NEWWINDOW2)]
    void NewWindow2([in, out] IDispatch **ppDisp, [in, out] VARIANT_BOOL *Cancel);

    [id(DISPID_NAVIGATECOMPLETE2)]
    void NavigateComplete2([in] IDispatch *pDisp, [in] VARIANT *URL);

    [id(DISPID_DOCUMENTCOMPLETE)]
    void DocumentComplete([in] IDispatch *pDisp, [in] VARIANT *URL);

    [id(DISPID_ONQUIT)]
    void OnQuit();

    [id(DISPID_ONVISIBLE)]
    void OnVisible([in] VARIANT_BOOL Visible);

    [id(DISPID_ONTOOLBAR)]
    void OnToolBar([in] VARIANT_BOOL ToolBar);

    [id(DISPID_ONMENUBAR)]
    void OnMenuBar([in] VARIANT_BOOL MenuBar);

    [id(DISPID_ONSTATUSBAR)]
    void OnStatusBar([in] VARIANT_BOOL StatusBar);

    [id(DISPID_ONFULLSCREEN)]
    void OnFullScreen([in] VARIANT_BOOL FullScreen);

    [id(DISPID_ONTHEATERMODE)]
    void OnTheaterMode([in] VARIANT_BOOL TheaterMode);
}

[
    uuid(8856f961-340a-11d0-a96b-00c04fd705a2)
]
coclass WebBrowser
{
    [default] interface IWebBrowser2;
    interface IWebBrowser;
    [default, source] dispinterface DWebBrowserEvents2;
    [source] dispinterface DWebBrowserEvents;
}

338 339 340 341 342 343 344
[
    object,
    oleautomation,
    uuid(85cb6900-4d95-11cf-960c-0080c7f4ee85)
]
interface IShellWindows : IDispatch
{
345
    [propget] HRESULT Count( [out] long *Count );
Jacek Caban's avatar
Jacek Caban committed
346 347 348
    [id(0)] HRESULT Item( [in] VARIANT index, [out] IDispatch **Folder );
    [id(-4)] HRESULT _NewEnum( [out] IUnknown **ppunk );
    [hidden] HRESULT Register( [in] IDispatch *pid, [in] long hWnd, [in] int swClass,
349
                [out] long *plCookie );
Jacek Caban's avatar
Jacek Caban committed
350
    [hidden] HRESULT RegisterPending( [in] long lThread, [in] VARIANT *pvarloc,
351
                [in] VARIANT *varlocRoot, [in] int swClass, [out] long *plCookie );
Jacek Caban's avatar
Jacek Caban committed
352 353 354 355
    [hidden] HRESULT Revoke( [in] long Cookie );
    [hidden] HRESULT OnNavigate( [in] long Cookie, [out] VARIANT *pvarLoc );
    [hidden] HRESULT OnActivated( [in] long Cookie, [in] VARIANT fActive );
    [hidden] HRESULT FindWindowSW( [in] VARIANT *pvarLoc, [in] VARIANT *pvarLocRoot, 
356 357
                [in] int swClass, [out] long *phwnd, int swfwOptions,
                IDispatch **ppdispOut );
Jacek Caban's avatar
Jacek Caban committed
358 359
    [hidden] HRESULT OnCreated( [in] long lCookie, [in] IUnknown *punk );
    [hidden] HRESULT ProcessAttachDetach( [in] VARIANT_BOOL fAttach );
360
}
361 362 363 364 365 366 367 368 369

[
    uuid(9ba05972-f6a8-11cf-a442-00a0c90a8f39)
]
coclass ShellWindows
{
    [default] interface IShellWindows;
    [default, source] dispinterface DShellWindowsEvents;
}