|
1 /* |
|
2 * Copyright (C) 2005, 2006, 2007 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 * |
|
8 * 1. Redistributions of source code must retain the above copyright |
|
9 * notice, this list of conditions and the following disclaimer. |
|
10 * 2. Redistributions in binary form must reproduce the above copyright |
|
11 * notice, this list of conditions and the following disclaimer in the |
|
12 * documentation and/or other materials provided with the distribution. |
|
13 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of |
|
14 * its contributors may be used to endorse or promote products derived |
|
15 * from this software without specific prior written permission. |
|
16 * |
|
17 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY |
|
18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
|
19 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
|
20 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY |
|
21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
|
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
|
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
|
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
|
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
27 */ |
|
28 |
|
29 #import <WebKit/WebUIDelegate.h> |
|
30 |
|
31 // Mail on Tiger expects the old value for WebMenuItemTagSearchInGoogle |
|
32 #define WebMenuItemTagSearchInGoogle OldWebMenuItemTagSearchWeb |
|
33 |
|
34 #define WEBMENUITEMTAG_WEBKIT_3_0_SPI_START 2000 |
|
35 enum { |
|
36 // The next three values were used in WebKit 2.0 for SPI. In WebKit 3.0 these are API, with different values. |
|
37 OldWebMenuItemTagSearchInSpotlight = 1000, |
|
38 OldWebMenuItemTagSearchWeb, |
|
39 OldWebMenuItemTagLookUpInDictionary, |
|
40 // FIXME: These should move to WebUIDelegate.h as part of the WebMenuItemTag enum there, when we're not in API freeze |
|
41 // Note that these values must be kept aligned with values in WebCore/ContextMenuItem.h |
|
42 WebMenuItemTagOpenLink = WEBMENUITEMTAG_WEBKIT_3_0_SPI_START, |
|
43 WebMenuItemTagIgnoreGrammar, |
|
44 WebMenuItemTagSpellingMenu, |
|
45 WebMenuItemTagShowSpellingPanel, |
|
46 WebMenuItemTagCheckSpelling, |
|
47 WebMenuItemTagCheckSpellingWhileTyping, |
|
48 WebMenuItemTagCheckGrammarWithSpelling, |
|
49 WebMenuItemTagFontMenu, |
|
50 WebMenuItemTagShowFonts, |
|
51 WebMenuItemTagBold, |
|
52 WebMenuItemTagItalic, |
|
53 WebMenuItemTagUnderline, |
|
54 WebMenuItemTagOutline, |
|
55 WebMenuItemTagStyles, |
|
56 WebMenuItemTagShowColors, |
|
57 WebMenuItemTagSpeechMenu, |
|
58 WebMenuItemTagStartSpeaking, |
|
59 WebMenuItemTagStopSpeaking, |
|
60 WebMenuItemTagWritingDirectionMenu, |
|
61 WebMenuItemTagDefaultDirection, |
|
62 WebMenuItemTagLeftToRight, |
|
63 WebMenuItemTagRightToLeft, |
|
64 WebMenuItemPDFSinglePageScrolling, |
|
65 WebMenuItemPDFFacingPagesScrolling, |
|
66 WebMenuItemTagInspectElement, |
|
67 WebMenuItemTagBaseApplication = 10000 |
|
68 }; |
|
69 |
|
70 @interface NSObject (WebUIDelegatePrivate) |
|
71 |
|
72 - (void)webView:(WebView *)webView addMessageToConsole:(NSDictionary *)message; |
|
73 |
|
74 - (NSView *)webView:(WebView *)webView plugInViewWithArguments:(NSDictionary *)arguments; |
|
75 |
|
76 // regions is an dictionary whose keys are regions label and values are arrays of WebDashboardRegions. |
|
77 - (void)webView:(WebView *)webView dashboardRegionsChanged:(NSDictionary *)regions; |
|
78 |
|
79 - (void)webView:(WebView *)sender dragImage:(NSImage *)anImage at:(NSPoint)viewLocation offset:(NSSize)initialOffset event:(NSEvent *)event pasteboard:(NSPasteboard *)pboard source:(id)sourceObj slideBack:(BOOL)slideFlag forView:(NSView *)view; |
|
80 - (void)webView:(WebView *)sender didDrawRect:(NSRect)rect; |
|
81 - (void)webView:(WebView *)sender didScrollDocumentInFrameView:(WebFrameView *)frameView; |
|
82 // FIXME: If we ever make this method public, it should include a WebFrame parameter. |
|
83 - (BOOL)webViewShouldInterruptJavaScript:(WebView *)sender; |
|
84 - (void)webView:(WebView *)sender willPopupMenu:(NSMenu *)menu; |
|
85 - (void)webView:(WebView *)sender contextMenuItemSelected:(NSMenuItem *)item forElement:(NSDictionary *)element; |
|
86 - (void)webView:(WebView *)sender saveFrameView:(WebFrameView *)frameView showingPanel:(BOOL)showingPanel; |
|
87 |
|
88 @end |