11 #include "guilib/DispResource.h" 12 #include "threads/CriticalSection.h" 13 #include "threads/SystemClock.h" 14 #include "windowing/WinSystem.h" 24 WINDOW_STATE_FULLSCREEN = 1,
25 WINDOW_STATE_FULLSCREEN_WINDOW,
26 WINDOW_STATE_WINDOWED,
27 WINDOW_STATE_BORDERLESS
30 static const char* window_state_names[] =
34 "windowed fullscreen",
40 enum WINDOW_FULLSCREEN_STATE
42 WINDOW_FULLSCREEN_STATE_FULLSCREEN = WINDOW_STATE_FULLSCREEN,
43 WINDOW_FULLSCREEN_STATE_FULLSCREEN_WINDOW = WINDOW_STATE_FULLSCREEN_WINDOW
47 enum WINDOW_WINDOW_STATE
49 WINDOW_WINDOW_STATE_WINDOWED = WINDOW_STATE_WINDOWED,
50 WINDOW_WINDOW_STATE_BORDERLESS = WINDOW_STATE_BORDERLESS
70 bool InitWindowSystem()
override;
71 bool DestroyWindowSystem()
override;
72 bool ResizeWindow(
int newWidth,
int newHeight,
int newLeft,
int newTop)
override;
73 void FinishWindowResize(
int newWidth,
int newHeight)
override;
74 void UpdateResolutions()
override;
75 void NotifyAppFocusChange(
bool bGaining)
override;
76 void ShowOSMouse(
bool show)
override;
77 bool HasInertialGestures()
override {
return true; }
78 bool Minimize()
override;
79 bool Restore()
override;
81 bool Show(
bool raise =
true)
override;
82 std::string GetClipboardText()
override;
83 bool UseLimitedColor()
override;
86 std::unique_ptr<CVideoSync> GetVideoSync(
void *clock)
override;
88 bool WindowedMode()
const {
return m_state != WINDOW_STATE_FULLSCREEN; }
89 bool SetFullScreen(
bool fullScreen,
RESOLUTION_INFO& res,
bool blankOtherDisplays)
override;
92 bool IsAlteringWindow()
const {
return m_IsAlteringWindow; }
93 void SetAlteringWindow(
bool altering) { m_IsAlteringWindow = altering; }
94 bool IsTogglingHDR()
const {
return false; }
95 void SetTogglingHDR(
bool toggling) {}
96 virtual bool DPIChanged(WORD dpi, RECT windowRect)
const;
97 bool IsMinimized()
const {
return m_bMinimized; }
98 void SetMinimized(
bool minimized) { m_bMinimized = minimized; }
99 int GetGuiSdrPeakLuminance()
const;
101 bool CanDoWindowed()
override;
104 bool MessagePump()
override;
107 bool CreateNewWindow(
const std::string& name,
bool fullScreen,
RESOLUTION_INFO& res)
override = 0;
108 virtual void UpdateStates(
bool fullScreen);
109 WINDOW_STATE GetState(
bool fullScreen)
const;
110 virtual void SetDeviceFullScreen(
bool fullScreen,
RESOLUTION_INFO& res) = 0;
111 virtual void ReleaseBackBuffer() = 0;
112 virtual void CreateBackBuffer() = 0;
113 virtual void ResizeDeviceBuffers() = 0;
114 virtual bool IsStereoEnabled() = 0;
115 virtual void AdjustWindow();
120 bool ChangeResolution(
const RESOLUTION_INFO& res,
bool forceChange =
false);
122 void RestoreDesktopResolution();
123 void GetConnectedDisplays(std::vector<MONITOR_DETAILS>& outputs);
131 void OnDisplayLost();
132 void OnDisplayReset();
133 void OnDisplayBack();
134 void ResolutionChanged();
136 std::vector<MONITOR_DETAILS> m_displays;
137 bool m_ValidWindowedPosition;
138 bool m_IsAlteringWindow;
140 CCriticalSection m_resourceSection;
141 std::vector<IDispResource*> m_resources;
142 bool m_delayDispReset;
145 WINDOW_STATE m_state;
146 WINDOW_FULLSCREEN_STATE m_fullscreenState;
147 WINDOW_WINDOW_STATE m_windowState;
150 bool m_bFirstResChange =
true;
152 winrt::Windows::UI::Core::CoreWindow m_coreWindow =
nullptr;
Definition: WinSystemWin10.h:53
Definition: WinSystem.h:44
Definition: SystemClock.h:31
Definition: DispResource.h:14
Provide info of a resolution.
Definition: Resolution.h:66
Definition: WinSystemWin10.h:63