Bug 1758698 [wpt PR 33120] - Add more referrer policy WPTs for Early Hints, a=testonly
[gecko.git] / widget / ScrollbarDrawingGTK.h
blob3d0b5ba5f0a244b8567992961b60f4ee793de314
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_ScrollbarDrawingGTK_h
7 #define mozilla_widget_ScrollbarDrawingGTK_h
9 #include "nsITheme.h"
10 #include "nsNativeTheme.h"
11 #include "ScrollbarDrawing.h"
13 namespace mozilla::widget {
15 class ScrollbarDrawingGTK final : public ScrollbarDrawing {
16 public:
17 ScrollbarDrawingGTK() : ScrollbarDrawing(Kind::Gtk) {}
18 virtual ~ScrollbarDrawingGTK() = default;
20 LayoutDeviceIntSize GetMinimumWidgetSize(nsPresContext*,
21 StyleAppearance aAppearance,
22 nsIFrame* aFrame) override;
24 Maybe<nsITheme::Transparency> GetScrollbarPartTransparency(
25 nsIFrame* aFrame, StyleAppearance aAppearance) override;
27 template <typename PaintBackendData>
28 bool DoPaintScrollbarThumb(PaintBackendData&, const LayoutDeviceRect&,
29 bool aHorizontal, nsIFrame*, const ComputedStyle&,
30 const EventStates& aElementState,
31 const EventStates& aDocumentState, const Colors&,
32 const DPIRatio&);
33 bool PaintScrollbarThumb(DrawTarget&, const LayoutDeviceRect&,
34 bool aHorizontal, nsIFrame*,
35 const ComputedStyle& aStyle,
36 const EventStates& aElementState,
37 const EventStates& aDocumentState, const Colors&,
38 const DPIRatio&) override;
39 bool PaintScrollbarThumb(WebRenderBackendData&, const LayoutDeviceRect&,
40 bool aHorizontal, nsIFrame*,
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;
51 } // namespace mozilla::widget
53 #endif