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
10 #include "nsNativeTheme.h"
15 class HeadlessThemeGTK final
: private nsNativeTheme
, public nsITheme
{
17 NS_DECL_ISUPPORTS_INHERITED
19 HeadlessThemeGTK() = default;
20 NS_IMETHOD
DrawWidgetBackground(gfxContext
* aContext
, nsIFrame
* aFrame
,
21 StyleAppearance aAppearance
,
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
;
44 ThemeSupportsWidget(nsPresContext
* aPresContext
, nsIFrame
* aFrame
,
45 StyleAppearance aAppearance
) override
;
47 NS_IMETHOD_(bool) WidgetIsContainer(StyleAppearance aAppearance
) override
;
50 ThemeDrawsFocusForWidget(StyleAppearance aAppearance
) override
;
52 virtual bool ThemeNeedsComboboxDropmarker() override
;
55 virtual ~HeadlessThemeGTK() {}
59 } // namespace mozilla
61 #endif // mozilla_widget_HeadlessThemeGTK_h