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_WindowsUIUtils_h__
7 #define mozilla_widget_WindowsUIUtils_h__
9 #include "nsIWindowsUIUtils.h"
12 #include "mozilla/Maybe.h"
13 #include "mozilla/MozPromise.h"
16 mozilla::MozPromise
<bool, nsresult
, /* IsExclusive */ true>;
19 enum class ColorScheme
: uint8_t;
22 class WindowsUIUtils final
: public nsIWindowsUIUtils
{
25 NS_DECL_NSIWINDOWSUIUTILS
29 static RefPtr
<SharePromise
> Share(nsAutoString aTitle
, nsAutoString aText
,
32 static void UpdateInTabletMode();
33 static bool GetInTabletMode();
35 // Gets the system accent color, or one of the darker / lighter variants
36 // (darker = -1/2/3, lighter=+1/2/3, values outside of that range are
38 static mozilla::Maybe
<nscolor
> GetAccentColor(int aTone
= 0);
39 static mozilla::Maybe
<nscolor
> GetSystemColor(mozilla::ColorScheme
, int);
41 // Use LookAndFeel for a cached getter.
42 static bool ComputeOverlayScrollbars();
43 static double ComputeTextScaleFactor();
49 #endif // mozilla_widget_WindowsUIUtils_h__