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 // Public APIs not available on versions of Mac on which we build | 31 // This file forward-declares APIs for NSScroller that are only present on |
32 #if __MAC_OS_X_VERSION_MAX_ALLOWED == 1060 | 32 // build SDKs newer than are currently supported. |
| 33 |
| 34 #if !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_V
ERSION_10_7 |
33 enum { | 35 enum { |
34 NSScrollerStyleLegacy = 0, | 36 NSScrollerStyleLegacy = 0, |
35 NSScrollerStyleOverlay = 1 | 37 NSScrollerStyleOverlay = 1 |
36 }; | 38 }; |
37 typedef NSInteger NSScrollerStyle; | 39 typedef NSInteger NSScrollerStyle; |
38 | 40 |
39 enum { | 41 enum { |
40 NSScrollerKnobStyleDefault = 0, | 42 NSScrollerKnobStyleDefault = 0, |
41 NSScrollerKnobStyleDark = 1, | 43 NSScrollerKnobStyleDark = 1, |
42 NSScrollerKnobStyleLight = 2 | 44 NSScrollerKnobStyleLight = 2 |
43 }; | 45 }; |
44 typedef NSInteger NSScrollerKnobStyle; | 46 typedef NSInteger NSScrollerKnobStyle; |
45 #endif | |
46 | |
47 #if __MAC_OS_X_VERSION_MAX_ALLOWED == 1060 | |
48 @interface NSScroller(NSObject) | 47 @interface NSScroller(NSObject) |
49 + (NSScrollerStyle)preferredScrollerStyle; | 48 + (NSScrollerStyle)preferredScrollerStyle; |
50 @end | 49 @end |
51 #endif | 50 #endif // !10.7 |
52 | 51 |
53 @interface NSObject (ScrollbarPainter) | 52 @interface NSObject (ScrollbarPainter) |
54 + (id)scrollerImpWithStyle:(NSScrollerStyle)newScrollerStyle controlSize:(NSCont
rolSize)newControlSize horizontal:(BOOL)horizontal replacingScrollerImp:(id)prev
ious; | 53 + (id)scrollerImpWithStyle:(NSScrollerStyle)newScrollerStyle controlSize:(NSCont
rolSize)newControlSize horizontal:(BOOL)horizontal replacingScrollerImp:(id)prev
ious; |
55 - (CGFloat)knobAlpha; | 54 - (CGFloat)knobAlpha; |
56 - (void)setKnobAlpha:(CGFloat)knobAlpha; | 55 - (void)setKnobAlpha:(CGFloat)knobAlpha; |
57 - (CGFloat)trackAlpha; | 56 - (CGFloat)trackAlpha; |
58 - (void)setTrackAlpha:(CGFloat)trackAlpha; | 57 - (void)setTrackAlpha:(CGFloat)trackAlpha; |
59 - (void)setEnabled:(BOOL)enabled; | 58 - (void)setEnabled:(BOOL)enabled; |
60 - (void)setBoundsSize:(NSSize)boundsSize; | 59 - (void)setBoundsSize:(NSSize)boundsSize; |
61 - (void)setDoubleValue:(double)doubleValue; | 60 - (void)setDoubleValue:(double)doubleValue; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 - (void)mouseMovedInContentArea; | 100 - (void)mouseMovedInContentArea; |
102 - (void)startLiveResize; | 101 - (void)startLiveResize; |
103 - (void)contentAreaDidResize; | 102 - (void)contentAreaDidResize; |
104 - (void)endLiveResize; | 103 - (void)endLiveResize; |
105 - (void)windowOrderedIn; | 104 - (void)windowOrderedIn; |
106 - (void)windowOrderedOut; | 105 - (void)windowOrderedOut; |
107 - (void)beginScrollGesture; | 106 - (void)beginScrollGesture; |
108 - (void)endScrollGesture; | 107 - (void)endScrollGesture; |
109 @end | 108 @end |
110 | 109 |
111 namespace WebCore { | 110 #endif // WebCore_NSScrollerImpDetails_h |
112 | |
113 bool isScrollbarOverlayAPIAvailable(); | |
114 | |
115 NSScrollerStyle recommendedScrollerStyle(); | |
116 | |
117 } | |
118 | |
119 #endif | |
OLD | NEW |