Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/widget/headless/HeadlessThemeGTK.h
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: C++; tab-width: 2; 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/. */
5
6
#ifndef mozilla_widget_HeadlessThemeGTK_h
7
#define mozilla_widget_HeadlessThemeGTK_h
8
9
#include "nsITheme.h"
10
#include "nsNativeTheme.h"
11
12
namespace mozilla {
13
namespace widget {
14
15
class HeadlessThemeGTK final : private nsNativeTheme,
16
                               public nsITheme {
17
public:
18
  NS_DECL_ISUPPORTS_INHERITED
19
20
0
  HeadlessThemeGTK() = default;
21
  NS_IMETHOD DrawWidgetBackground(gfxContext* aContext,
22
                                  nsIFrame* aFrame, WidgetType aWidgetType,
23
                                  const nsRect& aRect,
24
                                  const nsRect& aDirtyRect) override;
25
26
  MOZ_MUST_USE LayoutDeviceIntMargin GetWidgetBorder(nsDeviceContext* aContext,
27
                                                     nsIFrame* aFrame,
28
                                                     WidgetType aWidgetType) override;
29
30
  bool GetWidgetPadding(nsDeviceContext* aContext,
31
                        nsIFrame* aFrame,
32
                        WidgetType aWidgetType,
33
                        LayoutDeviceIntMargin* aResult) override;
34
  NS_IMETHOD GetMinimumWidgetSize(nsPresContext* aPresContext,
35
                                  nsIFrame* aFrame, WidgetType aWidgetType,
36
                                  mozilla::LayoutDeviceIntSize* aResult,
37
                                  bool* aIsOverridable) override;
38
39
  NS_IMETHOD WidgetStateChanged(nsIFrame* aFrame, WidgetType aWidgetType,
40
                                nsAtom* aAttribute,
41
                                bool* aShouldRepaint,
42
                                const nsAttrValue* aOldValue) override;
43
44
  NS_IMETHOD ThemeChanged() override;
45
46
  NS_IMETHOD_(bool) ThemeSupportsWidget(nsPresContext* aPresContext,
47
                                        nsIFrame* aFrame,
48
                                        WidgetType aWidgetType) override;
49
50
  NS_IMETHOD_(bool) WidgetIsContainer(WidgetType aWidgetType) override;
51
52
  NS_IMETHOD_(bool) ThemeDrawsFocusForWidget(WidgetType aWidgetType) override;
53
54
  virtual bool ThemeNeedsComboboxDropmarker() override;
55
56
protected:
57
0
  virtual ~HeadlessThemeGTK() { }
58
};
59
60
} // namespace widget
61
} // namespace mozilla
62
63
#endif // mozilla_widget_HeadlessThemeGTK_h