Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CWinSystemWin10 Class Referenceabstract

#include <WinSystemWin10.h>

Inheritance diagram for CWinSystemWin10:
CWinSystemBase CWinSystemWin10DX

Public Member Functions

 CWinSystemWin10 ()
 
virtual ~CWinSystemWin10 ()
 
bool InitWindowSystem () override
 
bool DestroyWindowSystem () override
 
bool ResizeWindow (int newWidth, int newHeight, int newLeft, int newTop) override
 
void FinishWindowResize (int newWidth, int newHeight) override
 
void ForceFullScreen (const RESOLUTION_INFO &resInfo) override
 Forces the window to fullscreen provided the window resolution.
 
void UpdateResolutions () override
 
void NotifyAppFocusChange (bool bGaining) override
 
void ShowOSMouse (bool show) override
 
bool HasInertialGestures () override
 
bool Minimize () override
 
bool Restore () override
 
bool Hide () override
 
bool Show (bool raise=true) override
 
std::string GetClipboardText () override
 
bool UseLimitedColor () override
 
float GetGuiSdrPeakLuminance () const override
 Max luminance for GUI SDR content in HDR mode.
 
bool HasSystemSdrPeakLuminance () override
 Test support of the OS for a SDR max luminance in HDR mode setting.
 
std::unique_ptr< CVideoSyncGetVideoSync (CVideoReferenceClock *clock) override
 
bool WindowedMode () const
 
bool SetFullScreen (bool fullScreen, RESOLUTION_INFO &res, bool blankOtherDisplays) override
 
bool IsAlteringWindow () const
 
void SetAlteringWindow (bool altering)
 
bool IsTogglingHDR () const
 
void SetTogglingHDR (bool toggling)
 
virtual bool DPIChanged (WORD dpi, RECT windowRect) const
 
bool IsMinimized () const
 
void SetMinimized (bool minimized)
 
void CacheSystemSdrPeakLuminance ()
 Cache the system HDR/SDR balance for use during rendering, instead of querying the API for each frame.
 
bool CanDoWindowed () override
 
bool MessagePump () override
 
- Public Member Functions inherited from CWinSystemBase
 CWinSystemBase ()
 
virtual ~CWinSystemBase ()
 
virtual CRenderSystemBaseGetRenderSystem ()
 
virtual const std::string GetName ()
 
virtual bool DestroyWindow ()
 
virtual bool DisplayHardwareScalingEnabled ()
 
virtual void UpdateDisplayHardwareScaling (const RESOLUTION_INFO &resInfo)
 
virtual bool MoveWindow (int topLeft, int topRight)
 
virtual void FinishModeChange (RESOLUTION res)
 
virtual bool CenterWindow ()
 
virtual bool IsCreated ()
 
virtual void NotifyAppActiveChange (bool bActivated)
 
virtual bool HasCursor ()
 
virtual int NoOfBuffers ()
 
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 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::COSScreenSaverManagerGetOSScreenSaver ()
 Get OS screen saver inhibit implementation if available.
 
unsigned int GetWidth ()
 
unsigned int GetHeight ()
 
bool IsFullScreen ()
 
virtual bool SupportsScreenMove ()
 Check if the windowing system supports moving windows across screens.
 
void SetWindowResolution (int width, int height)
 
std::vector< RESOLUTION_WHRScreenResolutions (float refreshrate)
 
std::vector< REFRESHRATERefreshRates (int width, int height, uint32_t dwFlags)
 
REFRESHRATE DefaultRefreshRate (const std::vector< REFRESHRATE > &rates)
 
virtual bool HasCalibration (const RESOLUTION_INFO &resInfo)
 
void RegisterRenderLoop (IRenderLoop *client)
 
void UnregisterRenderLoop (IRenderLoop *client)
 
void DriveRenderLoop ()
 
virtual CGraphicContextGetGfxContext () const
 
virtual voidGetHWContext ()
 Get OS specific hardware context.
 
std::shared_ptr< CDPMSSupportGetDPMSManager ()
 
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 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, intGetDitherSettings ()
 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.
 

Protected Member Functions

bool CreateNewWindow (const std::string &name, bool fullScreen, RESOLUTION_INFO &res) override=0
 
virtual void UpdateStates (bool fullScreen)
 
WINDOW_STATE GetState (bool fullScreen) const
 
virtual void SetDeviceFullScreen (bool fullScreen, RESOLUTION_INFO &res)=0
 
virtual void ReleaseBackBuffer ()=0
 
virtual void CreateBackBuffer ()=0
 
virtual void ResizeDeviceBuffers ()=0
 
virtual bool IsStereoEnabled ()=0
 
virtual void AdjustWindow ()
 
virtual void Register (IDispResource *resource)
 
virtual void Unregister (IDispResource *resource)
 
bool ChangeResolution (const RESOLUTION_INFO &res, bool forceChange=false)
 
const MONITOR_DETAILSGetDefaultMonitor () const
 
void RestoreDesktopResolution ()
 
void GetConnectedDisplays (std::vector< MONITOR_DETAILS > &outputs)
 
void OnDisplayLost ()
 
void OnDisplayReset ()
 
void OnDisplayBack ()
 
void ResolutionChanged ()
 
- Protected Member Functions inherited from CWinSystemBase
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::IOSScreenSaverGetOSScreenSaverImpl ()
 

Static Protected Member Functions

static bool AddResolution (const RESOLUTION_INFO &res)
 Adds a resolution to the list of resolutions if we don't already have it.
 

Protected Attributes

std::vector< MONITOR_DETAILSm_displays
 
bool m_ValidWindowedPosition
 
bool m_IsAlteringWindow
 
CCriticalSection m_resourceSection
 
std::vector< IDispResource * > m_resources
 
bool m_delayDispReset
 
XbmcThreads::EndTime m_dispResetTimer
 
WINDOW_STATE m_state
 
WINDOW_FULLSCREEN_STATE m_fullscreenState
 
WINDOW_WINDOW_STATE m_windowState
 
bool m_inFocus
 
bool m_bMinimized
 
bool m_bFirstResChange = true
 
winrt::Windows::UI::Core::CoreWindow m_coreWindow = nullptr
 
bool m_validSystemSdrPeakLuminance {false}
 
float m_systemSdrPeakLuminance {.0f}
 
DWORD m_uiThreadId {0}
 
HDR_STATUS m_cachedHdrStatus {HDR_STATUS::HDR_UNSUPPORTED}
 
bool m_cachedHasSystemSdrPeakLum {false}
 
- Protected Attributes inherited from CWinSystemBase
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
 

Additional Inherited Members

- Static Public Member Functions inherited from CWinSystemBase
static std::unique_ptr< CWinSystemBaseCreateWinSystem ()
 
- Static Public Attributes inherited from CWinSystemBase
static const char * SETTING_WINSYSTEM_IS_HDR_DISPLAY = "winsystem.ishdrdisplay"
 

Constructor & Destructor Documentation

◆ CWinSystemWin10()

CWinSystemWin10::CWinSystemWin10 ( )

◆ ~CWinSystemWin10()

CWinSystemWin10::~CWinSystemWin10 ( )
virtual

Member Function Documentation

◆ AddResolution()

bool CWinSystemWin10::AddResolution ( const RESOLUTION_INFO & res)
staticprotected

Adds a resolution to the list of resolutions if we don't already have it.

Parameters
resresolution to add.

◆ AdjustWindow()

void CWinSystemWin10::AdjustWindow ( )
protectedvirtual

◆ CacheSystemSdrPeakLuminance()

void CWinSystemWin10::CacheSystemSdrPeakLuminance ( )

Cache the system HDR/SDR balance for use during rendering, instead of querying the API for each frame.

◆ CanDoWindowed()

bool CWinSystemWin10::CanDoWindowed ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ ChangeResolution()

bool CWinSystemWin10::ChangeResolution ( const RESOLUTION_INFO & res,
bool forceChange = false )
protected

◆ CreateBackBuffer()

virtual void CWinSystemWin10::CreateBackBuffer ( )
protectedpure virtual

Implemented in CWinSystemWin10DX.

◆ CreateNewWindow()

bool CWinSystemWin10::CreateNewWindow ( const std::string & name,
bool fullScreen,
RESOLUTION_INFO & res )
overrideprotectedpure virtual

Implements CWinSystemBase.

Implemented in CWinSystemWin10DX.

◆ DestroyWindowSystem()

bool CWinSystemWin10::DestroyWindowSystem ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ DPIChanged()

bool CWinSystemWin10::DPIChanged ( WORD dpi,
RECT windowRect ) const
virtual

Reimplemented in CWinSystemWin10DX.

◆ FinishWindowResize()

void CWinSystemWin10::FinishWindowResize ( int newWidth,
int newHeight )
overridevirtual

Reimplemented from CWinSystemBase.

◆ ForceFullScreen()

void CWinSystemWin10::ForceFullScreen ( const RESOLUTION_INFO & resInfo)
overridevirtual

Forces the window to fullscreen provided the window resolution.

Parameters
resInfo- the resolution info

Reimplemented from CWinSystemBase.

◆ GetClipboardText()

std::string CWinSystemWin10::GetClipboardText ( void )
overridevirtual

Reimplemented from CWinSystemBase.

◆ GetConnectedDisplays()

void CWinSystemWin10::GetConnectedDisplays ( std::vector< MONITOR_DETAILS > & outputs)
protected

◆ GetDefaultMonitor()

const MONITOR_DETAILS * CWinSystemWin10::GetDefaultMonitor ( ) const
protected

◆ GetGuiSdrPeakLuminance()

float CWinSystemWin10::GetGuiSdrPeakLuminance ( ) const
overridevirtual

Max luminance for GUI SDR content in HDR mode.

Returns
Max luminance in nits, lower than 10000.

Reimplemented from CWinSystemBase.

◆ GetState()

WINDOW_STATE CWinSystemWin10::GetState ( bool fullScreen) const
protected

◆ GetVideoSync()

std::unique_ptr< CVideoSync > CWinSystemWin10::GetVideoSync ( CVideoReferenceClock * clock)
overridevirtual

Reimplemented from CWinSystemBase.

◆ HasInertialGestures()

bool CWinSystemWin10::HasInertialGestures ( )
inlineoverridevirtual

Reimplemented from CWinSystemBase.

◆ HasSystemSdrPeakLuminance()

bool CWinSystemWin10::HasSystemSdrPeakLuminance ( )
overridevirtual

Test support of the OS for a SDR max luminance in HDR mode setting.

Returns
true when the OS supports that setting, false otherwise

Reimplemented from CWinSystemBase.

◆ Hide()

bool CWinSystemWin10::Hide ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ InitWindowSystem()

bool CWinSystemWin10::InitWindowSystem ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ IsAlteringWindow()

bool CWinSystemWin10::IsAlteringWindow ( ) const
inline

◆ IsMinimized()

bool CWinSystemWin10::IsMinimized ( ) const
inline

◆ IsStereoEnabled()

virtual bool CWinSystemWin10::IsStereoEnabled ( )
protectedpure virtual

Implemented in CWinSystemWin10DX.

◆ IsTogglingHDR()

bool CWinSystemWin10::IsTogglingHDR ( ) const
inline

◆ MessagePump()

bool CWinSystemWin10::MessagePump ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ Minimize()

bool CWinSystemWin10::Minimize ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ NotifyAppFocusChange()

void CWinSystemWin10::NotifyAppFocusChange ( bool bGaining)
overridevirtual

Reimplemented from CWinSystemBase.

◆ OnDisplayBack()

void CWinSystemWin10::OnDisplayBack ( )
protected

◆ OnDisplayLost()

void CWinSystemWin10::OnDisplayLost ( )
protected

◆ OnDisplayReset()

void CWinSystemWin10::OnDisplayReset ( )
protected

◆ Register()

void CWinSystemWin10::Register ( IDispResource * resource)
protectedvirtual

Implements CWinSystemBase.

Reimplemented in CWinSystemWin10DX.

◆ ReleaseBackBuffer()

virtual void CWinSystemWin10::ReleaseBackBuffer ( )
protectedpure virtual

Implemented in CWinSystemWin10DX.

◆ ResizeDeviceBuffers()

virtual void CWinSystemWin10::ResizeDeviceBuffers ( )
protectedpure virtual

Implemented in CWinSystemWin10DX.

◆ ResizeWindow()

bool CWinSystemWin10::ResizeWindow ( int newWidth,
int newHeight,
int newLeft,
int newTop )
overridevirtual

Implements CWinSystemBase.

Reimplemented in CWinSystemWin10DX.

◆ ResolutionChanged()

void CWinSystemWin10::ResolutionChanged ( )
protected

◆ Restore()

bool CWinSystemWin10::Restore ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ RestoreDesktopResolution()

void CWinSystemWin10::RestoreDesktopResolution ( )
protected

◆ SetAlteringWindow()

void CWinSystemWin10::SetAlteringWindow ( bool altering)
inline

◆ SetDeviceFullScreen()

virtual void CWinSystemWin10::SetDeviceFullScreen ( bool fullScreen,
RESOLUTION_INFO & res )
protectedpure virtual

Implemented in CWinSystemWin10DX.

◆ SetFullScreen()

bool CWinSystemWin10::SetFullScreen ( bool fullScreen,
RESOLUTION_INFO & res,
bool blankOtherDisplays )
overridevirtual

Implements CWinSystemBase.

Reimplemented in CWinSystemWin10DX.

◆ SetMinimized()

void CWinSystemWin10::SetMinimized ( bool minimized)
inline

◆ SetTogglingHDR()

void CWinSystemWin10::SetTogglingHDR ( bool toggling)
inline

◆ Show()

bool CWinSystemWin10::Show ( bool raise = true)
overridevirtual

Reimplemented from CWinSystemBase.

◆ ShowOSMouse()

void CWinSystemWin10::ShowOSMouse ( bool show)
overridevirtual

Reimplemented from CWinSystemBase.

◆ Unregister()

void CWinSystemWin10::Unregister ( IDispResource * resource)
protectedvirtual

Implements CWinSystemBase.

Reimplemented in CWinSystemWin10DX.

◆ UpdateResolutions()

void CWinSystemWin10::UpdateResolutions ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ UpdateStates()

void CWinSystemWin10::UpdateStates ( bool fullScreen)
protectedvirtual

◆ UseLimitedColor()

bool CWinSystemWin10::UseLimitedColor ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ WindowedMode()

bool CWinSystemWin10::WindowedMode ( ) const
inline

Member Data Documentation

◆ m_bFirstResChange

bool CWinSystemWin10::m_bFirstResChange = true
protected

◆ m_bMinimized

bool CWinSystemWin10::m_bMinimized
protected

◆ m_cachedHasSystemSdrPeakLum

bool CWinSystemWin10::m_cachedHasSystemSdrPeakLum {false}
protected

◆ m_cachedHdrStatus

HDR_STATUS CWinSystemWin10::m_cachedHdrStatus {HDR_STATUS::HDR_UNSUPPORTED}
protected

◆ m_coreWindow

winrt::Windows::UI::Core::CoreWindow CWinSystemWin10::m_coreWindow = nullptr
protected

◆ m_delayDispReset

bool CWinSystemWin10::m_delayDispReset
protected

◆ m_displays

std::vector<MONITOR_DETAILS> CWinSystemWin10::m_displays
protected

◆ m_dispResetTimer

XbmcThreads::EndTime CWinSystemWin10::m_dispResetTimer
protected

◆ m_fullscreenState

WINDOW_FULLSCREEN_STATE CWinSystemWin10::m_fullscreenState
protected

◆ m_inFocus

bool CWinSystemWin10::m_inFocus
protected

◆ m_IsAlteringWindow

bool CWinSystemWin10::m_IsAlteringWindow
protected

◆ m_resources

std::vector<IDispResource*> CWinSystemWin10::m_resources
protected

◆ m_resourceSection

CCriticalSection CWinSystemWin10::m_resourceSection
protected

◆ m_state

WINDOW_STATE CWinSystemWin10::m_state
protected

◆ m_systemSdrPeakLuminance

float CWinSystemWin10::m_systemSdrPeakLuminance {.0f}
protected

◆ m_uiThreadId

DWORD CWinSystemWin10::m_uiThreadId {0}
protected

◆ m_validSystemSdrPeakLuminance

bool CWinSystemWin10::m_validSystemSdrPeakLuminance {false}
protected

◆ m_ValidWindowedPosition

bool CWinSystemWin10::m_ValidWindowedPosition
protected

◆ m_windowState

WINDOW_WINDOW_STATE CWinSystemWin10::m_windowState
protected

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