2014-10-04 15:12:15 -04:00
|
|
|
// Copyright 2014 Dolphin Emulator Project
|
2015-05-18 01:08:10 +02:00
|
|
|
// Licensed under GPLv2+
|
2014-10-04 15:12:15 -04:00
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2018-04-14 16:42:54 +02:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
|
2014-10-04 15:12:15 -04:00
|
|
|
namespace UICommon
|
|
|
|
{
|
|
|
|
void Init();
|
|
|
|
void Shutdown();
|
|
|
|
|
2018-01-01 21:03:50 +00:00
|
|
|
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
2018-04-14 16:48:49 +02:00
|
|
|
void EnableScreenSaver(unsigned long win, bool enable);
|
2018-01-01 21:03:50 +00:00
|
|
|
#else
|
|
|
|
void EnableScreenSaver(bool enable);
|
|
|
|
#endif
|
|
|
|
|
2017-07-21 12:46:12 +02:00
|
|
|
// Calls std::locale::global, selecting a fallback locale if the
|
|
|
|
// requested locale isn't available
|
|
|
|
void SetLocale(std::string locale_name);
|
|
|
|
|
2014-10-04 15:12:15 -04:00
|
|
|
void CreateDirectories();
|
2015-02-25 03:23:42 -06:00
|
|
|
void SetUserDirectory(const std::string& custom_path);
|
2014-10-04 15:12:15 -04:00
|
|
|
|
2017-06-24 21:41:53 +02:00
|
|
|
bool TriggerSTMPowerEvent();
|
|
|
|
|
2017-05-09 18:49:10 +02:00
|
|
|
void SaveWiimoteSources();
|
2017-12-31 20:33:36 +01:00
|
|
|
|
|
|
|
// Return a pretty file size string from byte count.
|
|
|
|
// e.g. 1134278 -> "1.08 MiB"
|
|
|
|
std::string FormatSize(u64 bytes);
|
2016-06-24 10:43:46 +02:00
|
|
|
} // namespace UICommon
|