11 #include "HDRStatus.h" 12 #include "OSScreenSaver.h" 13 #include "Resolution.h" 14 #include "VideoSync.h" 15 #include "WinEvents.h" 16 #include "cores/VideoPlayer/VideoRenderers/DebugInfo.h" 17 #include "guilib/DispResource.h" 18 #include "utils/HDRCapabilities.h" 50 static std::unique_ptr<CWinSystemBase> CreateWinSystem();
55 virtual const std::string GetName() {
return "platform default"; }
58 virtual bool InitWindowSystem();
59 virtual bool DestroyWindowSystem();
60 virtual bool CreateNewWindow(
const std::string& name,
bool fullScreen,
RESOLUTION_INFO& res) = 0;
61 virtual bool DestroyWindow(){
return false; }
62 virtual bool ResizeWindow(
int newWidth,
int newHeight,
int newLeft,
int newTop) = 0;
63 virtual bool SetFullScreen(
bool fullScreen,
RESOLUTION_INFO& res,
bool blankOtherDisplays) = 0;
64 virtual bool DisplayHardwareScalingEnabled() {
return false; }
65 virtual void UpdateDisplayHardwareScaling(
const RESOLUTION_INFO& resInfo) { }
66 virtual bool MoveWindow(
int topLeft,
int topRight){
return false;}
67 virtual void FinishModeChange(RESOLUTION res){}
68 virtual void FinishWindowResize(
int newWidth,
int newHeight) {ResizeWindow(newWidth, newHeight, -1, -1);}
69 virtual bool CenterWindow(){
return false;}
70 virtual bool IsCreated(){
return m_bWindowCreated; }
71 virtual void NotifyAppFocusChange(
bool bGaining) {}
72 virtual void NotifyAppActiveChange(
bool bActivated) {}
73 virtual void ShowOSMouse(
bool show) {}
74 virtual bool HasCursor(){
return true; }
76 virtual bool HasInertialGestures(){
return false; }
78 virtual bool UseLimitedColor();
80 virtual int NoOfBuffers();
101 virtual bool Minimize() {
return false; }
102 virtual bool Restore() {
return false; }
103 virtual bool Hide() {
return false; }
104 virtual bool Show(
bool raise =
true) {
return false; }
107 virtual std::unique_ptr<CVideoSync> GetVideoSync(
void *clock) {
return nullptr; }
110 virtual void OnMove(
int x,
int y) {}
124 unsigned int GetWidth() {
return m_nWidth; }
125 unsigned int GetHeight() {
return m_nHeight; }
126 virtual bool CanDoWindowed() {
return true; }
127 bool IsFullScreen() {
return m_bFullScreen; }
128 virtual void UpdateResolutions();
129 void SetWindowResolution(
int width,
int height);
130 std::vector<RESOLUTION_WHR> ScreenResolutions(
float refreshrate);
131 std::vector<REFRESHRATE> RefreshRates(
int width,
int height, uint32_t dwFlags);
132 REFRESHRATE DefaultRefreshRate(std::vector<REFRESHRATE> rates);
133 virtual bool HasCalibration(
const RESOLUTION_INFO& resInfo) {
return true; }
136 virtual std::string GetClipboardText(
void);
145 void DriveRenderLoop();
148 virtual bool MessagePump() {
return false; }
164 std::shared_ptr<CDPMSSupport> GetDPMSManager();
172 virtual bool IsHDRDisplay() {
return false; }
173 virtual HDR_STATUS ToggleHDR() {
return HDR_STATUS::HDR_UNSUPPORTED; }
174 virtual HDR_STATUS GetOSHDRStatus() {
return HDR_STATUS::HDR_UNSUPPORTED; }
177 static const char* SETTING_WINSYSTEM_IS_HDR_DISPLAY;
182 virtual std::vector<std::string> GetConnectedOutputs() {
return {}; }
185 void UpdateDesktopResolution(
RESOLUTION_INFO& newRes,
const std::string &output,
int width,
int height,
float refreshRate, uint32_t dwFlags);
186 virtual std::unique_ptr<KODI::WINDOWING::IOSScreenSaver> GetOSScreenSaverImpl() {
return nullptr; }
192 bool m_bWindowCreated =
false;
193 bool m_bFullScreen =
false;
194 bool m_bBlankOtherDisplay =
false;
195 float m_fRefreshRate = 0.0f;
196 std::unique_ptr<KODI::WINDOWING::COSScreenSaverManager> m_screenSaverManager;
197 CCriticalSection m_renderLoopSection;
198 std::vector<IRenderLoop*> m_renderLoopClients;
200 std::unique_ptr<IWinEvents> m_winEvents;
201 std::unique_ptr<CGraphicContext> m_gfxContext;
202 std::shared_ptr<CDPMSSupport> m_dpms;
Definition: WinSystem.h:23
Definition: WinSystem.h:31
Definition: DPMSSupport.h:18
Definition: DispResource.h:26
virtual float GetDisplayLatency()
Get average display latency.
Definition: WinSystem.h:90
Definition: WinSystem.h:44
virtual bool SetHDR(const VideoPicture *videoPicture)
Set the HDR metadata.
Definition: WinSystem.h:171
Definition: RenderSystem.h:27
Definition: DispResource.h:14
Provide info of a resolution.
Definition: Resolution.h:66
virtual float GetFrameLatencyAdjustment()
Get time that should be subtracted from the display latency for this frame in milliseconds.
Definition: WinSystem.h:99
virtual void * GetHWContext()
Get OS specific hardware context.
Definition: WinSystem.h:162
Definition: DebugInfo.h:29
Manage the OS screen saver.
Definition: OSScreenSaver.h:92
Definition: DVDVideoCodec.h:36
Definition: HDRCapabilities.h:11
Definition: GraphicContext.h:60