📄 iwebuidelegate.idl
字号:
- (void)webView:(WebView *)sender makeFirstResponder:(NSResponder *)responder; */ HRESULT makeFirstResponder([in] IWebView* sender, [in] OLE_HANDLE responderHWnd); /*! @method webView:setStatusText: @abstract Set the window's status display, if any, to the specified string. @param sender The WebView sending the delegate method. @param text The status text to set - (void)webView:(WebView *)sender setStatusText:(NSString *)text; */ HRESULT setStatusText([in] IWebView* sender, [in] BSTR text); /*! @method webViewStatusText: @abstract Get the currently displayed status text. @param sender The WebView sending the delegate method. @result The status text - (NSString *)webViewStatusText:(WebView *)sender; */ HRESULT webViewStatusText([in] IWebView* sender, [out, retval] BSTR* text); /*! @method webViewAreToolbarsVisible: @abstract Determine whether the window's toolbars are currently visible @param sender The WebView sending the delegate method. @discussion This method should return YES if the window has any toolbars that are currently on, besides the status bar. If the app has more than one toolbar per window, for example a regular command toolbar and a favorites bar, it should return YES from this method if at least one is on. @result YES if at least one toolbar is visible, otherwise NO. - (BOOL)webViewAreToolbarsVisible:(WebView *)sender; */ HRESULT webViewAreToolbarsVisible([in] IWebView* sender, [out, retval] BOOL* visible); /*! @method webView:setToolbarsVisible: @param sender The WebView sending the delegate method. @abstract Set whether the window's toolbars are currently visible. @param visible New value for toolbar visibility @discussion Setting this to YES should turn on all toolbars (except for a possible status bar). Setting it to NO should turn off all toolbars (with the same exception). - (void)webView:(WebView *)sender setToolbarsVisible:(BOOL)visible; */ HRESULT setToolbarsVisible([in] IWebView* sender, [in] BOOL visible); /*! @method webViewIsStatusBarVisible: @abstract Determine whether the status bar is visible. @param sender The WebView sending the delegate method. @result YES if the status bar is visible, otherwise NO. - (BOOL)webViewIsStatusBarVisible:(WebView *)sender; */ HRESULT webViewIsStatusBarVisible([in] IWebView* sender, [out, retval] BOOL* visible); /*! @method webView:setStatusBarVisible: @abstract Set whether the status bar is currently visible. @param visible The new visibility value @discussion Setting this to YES should show the status bar, setting it to NO should hide it. - (void)webView:(WebView *)sender setStatusBarVisible:(BOOL)visible; */ HRESULT setStatusBarVisible([in] IWebView* sender, [in] BOOL visible); /*! @method webViewIsResizable: @abstract Determine whether the window is resizable or not. @param sender The WebView sending the delegate method. @result YES if resizable, NO if not. @discussion If there are multiple views in the same window, they have have their own separate resize controls and this may need to be handled specially. - (BOOL)webViewIsResizable:(WebView *)sender; */ HRESULT webViewIsResizable([in] IWebView* sender, [out, retval] BOOL* resizable); /*! @method webView:setResizable: @abstract Set the window to resizable or not @param sender The WebView sending the delegate method. @param resizable YES if the window should be made resizable, NO if not. @discussion If there are multiple views in the same window, they have have their own separate resize controls and this may need to be handled specially. - (void)webView:(WebView *)sender setResizable:(BOOL)resizable; */ HRESULT setResizable([in] IWebView* sender, [in] BOOL resizable); /*! @method webView:setFrame: @abstract Set the window's frame rect @param sender The WebView sending the delegate method. @param frame The new window frame size @discussion Even though a caller could set the frame directly using the NSWindow, this method is provided so implementors of this protocol can do special things on programmatic move/resize, like avoiding autosaving of the size. - (void)webView:(WebView *)sender setFrame:(NSRect)frame; */ HRESULT setFrame([in] IWebView* sender, [in] RECT* frame); /*! @method webViewFrame: @param sender The WebView sending the delegate method. @abstract REturn the window's frame rect @discussion - (NSRect)webViewFrame:(WebView *)sender; */ HRESULT webViewFrame([in] IWebView* sender, [out, retval] RECT* frame); /*! @method webView:setContentRect: @abstract Set the window's content rect @param sender The WebView sending the delegate method. @param frame The new window content rect @discussion Even though a caller could set the content rect directly using the NSWindow, this method is provided so implementors of this protocol can do special things on programmatic move/resize, like avoiding autosaving of the size. - (void)webView:(WebView *)sender setContentRect:(NSRect)contentRect; */ HRESULT setContentRect([in] IWebView* sender, [in] RECT* contentRect); /*! @method webViewContentRect: @abstract Return the window's content rect @discussion - (NSRect)webViewContentRect:(WebView *)sender; */ HRESULT webViewContentRect([in] IWebView* sender, [out, retval] RECT* contentRect); /*! @method webView:runJavaScriptAlertPanelWithMessage: @abstract Display a JavaScript alert panel @param sender The WebView sending the delegate method. @param message The message to display @discussion Clients should visually indicate that this panel comes from JavaScript. The panel should have a single OK button. - (void)webView:(WebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message; */ HRESULT runJavaScriptAlertPanelWithMessage([in] IWebView* sender, [in] BSTR message); /*! @method webView:runJavaScriptConfirmPanelWithMessage: @abstract Display a JavaScript confirm panel @param sender The WebView sending the delegate method. @param message The message to display @result YES if the user hit OK, no if the user chose Cancel. @discussion Clients should visually indicate that this panel comes from JavaScript. The panel should have two buttons, e.g. "OK" and "Cancel". - (BOOL)webView:(WebView *)sender runJavaScriptConfirmPanelWithMessage:(NSString *)message; */ HRESULT runJavaScriptConfirmPanelWithMessage([in] IWebView* sender, [in] BSTR message, [out, retval] BOOL* result); /*! @method webView:runJavaScriptTextInputPanelWithPrompt:defaultText: @abstract Display a JavaScript text input panel @param sender The WebView sending the delegate method. @param message The message to display @param defaultText The initial text for the text entry area. @result The typed text if the user hit OK, otherwise nil. @discussion Clients should visually indicate that this panel comes from JavaScript. The panel should have two buttons, e.g. "OK" and "Cancel", and an area to type text. - (NSString *)webView:(WebView *)sender runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText; */ HRESULT runJavaScriptTextInputPanelWithPrompt([in] IWebView* sender, [in] BSTR message, [in] BSTR defaultText, [out, retval] BSTR* result); /*! @method webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame: @abstract Display a confirm panel by an "before unload" event handler. @param sender The WebView sending the delegate method. @param message The message to display. @param frame The WebFrame whose JavaScript initiated this call. @result YES if the user hit OK, NO if the user chose Cancel. @discussion Clients should include a message in addition to the one supplied by the web page that indicates. The panel should have two buttons, e.g. "OK" and "Cancel". - (BOOL)webView:(WebView *)sender runBeforeUnloadConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame; */ HRESULT runBeforeUnloadConfirmPanelWithMessage([in] IWebView* sender, [in] BSTR message, [in] IWebFrame* initiatedByFrame, [out, retval] BOOL* result); /*! @method webView:runOpenPanelForFileButtonWithResultListener: @abstract Display a file open panel for a file input control. @param sender The WebView sending the delegate method. @param resultListener The object to call back with the results. @discussion This method is passed a callback object instead of giving a return value so that it can be handled with a sheet. - (void)webView:(WebView *)sender runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener; */ HRESULT runOpenPanelForFileButtonWithResultListener([in] IWebView* sender, [in] IWebOpenPanelResultListener* resultListener); /*! @method webView:mouseDidMoveOverElement:modifierFlags: @abstract Update the window's feedback for mousing over links to reflect a new item the mouse is over or new modifier flags. @param sender The WebView sending the delegate method. @param elementInformation Dictionary that describes the element that the mouse is over, or nil. @param modifierFlags The modifier flags as in NSEvent. - (void)webView:(WebView *)sender mouseDidMoveOverElement:(NSDictionary *)elementInformation modifierFlags:(WebNSUInt)modifierFlags; */ HRESULT mouseDidMoveOverElement([in] IWebView* sender, [in] IPropertyBag* elementInformation, [in] UINT modifierFlags); /*! @method webView:contextMenuItemsForElement:defaultMenuItems: @abstract Returns the menu items to display in an element's contextual menu. @param sender The WebView sending the delegate method. @param element A dictionary representation of the clicked element. @param defaultMenuItems An array of default NSMenuItems to include in all contextual menus. @result An array of NSMenuItems to include in the contextual menu. - (NSArray *)webView:(WebView *)sender contextMenuItemsForElement:(NSDictionary *)element defaultMenuItems:(NSArray *)defaultMenuItems; */ HRESULT contextMenuItemsForElement([in] IWebView* sender, [in] IPropertyBag* element, [in] OLE_HANDLE defaultItemsHMenu, [out, retval] OLE_HANDLE* resultHMenu); /*! @method webView:validateUserInterfaceItem:defaultValidation: @abstract Controls UI validation @param webView The WebView sending the delegate method @param item The user interface item being validated @pararm defaultValidation Whether or not the WebView thinks the item is valid @discussion This method allows the UI delegate to control WebView's validation of user interface items. See WebView.h to see the methods to that WebView can currently validate. See NSUserInterfaceValidations and NSValidatedUserInterfaceItem for information about UI validation. - (BOOL)webView:(WebView *)webView validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)item defaultValidation:(BOOL)defaultValidation; */ HRESULT validateUserInterfaceItem([in] IWebView* webView, [in] UINT itemCommandID, [in] BOOL defaultValidation, [out, retval] BOOL* isValid); /*! @method webView:shouldPerformAction:fromSender: @abstract Controls actions @param webView The WebView sending the delegate method @param action The action being sent @param sender The sender of the action @discussion This method allows the UI delegate to control WebView's behavior when an action is being sent. For example, if the action is copy:, the delegate can return YES to allow WebView to perform its default copy behavior or return NO and perform copy: in some other way. See WebView.h to see the actions that WebView can perform. - (BOOL)webView:(WebView *)webView shouldPerformAction:(SEL)action fromSender:(id)sender; */ HRESULT shouldPerformAction([in] IWebView* webView, [in] UINT itemCommandID, [in] UINT sender); /*! @method webView:dragDestinationActionMaskForDraggingInfo: @abstract Controls behavior when dragging to a WebView @param webView The WebView sending the delegate method @param draggingInfo The dragging info of the drag @discussion This method is called periodically as something is dragged over a WebView. The UI delegate can return a mask indicating which drag destination actions can occur, WebDragDestinationActionAny to allow any kind of action or WebDragDestinationActionNone to not accept the drag. - (unsigned)webView:(WebView *)webView dragDestinationActionMaskForDraggingInfo:(id <NSDraggingInfo>)draggingInfo; */ HRESULT dragDestinationActionMaskForDraggingInfo([in] IWebView* webView, [in] IDataObject* draggingInfo, [out, retval] WebDragDestinationAction* action); /*! @method webView:willPerformDragDestinationAction:forDraggingInfo: @abstract Informs that WebView will perform a drag destination action @param webView The WebView sending the delegate method @param action The drag destination action @param draggingInfo The dragging info of the drag @discussion This method is called after the last call to webView:dragDestinationActionMaskForDraggingInfo: after something is dropped on a WebView. This method informs the UI delegate of the drag destination action that WebView will perform. - (void)webView:(WebView *)webView willPerformDragDestinationAction:(WebDragDestinationAction)action forDraggingInfo:(id <NSDraggingInfo>)draggingInfo; */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -