Bug 1608587 [wpt PR 21137] - Update wpt metadata, a=testonly
[gecko.git] / widget / headless / HeadlessThemeGTK.h
blob135940a4a1f7e38bf8348cbd4d51ad1a86b1b272
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/. */
6 #ifndef mozilla_widget_HeadlessThemeGTK_h
7 #define mozilla_widget_HeadlessThemeGTK_h
9 #include "nsITheme.h"
10 #include "nsNativeTheme.h"
12 namespace mozilla {
13 namespace widget {
15 class HeadlessThemeGTK final : private nsNativeTheme, public nsITheme {
16 public:
17 NS_DECL_ISUPPORTS_INHERITED
19 HeadlessThemeGTK() = default;
20 NS_IMETHOD DrawWidgetBackground(gfxContext* aContext, nsIFrame* aFrame,
21 StyleAppearance aAppearance,
22 const nsRect& aRect,
23 const nsRect& aDirtyRect) override;
25 MOZ_MUST_USE LayoutDeviceIntMargin
26 GetWidgetBorder(nsDeviceContext* aContext, nsIFrame* aFrame,
27 StyleAppearance aAppearance) override;
29 bool GetWidgetPadding(nsDeviceContext* aContext, nsIFrame* aFrame,
30 StyleAppearance aAppearance,
31 LayoutDeviceIntMargin* aResult) override;
32 NS_IMETHOD GetMinimumWidgetSize(nsPresContext* aPresContext, nsIFrame* aFrame,
33 StyleAppearance aAppearance,
34 mozilla::LayoutDeviceIntSize* aResult,
35 bool* aIsOverridable) override;
37 NS_IMETHOD WidgetStateChanged(nsIFrame* aFrame, StyleAppearance aAppearance,
38 nsAtom* aAttribute, bool* aShouldRepaint,
39 const nsAttrValue* aOldValue) override;
41 NS_IMETHOD ThemeChanged() override;
43 NS_IMETHOD_(bool)
44 ThemeSupportsWidget(nsPresContext* aPresContext, nsIFrame* aFrame,
45 StyleAppearance aAppearance) override;
47 NS_IMETHOD_(bool) WidgetIsContainer(StyleAppearance aAppearance) override;
49 NS_IMETHOD_(bool)
50 ThemeDrawsFocusForWidget(StyleAppearance aAppearance) override;
52 virtual bool ThemeNeedsComboboxDropmarker() override;
54 protected:
55 virtual ~HeadlessThemeGTK() {}
58 } // namespace widget
59 } // namespace mozilla
61 #endif // mozilla_widget_HeadlessThemeGTK_h