~ubuntu-branches/ubuntu/maverick/webkit/maverick

« back to all changes in this revision

Viewing changes to WebKit/win/Interfaces/IWebFrame.idl

  • Committer: Bazaar Package Importer
  • Author(s): Mike Hommey
  • Date: 2007-08-19 15:54:12 UTC
  • Revision ID: james.westby@ubuntu.com-20070819155412-uxxg1h9plpghmtbi
Tags: upstream-0~svn25144
ImportĀ upstreamĀ versionĀ 0~svn25144

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2006, 2007 Apple Inc.  All rights reserved.
 
3
 *
 
4
 * Redistribution and use in source and binary forms, with or without
 
5
 * modification, are permitted provided that the following conditions
 
6
 * are met:
 
7
 * 1. Redistributions of source code must retain the above copyright
 
8
 *    notice, this list of conditions and the following disclaimer.
 
9
 * 2. Redistributions in binary form must reproduce the above copyright
 
10
 *    notice, this list of conditions and the following disclaimer in the
 
11
 *    documentation and/or other materials provided with the distribution.
 
12
 *
 
13
 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 
16
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 
17
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 
18
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 
19
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 
20
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 
21
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
 
24
 */
 
25
 
 
26
cpp_quote("/*")
 
27
cpp_quote(" * Copyright (C) 2006, 2007 Apple Inc.  All rights reserved.")
 
28
cpp_quote(" *")
 
29
cpp_quote(" * Redistribution and use in source and binary forms, with or without")
 
30
cpp_quote(" * modification, are permitted provided that the following conditions")
 
31
cpp_quote(" * are met:")
 
32
cpp_quote(" * 1. Redistributions of source code must retain the above copyright")
 
33
cpp_quote(" *    notice, this list of conditions and the following disclaimer.")
 
34
cpp_quote(" * 2. Redistributions in binary form must reproduce the above copyright")
 
35
cpp_quote(" *    notice, this list of conditions and the following disclaimer in the")
 
36
cpp_quote(" *    documentation and/or other materials provided with the distribution.")
 
37
cpp_quote(" *")
 
38
cpp_quote(" * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY")
 
39
cpp_quote(" * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE")
 
40
cpp_quote(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR")
 
41
cpp_quote(" * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR")
 
42
cpp_quote(" * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,")
 
43
cpp_quote(" * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,")
 
44
cpp_quote(" * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR")
 
45
cpp_quote(" * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY")
 
46
cpp_quote(" * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT")
 
47
cpp_quote(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE")
 
48
cpp_quote(" * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ")
 
49
cpp_quote(" */")
 
50
 
 
51
import "oaidl.idl";
 
52
import "ocidl.idl";
 
53
import "DOMHTML.idl";
 
54
import "IWebArchive.idl";
 
55
import "IWebFrameView.idl";
 
56
import "IWebView.idl";
 
57
import "IWebURLRequest.idl";
 
58
import "DOMCore.idl";
 
59
 
 
60
interface IDOMDocument;
 
61
interface IDOMHTMLElement;
 
62
interface IWebURLRequest;
 
63
interface IWebArchive;
 
64
interface IWebDataSource;
 
65
interface IWebFramePrivate;
 
66
interface IWebFrameView;
 
67
interface IWebView;
 
68
 
 
69
/*!
 
70
    @class WebFrame
 
71
    @discussion Every web page is represented by at least one WebFrame.  A WebFrame
 
72
    has a WebFrameView and a WebDataSource.
 
73
    @interface WebFrame : NSObject
 
74
*/
 
75
[
 
76
    object,
 
77
    oleautomation,
 
78
    uuid(B4B22EF7-DD43-4d01-A992-99C4A8B1F845),
 
79
    pointer_default(unique)
 
80
]
 
81
interface IWebFrame : IUnknown
 
82
{
 
83
    /*!
 
84
        @method name
 
85
        @result The frame name.
 
86
        - (NSString *)name;
 
87
    */
 
88
    HRESULT name([out, retval] BSTR* frameName);
 
89
 
 
90
    /*!
 
91
        @method webView
 
92
        @result Returns the WebView for the document that includes this frame.
 
93
        - (WebView *)webView;
 
94
    */
 
95
    HRESULT webView([out, retval] IWebView** view);
 
96
 
 
97
    /*!
 
98
        @method frameView
 
99
        @result The WebFrameView for this frame.
 
100
        - (WebFrameView *)frameView;
 
101
    */
 
102
    HRESULT frameView([out, retval] IWebFrameView** view);
 
103
 
 
104
    /*!
 
105
        @method DOMDocument
 
106
        @abstract Returns the DOM document of the frame.
 
107
        @description Returns nil if the frame does not contain a DOM document such as a standalone image.
 
108
        - (DOMDocument *)DOMDocument;
 
109
    */
 
110
    HRESULT DOMDocument([out, retval] IDOMDocument** document);
 
111
 
 
112
    /*!
 
113
        @method frameElement
 
114
        @abstract Returns the frame element of the frame.
 
115
        @description The class of the result is either DOMHTMLFrameElement, DOMHTMLIFrameElement or DOMHTMLObjectElement.
 
116
        Returns nil if the frame is the main frame since there is no frame element for the frame in this case.
 
117
        - (DOMHTMLElement *)frameElement;
 
118
    */
 
119
    HRESULT frameElement([out, retval] IDOMHTMLElement** frameElement);
 
120
 
 
121
    /*!
 
122
        @method loadRequest:
 
123
        @param request The web request to load.
 
124
        - (void)loadRequest:(NSURLRequest *)request;
 
125
    */
 
126
    HRESULT loadRequest([in] IWebURLRequest* request);
 
127
 
 
128
    /*!
 
129
        @method loadData:MIMEType:textEncodingName:baseURL:
 
130
        @param data The data to use for the main page of the document.
 
131
        @param MIMEType The MIME type of the data.
 
132
        @param encodingName The encoding of the data.
 
133
        @param URL The base URL to apply to relative URLs within the document.
 
134
        - (void)loadData:(NSData *)data MIMEType:(NSString *)MIMEType textEncodingName:(NSString *)encodingName baseURL:(NSURL *)URL;
 
135
    */
 
136
    HRESULT loadData([in] IStream* data, [in] BSTR mimeType, [in] BSTR textEncodingName, [in] BSTR url);
 
137
 
 
138
    /*!
 
139
        @method loadHTMLString:baseURL:
 
140
        @param string The string to use for the main page of the document.
 
141
        @param URL The base URL to apply to relative URLs within the document.
 
142
        - (void)loadHTMLString:(NSString *)string baseURL:(NSURL *)URL;
 
143
    */
 
144
    HRESULT loadHTMLString([in] BSTR string, [in] BSTR baseURL);
 
145
 
 
146
    /*!
 
147
        @method loadAlternateHTMLString:baseURL:forUnreachableURL:
 
148
        @abstract Loads a page to display as a substitute for a URL that could not be reached.
 
149
        @discussion This allows clients to display page-loading errors in the webview itself.
 
150
        This is typically called while processing the WebFrameLoadDelegate method
 
151
        -webView:didFailProvisionalLoadWithError:forFrame: or one of the the WebPolicyDelegate methods
 
152
        -webView:decidePolicyForMIMEType:request:frame:decisionListener: or
 
153
        -webView:unableToImplementPolicyWithError:frame:. If it is called from within one of those
 
154
        three delegate methods then the back/forward list will be maintained appropriately.
 
155
        @param string The string to use for the main page of the document.
 
156
        @param baseURL The baseURL to apply to relative URLs within the document.
 
157
        @param unreachableURL The URL for which this page will serve as alternate content.
 
158
        - (void)loadAlternateHTMLString:(NSString *)string baseURL:(NSURL *)baseURL forUnreachableURL:(NSURL *)unreachableURL;
 
159
    */
 
160
    HRESULT loadAlternateHTMLString([in] BSTR str, [in] BSTR baseURL, [in] BSTR unreachableURL);
 
161
 
 
162
    /*!
 
163
        @method loadArchive:
 
164
        @abstract Causes WebFrame to load a WebArchive.
 
165
        @param archive The archive to be loaded.
 
166
        - (void)loadArchive:(WebArchive *)archive;
 
167
    */
 
168
    HRESULT loadArchive([in] IWebArchive* archive);
 
169
 
 
170
    /*!
 
171
        @method dataSource
 
172
        @discussion Returns the committed data source.  Will return nil if the
 
173
        provisional data source hasn't yet been loaded.
 
174
        @result The datasource for this frame.
 
175
        - (WebDataSource *)dataSource;
 
176
    */
 
177
    HRESULT dataSource([out, retval] IWebDataSource** source);
 
178
 
 
179
    /*!
 
180
        @method provisionalDataSource
 
181
        @discussion Will return the provisional data source.  The provisional data source will
 
182
        be nil if no data source has been set on the frame, or the data source
 
183
        has successfully transitioned to the committed data source.
 
184
        @result The provisional datasource of this frame.
 
185
        - (WebDataSource *)provisionalDataSource;
 
186
    */
 
187
    HRESULT provisionalDataSource([out, retval] IWebDataSource** source);
 
188
 
 
189
    /*!
 
190
        @method stopLoading
 
191
        @discussion Stop any pending loads on the frame's data source,
 
192
        and its children.
 
193
        - (void)stopLoading;
 
194
    */
 
195
    HRESULT stopLoading();
 
196
 
 
197
    /*!
 
198
        @method reload
 
199
        - (void)reload;
 
200
    */
 
201
    HRESULT reload();
 
202
 
 
203
    /*!
 
204
        @method findFrameNamed:
 
205
        @discussion This method returns a frame with the given name. findFrameNamed returns self 
 
206
        for _self and _current, the parent frame for _parent and the main frame for _top. 
 
207
        findFrameNamed returns self for _parent and _top if the receiver is the mainFrame.
 
208
        findFrameNamed first searches from the current frame to all descending frames then the
 
209
        rest of the frames in the WebView. If still not found, findFrameNamed searches the
 
210
        frames of the other WebViews.
 
211
        @param name The name of the frame to find.
 
212
        @result The frame matching the provided name. nil if the frame is not found.
 
213
        - (WebFrame *)findFrameNamed:(NSString *)name;
 
214
    */
 
215
    HRESULT findFrameNamed([in] BSTR name, [out, retval] IWebFrame** frame);
 
216
 
 
217
    /*!
 
218
        @method parentFrame
 
219
        @result The frame containing this frame, or nil if this is a top level frame.
 
220
        - (WebFrame *)parentFrame;
 
221
    */
 
222
    HRESULT parentFrame([out, retval] IWebFrame** frame);
 
223
 
 
224
    /*!
 
225
        @method childFrames
 
226
        @discussion The frames in the array are associated with a frame set or iframe.
 
227
        @result Returns an array of WebFrame.
 
228
        - (NSArray *)childFrames;
 
229
    */
 
230
    HRESULT childFrames([out, retval] IEnumVARIANT** enumFrames);
 
231
 
 
232
 
 
233
  /* This is a DOMElement on mac, but maybe should be a DOMHTMLFrameElement? */
 
234
    HRESULT currentForm([out, retval] IDOMElement** frameElement);
 
235
}