~ubuntu-branches/ubuntu/raring/qtwebkit-source/raring-proposed

« back to all changes in this revision

Viewing changes to Source/WebKit/mac/WebView/WebHTMLViewPrivate.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-02-18 14:24:18 UTC
  • Revision ID: package-import@ubuntu.com-20130218142418-eon0jmjg3nj438uy
Tags: upstream-2.3
ImportĀ upstreamĀ versionĀ 2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2005, 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
 *
 
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/WebHTMLView.h>
 
30
 
 
31
#if !defined(ENABLE_NETSCAPE_PLUGIN_API)
 
32
#define ENABLE_NETSCAPE_PLUGIN_API 1
 
33
#endif
 
34
 
 
35
@class DOMDocumentFragment;
 
36
@class DOMNode;
 
37
@class DOMRange;
 
38
@class WebPluginController;
 
39
 
 
40
@protocol WebHTMLHighlighter
 
41
- (NSRect)highlightRectForLine:(NSRect)lineRect representedNode:(DOMNode *)node;
 
42
- (void)paintHighlightForBox:(NSRect)boxRect onLine:(NSRect)lineRect behindText:(BOOL)text entireLine:(BOOL)line representedNode:(DOMNode *)node;
 
43
@end
 
44
 
 
45
extern const float _WebHTMLViewPrintingMinimumShrinkFactor;
 
46
extern const float _WebHTMLViewPrintingMaximumShrinkFactor;
 
47
 
 
48
@interface WebHTMLView (WebPrivate)
 
49
 
 
50
+ (NSArray *)supportedMIMETypes;
 
51
+ (NSArray *)supportedImageMIMETypes;
 
52
+ (NSArray *)supportedNonImageMIMETypes;
 
53
+ (NSArray *)unsupportedTextMIMETypes;
 
54
 
 
55
- (void)close;
 
56
 
 
57
// Modifier (flagsChanged) tracking SPI
 
58
+ (void)_postFlagsChangedEvent:(NSEvent *)flagsChangedEvent;
 
59
- (void)_updateMouseoverWithFakeEvent;
 
60
 
 
61
- (void)_setAsideSubviews;
 
62
- (void)_restoreSubviews;
 
63
 
 
64
- (BOOL)_insideAnotherHTMLView;
 
65
- (void)_clearLastHitViewIfSelf;
 
66
- (void)_updateMouseoverWithEvent:(NSEvent *)event;
 
67
 
 
68
+ (NSArray *)_insertablePasteboardTypes;
 
69
+ (NSArray *)_selectionPasteboardTypes;
 
70
- (void)_writeSelectionToPasteboard:(NSPasteboard *)pasteboard;
 
71
 
 
72
- (void)_frameOrBoundsChanged;
 
73
 
 
74
- (void)_handleAutoscrollForMouseDragged:(NSEvent *)event;
 
75
- (WebPluginController *)_pluginController;
 
76
 
 
77
// FIXME: _selectionRect is deprecated in favor of selectionRect, which is in protocol WebDocumentSelection.
 
78
// We can't remove this yet because it's still in use by Mail.
 
79
- (NSRect)_selectionRect;
 
80
 
 
81
- (void)_startAutoscrollTimer:(NSEvent *)event;
 
82
- (void)_stopAutoscrollTimer;
 
83
 
 
84
- (BOOL)_canEdit;
 
85
- (BOOL)_canEditRichly;
 
86
- (BOOL)_canAlterCurrentSelection;
 
87
- (BOOL)_hasSelection;
 
88
- (BOOL)_hasSelectionOrInsertionPoint;
 
89
- (BOOL)_isEditable;
 
90
 
 
91
- (BOOL)_transparentBackground;
 
92
- (void)_setTransparentBackground:(BOOL)isBackgroundTransparent;
 
93
 
 
94
- (void)_setToolTip:(NSString *)string;
 
95
 
 
96
// SPI used by Mail.
 
97
// FIXME: These should all be moved to WebView; we won't always have a WebHTMLView.
 
98
- (NSImage *)_selectionDraggingImage;
 
99
- (NSRect)_selectionDraggingRect;
 
100
- (DOMNode *)_insertOrderedList;
 
101
- (DOMNode *)_insertUnorderedList;
 
102
- (BOOL)_canIncreaseSelectionListLevel;
 
103
- (BOOL)_canDecreaseSelectionListLevel;
 
104
- (DOMNode *)_increaseSelectionListLevel;
 
105
- (DOMNode *)_increaseSelectionListLevelOrdered;
 
106
- (DOMNode *)_increaseSelectionListLevelUnordered;
 
107
- (void)_decreaseSelectionListLevel;
 
108
- (void)_setHighlighter:(id <WebHTMLHighlighter>)highlighter ofType:(NSString *)type;
 
109
- (void)_removeHighlighterOfType:(NSString *)type;
 
110
- (DOMDocumentFragment *)_documentFragmentFromPasteboard:(NSPasteboard *)pasteboard forType:(NSString *)pboardType inContext:(DOMRange *)context subresources:(NSArray **)subresources;
 
111
 
 
112
#if ENABLE_NETSCAPE_PLUGIN_API
 
113
- (void)_resumeNullEventsForAllNetscapePlugins;
 
114
- (void)_pauseNullEventsForAllNetscapePlugins;
 
115
#endif
 
116
 
 
117
- (BOOL)_isUsingAcceleratedCompositing;
 
118
- (NSView *)_compositingLayersHostingView;
 
119
 
 
120
// SPI for printing (should be converted to API someday). When the WebHTMLView isn't being printed
 
121
// directly, this method must be called before paginating, or the computed height might be incorrect.
 
122
// Typically this would be called from inside an override of -[NSView knowsPageRange:].
 
123
- (void)_layoutForPrinting;
 
124
- (CGFloat)_adjustedBottomOfPageWithTop:(CGFloat)top bottom:(CGFloat)bottom limit:(CGFloat)bottomLimit;
 
125
- (BOOL)_isInPrintMode;
 
126
- (BOOL)_beginPrintModeWithPageWidth:(float)pageWidth height:(float)pageHeight shrinkToFit:(BOOL)shrinkToFit;
 
127
// Lays out to pages of the given minimum width and height or more (increasing both dimensions proportionally)
 
128
// as needed for the content to fit, but no more than the given maximum width.
 
129
- (BOOL)_beginPrintModeWithMinimumPageWidth:(CGFloat)minimumPageWidth height:(CGFloat)minimumPageHeight maximumPageWidth:(CGFloat)maximumPageWidth;
 
130
- (void)_endPrintMode;
 
131
 
 
132
- (BOOL)_isInScreenPaginationMode;
 
133
- (BOOL)_beginScreenPaginationModeWithPageSize:(CGSize)pageSize shrinkToFit:(BOOL)shrinkToFit;
 
134
- (void)_endScreenPaginationMode;
 
135
 
 
136
- (BOOL)_canSmartReplaceWithPasteboard:(NSPasteboard *)pasteboard;
 
137
 
 
138
@end