|
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 cpp_quote("/* identifiers for commands that can be called by the webview's frame */") |
|
52 cpp_quote("enum WebViewCmd { Cut = 100, Copy, Paste, ForwardDelete, SelectAll, Undo, Redo };") |
|
53 |
|
54 cpp_quote("#define WebViewProgressStartedNotification TEXT(\"WebProgressStartedNotification\")") |
|
55 cpp_quote("#define WebViewProgressEstimateChangedNotification TEXT(\"WebProgressEstimateChangedNotification\")") |
|
56 cpp_quote("#define WebViewProgressFinishedNotification TEXT(\"WebProgressFinishedNotification\")") |
|
57 |
|
58 import "oaidl.idl"; |
|
59 import "ocidl.idl"; |
|
60 import "IWebUIDelegate.idl"; |
|
61 import "IWebURLResponse.idl"; |
|
62 import "IWebResourceLoadDelegate.idl"; |
|
63 import "IWebDownload.idl"; |
|
64 import "IWebFrameLoadDelegate.idl"; |
|
65 import "IWebPolicyDelegate.idl"; |
|
66 import "IWebBackForwardList.idl"; |
|
67 import "IWebHistoryItem.idl"; |
|
68 import "IWebPreferences.idl"; |
|
69 import "DOMCSS.idl"; |
|
70 import "IWebUndoManager.idl"; |
|
71 import "IWebEditingDelegate.idl"; |
|
72 import "DOMRange.idl"; |
|
73 |
|
74 interface IDOMCSSStyleDeclaration; |
|
75 interface IDOMDocument; |
|
76 interface IDOMElement; |
|
77 interface IDOMNode; |
|
78 interface IDOMRange; |
|
79 |
|
80 interface IWebArchive; |
|
81 interface IWebBackForwardList; |
|
82 interface IWebDataSource; |
|
83 interface IWebFrame; |
|
84 interface IWebFrameView; |
|
85 interface IWebHistoryItem; |
|
86 interface IWebPreferences; |
|
87 interface IWebScriptObject; |
|
88 |
|
89 interface IWebUIDelegate; |
|
90 interface IWebResourceLoadDelegate; |
|
91 interface IWebDownloadDelegate; |
|
92 interface IWebEditingDelegate; |
|
93 interface IWebFrameLoadDelegate; |
|
94 interface IWebPolicyDelegate; |
|
95 interface IWebDocumentView; |
|
96 interface IWebDocumentRepresentation; |
|
97 interface IWebUndoManager; |
|
98 |
|
99 /* These are the keys for the WebElementPropertyBag */ |
|
100 const LPCOLESTR WebElementDOMNodeKey = L"WebElementDOMNodeKey"; |
|
101 const LPCOLESTR WebElementFrameKey = L"WebElementFrameKey"; |
|
102 const LPCOLESTR WebElementImageAltStringKey = L"WebElementImageAltStringKey"; |
|
103 const LPCOLESTR WebElementImageKey = L"WebElementImageKey"; |
|
104 const LPCOLESTR WebElementImageRectKey = L"WebElementImageRectKey"; |
|
105 const LPCOLESTR WebElementImageURLKey = L"WebElementImageURLKey"; |
|
106 const LPCOLESTR WebElementIsSelectedKey = L"WebElementIsSelectedKey"; |
|
107 const LPCOLESTR WebElementSpellingToolTipKey = L"WebElementSpellingToolTipKey"; |
|
108 const LPCOLESTR WebElementTitleKey = L"WebElementTitleKey"; |
|
109 const LPCOLESTR WebElementLinkURLKey = L"WebElementLinkURLKey"; |
|
110 const LPCOLESTR WebElementLinkTargetFrameKey = L"WebElementLinkTargetFrameKey"; |
|
111 const LPCOLESTR WebElementLinkTitleKey = L"WebElementLinkTitleKey"; |
|
112 const LPCOLESTR WebElementLinkLabelKey = L"WebElementLinkLabelKey"; |
|
113 const LPCOLESTR WebElementIsContentEditableKey = L"WebElementIsContentEditableKey"; |
|
114 |
|
115 /*! |
|
116 @class IEnumTextMatches |
|
117 */ |
|
118 [ |
|
119 object, |
|
120 oleautomation, |
|
121 uuid(C0CDE63A-5ED1-453f-B937-93B1A61AD3B3), |
|
122 pointer_default(unique) |
|
123 ] |
|
124 interface IEnumTextMatches : IUnknown |
|
125 { |
|
126 HRESULT Next(ULONG celt, RECT* rect, ULONG* pceltFetched); |
|
127 HRESULT Skip(ULONG celt); |
|
128 HRESULT Reset(void); |
|
129 HRESULT Clone(IEnumTextMatches** ppenum); |
|
130 }; |
|
131 |
|
132 /*! |
|
133 @class WebView |
|
134 WebView manages the interaction between WebFrameViews and WebDataSources. Modification |
|
135 of the policies and behavior of the WebKit is largely managed by WebViews and their |
|
136 delegates. |
|
137 |
|
138 <p> |
|
139 Typical usage: |
|
140 </p> |
|
141 <pre> |
|
142 WebView *webView; |
|
143 WebFrame *mainFrame; |
|
144 |
|
145 webView = [[WebView alloc] initWithFrame: NSMakeRect (0,0,640,480)]; |
|
146 mainFrame = [webView mainFrame]; |
|
147 [mainFrame loadRequest:request]; |
|
148 </pre> |
|
149 |
|
150 WebViews have the following delegates: WebUIDelegate, WebResourceLoadDelegate, |
|
151 WebFrameLoadDelegate, and WebPolicyDelegate. |
|
152 |
|
153 WebKit depends on the WebView's WebUIDelegate for all window |
|
154 related management, including opening new windows and controlling the user interface |
|
155 elements in those windows. |
|
156 |
|
157 WebResourceLoadDelegate is used to monitor the progress of resources as they are |
|
158 loaded. This delegate may be used to present users with a progress monitor. |
|
159 |
|
160 The WebFrameLoadDelegate receives messages when the URL in a WebFrame is |
|
161 changed. |
|
162 |
|
163 WebView's WebPolicyDelegate can make determinations about how |
|
164 content should be handled, based on the resource's URL and MIME type. |
|
165 |
|
166 @interface WebView : NSView |
|
167 */ |
|
168 [ |
|
169 object, |
|
170 oleautomation, |
|
171 hidden, |
|
172 uuid(174BBEFD-058E-49c7-91DF-6F110AA4AC28), |
|
173 pointer_default(unique) |
|
174 ] |
|
175 interface IWebView : IUnknown |
|
176 { |
|
177 /*! |
|
178 @method canShowMIMEType: |
|
179 @abstract Checks if the WebKit can show content of a certain MIME type. |
|
180 @param MIMEType The MIME type to check. |
|
181 @result YES if the WebKit can show content with MIMEtype. |
|
182 + (BOOL)canShowMIMEType:(NSString *)MIMEType; |
|
183 */ |
|
184 HRESULT canShowMIMEType([in] BSTR mimeType, [out, retval] BOOL* canShow); |
|
185 |
|
186 /*! |
|
187 @method canShowMIMETypeAsHTML: |
|
188 @abstract Checks if the the MIME type is a type that the WebKit will interpret as HTML. |
|
189 @param MIMEType The MIME type to check. |
|
190 @result YES if the MIMEtype in an HTML type. |
|
191 + (BOOL)canShowMIMETypeAsHTML:(NSString *)MIMEType; |
|
192 */ |
|
193 HRESULT canShowMIMETypeAsHTML([in] BSTR mimeType, [out, retval] BOOL* canShow); |
|
194 |
|
195 /*! |
|
196 @method MIMETypesShownAsHTML |
|
197 @result Returns an array of NSStrings that describe the MIME types |
|
198 WebKit will attempt to render as HTML. |
|
199 + (NSArray *)MIMETypesShownAsHTML; |
|
200 */ |
|
201 HRESULT MIMETypesShownAsHTML([out, retval] IEnumVARIANT** enumVariant); |
|
202 |
|
203 /*! |
|
204 @method setMIMETypesShownAsHTML: |
|
205 @discussion Sets the array of NSString MIME types that WebKit will |
|
206 attempt to render as HTML. Typically you will retrieve the built-in |
|
207 array using MIMETypesShownAsHTML and add additional MIME types to that |
|
208 array. |
|
209 + (void)setMIMETypesShownAsHTML:(NSArray *)MIMETypes; |
|
210 */ |
|
211 HRESULT setMIMETypesShownAsHTML([in, size_is(cMimeTypes)] BSTR* mimeTypes, [in] int cMimeTypes); |
|
212 |
|
213 /*! |
|
214 @method URLFromPasteboard: |
|
215 @abstract Returns a URL from a pasteboard |
|
216 @param pasteboard The pasteboard with a URL |
|
217 @result A URL if the pasteboard has one. Nil if it does not. |
|
218 @discussion This method differs than NSURL's URLFromPasteboard method in that it tries multiple pasteboard types |
|
219 including NSURLPboardType to find a URL on the pasteboard. |
|
220 + (NSURL *)URLFromPasteboard:(NSPasteboard *)pasteboard; |
|
221 */ |
|
222 HRESULT URLFromPasteboard([in] IDataObject* pasteboard, [out, retval] BSTR* url); |
|
223 |
|
224 /*! |
|
225 @method URLTitleFromPasteboard: |
|
226 @abstract Returns a URL title from a pasteboard |
|
227 @param pasteboard The pasteboard with a URL title |
|
228 @result A URL title if the pasteboard has one. Nil if it does not. |
|
229 @discussion This method returns a title that refers a URL on the pasteboard. An example of this is the link label |
|
230 which is the text inside the anchor tag. |
|
231 + (NSString *)URLTitleFromPasteboard:(NSPasteboard *)pasteboard; |
|
232 */ |
|
233 HRESULT URLTitleFromPasteboard([in] IDataObject* pasteboard, [out, retval] BSTR* urlTitle); |
|
234 |
|
235 /*! |
|
236 @method initWithFrame:frameName:groupName: |
|
237 @abstract The designated initializer for WebView. |
|
238 @discussion Initialize a WebView with the supplied parameters. This method will |
|
239 create a main WebFrame with the view. Passing a top level frame name is useful if you |
|
240 handle a targetted frame navigation that would normally open a window in some other |
|
241 way that still ends up creating a new WebView. |
|
242 @param frame The frame used to create the view. |
|
243 @param frameName The name to use for the top level frame. May be nil. |
|
244 @param groupName The name of the webView set to which this webView will be added. May be nil. |
|
245 @result Returns an initialized WebView. |
|
246 - (id)initWithFrame:(NSRect)frame frameName:(NSString *)frameName groupName:(NSString *)groupName; |
|
247 */ |
|
248 HRESULT initWithFrame([in] RECT frame, [in] BSTR frameName, [in] BSTR groupName); |
|
249 |
|
250 /*! |
|
251 @method setUIDelegate: |
|
252 @abstract Set the WebView's WebUIDelegate. |
|
253 @param delegate The WebUIDelegate to set as the delegate. |
|
254 - (void)setUIDelegate:(id)delegate; |
|
255 */ |
|
256 HRESULT setUIDelegate([in] IWebUIDelegate* d); |
|
257 |
|
258 /*! |
|
259 @method UIDelegate |
|
260 @abstract Return the WebView's WebUIDelegate. |
|
261 @result The WebView's WebUIDelegate. |
|
262 - (id)UIDelegate; |
|
263 */ |
|
264 HRESULT uiDelegate([retval, out] IWebUIDelegate** d); |
|
265 |
|
266 /*! |
|
267 @method setResourceLoadDelegate: |
|
268 @abstract Set the WebView's WebResourceLoadDelegate load delegate. |
|
269 @param delegate The WebResourceLoadDelegate to set as the load delegate. |
|
270 - (void)setResourceLoadDelegate:(id)delegate; |
|
271 */ |
|
272 HRESULT setResourceLoadDelegate([in] IWebResourceLoadDelegate* d); |
|
273 |
|
274 /*! |
|
275 @method resourceLoadDelegate |
|
276 @result Return the WebView's WebResourceLoadDelegate. |
|
277 - (id)resourceLoadDelegate; |
|
278 */ |
|
279 HRESULT resourceLoadDelegate([retval, out] IWebResourceLoadDelegate** d); |
|
280 |
|
281 /*! |
|
282 @method setDownloadDelegate: |
|
283 @abstract Set the WebView's WebDownloadDelegate. |
|
284 @discussion The download delegate is retained by WebDownload when any downloads are in progress. |
|
285 @param delegate The WebDownloadDelegate to set as the download delegate. |
|
286 - (void)setDownloadDelegate:(id)delegate; |
|
287 */ |
|
288 HRESULT setDownloadDelegate([in] IWebDownloadDelegate* d); |
|
289 |
|
290 /*! |
|
291 @method downloadDelegate |
|
292 @abstract Return the WebView's WebDownloadDelegate. |
|
293 @result The WebView's WebDownloadDelegate. |
|
294 - (id)downloadDelegate; |
|
295 */ |
|
296 HRESULT downloadDelegate([retval, out] IWebDownloadDelegate** d); |
|
297 |
|
298 /*! |
|
299 @method setFrameLoadDelegate: |
|
300 @abstract Set the WebView's WebFrameLoadDelegate delegate. |
|
301 @param delegate The WebFrameLoadDelegate to set as the delegate. |
|
302 - (void)setFrameLoadDelegate:(id)delegate; |
|
303 */ |
|
304 HRESULT setFrameLoadDelegate([in] IWebFrameLoadDelegate* d); |
|
305 |
|
306 /*! |
|
307 @method frameLoadDelegate |
|
308 @abstract Return the WebView's WebFrameLoadDelegate delegate. |
|
309 @result The WebView's WebFrameLoadDelegate delegate. |
|
310 - (id)frameLoadDelegate; |
|
311 */ |
|
312 HRESULT frameLoadDelegate([retval, out] IWebFrameLoadDelegate** d); |
|
313 |
|
314 /*! |
|
315 @method setPolicyDelegate: |
|
316 @abstract Set the WebView's WebPolicyDelegate delegate. |
|
317 @param delegate The WebPolicyDelegate to set as the delegate. |
|
318 - (void)setPolicyDelegate:(id)delegate; |
|
319 */ |
|
320 HRESULT setPolicyDelegate([in] IWebPolicyDelegate* d); |
|
321 |
|
322 /*! |
|
323 @method policyDelegate |
|
324 @abstract Return the WebView's WebPolicyDelegate. |
|
325 @result The WebView's WebPolicyDelegate. |
|
326 - (id)policyDelegate; |
|
327 */ |
|
328 HRESULT policyDelegate([retval, out] IWebPolicyDelegate** d); |
|
329 |
|
330 /*! |
|
331 @method mainFrame |
|
332 @abstract Return the top level frame. |
|
333 @discussion Note that even document that are not framesets will have a |
|
334 mainFrame. |
|
335 @result The main frame. |
|
336 - (WebFrame *)mainFrame; |
|
337 */ |
|
338 HRESULT mainFrame([retval, out] IWebFrame** frame); |
|
339 |
|
340 /*! |
|
341 @method focusedFrame |
|
342 @abstract Return the frame that has the current focus. |
|
343 */ |
|
344 HRESULT focusedFrame([retval, out] IWebFrame** frame); |
|
345 |
|
346 /*! |
|
347 @method backForwardList |
|
348 @result The backforward list for this webView. |
|
349 - (WebBackForwardList *)backForwardList; |
|
350 */ |
|
351 HRESULT backForwardList([retval, out] IWebBackForwardList** list); |
|
352 |
|
353 /*! |
|
354 @method setMaintainsBackForwardList: |
|
355 @abstract Enable or disable the use of a backforward list for this webView. |
|
356 @param flag Turns use of the back forward list on or off |
|
357 - (void)setMaintainsBackForwardList:(BOOL)flag; |
|
358 */ |
|
359 HRESULT setMaintainsBackForwardList([in] BOOL flag); |
|
360 |
|
361 /*! |
|
362 @method goBack |
|
363 @abstract Go back to the previous URL in the backforward list. |
|
364 @result YES if able to go back in the backforward list, NO otherwise. |
|
365 - (BOOL)goBack; |
|
366 */ |
|
367 HRESULT goBack([out, retval] BOOL* succeeded); |
|
368 |
|
369 /*! |
|
370 @method goForward |
|
371 @abstract Go forward to the next URL in the backforward list. |
|
372 @result YES if able to go forward in the backforward list, NO otherwise. |
|
373 - (BOOL)goForward; |
|
374 */ |
|
375 HRESULT goForward([out, retval] BOOL* succeeded); |
|
376 |
|
377 /*! |
|
378 @method goToBackForwardItem: |
|
379 @abstract Go back or forward to an item in the backforward list. |
|
380 @result YES if able to go to the item, NO otherwise. |
|
381 - (BOOL)goToBackForwardItem:(WebHistoryItem *)item; |
|
382 */ |
|
383 HRESULT goToBackForwardItem([in] IWebHistoryItem* item, [out, retval] BOOL* succeeded); |
|
384 |
|
385 /*! |
|
386 @method setTextSizeMultiplier: |
|
387 @abstract Change the size of the text rendering in views managed by this webView. |
|
388 @param multiplier A fractional percentage value, 1.0 is 100%. |
|
389 - (void)setTextSizeMultiplier:(float)multiplier; |
|
390 */ |
|
391 HRESULT setTextSizeMultiplier([in] float multiplier); |
|
392 |
|
393 /*! |
|
394 @method textSizeMultiplier |
|
395 @result The text size multipler. |
|
396 - (float)textSizeMultiplier; |
|
397 */ |
|
398 HRESULT textSizeMultiplier([out, retval] float* multiplier); |
|
399 |
|
400 /*! |
|
401 @method setApplicationNameForUserAgent: |
|
402 @abstract Set the application name. |
|
403 @discussion This name will be used in user-agent strings |
|
404 that are chosen for best results in rendering web pages. |
|
405 @param applicationName The application name |
|
406 - (void)setApplicationNameForUserAgent:(NSString *)applicationName; |
|
407 */ |
|
408 HRESULT setApplicationNameForUserAgent([in] BSTR applicationName); |
|
409 |
|
410 /*! |
|
411 @method applicationNameForUserAgent |
|
412 @result The name of the application as used in the user-agent string. |
|
413 - (NSString *)applicationNameForUserAgent; |
|
414 */ |
|
415 HRESULT applicationNameForUserAgent([out, retval] BSTR* applicationName); |
|
416 |
|
417 /*! |
|
418 @method setCustomUserAgent: |
|
419 @abstract Set the user agent. |
|
420 @discussion Setting this means that the webView should use this user-agent string |
|
421 instead of constructing a user-agent string for each URL. Setting it to nil |
|
422 causes the webView to construct the user-agent string for each URL |
|
423 for best results rendering web pages. |
|
424 @param userAgentString The user agent description |
|
425 - (void)setCustomUserAgent:(NSString *)userAgentString; |
|
426 */ |
|
427 HRESULT setCustomUserAgent([in] BSTR userAgentString); |
|
428 |
|
429 /*! |
|
430 @method customUserAgent |
|
431 @result The custom user-agent string or nil if no custom user-agent string has been set. |
|
432 - (NSString *)customUserAgent; |
|
433 */ |
|
434 HRESULT customUserAgent([out, retval] BSTR* userAgentString); |
|
435 |
|
436 /*! |
|
437 @method userAgentForURL: |
|
438 @abstract Get the appropriate user-agent string for a particular URL. |
|
439 @param URL The URL. |
|
440 @result The user-agent string for the supplied URL. |
|
441 - (NSString *)userAgentForURL:(NSURL *)URL; |
|
442 */ |
|
443 HRESULT userAgentForURL([in] BSTR url, [out, retval] BSTR* userAgent); |
|
444 |
|
445 /*! |
|
446 @method supportsTextEncoding |
|
447 @abstract Find out if the current web page supports text encodings. |
|
448 @result YES if the document view of the current web page can |
|
449 support different text encodings. |
|
450 - (BOOL)supportsTextEncoding; |
|
451 */ |
|
452 HRESULT supportsTextEncoding([out, retval] BOOL* supports); |
|
453 |
|
454 /*! |
|
455 @method setCustomTextEncodingName: |
|
456 @discussion Make the page display with a different text encoding; stops any load in progress. |
|
457 The text encoding passed in overrides the normal text encoding smarts including |
|
458 what's specified in a web page's header or HTTP response. |
|
459 The text encoding automatically goes back to the default when the top level frame |
|
460 changes to a new location. |
|
461 Setting the text encoding name to nil makes the webView use default encoding rules. |
|
462 @param encoding The text encoding name to use to display a page or nil. |
|
463 - (void)setCustomTextEncodingName:(NSString *)encodingName; |
|
464 */ |
|
465 HRESULT setCustomTextEncodingName([in] BSTR encodingName); |
|
466 |
|
467 /*! |
|
468 @method customTextEncodingName |
|
469 @result The custom text encoding name or nil if no custom text encoding name has been set. |
|
470 - (NSString *)customTextEncodingName; |
|
471 */ |
|
472 HRESULT customTextEncodingName([out, retval] BSTR* encodingName); |
|
473 |
|
474 /*! |
|
475 @method setMediaStyle: |
|
476 @discussion Set the media style for the WebView. The mediaStyle will override the normal value |
|
477 of the CSS media property. Setting the value to nil will restore the normal value. |
|
478 @param mediaStyle The value to use for the CSS media property. |
|
479 - (void)setMediaStyle:(NSString *)mediaStyle; |
|
480 */ |
|
481 HRESULT setMediaStyle([in] BSTR media); |
|
482 |
|
483 /*! |
|
484 @method mediaStyle |
|
485 @result mediaStyle The value to use for the CSS media property, as set by setMediaStyle:. It |
|
486 will be nil unless set by that method. |
|
487 - (NSString *)mediaStyle; |
|
488 */ |
|
489 HRESULT mediaStyle([out, retval] BSTR* media); |
|
490 |
|
491 /*! |
|
492 @method stringByEvaluatingJavaScriptFromString: |
|
493 @param script The text of the JavaScript. |
|
494 @result The result of the script, converted to a string, or nil for failure. |
|
495 - (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)script; |
|
496 */ |
|
497 HRESULT stringByEvaluatingJavaScriptFromString([in] BSTR script, [out, retval] BSTR* result); |
|
498 |
|
499 /*! |
|
500 @method windowScriptObject |
|
501 @discussion windowScriptObject return a WebScriptObject that represents the |
|
502 window object from the script environment. |
|
503 @result Returns the window object from the script environment. |
|
504 - (WebScriptObject *)windowScriptObject; |
|
505 */ |
|
506 HRESULT windowScriptObject([out, retval] IWebScriptObject** webScriptObject); |
|
507 |
|
508 /*! |
|
509 @method setPreferences: |
|
510 @param preferences The preferences to use for the webView. |
|
511 @abstract Override the standard setting for the webView. |
|
512 - (void)setPreferences: (WebPreferences *)prefs; |
|
513 */ |
|
514 HRESULT setPreferences([in] IWebPreferences* prefs); |
|
515 |
|
516 /*! |
|
517 @method preferences |
|
518 @result Returns the preferences used by this webView. |
|
519 @discussion This method will return [WebPreferences standardPreferences] if no |
|
520 other instance of WebPreferences has been set. |
|
521 - (WebPreferences *)preferences; |
|
522 */ |
|
523 HRESULT preferences([out, retval] IWebPreferences** prefs); |
|
524 |
|
525 /*! |
|
526 @method setPreferencesIdentifier: |
|
527 @param anIdentifier The string to use a prefix for storing values for this WebView in the user |
|
528 defaults database. |
|
529 @discussion If the WebPreferences for this WebView are stored in the user defaults database, the |
|
530 string set in this method will be used a key prefix. |
|
531 - (void)setPreferencesIdentifier:(NSString *)anIdentifier; |
|
532 */ |
|
533 HRESULT setPreferencesIdentifier([in] BSTR anIdentifier); |
|
534 |
|
535 /*! |
|
536 @method preferencesIdentifier |
|
537 @result Returns the WebPreferences key prefix. |
|
538 - (NSString *)preferencesIdentifier; |
|
539 */ |
|
540 HRESULT preferencesIdentifier([out, retval] BSTR* anIdentifier); |
|
541 |
|
542 /*! |
|
543 @method setHostWindow: |
|
544 @param hostWindow The host window for the web view. |
|
545 @discussion Parts of WebKit (such as plug-ins and JavaScript) depend on a window to function |
|
546 properly. Set a host window so these parts continue to function even when the web view is |
|
547 not in an actual window. |
|
548 - (void)setHostWindow:(NSWindow *)hostWindow; |
|
549 */ |
|
550 HRESULT setHostWindow([in] OLE_HANDLE window); |
|
551 |
|
552 /*! |
|
553 @method hostWindow |
|
554 @result The host window for the web view. |
|
555 - (NSWindow *)hostWindow; |
|
556 */ |
|
557 HRESULT hostWindow([out, retval] OLE_HANDLE* window); |
|
558 |
|
559 /*! |
|
560 @method searchFor:direction:caseSensitive: |
|
561 @abstract Searches a document view for a string and highlights the string if it is found. |
|
562 Starts the search from the current selection. Will search across all frames. |
|
563 @param string The string to search for. |
|
564 @param forward YES to search forward, NO to seach backwards. |
|
565 @param caseFlag YES to for case-sensitive search, NO for case-insensitive search. |
|
566 @result YES if found, NO if not found. |
|
567 - (BOOL)searchFor:(NSString *)string direction:(BOOL)forward caseSensitive:(BOOL)caseFlag wrap:(BOOL)wrapFlag; |
|
568 */ |
|
569 HRESULT searchFor([in] BSTR str, [in] BOOL forward, [in] BOOL caseFlag, [in] BOOL wrapFlag, [out, retval] BOOL* found); |
|
570 |
|
571 /*! |
|
572 @method registerViewClass:representationClass:forMIMEType: |
|
573 @discussion Register classes that implement WebDocumentView and WebDocumentRepresentation respectively. |
|
574 A document class may register for a primary MIME type by excluding |
|
575 a subtype, i.e. "video/" will match the document class with |
|
576 all video types. More specific matching takes precedence |
|
577 over general matching. |
|
578 @param viewClass The WebDocumentView class to use to render data for a given MIME type. |
|
579 @param representationClass The WebDocumentRepresentation class to use to represent data of the given MIME type. |
|
580 @param MIMEType The MIME type to represent with an object of the given class. |
|
581 + (void)registerViewClass:(Class)viewClass representationClass:(Class)representationClass forMIMEType:(NSString *)MIMEType; |
|
582 */ |
|
583 HRESULT registerViewClass([in] IWebDocumentView* view, [in] IWebDocumentRepresentation* representation, [in] BSTR forMIMEType); |
|
584 |
|
585 /*! |
|
586 @method setGroupName: |
|
587 @param groupName The name of the group for this WebView. |
|
588 @discussion JavaScript may access named frames within the same group. |
|
589 - (void)setGroupName:(NSString *)groupName; |
|
590 */ |
|
591 HRESULT setGroupName([in] BSTR groupName); |
|
592 |
|
593 /*! |
|
594 @method groupName |
|
595 @discussion The group name for this WebView. |
|
596 - (NSString *)groupName; |
|
597 */ |
|
598 HRESULT groupName([out, retval] BSTR* groupName); |
|
599 |
|
600 /*! |
|
601 @method estimatedProgress |
|
602 @discussion An estimate of the percent complete for a document load. This |
|
603 value will range from 0 to 1.0 and, once a load completes, will remain at 1.0 |
|
604 until a new load starts, at which point it will be reset to 0. The value is an |
|
605 estimate based on the total number of bytes expected to be received |
|
606 for a document, including all it's possible subresources. For more accurate progress |
|
607 indication it is recommended that you implement a WebFrameLoadDelegate and a |
|
608 WebResourceLoadDelegate. |
|
609 - (double)estimatedProgress; |
|
610 */ |
|
611 HRESULT estimatedProgress([out, retval] double* estimatedProgress); |
|
612 |
|
613 /*! |
|
614 @method isLoading |
|
615 @discussion Returns YES if there are any pending loads. |
|
616 - (BOOL)isLoading; |
|
617 */ |
|
618 HRESULT isLoading([out, retval] BOOL* isLoading); |
|
619 |
|
620 /*! |
|
621 @method elementAtPoint: |
|
622 @param point A point in the coordinates of the WebView |
|
623 @result An element dictionary describing the point |
|
624 - (NSDictionary *)elementAtPoint:(NSPoint)point; |
|
625 */ |
|
626 HRESULT elementAtPoint([in] LPPOINT point, [out, retval] IPropertyBag** elementDictionary); |
|
627 |
|
628 /*! |
|
629 @method pasteboardTypesForSelection |
|
630 @abstract Returns the pasteboard types that WebView can use for the current selection |
|
631 - (NSArray *)pasteboardTypesForSelection; |
|
632 */ |
|
633 HRESULT pasteboardTypesForSelection([out, retval] IEnumVARIANT** enumVariant); |
|
634 |
|
635 /*! |
|
636 @method writeSelectionWithPasteboardTypes:toPasteboard: |
|
637 @abstract Writes the current selection to the pasteboard |
|
638 @param types The types that WebView will write to the pasteboard |
|
639 @param pasteboard The pasteboard to write to |
|
640 - (void)writeSelectionWithPasteboardTypes:(NSArray *)types toPasteboard:(NSPasteboard *)pasteboard; |
|
641 */ |
|
642 HRESULT writeSelectionWithPasteboardTypes([in, size_is(cTypes)] BSTR* types, [in] int cTypes, [in] IDataObject* pasteboard); |
|
643 |
|
644 /*! |
|
645 @method pasteboardTypesForElement: |
|
646 @abstract Returns the pasteboard types that WebView can use for an element |
|
647 @param element The element |
|
648 - (NSArray *)pasteboardTypesForElement:(NSDictionary *)element; |
|
649 */ |
|
650 HRESULT pasteboardTypesForElement([in] IPropertyBag* elementDictionary, [out, retval] IEnumVARIANT** enumVariant); |
|
651 |
|
652 /*! |
|
653 @method writeElement:withPasteboardTypes:toPasteboard: |
|
654 @abstract Writes an element to the pasteboard |
|
655 @param element The element to write to the pasteboard |
|
656 @param types The types that WebView will write to the pasteboard |
|
657 @param pasteboard The pasteboard to write to |
|
658 - (void)writeElement:(NSDictionary *)element withPasteboardTypes:(NSArray *)types toPasteboard:(NSPasteboard *)pasteboard; |
|
659 */ |
|
660 HRESULT writeElement([in] IPropertyBag* elementDictionary, [in, size_is(cWithPasteboardTypes)] BSTR* withPasteboardTypes, [in] int cWithPasteboardTypes, [in] IDataObject* pasteboard); |
|
661 |
|
662 /*! |
|
663 @method selectedText |
|
664 @abstract Returns the selection as a string |
|
665 */ |
|
666 HRESULT selectedText([out, retval] BSTR* text); |
|
667 |
|
668 /*! |
|
669 @method centerSelectionInVisibleArea |
|
670 @abstract Centers the selected text in the WebView |
|
671 - (void)centerSelectionInVisibleArea:(id)sender; |
|
672 */ |
|
673 HRESULT centerSelectionInVisibleArea([in] IUnknown* sender); |
|
674 |
|
675 /*! |
|
676 @method moveDragCaretToPoint: |
|
677 @param point A point in the coordinates of the WebView |
|
678 @discussion This method moves the caret that shows where something being dragged will be dropped. It may cause the WebView to scroll |
|
679 to make the new position of the drag caret visible. |
|
680 - (void)moveDragCaretToPoint:(NSPoint)point; |
|
681 */ |
|
682 HRESULT moveDragCaretToPoint([in] LPPOINT point); |
|
683 |
|
684 /*! |
|
685 @method removeDragCaret |
|
686 @abstract Removes the drag caret from the WebView |
|
687 - (void)removeDragCaret; |
|
688 */ |
|
689 HRESULT removeDragCaret(); |
|
690 |
|
691 /*! |
|
692 @method setDrawsBackground: |
|
693 @param drawsBackround YES to cause the receiver to draw a default white background, NO otherwise. |
|
694 @abstract Sets whether the receiver draws a default white background when the loaded page has no background specified. |
|
695 - (void)setDrawsBackground:(BOOL)drawsBackround; |
|
696 */ |
|
697 HRESULT setDrawsBackground([in] BOOL drawsBackground); |
|
698 |
|
699 /*! |
|
700 @method drawsBackground |
|
701 @result Returns YES if the receiver draws a default white background, NO otherwise. |
|
702 - (BOOL)drawsBackground; |
|
703 */ |
|
704 HRESULT drawsBackground([out, retval] BOOL* drawsBackground); |
|
705 |
|
706 /*! |
|
707 @method setMainFrameURL: |
|
708 @param URLString The URL to load in the mainFrame. |
|
709 - (void)setMainFrameURL:(NSString *)URLString; |
|
710 */ |
|
711 HRESULT setMainFrameURL([in] BSTR urlString); |
|
712 |
|
713 /*! |
|
714 @method mainFrameURL |
|
715 @result Returns the main frame's current URL. |
|
716 - (NSString *)mainFrameURL; |
|
717 */ |
|
718 HRESULT mainFrameURL([out, retval] BSTR* urlString); |
|
719 |
|
720 /*! |
|
721 @method mainFrameDocument |
|
722 @result Returns the main frame's DOMDocument. |
|
723 - (DOMDocument *)mainFrameDocument; |
|
724 */ |
|
725 HRESULT mainFrameDocument([out, retval] IDOMDocument** document); |
|
726 |
|
727 /*! |
|
728 @method mainFrameTitle |
|
729 @result Returns the main frame's title if any, otherwise an empty string. |
|
730 - (NSString *)mainFrameTitle; |
|
731 */ |
|
732 HRESULT mainFrameTitle([out, retval] BSTR* title); |
|
733 |
|
734 /*! |
|
735 @method mainFrameIcon |
|
736 @discussion The methods returns the site icon for the current page loaded in the mainFrame. |
|
737 @result Returns the main frame's icon if any, otherwise nil. |
|
738 - (NSImage *)mainFrameIcon; |
|
739 */ |
|
740 HRESULT mainFrameIcon([out, retval] OLE_HANDLE* hBitmap); |
|
741 } |
|
742 |
|
743 /* |
|
744 @interface WebView (WebIBActions) <NSUserInterfaceValidations> |
|
745 */ |
|
746 [ |
|
747 object, |
|
748 oleautomation, |
|
749 uuid(8F0E3A30-B924-44f8-990A-1AE61ED6C632), |
|
750 pointer_default(unique) |
|
751 ] |
|
752 interface IWebIBActions : IUnknown |
|
753 { |
|
754 /* |
|
755 - (IBAction)takeStringURLFrom:(id)sender; |
|
756 */ |
|
757 HRESULT takeStringURLFrom([in] IUnknown* sender); |
|
758 |
|
759 /* |
|
760 - (IBAction)stopLoading:(id)sender; |
|
761 */ |
|
762 HRESULT stopLoading([in] IUnknown* sender); |
|
763 |
|
764 /* |
|
765 - (IBAction)reload:(id)sender; |
|
766 */ |
|
767 HRESULT reload([in] IUnknown* sender); |
|
768 |
|
769 /* |
|
770 - (BOOL)canGoBack; |
|
771 */ |
|
772 HRESULT canGoBack([in] IUnknown* sender, [out, retval] BOOL* result); |
|
773 |
|
774 /* |
|
775 - (IBAction)goBack:(id)sender; |
|
776 */ |
|
777 HRESULT goBack([in] IUnknown* sender); |
|
778 |
|
779 /* |
|
780 - (BOOL)canGoForward; |
|
781 */ |
|
782 HRESULT canGoForward([in] IUnknown* sender, [out, retval] BOOL* result); |
|
783 |
|
784 /* |
|
785 - (IBAction)goForward:(id)sender; |
|
786 */ |
|
787 HRESULT goForward([in] IUnknown* sender); |
|
788 |
|
789 /* |
|
790 - (BOOL)canMakeTextLarger; |
|
791 */ |
|
792 HRESULT canMakeTextLarger([in] IUnknown* sender, [out, retval] BOOL* result); |
|
793 |
|
794 /* |
|
795 - (IBAction)makeTextLarger:(id)sender; |
|
796 */ |
|
797 HRESULT makeTextLarger([in] IUnknown* sender); |
|
798 |
|
799 /* |
|
800 - (BOOL)canMakeTextSmaller; |
|
801 */ |
|
802 HRESULT canMakeTextSmaller([in] IUnknown* sender, [out, retval] BOOL* result); |
|
803 |
|
804 /* |
|
805 - (IBAction)makeTextSmaller:(id)sender; |
|
806 */ |
|
807 HRESULT makeTextSmaller([in] IUnknown* sender); |
|
808 |
|
809 /* |
|
810 - (BOOL)canMakeTextStandardSize; |
|
811 */ |
|
812 HRESULT canMakeTextStandardSize([in] IUnknown* sender, [out, retval] BOOL* result); |
|
813 |
|
814 /* |
|
815 - (IBAction)makeTextStandardSize:(id)sender; |
|
816 */ |
|
817 HRESULT makeTextStandardSize([in] IUnknown* sender); |
|
818 |
|
819 /* |
|
820 - (IBAction)toggleContinuousSpellChecking:(id)sender; |
|
821 */ |
|
822 HRESULT toggleContinuousSpellChecking([in] IUnknown* sender); |
|
823 |
|
824 /* |
|
825 - (IBAction)toggleSmartInsertDelete:(id)sender; |
|
826 */ |
|
827 HRESULT toggleSmartInsertDelete([in] IUnknown* sender); |
|
828 |
|
829 /* |
|
830 - (void)toggleGrammarChecking:(id)sender |
|
831 */ |
|
832 HRESULT toggleGrammarChecking([in] IUnknown* sender); |
|
833 } |
|
834 |
|
835 /* |
|
836 @interface WebView (WebViewCSS) |
|
837 */ |
|
838 [ |
|
839 object, |
|
840 oleautomation, |
|
841 uuid(ADF68A8C-336F-405c-A053-3D11A9D5B092), |
|
842 pointer_default(unique) |
|
843 ] |
|
844 interface IWebViewCSS : IUnknown |
|
845 { |
|
846 /* |
|
847 - (DOMCSSStyleDeclaration *)computedStyleForElement:(DOMElement *)element pseudoElement:(NSString *)pseudoElement; |
|
848 */ |
|
849 HRESULT computedStyleForElement([in] IDOMElement* element, [in] BSTR pseudoElement, [out, retval] IDOMCSSStyleDeclaration** style); |
|
850 } |
|
851 |
|
852 /* |
|
853 @interface WebView (WebViewEditing) |
|
854 */ |
|
855 [ |
|
856 object, |
|
857 oleautomation, |
|
858 uuid(07BDAC9A-19A1-4086-864D-BAD9E0F00D5C), |
|
859 pointer_default(unique) |
|
860 ] |
|
861 interface IWebViewEditing : IUnknown |
|
862 { |
|
863 /* |
|
864 - (DOMRange *)editableDOMRangeForPoint:(NSPoint)point; |
|
865 */ |
|
866 HRESULT editableDOMRangeForPoint([in] LPPOINT point, [out, retval] IDOMRange** range); |
|
867 |
|
868 /* |
|
869 - (void)setSelectedDOMRange:(DOMRange *)range affinity:(NSSelectionAffinity)selectionAffinity; |
|
870 */ |
|
871 HRESULT setSelectedDOMRange([in] IDOMRange* range, [in] WebSelectionAffinity affinity); |
|
872 |
|
873 /* |
|
874 - (DOMRange *)selectedDOMRange; |
|
875 */ |
|
876 HRESULT selectedDOMRange([out, retval] IDOMRange** range); |
|
877 |
|
878 /* |
|
879 - (NSSelectionAffinity)selectionAffinity; |
|
880 */ |
|
881 HRESULT selectionAffinity([out, retval] [out, retval] WebSelectionAffinity* affinity); |
|
882 |
|
883 /* |
|
884 - (void)setEditable:(BOOL)flag; |
|
885 */ |
|
886 HRESULT setEditable([in] BOOL flag); |
|
887 |
|
888 /* |
|
889 - (BOOL)isEditable; |
|
890 */ |
|
891 HRESULT isEditable([out, retval] BOOL* isEditable); |
|
892 |
|
893 /* |
|
894 - (void)setTypingStyle:(DOMCSSStyleDeclaration *)style; |
|
895 */ |
|
896 HRESULT setTypingStyle([in] IDOMCSSStyleDeclaration* style); |
|
897 |
|
898 /* |
|
899 - (DOMCSSStyleDeclaration *)typingStyle; |
|
900 */ |
|
901 HRESULT typingStyle([out, retval] IDOMCSSStyleDeclaration** style); |
|
902 |
|
903 /* |
|
904 - (void)setSmartInsertDeleteEnabled:(BOOL)flag; |
|
905 */ |
|
906 HRESULT setSmartInsertDeleteEnabled([in] BOOL flag); |
|
907 |
|
908 /* |
|
909 - (BOOL)smartInsertDeleteEnabled; |
|
910 */ |
|
911 HRESULT smartInsertDeleteEnabled([out, retval] BOOL* enabled); |
|
912 |
|
913 /* |
|
914 - (void)setContinuousSpellCheckingEnabled:(BOOL)flag; |
|
915 */ |
|
916 HRESULT setContinuousSpellCheckingEnabled([in] BOOL flag); |
|
917 |
|
918 /* |
|
919 - (BOOL)isContinuousSpellCheckingEnabled; |
|
920 */ |
|
921 HRESULT isContinuousSpellCheckingEnabled([out, retval] BOOL* enabled); |
|
922 |
|
923 /* |
|
924 - (WebNSInt)spellCheckerDocumentTag; |
|
925 */ |
|
926 HRESULT spellCheckerDocumentTag([out, retval] int* tag); |
|
927 |
|
928 /* |
|
929 - (NSUndoManager *)undoManager; |
|
930 */ |
|
931 HRESULT undoManager([out, retval] IWebUndoManager** manager); |
|
932 |
|
933 /* |
|
934 - (void)setEditingDelegate:(id)delegate; |
|
935 */ |
|
936 HRESULT setEditingDelegate([in] IWebEditingDelegate* d); |
|
937 |
|
938 /* |
|
939 - (id)editingDelegate; |
|
940 */ |
|
941 HRESULT editingDelegate([out, retval] IWebEditingDelegate** d); |
|
942 |
|
943 /* |
|
944 - (DOMCSSStyleDeclaration *)styleDeclarationWithText:(NSString *)text; |
|
945 */ |
|
946 HRESULT styleDeclarationWithText([in] BSTR text, [out, retval] IDOMCSSStyleDeclaration** style); |
|
947 |
|
948 /* |
|
949 - (BOOL)hasSelectedRange; |
|
950 */ |
|
951 HRESULT hasSelectedRange([out, retval] BOOL* hasSelectedRange); |
|
952 |
|
953 /* |
|
954 - (BOOL)cutEnabled; |
|
955 */ |
|
956 HRESULT cutEnabled([out, retval] BOOL* enabled); |
|
957 |
|
958 /* |
|
959 - (BOOL)copyEnabled; |
|
960 */ |
|
961 HRESULT copyEnabled([out, retval] BOOL* enabled); |
|
962 |
|
963 /* |
|
964 - (BOOL)pasteEnabled; |
|
965 */ |
|
966 HRESULT pasteEnabled([out, retval] BOOL* enabled); |
|
967 |
|
968 /* |
|
969 - (BOOL)deleteEnabled; |
|
970 */ |
|
971 HRESULT deleteEnabled([out, retval] BOOL* enabled); |
|
972 |
|
973 /* |
|
974 - (BOOL)editingEnabled; |
|
975 */ |
|
976 HRESULT editingEnabled([out, retval] BOOL* enabled); |
|
977 |
|
978 /* |
|
979 - (BOOL)isGrammarCheckingEnabled |
|
980 */ |
|
981 HRESULT isGrammarCheckingEnabled([out, retval] BOOL* enabled); |
|
982 |
|
983 /* |
|
984 - (void)setGrammarCheckingEnabled:(BOOL)flag |
|
985 */ |
|
986 HRESULT setGrammarCheckingEnabled(BOOL enabled); |
|
987 } |
|
988 |
|
989 /* |
|
990 @interface WebView (WebViewUndoableEditing) |
|
991 */ |
|
992 [ |
|
993 object, |
|
994 oleautomation, |
|
995 uuid(639E7121-13C8-4a12-BC18-6E1F3D68F3C3), |
|
996 pointer_default(unique) |
|
997 ] |
|
998 interface IWebViewUndoableEditing : IUnknown |
|
999 { |
|
1000 /* |
|
1001 - (void)replaceSelectionWithNode:(DOMNode *)node; |
|
1002 */ |
|
1003 HRESULT replaceSelectionWithNode([in] IDOMNode* node); |
|
1004 |
|
1005 /* |
|
1006 - (void)replaceSelectionWithText:(NSString *)text; |
|
1007 */ |
|
1008 HRESULT replaceSelectionWithText([in] BSTR text); |
|
1009 |
|
1010 /* |
|
1011 - (void)replaceSelectionWithMarkupString:(NSString *)markupString; |
|
1012 */ |
|
1013 HRESULT replaceSelectionWithMarkupString([in] BSTR markupString); |
|
1014 |
|
1015 /* |
|
1016 - (void)replaceSelectionWithArchive:(WebArchive *)archive; |
|
1017 */ |
|
1018 HRESULT replaceSelectionWithArchive([in] IWebArchive* archive); |
|
1019 |
|
1020 /* |
|
1021 - (void)deleteSelection; |
|
1022 */ |
|
1023 HRESULT deleteSelection(); |
|
1024 |
|
1025 /* |
|
1026 - (void)clearSelection; |
|
1027 */ |
|
1028 HRESULT clearSelection(); |
|
1029 |
|
1030 /* |
|
1031 - (void)applyStyle:(DOMCSSStyleDeclaration *)style; |
|
1032 */ |
|
1033 HRESULT applyStyle([in] IDOMCSSStyleDeclaration* style); |
|
1034 } |
|
1035 |
|
1036 /* |
|
1037 @interface WebView (WebViewEditingActions) |
|
1038 */ |
|
1039 [ |
|
1040 object, |
|
1041 oleautomation, |
|
1042 uuid(7E066C42-8E81-4778-888D-D6CC93E27D4C), |
|
1043 pointer_default(unique) |
|
1044 ] |
|
1045 interface IWebViewEditingActions : IUnknown |
|
1046 { |
|
1047 /* |
|
1048 - (void)copy:(id)sender; |
|
1049 */ |
|
1050 HRESULT copy([in] IUnknown* sender); |
|
1051 |
|
1052 /* |
|
1053 - (void)cut:(id)sender; |
|
1054 */ |
|
1055 HRESULT cut([in] IUnknown* sender); |
|
1056 |
|
1057 /* |
|
1058 - (void)paste:(id)sender; |
|
1059 */ |
|
1060 HRESULT paste([in] IUnknown* sender); |
|
1061 |
|
1062 /* |
|
1063 - (void)copyURL:(id)sender; |
|
1064 */ |
|
1065 HRESULT copyURL([in] BSTR url); |
|
1066 |
|
1067 /* |
|
1068 - (void)copyFont:(id)sender; |
|
1069 */ |
|
1070 HRESULT copyFont([in] IUnknown* sender); |
|
1071 |
|
1072 /* |
|
1073 - (void)pasteFont:(id)sender; |
|
1074 */ |
|
1075 HRESULT pasteFont([in] IUnknown* sender); |
|
1076 |
|
1077 /* |
|
1078 - (void)delete:(id)sender; |
|
1079 */ |
|
1080 HRESULT delete_([in] IUnknown* sender); |
|
1081 |
|
1082 /* |
|
1083 - (void)pasteAsPlainText:(id)sender; |
|
1084 */ |
|
1085 HRESULT pasteAsPlainText([in] IUnknown* sender); |
|
1086 |
|
1087 /* |
|
1088 - (void)pasteAsRichText:(id)sender; |
|
1089 */ |
|
1090 HRESULT pasteAsRichText([in] IUnknown* sender); |
|
1091 |
|
1092 |
|
1093 /* |
|
1094 - (void)changeFont:(id)sender; |
|
1095 */ |
|
1096 HRESULT changeFont([in] IUnknown* sender); |
|
1097 |
|
1098 /* |
|
1099 - (void)changeAttributes:(id)sender; |
|
1100 */ |
|
1101 HRESULT changeAttributes([in] IUnknown* sender); |
|
1102 |
|
1103 /* |
|
1104 - (void)changeDocumentBackgroundColor:(id)sender; |
|
1105 */ |
|
1106 HRESULT changeDocumentBackgroundColor([in] IUnknown* sender); |
|
1107 |
|
1108 /* |
|
1109 - (void)changeColor:(id)sender; |
|
1110 */ |
|
1111 HRESULT changeColor([in] IUnknown* sender); |
|
1112 |
|
1113 |
|
1114 /* |
|
1115 - (void)alignCenter:(id)sender; |
|
1116 */ |
|
1117 HRESULT alignCenter([in] IUnknown* sender); |
|
1118 |
|
1119 /* |
|
1120 - (void)alignJustified:(id)sender; |
|
1121 */ |
|
1122 HRESULT alignJustified([in] IUnknown* sender); |
|
1123 |
|
1124 /* |
|
1125 - (void)alignLeft:(id)sender; |
|
1126 */ |
|
1127 HRESULT alignLeft([in] IUnknown* sender); |
|
1128 |
|
1129 /* |
|
1130 - (void)alignRight:(id)sender; |
|
1131 */ |
|
1132 HRESULT alignRight([in] IUnknown* sender); |
|
1133 |
|
1134 |
|
1135 /* |
|
1136 - (void)checkSpelling:(id)sender; |
|
1137 */ |
|
1138 HRESULT checkSpelling([in] IUnknown* sender); |
|
1139 |
|
1140 /* |
|
1141 - (void)showGuessPanel:(id)sender; |
|
1142 */ |
|
1143 HRESULT showGuessPanel([in] IUnknown* sender); |
|
1144 |
|
1145 /* |
|
1146 - (void)performFindPanelAction:(id)sender; |
|
1147 */ |
|
1148 HRESULT performFindPanelAction([in] IUnknown* sender); |
|
1149 |
|
1150 |
|
1151 /* |
|
1152 - (void)startSpeaking:(id)sender; |
|
1153 */ |
|
1154 HRESULT startSpeaking([in] IUnknown* sender); |
|
1155 |
|
1156 /* |
|
1157 - (void)stopSpeaking:(id)sender; |
|
1158 */ |
|
1159 HRESULT stopSpeaking([in] IUnknown* sender); |
|
1160 } |