OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2011 Apple Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 10 matching lines...) Expand all Loading... |
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #ifndef WebCore_NSScrollerImpDetails_h | 26 #ifndef WebCore_NSScrollerImpDetails_h |
27 #define WebCore_NSScrollerImpDetails_h | 27 #define WebCore_NSScrollerImpDetails_h |
28 | 28 |
29 #import <AvailabilityMacros.h> | 29 #import <AvailabilityMacros.h> |
30 | 30 |
31 // This file forward-declares APIs for NSScroller that are only present on | 31 // Public APIs not available on versions of Mac on which we build |
32 // build SDKs newer than are currently supported. | 32 #if __MAC_OS_X_VERSION_MAX_ALLOWED == 1060 |
33 | |
34 #if !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_V
ERSION_10_7 | |
35 enum { | 33 enum { |
36 NSScrollerStyleLegacy = 0, | 34 NSScrollerStyleLegacy = 0, |
37 NSScrollerStyleOverlay = 1 | 35 NSScrollerStyleOverlay = 1 |
38 }; | 36 }; |
39 typedef NSInteger NSScrollerStyle; | 37 typedef NSInteger NSScrollerStyle; |
40 | 38 |
41 enum { | 39 enum { |
42 NSScrollerKnobStyleDefault = 0, | 40 NSScrollerKnobStyleDefault = 0, |
43 NSScrollerKnobStyleDark = 1, | 41 NSScrollerKnobStyleDark = 1, |
44 NSScrollerKnobStyleLight = 2 | 42 NSScrollerKnobStyleLight = 2 |
45 }; | 43 }; |
46 typedef NSInteger NSScrollerKnobStyle; | 44 typedef NSInteger NSScrollerKnobStyle; |
| 45 #endif |
| 46 |
| 47 #if __MAC_OS_X_VERSION_MAX_ALLOWED == 1060 |
47 @interface NSScroller(NSObject) | 48 @interface NSScroller(NSObject) |
48 + (NSScrollerStyle)preferredScrollerStyle; | 49 + (NSScrollerStyle)preferredScrollerStyle; |
49 @end | 50 @end |
50 #endif // !10.7 | 51 #endif |
51 | 52 |
52 @interface NSObject (ScrollbarPainter) | 53 @interface NSObject (ScrollbarPainter) |
53 + (id)scrollerImpWithStyle:(NSScrollerStyle)newScrollerStyle controlSize:(NSCont
rolSize)newControlSize horizontal:(BOOL)horizontal replacingScrollerImp:(id)prev
ious; | 54 + (id)scrollerImpWithStyle:(NSScrollerStyle)newScrollerStyle controlSize:(NSCont
rolSize)newControlSize horizontal:(BOOL)horizontal replacingScrollerImp:(id)prev
ious; |
54 - (CGFloat)knobAlpha; | 55 - (CGFloat)knobAlpha; |
55 - (void)setKnobAlpha:(CGFloat)knobAlpha; | 56 - (void)setKnobAlpha:(CGFloat)knobAlpha; |
56 - (CGFloat)trackAlpha; | 57 - (CGFloat)trackAlpha; |
57 - (void)setTrackAlpha:(CGFloat)trackAlpha; | 58 - (void)setTrackAlpha:(CGFloat)trackAlpha; |
58 - (void)setEnabled:(BOOL)enabled; | 59 - (void)setEnabled:(BOOL)enabled; |
59 - (void)setBoundsSize:(NSSize)boundsSize; | 60 - (void)setBoundsSize:(NSSize)boundsSize; |
60 - (void)setDoubleValue:(double)doubleValue; | 61 - (void)setDoubleValue:(double)doubleValue; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 - (void)mouseMovedInContentArea; | 101 - (void)mouseMovedInContentArea; |
101 - (void)startLiveResize; | 102 - (void)startLiveResize; |
102 - (void)contentAreaDidResize; | 103 - (void)contentAreaDidResize; |
103 - (void)endLiveResize; | 104 - (void)endLiveResize; |
104 - (void)windowOrderedIn; | 105 - (void)windowOrderedIn; |
105 - (void)windowOrderedOut; | 106 - (void)windowOrderedOut; |
106 - (void)beginScrollGesture; | 107 - (void)beginScrollGesture; |
107 - (void)endScrollGesture; | 108 - (void)endScrollGesture; |
108 @end | 109 @end |
109 | 110 |
110 #endif // WebCore_NSScrollerImpDetails_h | 111 namespace WebCore { |
| 112 |
| 113 bool isScrollbarOverlayAPIAvailable(); |
| 114 |
| 115 NSScrollerStyle recommendedScrollerStyle(); |
| 116 |
| 117 } |
| 118 |
| 119 #endif |
OLD | NEW |