| 
    Kodi Documentation 22.0
    
   Kodi is an open source media player and entertainment hub. 
   | 
 
#include <WinSystem.h>
  
Public Member Functions | |
| CWinSystemBase () | |
| virtual | ~CWinSystemBase () | 
| virtual CRenderSystemBase * | GetRenderSystem () | 
| virtual const std::string | GetName () | 
| virtual bool | InitWindowSystem () | 
| virtual bool | DestroyWindowSystem () | 
| virtual bool | CreateNewWindow (const std::string &name, bool fullScreen, RESOLUTION_INFO &res)=0 | 
| virtual bool | DestroyWindow () | 
| virtual bool | ResizeWindow (int newWidth, int newHeight, int newLeft, int newTop)=0 | 
| virtual bool | SetFullScreen (bool fullScreen, RESOLUTION_INFO &res, bool blankOtherDisplays)=0 | 
| virtual void | SetDirtyRegions (const CDirtyRegionList &dirtyRegionsList) | 
| virtual int | GetBufferAge () | 
| virtual bool | MoveWindow (int topLeft, int topRight) | 
| virtual void | FinishModeChange (RESOLUTION res) | 
| virtual void | FinishWindowResize (int newWidth, int newHeight) | 
| virtual bool | CenterWindow () | 
| virtual bool | IsCreated () | 
| virtual void | NotifyAppFocusChange (bool bGaining) | 
| virtual void | NotifyAppActiveChange (bool bActivated) | 
| virtual void | ShowOSMouse (bool show) | 
| virtual bool | HasCursor () | 
| virtual bool | HasInertialGestures () | 
| virtual bool | UseLimitedColor () | 
| virtual int | NoOfBuffers () | 
| virtual void | ForceFullScreen (const RESOLUTION_INFO &resInfo) | 
| Forces the window to fullscreen provided the window resolution.   | |
| virtual float | GetDisplayLatency () | 
| Get average display latency.   | |
| virtual float | GetFrameLatencyAdjustment () | 
| Get time that should be subtracted from the display latency for this frame in milliseconds.   | |
| virtual bool | Minimize () | 
| virtual bool | Restore () | 
| virtual bool | Hide () | 
| virtual bool | Show (bool raise=true) | 
| virtual std::unique_ptr< CVideoSync > | GetVideoSync (CVideoReferenceClock *clock) | 
| virtual void | OnMove (int x, int y) | 
| virtual unsigned int | GetScreenId (const std::string &screen) | 
| Get the screen ID provided the screen name.   | |
| virtual void | MoveToScreen (unsigned int screenIdx) | 
| Window was requested to move to the given screen.   | |
| virtual void | OnChangeScreen (unsigned int screenIdx) | 
| Used to signal the windowing system about the change of the current screen.   | |
| KODI::WINDOWING::COSScreenSaverManager * | GetOSScreenSaver () | 
| Get OS screen saver inhibit implementation if available.   | |
| unsigned int | GetWidth () | 
| unsigned int | GetHeight () | 
| virtual bool | CanDoWindowed () | 
| bool | IsFullScreen () | 
| virtual bool | SupportsScreenMove () | 
| Check if the windowing system supports moving windows across screens.   | |
| virtual void | UpdateResolutions () | 
| void | SetWindowResolution (int width, int height) | 
| std::vector< RESOLUTION_WHR > | ScreenResolutions (float refreshrate) | 
| std::vector< REFRESHRATE > | RefreshRates (int width, int height, uint32_t dwFlags) | 
| REFRESHRATE | DefaultRefreshRate (const std::vector< REFRESHRATE > &rates) | 
| virtual bool | HasCalibration (const RESOLUTION_INFO &resInfo) | 
| virtual std::string | GetClipboardText (void) | 
| virtual void | Register (IDispResource *resource)=0 | 
| virtual void | Unregister (IDispResource *resource)=0 | 
| void | RegisterRenderLoop (IRenderLoop *client) | 
| void | UnregisterRenderLoop (IRenderLoop *client) | 
| void | DriveRenderLoop () | 
| virtual bool | MessagePump () | 
| virtual CGraphicContext & | GetGfxContext () const | 
| virtual void * | GetHWContext () | 
| Get OS specific hardware context.   | |
| std::shared_ptr< CDPMSSupport > | GetDPMSManager () | 
| virtual bool | SetHDR (const VideoPicture *videoPicture) | 
| Set the HDR metadata. Passing nullptr as the parameter should disable HDR.   | |
| virtual bool | IsHDRDisplay () | 
| virtual HDR_STATUS | ToggleHDR () | 
| virtual HDR_STATUS | GetOSHDRStatus () | 
| virtual CHDRCapabilities | GetDisplayHDRCapabilities () const | 
| virtual float | GetGuiSdrPeakLuminance () const | 
| virtual bool | HasSystemSdrPeakLuminance () | 
| virtual bool | SupportsVideoSuperResolution () | 
| System supports Video Super Resolution HW upscaler i.e.: "NVIDIA RTX Video Super Resolution" or "Intel Video Super Resolution".   | |
| virtual DEBUG_INFO_RENDER | GetDebugInfo () | 
| Gets debug info from video renderer for use in "Debug Info OSD" (Alt + O)   | |
| virtual std::vector< std::string > | GetConnectedOutputs () | 
| bool | IsHDRDisplaySettingEnabled () | 
| Return true when HDR display is available and enabled in settings.   | |
| bool | IsVideoSuperResolutionSettingEnabled () | 
| Return true when "Video Super Resolution" is supported and enabled in settings.   | |
| bool | IsHighPrecisionProcessingSettingEnabled () | 
| Return true when setting "High Precision Processing" is enabled.   | |
| std::pair< bool, int > | GetDitherSettings () | 
| Get dither settings.   | |
| virtual bool | BindTextureUploadContext () | 
| Binds a shared context to the current thread, in order to upload textures asynchronously.   | |
| virtual bool | UnbindTextureUploadContext () | 
| Unbinds the shared context.   | |
| virtual bool | HasContext () | 
| Checks if a graphics context is already bound to the current thread.   | |
Static Public Member Functions | |
| static std::unique_ptr< CWinSystemBase > | CreateWinSystem () | 
Static Public Attributes | |
| static const char * | SETTING_WINSYSTEM_IS_HDR_DISPLAY = "winsystem.ishdrdisplay" | 
Protected Member Functions | |
| void | UpdateDesktopResolution (RESOLUTION_INFO &newRes, const std::string &output, int width, int height, float refreshRate, uint32_t dwFlags) | 
| void | UpdateDesktopResolution (RESOLUTION_INFO &newRes, const std::string &output, int width, int height, int screenWidth, int screenHeight, float refreshRate, uint32_t dwFlags) | 
| virtual std::unique_ptr< KODI::WINDOWING::IOSScreenSaver > | GetOSScreenSaverImpl () | 
Protected Attributes | |
| int | m_nWidth = 0 | 
| int | m_nHeight = 0 | 
| int | m_nTop = 0 | 
| int | m_nLeft = 0 | 
| bool | m_bWindowCreated = false | 
| bool | m_bFullScreen = false | 
| bool | m_bBlankOtherDisplay = false | 
| float | m_fRefreshRate = 0.0f | 
| std::unique_ptr< KODI::WINDOWING::COSScreenSaverManager > | m_screenSaverManager | 
| CCriticalSection | m_renderLoopSection | 
| std::vector< IRenderLoop * > | m_renderLoopClients | 
| std::unique_ptr< IWinEvents > | m_winEvents | 
| std::unique_ptr< CGraphicContext > | m_gfxContext | 
| std::shared_ptr< CDPMSSupport > | m_dpms | 
| CWinSystemBase::CWinSystemBase | ( | ) | 
      
  | 
  virtualdefault | 
      
  | 
  inlinevirtual | 
Binds a shared context to the current thread, in order to upload textures asynchronously.
Reimplemented in KODI::WINDOWING::GBM::CWinSystemGbmEGLContext, KODI::WINDOWING::WAYLAND::CWinSystemWaylandEGLContext, KODI::WINDOWING::X11::CWinSystemX11GLContext, and KODI::WINDOWING::X11::CWinSystemX11GLESContext.
      
  | 
  inlinevirtual | 
Reimplemented in CWinSystemIOS, CWinSystemTVOS, CWinSystemWin10, KODI::WINDOWING::GBM::CWinSystemGbm, and KODI::WINDOWING::WAYLAND::CWinSystemWayland.
      
  | 
  inlinevirtual | 
Reimplemented in CWinSystemWin32.
      
  | 
  pure virtual | 
Implemented in CWinSystemAndroid, CWinSystemAndroidGLESContext, CWinSystemIOS, CWinSystemOSX, CWinSystemTVOS, CWinSystemWin10, CWinSystemWin10DX, CWinSystemWin32, CWinSystemWin32DX, KODI::WINDOWING::GBM::CWinSystemGbmEGLContext, KODI::WINDOWING::WAYLAND::CWinSystemWayland, KODI::WINDOWING::WAYLAND::CWinSystemWaylandEGLContext, KODI::WINDOWING::WAYLAND::CWinSystemWaylandWebOS, KODI::WINDOWING::X11::CWinSystemX11, KODI::WINDOWING::X11::CWinSystemX11GLContext, and KODI::WINDOWING::X11::CWinSystemX11GLESContext.
      
  | 
  static | 
| REFRESHRATE CWinSystemBase::DefaultRefreshRate | ( | const std::vector< REFRESHRATE > & | rates | ) | 
      
  | 
  inlinevirtual | 
Reimplemented in CWinSystemAndroid, CWinSystemIOS, CWinSystemOSX, CWinSystemTVOS, KODI::WINDOWING::GBM::CWinSystemGbmEGLContext, KODI::WINDOWING::WAYLAND::CWinSystemWayland, KODI::WINDOWING::WAYLAND::CWinSystemWaylandEGLContext, KODI::WINDOWING::X11::CWinSystemX11, KODI::WINDOWING::X11::CWinSystemX11GLContext, and KODI::WINDOWING::X11::CWinSystemX11GLESContext.
      
  | 
  virtual | 
Reimplemented in CWinSystemAndroid, CWinSystemIOS, CWinSystemOSX, CWinSystemTVOS, CWinSystemWin10, CWinSystemWin32, KODI::WINDOWING::GBM::CWinSystemGbm, KODI::WINDOWING::GBM::CWinSystemGbmEGLContext, KODI::WINDOWING::WAYLAND::CWinSystemWayland, KODI::WINDOWING::WAYLAND::CWinSystemWaylandEGLContext, KODI::WINDOWING::WAYLAND::CWinSystemWaylandWebOS, KODI::WINDOWING::X11::CWinSystemX11, KODI::WINDOWING::X11::CWinSystemX11GLContext, and KODI::WINDOWING::X11::CWinSystemX11GLESContext.
| void CWinSystemBase::DriveRenderLoop | ( | ) | 
      
  | 
  inlinevirtual | 
Reimplemented in KODI::WINDOWING::WAYLAND::CWinSystemWayland.
      
  | 
  inlinevirtual | 
Forces the window to fullscreen provided the window resolution.
| resInfo | - the resolution info | 
Reimplemented in CWinSystemWin10, and CWinSystemWin32.
      
  | 
  inlinevirtual | 
      
  | 
  virtual | 
Reimplemented in CWinSystemOSX, CWinSystemWin10, CWinSystemWin32, and KODI::WINDOWING::WAYLAND::CWinSystemWayland.
      
  | 
  inlinevirtual | 
      
  | 
  inlinevirtual | 
Gets debug info from video renderer for use in "Debug Info OSD" (Alt + O)
Reimplemented in CWinSystemWin10DX, and CWinSystemWin32DX.
      
  | 
  inlinevirtual | 
Reimplemented in CWinSystemAndroid, KODI::WINDOWING::GBM::CWinSystemGbm, and KODI::WINDOWING::WAYLAND::CWinSystemWayland.
      
  | 
  inlinevirtual | 
Get average display latency.
The latency should be measured as the time between finishing the rendering of a frame, i.e. calling PresentRender, and the rendered content becoming visible on the screen.
Reimplemented in KODI::WINDOWING::WAYLAND::CWinSystemWayland.
Get dither settings.
| std::shared_ptr< CDPMSSupport > CWinSystemBase::GetDPMSManager | ( | ) | 
      
  | 
  inlinevirtual | 
Get time that should be subtracted from the display latency for this frame in milliseconds.
Contrary to GetDisplayLatency, this value is calculated ad-hoc for the frame currently being rendered and not a value that is calculated/ averaged from past frames and their presentation times
Reimplemented in CWinSystemAndroidGLESContext, KODI::WINDOWING::WAYLAND::CWinSystemWayland, and KODI::WINDOWING::X11::CWinSystemX11GLContext.
      
  | 
  virtual | 
      
  | 
  inlinevirtual | 
Reimplemented in CWinSystemAndroid, CWinSystemWin10, CWinSystemWin32, and KODI::WINDOWING::WAYLAND::CWinSystemWaylandWebOS.
      
  | 
  inline | 
      
  | 
  inlinevirtual | 
Get OS specific hardware context.
Reimplemented in CWinSystemWin10DX, and CWinSystemWin32DX.
      
  | 
  inlinevirtual | 
      
  | 
  inlinevirtual | 
Reimplemented in CWinSystemWin10DX, and CWinSystemWin32DX.
| KODI::WINDOWING::COSScreenSaverManager * CWinSystemBase::GetOSScreenSaver | ( | ) | 
Get OS screen saver inhibit implementation if available.
      
  | 
  inlineprotectedvirtual | 
      
  | 
  inlinevirtual | 
Reimplemented in CWinSystemAndroidGLESContext, CWinSystemIOS, CWinSystemOSXGL, CWinSystemTVOS, CWinSystemWin10DX, CWinSystemWin32DX, KODI::WINDOWING::GBM::CWinSystemGbmGLContext, KODI::WINDOWING::GBM::CWinSystemGbmGLESContext, KODI::WINDOWING::WAYLAND::CWinSystemWaylandEGLContextGL, KODI::WINDOWING::WAYLAND::CWinSystemWaylandEGLContextGLES, KODI::WINDOWING::X11::CWinSystemX11GLContext, and KODI::WINDOWING::X11::CWinSystemX11GLESContext.
      
  | 
  inlinevirtual | 
Get the screen ID provided the screen name.
| screen | the name of the screen as presented on the application display settings | 
Reimplemented in CWinSystemOSX.
      
  | 
  inlinevirtual | 
      
  | 
  inline | 
      
  | 
  inlinevirtual | 
Reimplemented in KODI::WINDOWING::X11::CWinSystemX11.
      
  | 
  inlinevirtual | 
Checks if a graphics context is already bound to the current thread.
Reimplemented in KODI::WINDOWING::GBM::CWinSystemGbmEGLContext, KODI::WINDOWING::WAYLAND::CWinSystemWaylandEGLContext, KODI::WINDOWING::X11::CWinSystemX11GLContext, and KODI::WINDOWING::X11::CWinSystemX11GLESContext.
      
  | 
  inlinevirtual | 
      
  | 
  inlinevirtual | 
Reimplemented in CWinSystemWin10, and CWinSystemWin32.
      
  | 
  inlinevirtual | 
Reimplemented in CWinSystemWin10, and CWinSystemWin32.
      
  | 
  inlinevirtual | 
      
  | 
  virtual | 
Reimplemented in CWinSystemAndroid, CWinSystemAndroidGLESContext, CWinSystemIOS, CWinSystemOSX, CWinSystemTVOS, CWinSystemWin10, CWinSystemWin32, KODI::WINDOWING::GBM::CWinSystemGbm, KODI::WINDOWING::GBM::CWinSystemGbmGLContext, KODI::WINDOWING::GBM::CWinSystemGbmGLESContext, KODI::WINDOWING::WAYLAND::CWinSystemWayland, KODI::WINDOWING::WAYLAND::CWinSystemWaylandEGLContextGL, KODI::WINDOWING::WAYLAND::CWinSystemWaylandEGLContextGLES, KODI::WINDOWING::WAYLAND::CWinSystemWaylandWebOS, and KODI::WINDOWING::X11::CWinSystemX11.
      
  | 
  inlinevirtual | 
      
  | 
  inline | 
      
  | 
  inlinevirtual | 
| bool CWinSystemBase::IsHDRDisplaySettingEnabled | ( | ) | 
Return true when HDR display is available and enabled in settings.
| bool CWinSystemBase::IsHighPrecisionProcessingSettingEnabled | ( | ) | 
Return true when setting "High Precision Processing" is enabled.
| bool CWinSystemBase::IsVideoSuperResolutionSettingEnabled | ( | ) | 
Return true when "Video Super Resolution" is supported and enabled in settings.
      
  | 
  inlinevirtual | 
      
  | 
  inlinevirtual | 
Window was requested to move to the given screen.
| screenIdx | the screen index as known by the windowing system implementation | 
Reimplemented in CWinSystemOSX.
Reimplemented in CWinSystemIOS, CWinSystemTVOS, and KODI::WINDOWING::X11::CWinSystemX11.
Reimplemented in CWinSystemWin10, CWinSystemWin32, and KODI::WINDOWING::X11::CWinSystemX11.
Used to signal the windowing system about the change of the current screen.
| screenIdx | the screen index as known by the windowing system implementation | 
Reimplemented in CWinSystemOSX.
Reimplemented in CWinSystemOSX, CWinSystemWin10DX, and CWinSystemWin32DX.
| std::vector< REFRESHRATE > CWinSystemBase::RefreshRates | ( | int | width, | 
| int | height, | ||
| uint32_t | dwFlags ) | 
      
  | 
  pure virtual | 
| void CWinSystemBase::RegisterRenderLoop | ( | IRenderLoop * | client | ) | 
      
  | 
  pure virtual | 
Implemented in CWinSystemAndroidGLESContext, CWinSystemIOS, CWinSystemOSX, CWinSystemOSXGL, CWinSystemTVOS, CWinSystemWin10, CWinSystemWin10DX, CWinSystemWin32, CWinSystemWin32DX, KODI::WINDOWING::GBM::CWinSystemGbm, KODI::WINDOWING::WAYLAND::CWinSystemWayland, KODI::WINDOWING::X11::CWinSystemX11, KODI::WINDOWING::X11::CWinSystemX11GLContext, and KODI::WINDOWING::X11::CWinSystemX11GLESContext.
      
  | 
  inlinevirtual | 
Reimplemented in CWinSystemIOS, CWinSystemOSX, CWinSystemTVOS, CWinSystemWin10, CWinSystemWin32, and KODI::WINDOWING::X11::CWinSystemX11.
| std::vector< RESOLUTION_WHR > CWinSystemBase::ScreenResolutions | ( | float | refreshrate | ) | 
      
  | 
  inlinevirtual | 
      
  | 
  pure virtual | 
Implemented in CWinSystemAndroidGLESContext, CWinSystemIOS, CWinSystemOSX, CWinSystemOSXGL, CWinSystemTVOS, CWinSystemWin10, CWinSystemWin10DX, CWinSystemWin32, CWinSystemWin32DX, KODI::WINDOWING::GBM::CWinSystemGbm, KODI::WINDOWING::GBM::CWinSystemGbmGLContext, KODI::WINDOWING::GBM::CWinSystemGbmGLESContext, KODI::WINDOWING::WAYLAND::CWinSystemWayland, KODI::WINDOWING::X11::CWinSystemX11, KODI::WINDOWING::X11::CWinSystemX11GLContext, and KODI::WINDOWING::X11::CWinSystemX11GLESContext.
      
  | 
  inlinevirtual | 
Set the HDR metadata. Passing nullptr as the parameter should disable HDR.
Reimplemented in CWinSystemAndroidGLESContext, KODI::WINDOWING::GBM::CWinSystemGbm, and KODI::WINDOWING::WAYLAND::CWinSystemWayland.
      
  | 
  inlinevirtual | 
Check if the windowing system supports moving windows across screens.
      
  | 
  inlinevirtual | 
System supports Video Super Resolution HW upscaler i.e.: "NVIDIA RTX Video Super Resolution" or "Intel Video Super Resolution".
Reimplemented in CWinSystemWin32DX.
      
  | 
  inlinevirtual | 
Reimplemented in CWinSystemWin10DX, and CWinSystemWin32DX.
      
  | 
  inlinevirtual | 
Unbinds the shared context.
Reimplemented in KODI::WINDOWING::GBM::CWinSystemGbmEGLContext, KODI::WINDOWING::WAYLAND::CWinSystemWaylandEGLContext, KODI::WINDOWING::X11::CWinSystemX11GLContext, and KODI::WINDOWING::X11::CWinSystemX11GLESContext.
      
  | 
  pure virtual | 
| void CWinSystemBase::UnregisterRenderLoop | ( | IRenderLoop * | client | ) | 
      
  | 
  protected | 
      
  | 
  protected | 
      
  | 
  virtual | 
      
  | 
  virtual | 
      
  | 
  protected | 
      
  | 
  protected | 
      
  | 
  protected | 
      
  | 
  protected | 
      
  | 
  protected | 
      
  | 
  protected | 
      
  | 
  protected | 
      
  | 
  protected | 
      
  | 
  protected | 
      
  | 
  protected | 
      
  | 
  protected | 
      
  | 
  protected | 
      
  | 
  protected | 
      
  | 
  protected | 
      
  | 
  static |