Bug 1751217 Part 3: Make HDR-capable macOS screens report 30 pixelDepth. r=mstange
[gecko.git] / widget / ScrollbarDrawingAndroid.h
blob24453bba31d9d58b930e467f04deab073f8573db
1 /* -*- Mode: C++; tab-width: 40; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_widget_ScrollbarDrawingAndroid_h
7 #define mozilla_widget_ScrollbarDrawingAndroid_h
9 #include "nsITheme.h"
10 #include "ScrollbarDrawing.h"
12 namespace mozilla::widget {
14 class ScrollbarDrawingAndroid final : public ScrollbarDrawing {
15 public:
16 ScrollbarDrawingAndroid() : ScrollbarDrawing(Kind::Android) {}
17 virtual ~ScrollbarDrawingAndroid() = default;
19 LayoutDeviceIntSize GetMinimumWidgetSize(nsPresContext*,
20 StyleAppearance aAppearance,
21 nsIFrame* aFrame) override;
23 ScrollbarSizes GetScrollbarSizes(nsPresContext*, StyleScrollbarWidth,
24 Overlay) override;
26 template <typename PaintBackendData>
27 void DoPaintScrollbarThumb(PaintBackendData&, const LayoutDeviceRect& aRect,
28 bool aHorizontal, nsIFrame* aFrame,
29 const ComputedStyle& aStyle,
30 const EventStates& aElementState,
31 const EventStates& aDocumentState, const Colors&,
32 const DPIRatio&);
33 bool PaintScrollbarThumb(DrawTarget&, const LayoutDeviceRect& aRect,
34 bool aHorizontal, nsIFrame* aFrame,
35 const ComputedStyle& aStyle,
36 const EventStates& aElementState,
37 const EventStates& aDocumentState, const Colors&,
38 const DPIRatio&) override;
39 bool PaintScrollbarThumb(WebRenderBackendData&, const LayoutDeviceRect& aRect,
40 bool aHorizontal, nsIFrame* aFrame,
41 const ComputedStyle& aStyle,
42 const EventStates& aElementState,
43 const EventStates& aDocumentState, const Colors&,
44 const DPIRatio&) override;
46 void RecomputeScrollbarParams() override;
48 bool ShouldDrawScrollbarButtons() override { return false; }
51 } // namespace mozilla::widget
53 #endif