📄 iwebuidelegate.idl
字号:
HRESULT willPerformDragDestinationAction([in] IWebView* webView, [in] WebDragDestinationAction action, [in] IDataObject* draggingInfo); /*! @method webView:dragSourceActionMaskForPoint: @abstract Controls behavior when dragging from a WebView @param webView The WebView sending the delegate method @param point The point where the drag started in the coordinates of the WebView @discussion This method is called after the user has begun a drag from a WebView. The UI delegate can return a mask indicating which drag source actions can occur, WebDragSourceActionAny to allow any kind of action or WebDragSourceActionNone to not begin a drag. - (unsigned)webView:(WebView *)webView dragSourceActionMaskForPoint:(NSPoint)point; */ HRESULT dragSourceActionMaskForPoint([in] IWebView* webView, [in] LPPOINT point, [out, retval] WebDragSourceAction* action); /*! @method webView:willPerformDragSourceAction:fromPoint:withPasteboard: @abstract Informs that a drag a has begun from a WebView @param webView The WebView sending the delegate method @param action The drag source action @param point The point where the drag started in the coordinates of the WebView @param pasteboard The drag pasteboard @discussion This method is called after webView:dragSourceActionMaskForPoint: is called after the user has begun a drag from a WebView. This method informs the UI delegate of the drag source action that will be performed and gives the delegate an opportunity to modify the contents of the dragging pasteboard. - (void)webView:(WebView *)webView willPerformDragSourceAction:(WebDragSourceAction)action fromPoint:(NSPoint)point withPasteboard:(NSPasteboard *)pasteboard; */ HRESULT willPerformDragSourceAction([in] IWebView* webView, [in] WebDragSourceAction action, [in] LPPOINT point, [in] IDataObject* pasteboard); /*! @method webView:contextMenuItemSelected:ForElement: @abstract Perform the action associated with the selected item. @param sender The WebView sending the delegate method. @param item The menu item that was selected. @param element A dictionary representation of the clicked element. */ [local] HRESULT contextMenuItemSelected([in] IWebView* sender, [in] void* item, [in] IPropertyBag* element); /* @method hasCustomMenuImplementation: @abstract Returns whether the application uses the following functions to create a custom menu impementation. */ HRESULT hasCustomMenuImplementation([out, retval] BOOL* hasCustomMenus); /* @method webView:trackCutsomPopupMenu @abstract Adds custom draw data to the menu items and calls a custom trackPopupMenu. @param sender The WebView sending the delegate method. @param menu The menu that we want to pop up. @param point The point associated with the context menu event in the coordinates of the WebView */ HRESULT trackCustomPopupMenu([in] IWebView* sender, [in] OLE_HANDLE hMenu, [in] LPPOINT point); /* @method webView:measureCustomMenuItem @abstract This is called when the WM_MEASUREITEM command is received to measure the custom menu items @param sender The WebView sending the delegate method. @param measureItem The LPMEASUREITEMSTRUCT associated with the item. */ [local] HRESULT measureCustomMenuItem([in] IWebView* sender, [in] void* measureItem); /* @method webView:drawCustomMenuItem @abstract This is called when the WM_DRAWITEM command is received to draw the custom menu item @param sender The WebView sending the delegate method. @param drawItem The LPDRAWITEMSTRUCT associated with the item. */ [local] HRESULT drawCustomMenuItem([in] IWebView* sender, [in] void* drawItem); /* @method webView:addCustomMenuDrawingData @abstract Add custom data to the menu that the delegate can use when asked to draw. @param sender The WebView sending the delegate method. @param menu The cutsom menu to clean up. @discussion This method is called for submenus as well. */ HRESULT addCustomMenuDrawingData([in] IWebView* sender, [in] OLE_HANDLE hMenu); /* @method webView:cleanUpCustomMenuDrawingData @abstract Clean up any custom data added to the menu items @param sender The WebView sending the delegate method. @param menu The cutsom menu to clean up. */ HRESULT cleanUpCustomMenuDrawingData([in] IWebView* sender, [in] OLE_HANDLE hMenu); /*! @method webView:canTakeFocus: @abstract Informs whether focus can be transferred out of the WebView in the specified direction @param sender The WebView sending the delegate method. @param forward Whether focus is moving forward or backward. */ HRESULT canTakeFocus([in] IWebView* sender, [in] BOOL forward, [out] BOOL* result); /*! @method webView:takeFocus: @abstract Instructs the delegate to take focus out of the WebView @param sender The WebView sending the delegate method. @param forward Whether focus is moving forward or backward. */ HRESULT takeFocus([in] IWebView* sender, [in] BOOL forward); /// Undo related UI delegate methods -------------------------------------------------------------------------------- /*! @method registerUndoWithTarget: @abstract Registers an undo operation of a IWebUndoTarget on the undo/redo stack. @param target The target that will be called back when the action is undone @param actionName The name of the action - this will be passed back to the target when we need to undo the operation @param actionArg An object that target used to save undo information */ HRESULT registerUndoWithTarget([in] IWebUndoTarget* target, [in] BSTR actionName, [in] IUnknown* actionArg); /*! @method removeAllActionsWithTarget: @abstract remove all the undo operations that are registered for the passed in target on the undo/redo stack. @param target */ HRESULT removeAllActionsWithTarget([in] IWebUndoTarget* target); /*! @method setActionTitle: @abstract Sets the name of the action for the current group of undo operations @param actionName Name of the action */ HRESULT setActionTitle([in] BSTR actionTitle); /*! @method undo: @abstract Undo the last group of operations */ HRESULT undo(); /*! @method redo: @abstract Redo the last group of operations */ HRESULT redo(); /*! @method canUndo: @abstract Returns whether there's anything on the undo stack to be undone */ HRESULT canUndo([out, retval] BOOL* result); /*! @method canRedo: @abstract Returns whether there's anything on the redo stack to be redone */ HRESULT canRedo([out, retval] BOOL* result);}/*! @category WebUIDelegate2 @discussion A class that supplements the IWebUIDelegate interface*/[ object, oleautomation, uuid(C6FF73E1-304D-4129-A60C-66326C2578DB), pointer_default(unique)]interface IWebUIDelegate2 : IWebUIDelegate{/*! @method webView:printFrame: @abstract Informs that a WebFrame needs to be printed @param webView The WebView sending the delegate method @param frame The WebFrame needing to be printed @discussion This method is called when a script or user requests the page to be printed. In this method the delegate can prepare the WebFrame to be printed.*/ HRESULT printFrame([in] IWebView* webView, [in] IWebFrame* frame);/*! @method webView:ftpDirectoryTemplatePath @abstract Returns the path to the FTP directory listing template document @param webView The WebView sending the delegate method @param path The path to the template document @discussion This method is called when an FTP directory listing is viewed in a webView. In practice, all WebViews show the same template document data that was loaded for the very first WebView that displayed a directory listing, so this will only be called once.*/ HRESULT ftpDirectoryTemplatePath([in] IWebView* webView, [out, retval] BSTR* path);/*! @method webViewHeaderHeight: @param webView The WebView sending the delegate method @abstract Reserve a height for the printed page header. @result The height to reserve for the printed page header, return 0.0 to not reserve any space for a header. @discussion The height returned will be used to calculate the rect passed to webView:drawHeaderInRect:. - (float)webViewHeaderHeight:(WebView *)sender;*/ HRESULT webViewHeaderHeight([in] IWebView* webView, [out, retval] float* result);/*! @method webViewFooterHeight: @param webView The WebView sending the delegate method @abstract Reserve a height for the printed page footer. @result The height to reserve for the printed page footer, return 0.0 to not reserve any space for a footer. @discussion The height returned will be used to calculate the rect passed to webView:drawFooterInRect:. - (float)webViewFooterHeight:(WebView *)sender;*/ HRESULT webViewFooterHeight([in] IWebView* webView, [out, retval] float* result);/*! @method webView:drawHeaderInRect: @param webView The WebView sending the delegate method @param rect The NSRect reserved for the header of the page @abstract The delegate should draw a header for the sender in the supplied rect. - (void)webView:(WebView *)sender drawHeaderInRect:(NSRect)rect;*/ HRESULT drawHeaderInRect([in] IWebView* webView, [in] RECT* rect, [in] OLE_HANDLE drawingContext);/*! @method webView:drawFooterInRect: @param webView The WebView sending the delegate method @param rect The NSRect reserved for the footer of the page @abstract The delegate should draw a footer for the sender in the supplied rect. - (void)webView:(WebView *)sender drawFooterInRect:(NSRect)rect;*/ HRESULT drawFooterInRect([in] IWebView* webView, [in] RECT* rect, [in] OLE_HANDLE drawingContext, [in] UINT pageIndex, [in] UINT pageCount); HRESULT webViewPrintingMarginRect([in] IWebView* webView, [out, retval] RECT* rect);}/*! @category WebUIDelegate3 @discussion A class that supplements the IWebUIDelegate interface*/[ object, oleautomation, uuid(DD544D90-C233-4562-8EFD-A8D3A0DEBC19), pointer_default(unique)]interface IWebUIDelegate3 : IWebUIDelegate2{ HRESULT canRunModal([in] IWebView* webView, [out, retval] BOOL* canRunBoolean); HRESULT createModalDialog([in] IWebView* sender, [in] IWebURLRequest* request, [out, retval] IWebView** newWebView); HRESULT runModal([in] IWebView* webView); HRESULT isMenuBarVisible([in] IWebView* webView, [out, retval] BOOL* visible); HRESULT setMenuBarVisible([in] IWebView* webView, [in] BOOL visible); HRESULT runDatabaseSizeLimitPrompt([in] IWebView* webView, [in] BSTR displayName, [in] IWebFrame* initiatedByFrame, [out, retval] BOOL* allowed);}/*! @category WebUIDelegate4 @discussion A class that supplements the IWebUIDelegate interface*/[ object, oleautomation, uuid(042B7EE3-A5A4-4a8f-8C33-775CD9E89C7C), pointer_default(unique)]interface IWebUIDelegate4 : IWebUIDelegate3{ HRESULT paintCustomScrollbar([in] IWebView* webView, [in] HDC hDC, [in] RECT rect, [in] WebScrollBarControlSize size, [in] WebScrollbarControlState state, [in] WebScrollbarControlPart pressedPart, [in] BOOL vertical, [in] float value, [in] float proportion, [in] WebScrollbarControlPartMask parts); HRESULT paintCustomScrollCorner([in] IWebView* webView, [in] HDC hDC, [in] RECT rect);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -