webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Member Functions | List of all members
IWebView Interface Reference

import"IWebView.idl";

Inheritance diagram for IWebView:
WebView

Public Member Functions

HRESULT canShowMIMEType ([in] BSTR mimeType, [out, retval] BOOL *canShow)
 
HRESULT canShowMIMETypeAsHTML ([in] BSTR mimeType, [out, retval] BOOL *canShow)
 
HRESULT MIMETypesShownAsHTML ([out, retval] IEnumVARIANT **enumVariant)
 
HRESULT setMIMETypesShownAsHTML ([in, size_is(cMimeTypes)] BSTR *mimeTypes, [in] int cMimeTypes)
 
HRESULT URLFromPasteboard ([in] IDataObject *pasteboard, [out, retval] BSTR *url)
 
HRESULT URLTitleFromPasteboard ([in] IDataObject *pasteboard, [out, retval] BSTR *urlTitle)
 
HRESULT initWithFrame ([in] RECT frame, [in] BSTR frameName, [in] BSTR groupName)
 
HRESULT setAccessibilityDelegate ([in] IAccessibilityDelegate *d)
 
HRESULT accessibilityDelegate ([out][retval] IAccessibilityDelegate **d)
 
HRESULT setUIDelegate ([in] IWebUIDelegate *d)
 
HRESULT uiDelegate ([retval, out] IWebUIDelegate **d)
 
HRESULT setResourceLoadDelegate ([in] IWebResourceLoadDelegate *d)
 
HRESULT resourceLoadDelegate ([retval, out] IWebResourceLoadDelegate **d)
 
HRESULT setDownloadDelegate ([in] IWebDownloadDelegate *d)
 
HRESULT downloadDelegate ([retval, out] IWebDownloadDelegate **d)
 
HRESULT setFrameLoadDelegate ([in] IWebFrameLoadDelegate *d)
 
HRESULT frameLoadDelegate ([retval, out] IWebFrameLoadDelegate **d)
 
HRESULT setPolicyDelegate ([in] IWebPolicyDelegate *d)
 
HRESULT policyDelegate ([retval, out] IWebPolicyDelegate **d)
 
HRESULT mainFrame ([retval, out] IWebFrame **frame)
 
HRESULT focusedFrame ([retval, out] IWebFrame **frame)
 
HRESULT backForwardList ([retval, out] IWebBackForwardList **list)
 
HRESULT setMaintainsBackForwardList ([in] BOOL flag)
 
HRESULT goBack ([out, retval] BOOL *succeeded)
 
HRESULT goForward ([out, retval] BOOL *succeeded)
 
HRESULT goToBackForwardItem ([in] IWebHistoryItem *item, [out, retval] BOOL *succeeded)
 
HRESULT setTextSizeMultiplier ([in] float multiplier)
 
HRESULT textSizeMultiplier ([out, retval] float *multiplier)
 
HRESULT setApplicationNameForUserAgent ([in] BSTR applicationName)
 
HRESULT applicationNameForUserAgent ([out, retval] BSTR *applicationName)
 
HRESULT setCustomUserAgent ([in] BSTR userAgentString)
 
HRESULT customUserAgent ([out, retval] BSTR *userAgentString)
 
HRESULT userAgentForURL ([in] BSTR url, [out, retval] BSTR *userAgent)
 
HRESULT supportsTextEncoding ([out, retval] BOOL *supports)
 
HRESULT setCustomTextEncodingName ([in] BSTR encodingName)
 
HRESULT customTextEncodingName ([out, retval] BSTR *encodingName)
 
HRESULT setMediaStyle ([in] BSTR media)
 
HRESULT mediaStyle ([out, retval] BSTR *media)
 
HRESULT stringByEvaluatingJavaScriptFromString ([in] BSTR script, [out, retval] BSTR *result)
 
HRESULT windowScriptObject ([out, retval] IWebScriptObject **webScriptObject)
 
HRESULT setPreferences ([in] IWebPreferences *prefs)
 
HRESULT preferences ([out, retval] IWebPreferences **prefs)
 
HRESULT setPreferencesIdentifier ([in] BSTR anIdentifier)
 
HRESULT preferencesIdentifier ([out, retval] BSTR *anIdentifier)
 
HRESULT setHostWindow ([in] HWND window)
 
HRESULT hostWindow ([out, retval] HWND *window)
 
HRESULT searchFor ([in] BSTR str, [in] BOOL forward, [in] BOOL caseFlag, [in] BOOL wrapFlag, [out, retval] BOOL *found)
 
HRESULT registerViewClass ([in] IWebDocumentView *view, [in] IWebDocumentRepresentation *representation, [in] BSTR forMIMEType)
 
HRESULT setGroupName ([in] BSTR groupName)
 
HRESULT groupName ([out, retval] BSTR *groupName)
 
HRESULT estimatedProgress ([out, retval] double *estimatedProgress)
 
HRESULT isLoading ([out, retval] BOOL *isLoading)
 
HRESULT elementAtPoint ([in] LPPOINT point, [out, retval] IPropertyBag **elementDictionary)
 
HRESULT pasteboardTypesForSelection ([out, retval] IEnumVARIANT **enumVariant)
 
HRESULT writeSelectionWithPasteboardTypes ([in, size_is(cTypes)] BSTR *types, [in] int cTypes, [in] IDataObject *pasteboard)
 
HRESULT pasteboardTypesForElement ([in] IPropertyBag *elementDictionary, [out, retval] IEnumVARIANT **enumVariant)
 
HRESULT writeElement ([in] IPropertyBag *elementDictionary, [in, size_is(cWithPasteboardTypes)] BSTR *withPasteboardTypes, [in] int cWithPasteboardTypes, [in] IDataObject *pasteboard)
 
HRESULT selectedText ([out, retval] BSTR *text)
 
HRESULT centerSelectionInVisibleArea ([in] IUnknown *sender)
 
HRESULT moveDragCaretToPoint ([in] LPPOINT point)
 
HRESULT removeDragCaret ()
 
HRESULT setDrawsBackground ([in] BOOL drawsBackground)
 
HRESULT drawsBackground ([out, retval] BOOL *drawsBackground)
 
HRESULT setMainFrameURL ([in] BSTR urlString)
 
HRESULT mainFrameURL ([out, retval] BSTR *urlString)
 
HRESULT mainFrameDocument ([out, retval] IDOMDocument **document)
 
HRESULT mainFrameTitle ([out, retval] BSTR *title)
 
HRESULT mainFrameIcon ([out, retval] HBITMAP *hBitmap)
 
HRESULT registerURLSchemeAsLocal ([in] BSTR scheme)
 
HRESULT close ()
 

Member Function Documentation

◆ accessibilityDelegate()

HRESULT IWebView::accessibilityDelegate ( [retval] IAccessibilityDelegate **  d)

setAccessibilityDelegate: Set the WebView's accessibilityDelegate.

Returns
The WebView's WebUIDelegate.

◆ applicationNameForUserAgent()

HRESULT IWebView::applicationNameForUserAgent ( [out, retval] BSTR applicationName)

applicationNameForUserAgent

Returns
The name of the application as used in the user-agent string.
  • (NSString *)applicationNameForUserAgent;

◆ backForwardList()

HRESULT IWebView::backForwardList ( [retval, out] IWebBackForwardList **  list)

backForwardList

Returns
The backforward list for this webView.

◆ canShowMIMEType()

HRESULT IWebView::canShowMIMEType ( [in] BSTR  mimeType,
[out, retval] BOOL canShow 
)

canShowMIMEType: Checks if the WebKit can show content of a certain MIME type.

Parameters
MIMETypeThe MIME type to check.
Returns
YES if the WebKit can show content with MIMEtype.
  • (BOOL)canShowMIMEType:(NSString *)MIMEType;

◆ canShowMIMETypeAsHTML()

HRESULT IWebView::canShowMIMETypeAsHTML ( [in] BSTR  mimeType,
[out, retval] BOOL canShow 
)

canShowMIMETypeAsHTML: Checks if the the MIME type is a type that the WebKit will interpret as HTML.

Parameters
MIMETypeThe MIME type to check.
Returns
YES if the MIMEtype in an HTML type.
  • (BOOL)canShowMIMETypeAsHTML:(NSString *)MIMEType;

◆ centerSelectionInVisibleArea()

HRESULT IWebView::centerSelectionInVisibleArea ( [in] IUnknown *  sender)

centerSelectionInVisibleArea Centers the selected text in the WebView

  • (void)centerSelectionInVisibleArea:(id)sender;

◆ close()

HRESULT IWebView::close ( )

close Closes the receiver, unloading its web page and canceling any pending loads. Once the receiver has closed, it will no longer respond to requests or fire delegate methods. (However, the -close method itself may fire delegate methods.) A garbage collected application is required to call close when the receiver is no longer needed. The close method will be called automatically when the window or hostWindow closes and shouldCloseWithWindow returns YES. A non-garbage collected application can still call close, providing a convenient way to prevent receiver from doing any more loading and firing any future delegate methods.

Implemented in WebView, and WebView.

◆ customTextEncodingName()

HRESULT IWebView::customTextEncodingName ( [out, retval] BSTR encodingName)

customTextEncodingName

Returns
The custom text encoding name or nil if no custom text encoding name has been set.
  • (NSString *)customTextEncodingName;

◆ customUserAgent()

HRESULT IWebView::customUserAgent ( [out, retval] BSTR userAgentString)

customUserAgent

Returns
The custom user-agent string or nil if no custom user-agent string has been set.
  • (NSString *)customUserAgent;

◆ downloadDelegate()

HRESULT IWebView::downloadDelegate ( [retval, out] IWebDownloadDelegate **  d)

downloadDelegate Return the WebView's WebDownloadDelegate.

Returns
The WebView's WebDownloadDelegate.
  • (id)downloadDelegate;

◆ drawsBackground()

HRESULT IWebView::drawsBackground ( [out, retval] BOOL drawsBackground)

drawsBackground

Returns
Returns YES if the receiver draws a default white background, NO otherwise.
  • (BOOL)drawsBackground;

◆ elementAtPoint()

HRESULT IWebView::elementAtPoint ( [in] LPPOINT  point,
[out, retval] IPropertyBag **  elementDictionary 
)

elementAtPoint:

Parameters
pointA point in the coordinates of the WebView
Returns
An element dictionary describing the point
  • (NSDictionary *)elementAtPoint:(NSPoint)point;

◆ estimatedProgress()

HRESULT IWebView::estimatedProgress ( [out, retval] double *  estimatedProgress)

estimatedProgress An estimate of the percent complete for a document load. This value will range from 0 to 1.0 and, once a load completes, will remain at 1.0 until a new load starts, at which point it will be reset to 0. The value is an estimate based on the total number of bytes expected to be received for a document, including all it's possible subresources. For more accurate progress indication it is recommended that you implement a WebFrameLoadDelegate and a WebResourceLoadDelegate.

  • (double)estimatedProgress;

◆ focusedFrame()

HRESULT IWebView::focusedFrame ( [retval, out] IWebFrame **  frame)

focusedFrame Return the frame that has the current focus.

◆ frameLoadDelegate()

HRESULT IWebView::frameLoadDelegate ( [retval, out] IWebFrameLoadDelegate **  d)

frameLoadDelegate Return the WebView's WebFrameLoadDelegate delegate.

Returns
The WebView's WebFrameLoadDelegate delegate.
  • (id)frameLoadDelegate;

◆ goBack()

HRESULT IWebView::goBack ( [out, retval] BOOL succeeded)

goBack Go back to the previous URL in the backforward list.

Returns
YES if able to go back in the backforward list, NO otherwise.
  • (BOOL)goBack;

◆ goForward()

HRESULT IWebView::goForward ( [out, retval] BOOL succeeded)

goForward Go forward to the next URL in the backforward list.

Returns
YES if able to go forward in the backforward list, NO otherwise.
  • (BOOL)goForward;

◆ goToBackForwardItem()

HRESULT IWebView::goToBackForwardItem ( [in] IWebHistoryItem item,
[out, retval] BOOL succeeded 
)

goToBackForwardItem: Go back or forward to an item in the backforward list.

Returns
YES if able to go to the item, NO otherwise.
  • (BOOL)goToBackForwardItem:(WebHistoryItem *)item;

◆ groupName()

HRESULT IWebView::groupName ( [out, retval] BSTR groupName)

groupName The group name for this WebView.

  • (NSString *)groupName;

◆ hostWindow()

HRESULT IWebView::hostWindow ( [out, retval] HWND window)

hostWindow

Returns
The host window for the web view.
  • (NSWindow *)hostWindow;

◆ initWithFrame()

HRESULT IWebView::initWithFrame ( [in] RECT  frame,
[in] BSTR  frameName,
[in] BSTR  groupName 
)

initWithFrame:frameName:groupName: The designated initializer for WebView. 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.

Parameters
frameThe frame used to create the view.
frameNameThe name to use for the top level frame. May be nil.
groupNameThe name of the webView set to which this webView will be added. May be nil.
Returns
Returns an initialized WebView.
  • (id)initWithFrame:(NSRect)frame frameName:(NSString *)frameName groupName:(NSString *)groupName;

◆ isLoading()

HRESULT IWebView::isLoading ( [out, retval] BOOL isLoading)

isLoading Returns YES if there are any pending loads.

  • (BOOL)isLoading;

◆ mainFrame()

HRESULT IWebView::mainFrame ( [retval, out] IWebFrame **  frame)

mainFrame Return the top level frame. Note that even document that are not framesets will have a mainFrame.

Returns
The main frame.

◆ mainFrameDocument()

HRESULT IWebView::mainFrameDocument ( [out, retval] IDOMDocument **  document)

mainFrameDocument

Returns
Returns the main frame's DOMDocument.

◆ mainFrameIcon()

HRESULT IWebView::mainFrameIcon ( [out, retval] HBITMAP *  hBitmap)

mainFrameIcon The methods returns the site icon for the current page loaded in the mainFrame.

Returns
Returns the main frame's icon if any, otherwise nil.
  • (NSImage *)mainFrameIcon;

◆ mainFrameTitle()

HRESULT IWebView::mainFrameTitle ( [out, retval] BSTR title)

mainFrameTitle

Returns
Returns the main frame's title if any, otherwise an empty string.
  • (NSString *)mainFrameTitle;

◆ mainFrameURL()

HRESULT IWebView::mainFrameURL ( [out, retval] BSTR urlString)

mainFrameURL

Returns
Returns the main frame's current URL.
  • (NSString *)mainFrameURL;

◆ mediaStyle()

HRESULT IWebView::mediaStyle ( [out, retval] BSTR media)

mediaStyle

Returns
mediaStyle The value to use for the CSS media property, as set by setMediaStyle:. It will be nil unless set by that method.
  • (NSString *)mediaStyle;

◆ MIMETypesShownAsHTML()

HRESULT IWebView::MIMETypesShownAsHTML ( [out, retval] IEnumVARIANT **  enumVariant)

MIMETypesShownAsHTML

Returns
Returns an array of NSStrings that describe the MIME types WebKit will attempt to render as HTML.
  • (NSArray *)MIMETypesShownAsHTML;

◆ moveDragCaretToPoint()

HRESULT IWebView::moveDragCaretToPoint ( [in] LPPOINT  point)

moveDragCaretToPoint:

Parameters
pointA point in the coordinates of the WebView This method moves the caret that shows where something being dragged will be dropped. It may cause the WebView to scroll to make the new position of the drag caret visible.
  • (void)moveDragCaretToPoint:(NSPoint)point;

◆ pasteboardTypesForElement()

HRESULT IWebView::pasteboardTypesForElement ( [in] IPropertyBag *  elementDictionary,
[out, retval] IEnumVARIANT **  enumVariant 
)

pasteboardTypesForElement: Returns the pasteboard types that WebView can use for an element

Parameters
elementThe element
  • (NSArray *)pasteboardTypesForElement:(NSDictionary *)element;

◆ pasteboardTypesForSelection()

HRESULT IWebView::pasteboardTypesForSelection ( [out, retval] IEnumVARIANT **  enumVariant)

pasteboardTypesForSelection Returns the pasteboard types that WebView can use for the current selection

  • (NSArray *)pasteboardTypesForSelection;

◆ policyDelegate()

HRESULT IWebView::policyDelegate ( [retval, out] IWebPolicyDelegate **  d)

policyDelegate Return the WebView's WebPolicyDelegate.

Returns
The WebView's WebPolicyDelegate.
  • (id)policyDelegate;

◆ preferences()

HRESULT IWebView::preferences ( [out, retval] IWebPreferences **  prefs)

preferences

Returns
Returns the preferences used by this webView. This method will return [WebPreferences standardPreferences] if no other instance of WebPreferences has been set.

◆ preferencesIdentifier()

HRESULT IWebView::preferencesIdentifier ( [out, retval] BSTR anIdentifier)

preferencesIdentifier

Returns
Returns the WebPreferences key prefix.
  • (NSString *)preferencesIdentifier;

◆ registerURLSchemeAsLocal()

HRESULT IWebView::registerURLSchemeAsLocal ( [in] BSTR  scheme)

registerURLSchemeAsLocal Adds the scheme to the list of schemes to be treated as local.

Parameters
schemeThe scheme to register.
  • (void)registerURLSchemeAsLocal:(NSString *)scheme;

◆ registerViewClass()

HRESULT IWebView::registerViewClass ( [in] IWebDocumentView view,
[in] IWebDocumentRepresentation representation,
[in] BSTR  forMIMEType 
)

registerViewClass:representationClass:forMIMEType: Register classes that implement WebDocumentView and WebDocumentRepresentation respectively. A document class may register for a primary MIME type by excluding a subtype, i.e. "video/" will match the document class with all video types. More specific matching takes precedence over general matching.

Parameters
viewClassThe WebDocumentView class to use to render data for a given MIME type.
representationClassThe WebDocumentRepresentation class to use to represent data of the given MIME type.
MIMETypeThe MIME type to represent with an object of the given class.
  • (void)registerViewClass:(Class)viewClass representationClass:(Class)representationClass forMIMEType:(NSString *)MIMEType;

◆ removeDragCaret()

HRESULT IWebView::removeDragCaret ( )

removeDragCaret Removes the drag caret from the WebView

  • (void)removeDragCaret;

Implemented in WebView, and WebView.

◆ resourceLoadDelegate()

HRESULT IWebView::resourceLoadDelegate ( [retval, out] IWebResourceLoadDelegate **  d)

resourceLoadDelegate

Returns
Return the WebView's WebResourceLoadDelegate.
  • (id)resourceLoadDelegate;

◆ searchFor()

HRESULT IWebView::searchFor ( [in] BSTR  str,
[in] BOOL  forward,
[in] BOOL  caseFlag,
[in] BOOL  wrapFlag,
[out, retval] BOOL found 
)

searchFor:direction:caseSensitive: Searches a document view for a string and highlights the string if it is found. Starts the search from the current selection. Will search across all frames.

Parameters
stringThe string to search for.
forwardYES to search forward, NO to seach backwards.
caseFlagYES to for case-sensitive search, NO for case-insensitive search.
Returns
YES if found, NO if not found.
  • (BOOL)searchFor:(NSString *)string direction:(BOOL)forward caseSensitive:(BOOL)caseFlag wrap:(BOOL)wrapFlag;

◆ selectedText()

HRESULT IWebView::selectedText ( [out, retval] BSTR text)

selectedText Returns the selection as a string

◆ setAccessibilityDelegate()

HRESULT IWebView::setAccessibilityDelegate ( [in] IAccessibilityDelegate d)

accessibilityDelegate: Return the WebView's accessibilityDelegate.

Parameters
delegateThe WebUIDelegate to set as the delegate.
  • (void)setUIDelegate:(id)delegate;

◆ setApplicationNameForUserAgent()

HRESULT IWebView::setApplicationNameForUserAgent ( [in] BSTR  applicationName)

setApplicationNameForUserAgent: Set the application name. This name will be used in user-agent strings that are chosen for best results in rendering web pages.

Parameters
applicationNameThe application name
  • (void)setApplicationNameForUserAgent:(NSString *)applicationName;

◆ setCustomTextEncodingName()

HRESULT IWebView::setCustomTextEncodingName ( [in] BSTR  encodingName)

setCustomTextEncodingName: Make the page display with a different text encoding; stops any load in progress. The text encoding passed in overrides the normal text encoding smarts including what's specified in a web page's header or HTTP response. The text encoding automatically goes back to the default when the top level frame changes to a new location. Setting the text encoding name to nil makes the webView use default encoding rules.

Parameters
encodingThe text encoding name to use to display a page or nil.
  • (void)setCustomTextEncodingName:(NSString *)encodingName;

◆ setCustomUserAgent()

HRESULT IWebView::setCustomUserAgent ( [in] BSTR  userAgentString)

setCustomUserAgent: Set the user agent. 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.

Parameters
userAgentStringThe user agent description
  • (void)setCustomUserAgent:(NSString *)userAgentString;

◆ setDownloadDelegate()

HRESULT IWebView::setDownloadDelegate ( [in] IWebDownloadDelegate d)

setDownloadDelegate: Set the WebView's WebDownloadDelegate. The download delegate is retained by WebDownload when any downloads are in progress.

Parameters
delegateThe WebDownloadDelegate to set as the download delegate.
  • (void)setDownloadDelegate:(id)delegate;

◆ setDrawsBackground()

HRESULT IWebView::setDrawsBackground ( [in] BOOL  drawsBackground)

setDrawsBackground:

Parameters
drawsBackroundYES to cause the receiver to draw a default white background, NO otherwise. Sets whether the receiver draws a default white background when the loaded page has no background specified.
  • (void)setDrawsBackground:(BOOL)drawsBackround;

Implemented in WebView.

◆ setFrameLoadDelegate()

HRESULT IWebView::setFrameLoadDelegate ( [in] IWebFrameLoadDelegate d)

setFrameLoadDelegate: Set the WebView's WebFrameLoadDelegate delegate.

Parameters
delegateThe WebFrameLoadDelegate to set as the delegate.
  • (void)setFrameLoadDelegate:(id)delegate;

◆ setGroupName()

HRESULT IWebView::setGroupName ( [in] BSTR  groupName)

setGroupName:

Parameters
groupNameThe name of the group for this WebView. JavaScript may access named frames within the same group.
  • (void)setGroupName:(NSString *)groupName;

◆ setHostWindow()

HRESULT IWebView::setHostWindow ( [in] HWND  window)

setHostWindow:

Parameters
hostWindowThe host window for the web view. Parts of WebKit (such as plug-ins and JavaScript) depend on a window to function properly. Set a host window so these parts continue to function even when the web view is not in an actual window.
  • (void)setHostWindow:(NSWindow *)hostWindow;

◆ setMainFrameURL()

HRESULT IWebView::setMainFrameURL ( [in] BSTR  urlString)

setMainFrameURL:

Parameters
URLStringThe URL to load in the mainFrame.
  • (void)setMainFrameURL:(NSString *)URLString;

◆ setMaintainsBackForwardList()

HRESULT IWebView::setMaintainsBackForwardList ( [in] BOOL  flag)

setMaintainsBackForwardList: Enable or disable the use of a backforward list for this webView.

Parameters
flagTurns use of the back forward list on or off
  • (void)setMaintainsBackForwardList:(BOOL)flag;

Implemented in WebView.

◆ setMediaStyle()

HRESULT IWebView::setMediaStyle ( [in] BSTR  media)

setMediaStyle: Set the media style for the WebView. The mediaStyle will override the normal value of the CSS media property. Setting the value to nil will restore the normal value.

Parameters
mediaStyleThe value to use for the CSS media property.
  • (void)setMediaStyle:(NSString *)mediaStyle;

◆ setMIMETypesShownAsHTML()

HRESULT IWebView::setMIMETypesShownAsHTML ( [in, size_is(cMimeTypes)] BSTR mimeTypes,
[in] int  cMimeTypes 
)

setMIMETypesShownAsHTML: 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;

◆ setPolicyDelegate()

HRESULT IWebView::setPolicyDelegate ( [in] IWebPolicyDelegate d)

setPolicyDelegate: Set the WebView's WebPolicyDelegate delegate.

Parameters
delegateThe WebPolicyDelegate to set as the delegate.
  • (void)setPolicyDelegate:(id)delegate;

◆ setPreferences()

HRESULT IWebView::setPreferences ( [in] IWebPreferences prefs)

setPreferences:

Parameters
preferencesThe preferences to use for the webView. Override the standard setting for the webView.

◆ setPreferencesIdentifier()

HRESULT IWebView::setPreferencesIdentifier ( [in] BSTR  anIdentifier)

setPreferencesIdentifier:

Parameters
anIdentifierThe string to use a prefix for storing values for this WebView in the user defaults database. If the WebPreferences for this WebView are stored in the user defaults database, the string set in this method will be used a key prefix.
  • (void)setPreferencesIdentifier:(NSString *)anIdentifier;

◆ setResourceLoadDelegate()

HRESULT IWebView::setResourceLoadDelegate ( [in] IWebResourceLoadDelegate d)

setResourceLoadDelegate: Set the WebView's WebResourceLoadDelegate load delegate.

Parameters
delegateThe WebResourceLoadDelegate to set as the load delegate.
  • (void)setResourceLoadDelegate:(id)delegate;

◆ setTextSizeMultiplier()

HRESULT IWebView::setTextSizeMultiplier ( [in] float  multiplier)

setTextSizeMultiplier: Change the size of the text rendering in views managed by this webView.

Parameters
multiplierA fractional percentage value, 1.0 is 100%.
  • (void)setTextSizeMultiplier:(float)multiplier;

Implemented in WebView.

◆ setUIDelegate()

HRESULT IWebView::setUIDelegate ( [in] IWebUIDelegate d)

setUIDelegate: Set the WebView's WebUIDelegate.

Parameters
delegateThe WebUIDelegate to set as the delegate.
  • (void)setUIDelegate:(id)delegate;

◆ stringByEvaluatingJavaScriptFromString()

HRESULT IWebView::stringByEvaluatingJavaScriptFromString ( [in] BSTR  script,
[out, retval] BSTR result 
)

stringByEvaluatingJavaScriptFromString:

Parameters
scriptThe text of the JavaScript.
Returns
The result of the script, converted to a string, or nil for failure.
  • (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)script;

◆ supportsTextEncoding()

HRESULT IWebView::supportsTextEncoding ( [out, retval] BOOL supports)

supportsTextEncoding Find out if the current web page supports text encodings.

Returns
YES if the document view of the current web page can support different text encodings.
  • (BOOL)supportsTextEncoding;

◆ textSizeMultiplier()

HRESULT IWebView::textSizeMultiplier ( [out, retval] float *  multiplier)

textSizeMultiplier

Returns
The text size multipler.
  • (float)textSizeMultiplier;

◆ uiDelegate()

HRESULT IWebView::uiDelegate ( [retval, out] IWebUIDelegate **  d)

◆ URLFromPasteboard()

HRESULT IWebView::URLFromPasteboard ( [in] IDataObject *  pasteboard,
[out, retval] BSTR url 
)

URLFromPasteboard: Returns a URL from a pasteboard

Parameters
pasteboardThe pasteboard with a URL
Returns
A URL if the pasteboard has one. Nil if it does not. 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;

◆ URLTitleFromPasteboard()

HRESULT IWebView::URLTitleFromPasteboard ( [in] IDataObject *  pasteboard,
[out, retval] BSTR urlTitle 
)

URLTitleFromPasteboard: Returns a URL title from a pasteboard

Parameters
pasteboardThe pasteboard with a URL title
Returns
A URL title if the pasteboard has one. Nil if it does not. 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;

◆ userAgentForURL()

HRESULT IWebView::userAgentForURL ( [in] BSTR  url,
[out, retval] BSTR userAgent 
)

userAgentForURL: Get the appropriate user-agent string for a particular URL.

Parameters
URLThe URL.
Returns
The user-agent string for the supplied URL.
  • (NSString *)userAgentForURL:(NSURL *)URL;

◆ windowScriptObject()

HRESULT IWebView::windowScriptObject ( [out, retval] IWebScriptObject **  webScriptObject)

windowScriptObject windowScriptObject return a WebScriptObject that represents the window object from the script environment.

Returns
Returns the window object from the script environment.

◆ writeElement()

HRESULT IWebView::writeElement ( [in] IPropertyBag *  elementDictionary,
[in, size_is(cWithPasteboardTypes)] BSTR withPasteboardTypes,
[in] int  cWithPasteboardTypes,
[in] IDataObject *  pasteboard 
)

writeElement:withPasteboardTypes:toPasteboard: Writes an element to the pasteboard

Parameters
elementThe element to write to the pasteboard
typesThe types that WebView will write to the pasteboard
pasteboardThe pasteboard to write to
  • (void)writeElement:(NSDictionary *)element withPasteboardTypes:(NSArray *)types toPasteboard:(NSPasteboard *)pasteboard;

◆ writeSelectionWithPasteboardTypes()

HRESULT IWebView::writeSelectionWithPasteboardTypes ( [in, size_is(cTypes)] BSTR types,
[in] int  cTypes,
[in] IDataObject *  pasteboard 
)

writeSelectionWithPasteboardTypes:toPasteboard: Writes the current selection to the pasteboard

Parameters
typesThe types that WebView will write to the pasteboard
pasteboardThe pasteboard to write to
  • (void)writeSelectionWithPasteboardTypes:(NSArray *)types toPasteboard:(NSPasteboard *)pasteboard;

The documentation for this interface was generated from the following file: