webengine/osswebengine/WebKit/WebView/WebHTMLViewPrivate.h
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2  * Copyright (C) 2005 Apple Computer, 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 @class DOMDocumentFragment;
       
    32 @class DOMElement;
       
    33 @class DOMNode;
       
    34 @class DOMRange;
       
    35 @class WebArchive;
       
    36 @class WebFrameBridge;
       
    37 @class WebView;
       
    38 @class WebFrame;
       
    39 @class WebPluginController;
       
    40 
       
    41 @protocol WebHTMLHighlighter
       
    42 - (NSRect)highlightRectForLine:(NSRect)lineRect representedNode:(DOMNode *)node;
       
    43 - (void)paintHighlightForBox:(NSRect)boxRect onLine:(NSRect)lineRect behindText:(BOOL)text entireLine:(BOOL)line representedNode:(DOMNode *)node;
       
    44 
       
    45 // the following methods are deprecated and will be removed once Mail switches to the new methods <rdar://problem/5050528>
       
    46 - (NSRect)highlightRectForLine:(NSRect)lineRect;
       
    47 - (void)paintHighlightForBox:(NSRect)boxRect onLine:(NSRect)lineRect behindText:(BOOL)text entireLine:(BOOL)line;
       
    48 @end
       
    49 
       
    50 @interface WebHTMLView (WebPrivate)
       
    51 
       
    52 + (NSArray *)supportedMIMETypes;
       
    53 + (NSArray *)supportedImageMIMETypes;
       
    54 + (NSArray *)supportedNonImageMIMETypes;
       
    55 + (NSArray *)unsupportedTextMIMETypes;
       
    56 
       
    57 - (void)close;
       
    58 
       
    59 // Modifier (flagsChanged) tracking SPI
       
    60 + (void)_postFlagsChangedEvent:(NSEvent *)flagsChangedEvent;
       
    61 - (void)_updateMouseoverWithFakeEvent;
       
    62 
       
    63 - (void)_setAsideSubviews;
       
    64 - (void)_restoreSubviews;
       
    65 
       
    66 - (BOOL)_insideAnotherHTMLView;
       
    67 - (void)_clearLastHitViewIfSelf;
       
    68 - (void)_updateMouseoverWithEvent:(NSEvent *)event;
       
    69 
       
    70 + (NSArray *)_insertablePasteboardTypes;
       
    71 + (NSArray *)_selectionPasteboardTypes;
       
    72 - (void)_writeSelectionToPasteboard:(NSPasteboard *)pasteboard;
       
    73 
       
    74 - (void)_frameOrBoundsChanged;
       
    75 
       
    76 - (NSImage *)_dragImageForLinkElement:(NSDictionary *)element;
       
    77 - (NSImage *)_dragImageForURL:(NSString*)linkURL withLabel:(NSString*)label;
       
    78 - (void)_handleAutoscrollForMouseDragged:(NSEvent *)event;
       
    79 - (WebPluginController *)_pluginController;
       
    80 
       
    81 // FIXME: _selectionRect is deprecated in favor of selectionRect, which is in protocol WebDocumentSelection.
       
    82 // We can't remove this yet because it's still in use by Mail.
       
    83 - (NSRect)_selectionRect;
       
    84 
       
    85 - (void)_startAutoscrollTimer:(NSEvent *)event;
       
    86 - (void)_stopAutoscrollTimer;
       
    87 
       
    88 - (BOOL)_canEdit;
       
    89 - (BOOL)_canEditRichly;
       
    90 - (BOOL)_canAlterCurrentSelection;
       
    91 - (BOOL)_hasSelection;
       
    92 - (BOOL)_hasSelectionOrInsertionPoint;
       
    93 - (BOOL)_isEditable;
       
    94 
       
    95 - (BOOL)_transparentBackground;
       
    96 - (void)_setTransparentBackground:(BOOL)f;
       
    97 
       
    98 - (void)_setToolTip:(NSString *)string;
       
    99 
       
   100 // SPI's for Mail.
       
   101 - (NSImage *)_selectionDraggingImage;
       
   102 - (NSRect)_selectionDraggingRect;
       
   103 - (DOMNode *)_insertOrderedList;
       
   104 - (DOMNode *)_insertUnorderedList;
       
   105 - (BOOL)_canIncreaseSelectionListLevel;
       
   106 - (BOOL)_canDecreaseSelectionListLevel;
       
   107 - (DOMNode *)_increaseSelectionListLevel;
       
   108 - (DOMNode *)_increaseSelectionListLevelOrdered;
       
   109 - (DOMNode *)_increaseSelectionListLevelUnordered;
       
   110 - (void)_decreaseSelectionListLevel;
       
   111 - (void)_setHighlighter:(id<WebHTMLHighlighter>)highlighter ofType:(NSString*)type;
       
   112 - (void)_removeHighlighterOfType:(NSString*)type;
       
   113 - (DOMDocumentFragment *)_documentFragmentFromPasteboard:(NSPasteboard *)pasteboard forType:(NSString *)pboardType inContext:(DOMRange *)context subresources:(NSArray **)subresources;
       
   114 
       
   115 // SPI for DumpRenderTree
       
   116 - (void)_updateActiveState;
       
   117 
       
   118 // SPI for printing (should be converted to API someday). When the WebHTMLView isn't being printed
       
   119 // directly, this method must be called before paginating, or the computed height might be incorrect.
       
   120 // Typically this would be called from inside an override of -[NSView knowsPageRange:].
       
   121 - (void)_layoutForPrinting;
       
   122 
       
   123 @end