xbmc
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
CWinSystemBase Class Referenceabstract
Inheritance diagram for CWinSystemBase:
Inheritance graph
[legend]
Collaboration diagram for CWinSystemBase:
Collaboration graph
[legend]

Public Member Functions

virtual CRenderSystemBaseGetRenderSystem ()
 
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 bool DisplayHardwareScalingEnabled ()
 
virtual void UpdateDisplayHardwareScaling (const RESOLUTION_INFO &resInfo)
 
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 float GetDisplayLatency ()
 Get average display latency. More...
 
virtual float GetFrameLatencyAdjustment ()
 Get time that should be subtracted from the display latency for this frame in milliseconds. More...
 
virtual bool Minimize ()
 
virtual bool Restore ()
 
virtual bool Hide ()
 
virtual bool Show (bool raise=true)
 
virtual std::unique_ptr< CVideoSyncGetVideoSync (void *clock)
 
virtual void OnMove (int x, int y)
 
KODI::WINDOWING::COSScreenSaverManagerGetOSScreenSaver ()
 Get OS screen saver inhibit implementation if available. More...
 
unsigned int GetWidth ()
 
unsigned int GetHeight ()
 
virtual bool CanDoWindowed ()
 
bool IsFullScreen ()
 
virtual void UpdateResolutions ()
 
void SetWindowResolution (int width, int height)
 
std::vector< RESOLUTION_WHRScreenResolutions (float refreshrate)
 
std::vector< REFRESHRATERefreshRates (int width, int height, uint32_t dwFlags)
 
REFRESHRATE DefaultRefreshRate (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 ()
 
CGraphicContextGetGfxContext ()
 
virtual void * GetHWContext ()
 Get OS specific hardware context. More...
 
std::shared_ptr< CDPMSSupportGetDPMSManager ()
 
virtual bool SetHDR (const VideoPicture *videoPicture)
 Set the HDR metadata. More...
 
virtual bool IsHDRDisplay ()
 
virtual HDR_STATUS ToggleHDR ()
 
virtual HDR_STATUS GetOSHDRStatus ()
 
virtual CHDRCapabilities GetDisplayHDRCapabilities () const
 
virtual DEBUG_INFO_RENDER GetDebugInfo ()
 
virtual std::vector< std::string > GetConnectedOutputs ()
 

Static Public Member Functions

static std::unique_ptr< CWinSystemBaseCreateWinSystem ()
 

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)
 
virtual std::unique_ptr< KODI::WINDOWING::IOSScreenSaverGetOSScreenSaverImpl ()
 

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::COSScreenSaverManagerm_screenSaverManager
 
CCriticalSection m_renderLoopSection
 
std::vector< IRenderLoop * > m_renderLoopClients
 
std::unique_ptr< IWinEventsm_winEvents
 
std::unique_ptr< CGraphicContextm_gfxContext
 
std::shared_ptr< CDPMSSupportm_dpms
 

Member Function Documentation

◆ GetDisplayLatency()

virtual float CWinSystemBase::GetDisplayLatency ( )
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.

Returns
average display latency in seconds, or negative value if unknown

Reimplemented in KODI::WINDOWING::WAYLAND::CWinSystemWayland.

◆ GetFrameLatencyAdjustment()

virtual float CWinSystemBase::GetFrameLatencyAdjustment ( )
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 KODI::WINDOWING::WAYLAND::CWinSystemWayland, KODI::WINDOWING::X11::CWinSystemX11GLContext, and CWinSystemAndroidGLESContext.

◆ GetHWContext()

virtual void* CWinSystemBase::GetHWContext ( )
inlinevirtual

Get OS specific hardware context.

Returns
OS specific context or nullptr if OS not have
Note
This function is currently only related to Windows with DirectX, all other OS where use GL returns nullptr. Returned Windows class pointer is ID3D11DeviceContext1.

Reimplemented in CWinSystemWin32DX, and CWinSystemWin10DX.

◆ GetOSScreenSaver()

KODI::WINDOWING::COSScreenSaverManager * CWinSystemBase::GetOSScreenSaver ( )

Get OS screen saver inhibit implementation if available.

Returns
OS screen saver implementation that can be used with this windowing system or nullptr if unsupported. Lifetime of the returned object will usually end with DestroyWindowSystem, so do not use any more after calling that.

◆ SetHDR()

virtual bool CWinSystemBase::SetHDR ( const VideoPicture videoPicture)
inlinevirtual

Set the HDR metadata.

Passing nullptr as the parameter should disable HDR.

Reimplemented in KODI::WINDOWING::GBM::CWinSystemGbm, and CWinSystemAndroidGLESContext.


The documentation for this class was generated from the following files: