Backed out changeset b4a0f8afc02e (bug 1857946) for causing bc failures at browser...
[gecko.git] / widget / cocoa / nsLookAndFeel.h
blobadce685a4ef949b5bf2b6c4aa5c06146f693549b
1 /* -*- Mode: C++; tab-width: 4; 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 nsLookAndFeel_h_
7 #define nsLookAndFeel_h_
8 #include "nsXPLookAndFeel.h"
10 class nsLookAndFeel final : public nsXPLookAndFeel {
11 public:
12 nsLookAndFeel();
13 virtual ~nsLookAndFeel();
15 void NativeInit() final;
16 nsresult NativeGetColor(ColorID, ColorScheme, nscolor& aColor) override;
17 nsresult NativeGetInt(IntID, int32_t& aResult) override;
18 nsresult NativeGetFloat(FloatID, float& aResult) override;
19 bool NativeGetFont(FontID aID, nsString& aFontName,
20 gfxFontStyle& aFontStyle) override;
22 virtual char16_t GetPasswordCharacterImpl() override {
23 // unicode value for the bullet character, used for password textfields.
24 return 0x2022;
27 void RecordLookAndFeelSpecificTelemetry() override {
28 RecordAccessibilityTelemetry();
31 // Having a separate, static method allows us to rely on the same
32 // chunk of telemetry logging code at initialization and when we
33 // recieve an event that changes the value of our telemetry probe.
34 static void RecordAccessibilityTelemetry();
36 protected:
37 static bool SystemWantsDarkTheme();
38 static bool IsSystemOrientationRTL();
39 static nscolor ProcessSelectionBackground(nscolor aColor,
40 ColorScheme aScheme);
43 #endif // nsLookAndFeel_h_