⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iwebview.idl

📁 linux下开源浏览器WebKit的源码,市面上的很多商用浏览器都是移植自WebKit
💻 IDL
📖 第 1 页 / 共 3 页
字号:
/* * Copyright (C) 2006, 2007, 2008 Apple Inc.  All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  */cpp_quote("/* identifiers for commands that can be called by the webview's frame */")cpp_quote("enum WebViewCmd { Cut = 100, Copy, Paste, ForwardDelete, SelectAll, Undo, Redo };")cpp_quote("#define WebViewProgressStartedNotification TEXT(\"WebProgressStartedNotification\")")cpp_quote("#define WebViewProgressEstimateChangedNotification TEXT(\"WebProgressEstimateChangedNotification\")")cpp_quote("#define WebViewProgressFinishedNotification TEXT(\"WebProgressFinishedNotification\")")#ifndef DO_NO_IMPORTSimport "oaidl.idl";import "ocidl.idl";import "IWebUIDelegate.idl";import "IWebURLResponse.idl";import "IWebResourceLoadDelegate.idl";import "IWebDownload.idl";import "IWebFrameLoadDelegate.idl";import "IWebPolicyDelegate.idl";import "IWebBackForwardList.idl";import "IWebHistoryItem.idl";import "IWebPreferences.idl";import "DOMCSS.idl";import "IWebUndoManager.idl";import "IWebEditingDelegate.idl";import "DOMRange.idl";#endifinterface IDOMCSSStyleDeclaration;interface IDOMDocument;interface IDOMElement;interface IDOMNode;interface IDOMRange;interface IWebArchive;interface IWebBackForwardList;interface IWebDataSource;interface IWebFrame;interface IWebFrameView;interface IWebHistoryItem;interface IWebPreferences;interface IWebScriptObject;interface IWebUIDelegate;interface IWebResourceLoadDelegate;interface IWebDownloadDelegate;interface IWebEditingDelegate;interface IWebFrameLoadDelegate;interface IWebPolicyDelegate;interface IWebDocumentView;interface IWebDocumentRepresentation;interface IWebUndoManager;/* These are the keys for the WebElementPropertyBag */const LPCOLESTR WebElementDOMNodeKey = L"WebElementDOMNodeKey";const LPCOLESTR WebElementFrameKey = L"WebElementFrameKey";const LPCOLESTR WebElementImageAltStringKey = L"WebElementImageAltStringKey";const LPCOLESTR WebElementImageKey = L"WebElementImageKey";const LPCOLESTR WebElementImageRectKey = L"WebElementImageRectKey";const LPCOLESTR WebElementImageURLKey = L"WebElementImageURLKey";const LPCOLESTR WebElementIsSelectedKey = L"WebElementIsSelectedKey";const LPCOLESTR WebElementSpellingToolTipKey = L"WebElementSpellingToolTipKey";const LPCOLESTR WebElementTitleKey = L"WebElementTitleKey";const LPCOLESTR WebElementLinkURLKey = L"WebElementLinkURLKey";const LPCOLESTR WebElementLinkTargetFrameKey = L"WebElementLinkTargetFrameKey";const LPCOLESTR WebElementLinkTitleKey = L"WebElementLinkTitleKey";const LPCOLESTR WebElementLinkLabelKey = L"WebElementLinkLabelKey";const LPCOLESTR WebElementIsContentEditableKey = L"WebElementIsContentEditableKey";/*!    @class IEnumTextMatches*/[    object,    oleautomation,    uuid(C0CDE63A-5ED1-453f-B937-93B1A61AD3B3),    pointer_default(unique)]interface IEnumTextMatches : IUnknown{    HRESULT Next(ULONG celt, RECT* rect, ULONG* pceltFetched);    HRESULT Skip(ULONG celt);    HRESULT Reset(void);    HRESULT Clone(IEnumTextMatches** ppenum);};/*!    @class WebView    WebView manages the interaction between WebFrameViews and WebDataSources.  Modification    of the policies and behavior of the WebKit is largely managed by WebViews and their    delegates.        <p>    Typical usage:    </p>    <pre>    WebView *webView;    WebFrame *mainFrame;        webView  = [[WebView alloc] initWithFrame: NSMakeRect (0,0,640,480)];    mainFrame = [webView mainFrame];    [mainFrame loadRequest:request];    </pre>        WebViews have the following delegates:  WebUIDelegate, WebResourceLoadDelegate,    WebFrameLoadDelegate, and WebPolicyDelegate.        WebKit depends on the WebView's WebUIDelegate for all window    related management, including opening new windows and controlling the user interface    elements in those windows.        WebResourceLoadDelegate is used to monitor the progress of resources as they are    loaded.  This delegate may be used to present users with a progress monitor.        The WebFrameLoadDelegate receives messages when the URL in a WebFrame is    changed.        WebView's WebPolicyDelegate can make determinations about how    content should be handled, based on the resource's URL and MIME type.    @interface WebView : NSView*/[    object,    oleautomation,    hidden,    uuid(174BBEFD-058E-49c7-91DF-6F110AA4AC28),    pointer_default(unique)]interface IWebView : IUnknown{    /*!        @method canShowMIMEType:        @abstract Checks if the WebKit can show content of a certain MIME type.        @param MIMEType The MIME type to check.        @result YES if the WebKit can show content with MIMEtype.        + (BOOL)canShowMIMEType:(NSString *)MIMEType;    */    HRESULT canShowMIMEType([in] BSTR mimeType, [out, retval] BOOL* canShow);    /*!        @method canShowMIMETypeAsHTML:        @abstract Checks if the the MIME type is a type that the WebKit will interpret as HTML.        @param MIMEType The MIME type to check.        @result YES if the MIMEtype in an HTML type.        + (BOOL)canShowMIMETypeAsHTML:(NSString *)MIMEType;    */    HRESULT canShowMIMETypeAsHTML([in] BSTR mimeType, [out, retval] BOOL* canShow);    /*!        @method MIMETypesShownAsHTML        @result Returns an array of NSStrings that describe the MIME types        WebKit will attempt to render as HTML.        + (NSArray *)MIMETypesShownAsHTML;    */    HRESULT MIMETypesShownAsHTML([out, retval] IEnumVARIANT** enumVariant);    /*!        @method setMIMETypesShownAsHTML:        @discussion Sets the array of NSString MIME types that WebKit will        attempt to render as HTML.  Typically you will retrieve the built-in        array using MIMETypesShownAsHTML and add additional MIME types to that        array.        + (void)setMIMETypesShownAsHTML:(NSArray *)MIMETypes;    */    HRESULT setMIMETypesShownAsHTML([in, size_is(cMimeTypes)] BSTR* mimeTypes, [in] int cMimeTypes);    /*!        @method URLFromPasteboard:        @abstract Returns a URL from a pasteboard        @param pasteboard The pasteboard with a URL        @result A URL if the pasteboard has one. Nil if it does not.        @discussion This method differs than NSURL's URLFromPasteboard method in that it tries multiple pasteboard types        including NSURLPboardType to find a URL on the pasteboard.        + (NSURL *)URLFromPasteboard:(NSPasteboard *)pasteboard;    */    HRESULT URLFromPasteboard([in] IDataObject* pasteboard, [out, retval] BSTR* url);    /*!        @method URLTitleFromPasteboard:        @abstract Returns a URL title from a pasteboard        @param pasteboard The pasteboard with a URL title        @result A URL title if the pasteboard has one. Nil if it does not.        @discussion This method returns a title that refers a URL on the pasteboard. An example of this is the link label        which is the text inside the anchor tag.        + (NSString *)URLTitleFromPasteboard:(NSPasteboard *)pasteboard;    */    HRESULT URLTitleFromPasteboard([in] IDataObject* pasteboard, [out, retval] BSTR* urlTitle);    /*!        @method initWithFrame:frameName:groupName:        @abstract The designated initializer for WebView.        @discussion Initialize a WebView with the supplied parameters. This method will         create a main WebFrame with the view. Passing a top level frame name is useful if you        handle a targetted frame navigation that would normally open a window in some other         way that still ends up creating a new WebView.        @param frame The frame used to create the view.        @param frameName The name to use for the top level frame. May be nil.        @param groupName The name of the webView set to which this webView will be added.  May be nil.        @result Returns an initialized WebView.        - (id)initWithFrame:(NSRect)frame frameName:(NSString *)frameName groupName:(NSString *)groupName;    */    HRESULT initWithFrame([in] RECT frame, [in] BSTR frameName, [in] BSTR groupName);    /*!        @method setUIDelegate:        @abstract Set the WebView's WebUIDelegate.        @param delegate The WebUIDelegate to set as the delegate.        - (void)setUIDelegate:(id)delegate;    */    HRESULT setUIDelegate([in] IWebUIDelegate* d);    /*!        @method UIDelegate        @abstract Return the WebView's WebUIDelegate.        @result The WebView's WebUIDelegate.        - (id)UIDelegate;    */    HRESULT uiDelegate([retval, out] IWebUIDelegate** d);    /*!        @method setResourceLoadDelegate:        @abstract Set the WebView's WebResourceLoadDelegate load delegate.        @param delegate The WebResourceLoadDelegate to set as the load delegate.        - (void)setResourceLoadDelegate:(id)delegate;    */    HRESULT setResourceLoadDelegate([in] IWebResourceLoadDelegate* d);    /*!        @method resourceLoadDelegate        @result Return the WebView's WebResourceLoadDelegate.        - (id)resourceLoadDelegate;    */        HRESULT resourceLoadDelegate([retval, out] IWebResourceLoadDelegate** d);    /*!        @method setDownloadDelegate:        @abstract Set the WebView's WebDownloadDelegate.        @discussion The download delegate is retained by WebDownload when any downloads are in progress.        @param delegate The WebDownloadDelegate to set as the download delegate.        - (void)setDownloadDelegate:(id)delegate;    */    HRESULT setDownloadDelegate([in] IWebDownloadDelegate* d);    /*!        @method downloadDelegate        @abstract Return the WebView's WebDownloadDelegate.        @result The WebView's WebDownloadDelegate.        - (id)downloadDelegate;    */        HRESULT downloadDelegate([retval, out] IWebDownloadDelegate** d);    /*!        @method setFrameLoadDelegate:        @abstract Set the WebView's WebFrameLoadDelegate delegate.        @param delegate The WebFrameLoadDelegate to set as the delegate.        - (void)setFrameLoadDelegate:(id)delegate;    */    HRESULT setFrameLoadDelegate([in] IWebFrameLoadDelegate* d);    /*!        @method frameLoadDelegate        @abstract Return the WebView's WebFrameLoadDelegate delegate.        @result The WebView's WebFrameLoadDelegate delegate.        - (id)frameLoadDelegate;    */        HRESULT frameLoadDelegate([retval, out] IWebFrameLoadDelegate** d);    /*!        @method setPolicyDelegate:        @abstract Set the WebView's WebPolicyDelegate delegate.        @param delegate The WebPolicyDelegate to set as the delegate.        - (void)setPolicyDelegate:(id)delegate;    */        HRESULT setPolicyDelegate([in] IWebPolicyDelegate* d);    /*!        @method policyDelegate        @abstract Return the WebView's WebPolicyDelegate.        @result The WebView's WebPolicyDelegate.        - (id)policyDelegate;    */        HRESULT policyDelegate([retval, out] IWebPolicyDelegate** d);    /*!        @method mainFrame        @abstract Return the top level frame.          @discussion Note that even document that are not framesets will have a        mainFrame.        @result The main frame.        - (WebFrame *)mainFrame;    */        HRESULT mainFrame([retval, out] IWebFrame** frame);    /*!        @method focusedFrame    @abstract Return the frame that has the current focus.      */    HRESULT focusedFrame([retval, out] IWebFrame** frame);    /*!        @method backForwardList        @result The backforward list for this webView.        - (WebBackForwardList *)backForwardList;    */        HRESULT backForwardList([retval, out] IWebBackForwardList** list);    /*!        @method setMaintainsBackForwardList:        @abstract Enable or disable the use of a backforward list for this webView.        @param flag Turns use of the back forward list on or off        - (void)setMaintainsBackForwardList:(BOOL)flag;    */        HRESULT setMaintainsBackForwardList([in] BOOL flag);    /*!        @method goBack        @abstract Go back to the previous URL in the backforward list.        @result YES if able to go back in the backforward list, NO otherwise.        - (BOOL)goBack;    */    HRESULT goBack([out, retval] BOOL* succeeded);    /*!        @method goForward        @abstract Go forward to the next URL in the backforward list.        @result YES if able to go forward in the backforward list, NO otherwise.        - (BOOL)goForward;    */        HRESULT goForward([out, retval] BOOL* succeeded);    /*!        @method goToBackForwardItem:        @abstract Go back or forward to an item in the backforward list.        @result YES if able to go to the item, NO otherwise.        - (BOOL)goToBackForwardItem:(WebHistoryItem *)item;    */        HRESULT goToBackForwardItem([in] IWebHistoryItem* item, [out, retval] BOOL* succeeded);    /*!        @method setTextSizeMultiplier:        @abstract Change the size of the text rendering in views managed by this webView.        @param multiplier A fractional percentage value, 1.0 is 100%.        - (void)setTextSizeMultiplier:(float)multiplier;    */    HRESULT setTextSizeMultiplier([in] float multiplier);    /*!        @method textSizeMultiplier        @result The text size multipler.        - (float)textSizeMultiplier;    */        HRESULT textSizeMultiplier([out, retval] float* multiplier);    /*!        @method setApplicationNameForUserAgent:        @abstract Set the application name.         @discussion This name will be used in user-agent strings        that are chosen for best results in rendering web pages.        @param applicationName The application name        - (void)setApplicationNameForUserAgent:(NSString *)applicationName;    */    HRESULT setApplicationNameForUserAgent([in] BSTR applicationName);    /*!        @method applicationNameForUserAgent        @result The name of the application as used in the user-agent string.        - (NSString *)applicationNameForUserAgent;    */    HRESULT applicationNameForUserAgent([out, retval] BSTR* applicationName);    /*!        @method setCustomUserAgent:        @abstract Set the user agent.         @discussion Setting this means that the webView should use this user-agent string        instead of constructing a user-agent string for each URL. Setting it to nil        causes the webView to construct the user-agent string for each URL        for best results rendering web pages.        @param userAgentString The user agent description

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -