|
1 /* |
|
2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
|
3 * Copyright (C) 2010 Igalia S.L |
|
4 * |
|
5 * Redistribution and use in source and binary forms, with or without |
|
6 * modification, are permitted provided that the following conditions |
|
7 * are met: |
|
8 * |
|
9 * 1. Redistributions of source code must retain the above copyright |
|
10 * notice, this list of conditions and the following disclaimer. |
|
11 * 2. Redistributions in binary form must reproduce the above copyright |
|
12 * notice, this list of conditions and the following disclaimer in the |
|
13 * documentation and/or other materials provided with the distribution. |
|
14 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of |
|
15 * its contributors may be used to endorse or promote products derived |
|
16 * from this software without specific prior written permission. |
|
17 * |
|
18 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY |
|
19 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
|
20 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
|
21 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY |
|
22 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
|
23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
|
24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
|
25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
|
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
28 */ |
|
29 |
|
30 // This header contains WebView declarations that can be used anywhere in WebKit, but are neither SPI nor API. |
|
31 |
|
32 #import "WebPreferences.h" |
|
33 #import "WebViewPrivate.h" |
|
34 #import "WebTypesInternal.h" |
|
35 |
|
36 #ifdef __cplusplus |
|
37 #import <WebCore/WebCoreKeyboardUIMode.h> |
|
38 |
|
39 namespace WebCore { |
|
40 class String; |
|
41 class Frame; |
|
42 class KURL; |
|
43 class KeyboardEvent; |
|
44 class Page; |
|
45 class Node; |
|
46 } |
|
47 #endif |
|
48 |
|
49 @class WebBasePluginPackage; |
|
50 @class WebDownload; |
|
51 @class WebNodeHighlight; |
|
52 |
|
53 #ifdef __cplusplus |
|
54 |
|
55 @interface WebView (WebViewEditingExtras) |
|
56 - (BOOL)_interceptEditingKeyEvent:(WebCore::KeyboardEvent*)event shouldSaveCommand:(BOOL)shouldSave; |
|
57 - (BOOL)_shouldChangeSelectedDOMRange:(DOMRange *)currentRange toDOMRange:(DOMRange *)proposedRange affinity:(NSSelectionAffinity)selectionAffinity stillSelecting:(BOOL)flag; |
|
58 @end |
|
59 |
|
60 @interface WebView (AllWebViews) |
|
61 + (void)_makeAllWebViewsPerformSelector:(SEL)selector; |
|
62 - (void)_removeFromAllWebViewsSet; |
|
63 - (void)_addToAllWebViewsSet; |
|
64 @end |
|
65 |
|
66 @interface WebView (WebViewInternal) |
|
67 |
|
68 + (BOOL)shouldIncludeInWebKitStatistics; |
|
69 |
|
70 - (WebCore::Frame*)_mainCoreFrame; |
|
71 - (WebFrame *)_selectedOrMainFrame; |
|
72 |
|
73 - (WebCore::KeyboardUIMode)_keyboardUIMode; |
|
74 |
|
75 - (BOOL)_becomingFirstResponderFromOutside; |
|
76 |
|
77 #if ENABLE(ICONDATABASE) |
|
78 - (void)_registerForIconNotification:(BOOL)listen; |
|
79 - (void)_dispatchDidReceiveIconFromWebFrame:(WebFrame *)webFrame; |
|
80 #endif |
|
81 |
|
82 - (void)_selectionChanged; |
|
83 |
|
84 #if USE(ACCELERATED_COMPOSITING) |
|
85 - (BOOL)_needsOneShotDrawingSynchronization; |
|
86 - (void)_setNeedsOneShotDrawingSynchronization:(BOOL)needsSynchronization; |
|
87 - (void)_scheduleCompositingLayerSync; |
|
88 #endif |
|
89 |
|
90 #if ENABLE(VIDEO) && USE(GSTREAMER) |
|
91 - (void)_scheduleGlibContextIterations; |
|
92 #endif |
|
93 |
|
94 @end |
|
95 |
|
96 #endif |
|
97 |
|
98 @interface WebView (WebViewEventHandling) |
|
99 - (void)_closingEventHandling; |
|
100 - (void)_updateMouseoverWithFakeEvent; |
|
101 - (void)_cancelUpdateMouseoverTimer; |
|
102 - (void)_stopAutoscrollTimer; |
|
103 - (void)_setToolTip:(NSString *)toolTip; |
|
104 @end |
|
105 |
|
106 // FIXME: Temporary way to expose methods that are in the wrong category inside WebView. |
|
107 @interface WebView (WebViewOtherInternal) |
|
108 |
|
109 + (void)_setCacheModel:(WebCacheModel)cacheModel; |
|
110 + (WebCacheModel)_cacheModel; |
|
111 |
|
112 #ifdef __cplusplus |
|
113 - (WebCore::Page*)page; |
|
114 #endif |
|
115 |
|
116 - (NSMenu *)_menuForElement:(NSDictionary *)element defaultItems:(NSArray *)items; |
|
117 - (id)_UIDelegateForwarder; |
|
118 - (id)_editingDelegateForwarder; |
|
119 - (id)_policyDelegateForwarder; |
|
120 - (void)_pushPerformingProgrammaticFocus; |
|
121 - (void)_popPerformingProgrammaticFocus; |
|
122 - (void)_didStartProvisionalLoadForFrame:(WebFrame *)frame; |
|
123 + (BOOL)_viewClass:(Class *)vClass andRepresentationClass:(Class *)rClass forMIMEType:(NSString *)MIMEType allowingPlugins:(BOOL)allowPlugins; |
|
124 - (BOOL)_viewClass:(Class *)vClass andRepresentationClass:(Class *)rClass forMIMEType:(NSString *)MIMEType; |
|
125 + (void)_registerPluginMIMEType:(NSString *)MIMEType; |
|
126 + (void)_unregisterPluginMIMEType:(NSString *)MIMEType; |
|
127 + (BOOL)_canShowMIMEType:(NSString *)MIMEType allowingPlugins:(BOOL)allowPlugins; |
|
128 - (BOOL)_canShowMIMEType:(NSString *)MIMEType; |
|
129 + (NSString *)_MIMETypeForFile:(NSString *)path; |
|
130 - (WebDownload *)_downloadURL:(NSURL *)URL; |
|
131 + (NSString *)_generatedMIMETypeForURLScheme:(NSString *)URLScheme; |
|
132 + (BOOL)_representationExistsForURLScheme:(NSString *)URLScheme; |
|
133 - (BOOL)_isPerformingProgrammaticFocus; |
|
134 - (void)_mouseDidMoveOverElement:(NSDictionary *)dictionary modifierFlags:(NSUInteger)modifierFlags; |
|
135 - (WebView *)_openNewWindowWithRequest:(NSURLRequest *)request; |
|
136 - (void)_writeImageForElement:(NSDictionary *)element withPasteboardTypes:(NSArray *)types toPasteboard:(NSPasteboard *)pasteboard; |
|
137 - (void)_writeLinkElement:(NSDictionary *)element withPasteboardTypes:(NSArray *)types toPasteboard:(NSPasteboard *)pasteboard; |
|
138 - (void)_openFrameInNewWindowFromMenu:(NSMenuItem *)sender; |
|
139 - (void)_searchWithGoogleFromMenu:(id)sender; |
|
140 - (void)_searchWithSpotlightFromMenu:(id)sender; |
|
141 - (void)_progressCompleted:(WebFrame *)frame; |
|
142 - (void)_didCommitLoadForFrame:(WebFrame *)frame; |
|
143 - (void)_didFinishLoadForFrame:(WebFrame *)frame; |
|
144 - (void)_didFailLoadWithError:(NSError *)error forFrame:(WebFrame *)frame; |
|
145 - (void)_didFailProvisionalLoadWithError:(NSError *)error forFrame:(WebFrame *)frame; |
|
146 - (void)_willChangeValueForKey:(NSString *)key; |
|
147 - (void)_didChangeValueForKey:(NSString *)key; |
|
148 - (WebBasePluginPackage *)_pluginForMIMEType:(NSString *)MIMEType; |
|
149 - (WebBasePluginPackage *)_pluginForExtension:(NSString *)extension; |
|
150 #if ENABLE(PLUGIN_PROXY_FOR_VIDEO) |
|
151 - (WebBasePluginPackage *)_videoProxyPluginForMIMEType:(NSString *)MIMEType; |
|
152 #endif |
|
153 |
|
154 - (void)setCurrentNodeHighlight:(WebNodeHighlight *)nodeHighlight; |
|
155 - (WebNodeHighlight *)currentNodeHighlight; |
|
156 |
|
157 - (void)addPluginInstanceView:(NSView *)view; |
|
158 - (void)removePluginInstanceView:(NSView *)view; |
|
159 - (void)removePluginInstanceViewsFor:(WebFrame*)webFrame; |
|
160 |
|
161 - (void)_addObject:(id)object forIdentifier:(unsigned long)identifier; |
|
162 - (id)_objectForIdentifier:(unsigned long)identifier; |
|
163 - (void)_removeObjectForIdentifier:(unsigned long)identifier; |
|
164 |
|
165 - (void)_setZoomMultiplier:(float)multiplier isTextOnly:(BOOL)isTextOnly; |
|
166 - (float)_zoomMultiplier:(BOOL)isTextOnly; |
|
167 - (float)_realZoomMultiplier; |
|
168 - (BOOL)_realZoomMultiplierIsTextOnly; |
|
169 - (BOOL)_canZoomOut:(BOOL)isTextOnly; |
|
170 - (BOOL)_canZoomIn:(BOOL)isTextOnly; |
|
171 - (IBAction)_zoomOut:(id)sender isTextOnly:(BOOL)isTextOnly; |
|
172 - (IBAction)_zoomIn:(id)sender isTextOnly:(BOOL)isTextOnly; |
|
173 - (BOOL)_canResetZoom:(BOOL)isTextOnly; |
|
174 - (IBAction)_resetZoom:(id)sender isTextOnly:(BOOL)isTextOnly; |
|
175 |
|
176 - (BOOL)_mustDrawUnionedRect:(NSRect)rect singleRects:(const NSRect *)rects count:(NSInteger)count; |
|
177 |
|
178 + (BOOL)_canHandleRequest:(NSURLRequest *)request forMainFrame:(BOOL)forMainFrame; |
|
179 |
|
180 - (void)_setInsertionPasteboard:(NSPasteboard *)pasteboard; |
|
181 |
|
182 #if ENABLE(VIDEO) && defined(__cplusplus) |
|
183 - (void)_enterFullscreenForNode:(WebCore::Node*)node; |
|
184 - (void)_exitFullscreen; |
|
185 #endif |
|
186 |
|
187 - (JSValueRef)_computedStyleIncludingVisitedInfo:(JSContextRef)context forElement:(JSValueRef)value; |
|
188 |
|
189 @end |