OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google 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 |
11 * documentation and/or other materials provided with the distribution. | 11 * documentation and/or other materials provided with the distribution. |
12 * | 12 * |
13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND | 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND |
14 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 14 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
15 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 15 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
16 * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR | 16 * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR |
17 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 17 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
19 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | 19 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
20 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | 20 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
21 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 21 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
22 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
23 */ | 23 */ |
24 | 24 |
25 #ifndef WebScrollbar_h | 25 #ifndef WebScrollbar_h |
26 #define WebScrollbar_h | 26 #define WebScrollbar_h |
27 | 27 |
28 #include "WebPoint.h" | 28 #include "WebPoint.h" |
29 #include "WebRect.h" | 29 #include "WebRect.h" |
| 30 #include "WebScrollbarOverlayColorTheme.h" |
30 #include "WebSize.h" | 31 #include "WebSize.h" |
31 #include "WebVector.h" | 32 #include "WebVector.h" |
32 | 33 |
33 namespace blink { | 34 namespace blink { |
34 | 35 |
35 // A const accessor interface for a WebKit scrollbar | 36 // A const accessor interface for a WebKit scrollbar |
36 class BLINK_PLATFORM_EXPORT WebScrollbar { | 37 class BLINK_PLATFORM_EXPORT WebScrollbar { |
37 public: | 38 public: |
38 enum Orientation { Horizontal, Vertical }; | 39 enum Orientation { Horizontal, Vertical }; |
39 | 40 |
(...skipping 15 matching lines...) Expand all Loading... |
55 BackTrackPart = 1 << 2, | 56 BackTrackPart = 1 << 2, |
56 ThumbPart = 1 << 3, | 57 ThumbPart = 1 << 3, |
57 ForwardTrackPart = 1 << 4, | 58 ForwardTrackPart = 1 << 4, |
58 BackButtonEndPart = 1 << 5, | 59 BackButtonEndPart = 1 << 5, |
59 ForwardButtonEndPart = 1 << 6, | 60 ForwardButtonEndPart = 1 << 6, |
60 ScrollbarBGPart = 1 << 7, | 61 ScrollbarBGPart = 1 << 7, |
61 TrackBGPart = 1 << 8, | 62 TrackBGPart = 1 << 8, |
62 AllParts = 0xffffffff | 63 AllParts = 0xffffffff |
63 }; | 64 }; |
64 | 65 |
65 enum ScrollbarOverlayStyle { | |
66 ScrollbarOverlayStyleDefault, | |
67 ScrollbarOverlayStyleDark, | |
68 ScrollbarOverlayStyleLight | |
69 }; | |
70 | |
71 virtual ~WebScrollbar() {} | 66 virtual ~WebScrollbar() {} |
72 | 67 |
73 // Return true if this is an overlay scrollbar. | 68 // Return true if this is an overlay scrollbar. |
74 virtual bool isOverlay() const = 0; | 69 virtual bool isOverlay() const = 0; |
75 | 70 |
76 // Gets the current value (i.e. position inside the region). | 71 // Gets the current value (i.e. position inside the region). |
77 virtual int value() const = 0; | 72 virtual int value() const = 0; |
78 | 73 |
79 virtual WebPoint location() const = 0; | 74 virtual WebPoint location() const = 0; |
80 virtual WebSize size() const = 0; | 75 virtual WebSize size() const = 0; |
81 virtual bool enabled() const = 0; | 76 virtual bool enabled() const = 0; |
82 virtual int maximum() const = 0; | 77 virtual int maximum() const = 0; |
83 virtual int totalSize() const = 0; | 78 virtual int totalSize() const = 0; |
84 virtual bool isScrollableAreaActive() const = 0; | 79 virtual bool isScrollableAreaActive() const = 0; |
85 virtual void getTickmarks(WebVector<WebRect>& tickmarks) const = 0; | 80 virtual void getTickmarks(WebVector<WebRect>& tickmarks) const = 0; |
86 virtual ScrollbarControlSize controlSize() const = 0; | 81 virtual ScrollbarControlSize controlSize() const = 0; |
87 virtual ScrollbarPart pressedPart() const = 0; | 82 virtual ScrollbarPart pressedPart() const = 0; |
88 virtual ScrollbarPart hoveredPart() const = 0; | 83 virtual ScrollbarPart hoveredPart() const = 0; |
89 virtual ScrollbarOverlayStyle scrollbarOverlayStyle() const = 0; | 84 virtual WebScrollbarOverlayColorTheme scrollbarOverlayColorTheme() const = 0; |
90 virtual bool isCustomScrollbar() const = 0; | 85 virtual bool isCustomScrollbar() const = 0; |
91 virtual Orientation orientation() const = 0; | 86 virtual Orientation orientation() const = 0; |
92 virtual bool isLeftSideVerticalScrollbar() const = 0; | 87 virtual bool isLeftSideVerticalScrollbar() const = 0; |
93 virtual float elasticOverscroll() const = 0; | 88 virtual float elasticOverscroll() const = 0; |
94 virtual void setElasticOverscroll(float) = 0; | 89 virtual void setElasticOverscroll(float) = 0; |
95 }; | 90 }; |
96 | 91 |
97 } // namespace blink | 92 } // namespace blink |
98 | 93 |
99 #endif | 94 #endif |
OLD | NEW |