Debian Codegraph @

Source/Core/DolphinQt/Host.h

raw symbols SCIP
1 // Copyright 2015 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 #pragma once
5
6 #include <atomic>
7
8 #include <QObject>
9
10 // Singleton that talks to the Core via the interface defined in Core/Host.h.
11 // Because Host_* calls might come from different threads than the MainWindow,
12 // the Host class communicates with it via signals/slots only.
13
14 // Many of the Host_* functions are ignored, and some shouldn't exist.
15 class Host final : public QObject
16 {
17 Q_OBJECT
18
19 public:
20 ~Host() override;
21
22 static Host* GetInstance();
23
24 bool GetRenderFocus();
25 bool GetRenderFullFocus();
26 bool GetRenderFullscreen();
27 bool GetGBAFocus();
28 bool GetTASInputFocus() const;
29
30 void SetMainWindowHandle(void* handle);
31 void SetRenderHandle(void* handle);
32 void SetRenderFocus(bool focus);
33 void SetRenderFullFocus(bool focus);
34 void SetRenderFullscreen(bool fullscreen);
35 void SetTASInputFocus(bool focus);
36 void ResizeSurface(int new_width, int new_height);
37
38 signals:
39 void RequestTitle(const QString& title);
40 void RequestStop();
41 void RequestRenderSize(int w, int h);
42 void UpdateDisasmDialog();
43 void JitCacheInvalidation();
44 void JitProfileDataWiped();
45 void PPCSymbolsChanged();
46 void PPCBreakpointsChanged();
47
48 private:
49 Host();
50
51 std::atomic<void*> m_render_handle{nullptr};
52 std::atomic<void*> m_main_window_handle{nullptr};
53 std::atomic<bool> m_render_to_main{false};
54 std::atomic<bool> m_render_focus{false};
55 std::atomic<bool> m_render_full_focus{false};
56 std::atomic<bool> m_render_fullscreen{false};
57 std::atomic<bool> m_tas_input_focus{false};
58 };