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_ScrollbarDrawingWin_h
7 #define mozilla_widget_ScrollbarDrawingWin_h
10 #include "nsNativeTheme.h"
11 #include "ScrollbarDrawing.h"
13 namespace mozilla::widget
{
15 class ScrollbarDrawingWin
: public ScrollbarDrawing
{
17 ScrollbarDrawingWin() = default;
18 virtual ~ScrollbarDrawingWin() = default;
20 LayoutDeviceIntSize
GetMinimumWidgetSize(nsPresContext
*,
21 StyleAppearance aAppearance
,
22 nsIFrame
* aFrame
) override
;
24 Maybe
<nsITheme::Transparency
> GetScrollbarPartTransparency(
25 nsIFrame
* aFrame
, StyleAppearance aAppearance
) override
;
27 static ComputedStyle
* GetCustomScrollbarStyle(nsIFrame
* aFrame
,
28 bool* aDarkScrollbar
= nullptr);
30 template <typename PaintBackendData
>
31 bool DoPaintScrollbarThumb(PaintBackendData
&, const LayoutDeviceRect
&,
32 bool aHorizontal
, nsIFrame
*, const ComputedStyle
&,
33 const EventStates
& aElementState
,
34 const EventStates
& aDocumentState
, const Colors
&,
36 bool PaintScrollbarThumb(DrawTarget
&, const LayoutDeviceRect
&,
37 bool aHorizontal
, nsIFrame
*, const ComputedStyle
&,
38 const EventStates
& aElementState
,
39 const EventStates
& aDocumentState
, const Colors
&,
40 const DPIRatio
&) override
;
41 bool PaintScrollbarThumb(WebRenderBackendData
&, const LayoutDeviceRect
&,
42 bool aHorizontal
, nsIFrame
*, const ComputedStyle
&,
43 const EventStates
& aElementState
,
44 const EventStates
& aDocumentState
, const Colors
&,
45 const DPIRatio
&) override
;
47 void RecomputeScrollbarParams() override
;
50 } // namespace mozilla::widget