1/* 2 * Copyright (C) 2006, 2007, 2008 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#ifndef DO_NO_IMPORTS 27import "oaidl.idl"; 28import "ocidl.idl"; 29import "IWebFormDelegate.idl"; 30import "IWebFrameLoadDelegatePrivate.idl"; 31import "IWebInspector.idl"; 32#endif 33 34interface IEnumTextMatches; 35interface IWebFormDelegate; 36interface IWebFrameLoadDelegatePrivate; 37interface IWebInspector; 38interface IWebURLRequest; 39interface IWebView; 40 41[ 42 object, 43 oleautomation, 44 uuid(44914369-DEB5-4fcf-A6A3-30C02E73154F), 45 pointer_default(unique) 46] 47interface IWebViewPrivate : IUnknown 48{ 49 /*! 50 @method _setInViewSourceMode: 51 @abstract Used to place a WebView into a special source-viewing mode. 52 - (void)_setInViewSourceMode:(BOOL)flag; 53 */ 54 HRESULT setInViewSourceMode([in] BOOL flag); 55 56 /*! 57 @method _inViewSourceMode; 58 @abstract Whether or not the WebView is in source-view mode for HTML. 59 - (BOOL)_inViewSourceMode; 60 */ 61 HRESULT inViewSourceMode([out, retval] BOOL* flag); 62 63 HRESULT viewWindow([out, retval] OLE_HANDLE* window); 64 65 // May well become public 66 //- (void)_setFormDelegate:(id<WebFormDelegate>)delegate; 67 HRESULT setFormDelegate([in] IWebFormDelegate* formDelegate); 68 69 //- (id<WebFormDelegate>)_formDelegate; 70 HRESULT formDelegate([out, retval] IWebFormDelegate** formDelegate); 71 72 HRESULT setFrameLoadDelegatePrivate([in] IWebFrameLoadDelegatePrivate* frameLoadDelegatePrivate); 73 HRESULT frameLoadDelegatePrivate([out, retval] IWebFrameLoadDelegatePrivate** frameLoadDelegatePrivate); 74 75 HRESULT scrollOffset([out, retval] LPPOINT offset); 76 HRESULT scrollBy([in] LPPOINT offset); 77 HRESULT visibleContentRect([out, retval] LPRECT rect); 78 79 // SPI for DumpRenderTree 80 HRESULT updateFocusedAndActiveState(); 81 82 // Support for displaying multiple text matches. 83 HRESULT markAllMatchesForText([in] BSTR search, [in] BOOL caseSensitive, [in] BOOL highlight, [in] UINT limit, [out] UINT* matches); 84 HRESULT unmarkAllTextMatches(); 85 HRESULT rectsForTextMatches([out]IEnumTextMatches** pmatches); 86 HRESULT selectionRect([in, out] RECT* rc); 87 HRESULT generateSelectionImage(BOOL forceWhiteText, [out, retval] OLE_HANDLE* hBitmap); 88 89 HRESULT canHandleRequest([in] IWebURLRequest* request, [out, retval] BOOL* result); 90 91 HRESULT clearFocusNode(); 92 93 HRESULT setTabKeyCyclesThroughElements([in] BOOL cycles); 94 HRESULT tabKeyCyclesThroughElements([out, retval] BOOL* result); 95 96 HRESULT setAllowSiteSpecificHacks([in] BOOL allows); 97 HRESULT addAdditionalPluginDirectory([in] BSTR directory); 98 99 HRESULT loadBackForwardListFromOtherView([in] IWebView* otherView); 100 101 HRESULT setCustomDropTarget([in] IDropTarget* dt); 102 HRESULT removeCustomDropTarget(); 103 104 HRESULT setInitialFocus([in] BOOL forward); 105 106 HRESULT inspector([out, retval] IWebInspector**); 107 108 HRESULT clearUndoRedoOperations(); 109 110 HRESULT setProhibitsMainFrameScrolling([in] BOOL prohibits); 111 112 // SPI for DumpRenderTree. This is global to all WebViews. 113 HRESULT setShouldApplyMacFontAscentHack([in] BOOL shouldApply); 114 115 /*! 116 @method shouldClose: 117 @abstract This function will fire the before unload handler for a page. 118 If the user cancels the closing of a webview from the alert popped up by the 119 before unload handler, then this function will return false. 120 */ 121 HRESULT shouldClose([out, retval] BOOL* result); 122 123 // SPI for DumpRenderTree 124 HRESULT executeCoreCommandByName([in] BSTR name, [in] BSTR value); 125 126 HRESULT windowAncestryDidChange(); 127 128 HRESULT paintDocumentRectToContext([in] RECT rect, [in] OLE_HANDLE dc); 129 130 HRESULT setDefersCallbacks([in] BOOL defersCallbacks); 131 HRESULT defersCallbacks([out, retval] BOOL* defersCallbacks); 132 133 HRESULT standardUserAgentWithApplicationName([in] BSTR applicationName, [retval][out] BSTR* groupName); 134 135 HRESULT setCustomHTMLTokenizerTimeDelay([in] double timeDelay); 136 HRESULT setCustomHTMLTokenizerChunkSize([in] int chunkSize); 137 138 HRESULT backingStore([out, retval] OLE_HANDLE* hBitmap); 139 140 HRESULT setTransparent([in] BOOL transparent); 141 HRESULT transparent([out, retval] BOOL* transparent); 142 143 HRESULT setAlwaysUsesComplexTextCodePath([in] BOOL complex); 144 HRESULT alwaysUsesComplexTextCodePath([out, retval] BOOL* complex); 145 146 HRESULT setCookieEnabled([in] BOOL enable); 147 HRESULT cookieEnabled([out, retval] BOOL* enabled); 148 149 HRESULT setMediaVolume([in] float volume); 150 HRESULT mediaVolume([out, retval] float* volume); 151 152 // SPI for DumpRenderTree 153 HRESULT clearMainFrameName(); 154 155 HRESULT globalHistoryItem([out, retval] IWebHistoryItem**); 156 157 HRESULT registerEmbeddedViewMIMEType([in] BSTR mimeType); 158 159 HRESULT setMemoryCacheDelegateCallsEnabled([in] BOOL enabled); 160} 161