1/* 2 * Copyright (C) 2005, 2008, 2010 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 INC. AND ITS CONTRIBUTORS ``AS IS'' 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 23 * THE POSSIBILITY OF SUCH DAMAGE. 24 */ 25 26#if TARGET_OS_IPHONE 27// In iOS WebKit, WebDynamicScrollBarsView is a WAKScrollView. 28// See WebCore/WAKAppKitStubs.h. 29#else 30// This is a Private header (containing SPI), despite the fact that its name 31// does not contain the word Private. 32 33#import <AppKit/NSScrollView.h> 34 35// FIXME: <rdar://problem/5898985> Mail currently expects this header to define WebCoreScrollbarAlwaysOn. 36extern const int WebCoreScrollbarAlwaysOn; 37 38struct WebDynamicScrollBarsViewPrivate; 39@interface WebDynamicScrollBarsView : NSScrollView { 40@private 41 struct WebDynamicScrollBarsViewPrivate *_private; 42 43#ifndef __OBJC2__ 44 // We need to pad the class out to its former size. See <rdar://problem/7814899> for more information. 45 char padding[16]; 46#endif 47} 48 49// For use by DumpRenderTree only. 50+ (void)setCustomScrollerClass:(Class)scrollerClass; 51 52// This was originally added for Safari's benefit, but Safari has not used it for a long time. 53// Perhaps it can be removed. 54- (void)setAllowsHorizontalScrolling:(BOOL)flag; 55 56// Determines whether the scrollers should be drawn outside of the content (as in normal scroll views) 57// or should overlap the content. 58- (void)setAllowsScrollersToOverlapContent:(BOOL)flag; 59 60// These methods hide the scrollers in a way that does not prevent scrolling. 61- (void)setAlwaysHideHorizontalScroller:(BOOL)flag; 62- (void)setAlwaysHideVerticalScroller:(BOOL)flag; 63 64// These methods return YES if the scrollers are visible, or if the only reason that they are not 65// visible is that they have been suppressed by setAlwaysHideHorizontal/VerticalScroller:. 66- (BOOL)horizontalScrollingAllowed; 67- (BOOL)verticalScrollingAllowed; 68@end 69 70#endif // !TARGET_OS_IPHONE 71