2022-12-04 11:03:45 +00:00
|
|
|
// SPDX-FileCopyrightText: 2019-2022 Connor McLaughlin <stenzek@gmail.com>
|
|
|
|
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
|
|
|
|
2022-09-21 12:44:52 +00:00
|
|
|
namespace FrontendCommon {
|
2022-11-18 08:14:39 +00:00
|
|
|
void SuspendScreensaver();
|
2022-09-21 12:44:52 +00:00
|
|
|
void ResumeScreensaver();
|
|
|
|
|
|
|
|
/// Abstracts platform-specific code for asynchronously playing a sound.
|
|
|
|
/// On Windows, this will use PlaySound(). On Linux, it will shell out to aplay. On MacOS, it uses NSSound.
|
|
|
|
bool PlaySoundAsync(const char* path);
|
2023-02-05 05:00:51 +00:00
|
|
|
|
|
|
|
#ifdef __APPLE__
|
|
|
|
/// Add a handler to be run when macOS changes between dark and light themes
|
|
|
|
void AddThemeChangeHandler(void* ctx, void(handler)(void* ctx));
|
|
|
|
/// Remove a handler previously added using AddThemeChangeHandler with the given context
|
|
|
|
void RemoveThemeChangeHandler(void* ctx);
|
|
|
|
#endif
|
2022-09-21 12:44:52 +00:00
|
|
|
} // namespace FrontendCommon
|