Home | History | Annotate | Download | only in WebView
      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 // This is a Private header (containing SPI), despite the fact that its name
     27 // does not contain the word Private.
     28 
     29 #import <AppKit/NSScrollView.h>
     30 
     31 // FIXME: <rdar://problem/5898985> Mail currently expects this header to define WebCoreScrollbarAlwaysOn.
     32 extern const int WebCoreScrollbarAlwaysOn;
     33 
     34 struct WebDynamicScrollBarsViewPrivate;
     35 @interface WebDynamicScrollBarsView : NSScrollView {
     36 @private
     37     struct WebDynamicScrollBarsViewPrivate *_private;
     38 
     39 #ifndef __OBJC2__
     40     // We need to pad the class out to its former size.  See <rdar://problem/7814899> for more information.
     41     char padding[16];
     42 #endif
     43 }
     44 
     45 // This was originally added for Safari's benefit, but Safari has not used it for a long time.
     46 // Perhaps it can be removed.
     47 - (void)setAllowsHorizontalScrolling:(BOOL)flag;
     48 
     49 // Determines whether the scrollers should be drawn outside of the content (as in normal scroll views)
     50 // or should overlap the content.
     51 - (void)setAllowsScrollersToOverlapContent:(BOOL)flag;
     52 
     53 // These methods hide the scrollers in a way that does not prevent scrolling.
     54 - (void)setAlwaysHideHorizontalScroller:(BOOL)flag;
     55 - (void)setAlwaysHideVerticalScroller:(BOOL)flag;
     56 
     57 // These methods return YES if the scrollers are visible, or if the only reason that they are not
     58 // visible is that they have been suppressed by setAlwaysHideHorizontal/VerticalScroller:.
     59 - (BOOL)horizontalScrollingAllowed;
     60 - (BOOL)verticalScrollingAllowed;
     61 @end
     62