Debian Codegraph @

Source/Core/UICommon/UICommon.h

raw symbols SCIP
1 // Copyright 2014 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 #pragma once
5
6 #include <string>
7
8 #include "Common/CommonTypes.h"
9 #include "Common/HookableEvent.h"
10
11 struct WindowSystemInfo;
12
13 namespace UICommon
14 {
15 void Init();
16 void Shutdown();
17
18 // Triggered from the Host-thread on Android before a potential process termination.
19 [[nodiscard]] Common::EventHook AddFlushUnsavedDataCallback(std::function<void()> callback);
20 void FlushUnsavedData();
21
22 void InitControllers(const WindowSystemInfo& wsi);
23 void ShutdownControllers();
24
25 void InhibitScreenSaver(bool inhibit);
26
27 // Calls std::locale::global, selecting a fallback locale if the
28 // requested locale isn't available
29 void SetLocale(std::string locale_name);
30
31 void CreateDirectories();
32 void SetUserDirectory(std::string custom_path);
33
34 bool TriggerSTMPowerEvent();
35
36 // Return a pretty file size string from byte count.
37 // e.g. 1134278 -> "1.08 MiB"
38 std::string FormatSize(u64 bytes, int decimals = 2);
39 } // namespace UICommon