1 // Copyright 2022 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef BASE_WIN_DARK_MODE_SUPPORT_H_ 6 #define BASE_WIN_DARK_MODE_SUPPORT_H_ 7 8 #include "base/base_export.h" 9 #include "base/win/windows_types.h" 10 11 namespace base::win { 12 13 // Returns true if this version of Windows supports dark mode. 14 BASE_EXPORT bool IsDarkModeAvailable(); 15 16 // Sets whether the process can support Windows dark mode. 17 BASE_EXPORT void AllowDarkModeForApp(bool allow); 18 19 // Sets whether the given HWND can support Windows dark mode. 20 BASE_EXPORT bool AllowDarkModeForWindow(HWND hwnd, bool allow); 21 22 } // namespace base::win 23 24 #endif // BASE_WIN_DARK_MODE_SUPPORT_H_ 25