exdisp.idl 10.9 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";

26
#include <exdispid.h>
27 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 58 59 60 61 62 63 64 65 66 67 68 69

/*****************************************************************************
 * 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;

    HRESULT GoBack();
    HRESULT GoForward();
    HRESULT GoHome();
    HRESULT GoSearch();
    HRESULT Navigate(
        [in] BSTR URL,
        [in] VARIANT *Flags,
        [in] VARIANT *TargetFrameName,
        [in] VARIANT *PostData,
        [in] VARIANT *Headers);
    HRESULT Refresh();
    HRESULT Refresh2( [in] VARIANT *Level );
    HRESULT Stop();
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
    [propget] HRESULT Application([out] IDispatch** ppDisp);
    [propget] HRESULT Parent([out] IDispatch** ppDisp);
    [propget] HRESULT Container([out] IDispatch** ppDisp);
    [propget] HRESULT Document([out] IDispatch** ppDisp);
    [propget] HRESULT TopLevelContainer([out] VARIANT_BOOL* pBool);
    [propget] HRESULT Type([out] BSTR* Type);
    [propget] HRESULT Left([out] long *pl);
    [propput] HRESULT Left([in] long Left);
    [propget] HRESULT Top([out] long *pl);
    [propput] HRESULT Top([in] long Top);
    [propget] HRESULT Width([out] long *pl);
    [propput] HRESULT Width([in] long Width);
    [propget] HRESULT Height([out] long *pl);
    [propput] HRESULT Height([in] long Height);
    [propget] HRESULT LocationName([out] BSTR *LocationName);
    [propget] HRESULT LocationURL([out] BSTR * LocationURL);
    [propget] HRESULT Busy([out] VARIANT_BOOL *pBool);
87 88 89 90 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
{
    HRESULT Quit();
    HRESULT ClientToWindow([in,out] int* pcx, [in,out] int* pcy);
    HRESULT PutProperty([in] BSTR szProperty, [in] VARIANT vtValue);
    HRESULT GetProperty([in] BSTR szProperty, [out] VARIANT *pvtValue);
104
    [propget] HRESULT Name([out] BSTR* Name);
105
    [propget] HRESULT HWND([out] long *pHWND);
106 107 108 109 110 111 112 113 114 115 116 117 118 119
    [propget] HRESULT FullName([out] BSTR* FullName);
    [propget] HRESULT Path([out] BSTR* Path);
    [propget] HRESULT Visible([out] VARIANT_BOOL* pBool);
    [propput] HRESULT Visible([in] VARIANT_BOOL Value);
    [propget] HRESULT StatusBar([out] VARIANT_BOOL* pBool);
    [propput] HRESULT StatusBar([in] VARIANT_BOOL Value);
    [propget] HRESULT StatusText([out] BSTR *StatusText);
    [propput] HRESULT StatusText([in] BSTR StatusText);
    [propget] HRESULT ToolBar([out] int * Value);
    [propput] HRESULT ToolBar([in] int Value);
    [propget] HRESULT MenuBar([out] VARIANT_BOOL * Value);
    [propput] HRESULT MenuBar([in] VARIANT_BOOL Value);
    [propget] HRESULT FullScreen([out] VARIANT_BOOL * pbFullScreen);
    [propput] HRESULT FullScreen([in] VARIANT_BOOL bFullScreen);
120 121
}

122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
/*****************************************************************************
 * IWebBrowser2 interface
 */
[
    object,
    oleautomation,
    uuid(d30c1661-cdaf-11d0-8a3e-00c04fc9e26e)
]
interface IWebBrowser2 : IWebBrowserApp
{
    HRESULT Navigate2(
        [in] VARIANT *URL,
        [in] VARIANT *Flags,
        [in] VARIANT *TargetFrameName,
        [in] VARIANT *PostData,
        [in] VARIANT *Headers);
    HRESULT QueryStatusWB([in] OLECMDID cmdID, [out] OLECMDF *pcmdf);
    HRESULT ExecWB([in] OLECMDID cmdID, [in] OLECMDEXECOPT cmdexecopt, [in] VARIANT *pvaIn, [out, in] VARIANT *pvaOut);
    HRESULT ShowBrowserBar([in] VARIANT *pvaClsid, [in] VARIANT *pvarShow, [in] VARIANT *pvarSize);

    [propget] HRESULT ReadyState([out] READYSTATE *plReadyState);
    [propget] HRESULT Offline([out] VARIANT_BOOL *pbOffline);
    [propput] HRESULT Offline([in] VARIANT_BOOL bOffline);
    [propget] HRESULT Silent([out] VARIANT_BOOL *pbSilent);
    [propput] HRESULT Silent([in] VARIANT_BOOL bSilent);
    [propget] HRESULT RegisterAsBrowser([out] VARIANT_BOOL *pbRegister);
    [propput] HRESULT RegisterAsBrowser([in] VARIANT_BOOL bRegister);
    [propget] HRESULT RegisterAsDropTarget([out] VARIANT_BOOL *pbRegister);
    [propput] HRESULT RegisterAsDropTarget([in] VARIANT_BOOL bRegister);
    [propget] HRESULT TheaterMode([out] VARIANT_BOOL *pbRegister);
    [propput] HRESULT TheaterMode([in] VARIANT_BOOL bRegister);
    [propget] HRESULT AddressBar([out] VARIANT_BOOL *Value);
    [propput] HRESULT AddressBar([in] VARIANT_BOOL Value);
    [propget] HRESULT Resizable([out] VARIANT_BOOL *Value);
    [propput] HRESULT Resizable([in] VARIANT_BOOL Value);
}

159 160 161 162 163 164 165 166 167 168 169 170 171 172 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
[
    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;
}

322 323 324 325 326 327 328
[
    object,
    oleautomation,
    uuid(85cb6900-4d95-11cf-960c-0080c7f4ee85)
]
interface IShellWindows : IDispatch
{
329
    [propget] HRESULT Count( [out] long *Count );
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344
    HRESULT Item( [in] VARIANT index, [out] IDispatch **Folder );
    HRESULT _NewEnum( [out] IUnknown **ppunk );
    HRESULT Register( [in] IDispatch *pid, [in] long hWnd, [in] int swClass,
                [out] long *plCookie );
    HRESULT RegisterPending( [in] long lThread, [in] VARIANT *pvarloc,
                [in] VARIANT *varlocRoot, [in] int swClass, [out] long *plCookie );
    HRESULT Revoke( [in] long Cookie );
    HRESULT OnNavigate( [in] long Cookie, [out] VARIANT *pvarLoc );
    HRESULT OnActivated( [in] long Cookie, [in] VARIANT fActive );
    HRESULT FindWindowSW( [in] VARIANT *pvarLoc, [in] VARIANT *pvarLocRoot, 
                [in] int swClass, [out] long *phwnd, int swfwOptions,
                IDispatch **ppdispOut );
    HRESULT OnCreated( [in] long lCookie, [in] IUnknown *punk );
    HRESULT ProcessAttachDetach( [in] VARIANT_BOOL fAttach );
}