Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
CWinSystemWin32DX Class Reference

#include <WinSystemWin32DX.h>

Inheritance diagram for CWinSystemWin32DX:
CWinSystemWin32 CRenderSystemDX CWinSystemBase CRenderSystemBase

Public Member Functions

 CWinSystemWin32DX ()
 
 ~CWinSystemWin32DX ()
 
CRenderSystemBaseGetRenderSystem () override
 
bool CreateNewWindow (const std::string &name, bool fullScreen, RESOLUTION_INFO &res) override
 
bool ResizeWindow (int newWidth, int newHeight, int newLeft, int newTop) override
 
bool SetFullScreen (bool fullScreen, RESOLUTION_INFO &res, bool blankOtherDisplays) override
 
void PresentRenderImpl (bool rendered) override
 
bool DPIChanged (WORD dpi, RECT windowRect) const override
 
void SetWindow (HWND hWnd) const
 
bool DestroyRenderSystem () override
 
void UninitHooks ()
 
void InitHooks (IDXGIOutput *pOutput)
 
void OnMove (int x, int y) override
 
void OnResize (int width, int height)
 
void Register (ID3DResource *resource) const
 Register as a dependent of the DirectX Render System Resources should call this on construction if they're dependent on the Render System for survival. Any resources that registers will get callbacks on loss and reset of device. In addition, callbacks for destruction and creation of the device are also called, where any resources dependent on the DirectX device should be destroyed and recreated. More...
 
void Unregister (ID3DResource *resource) const
 Unregister as a dependent of the DirectX Render System Resources should call this on destruction if they're a dependent on the Render System. More...
 
void Register (IDispResource *resource) override
 
void Unregister (IDispResource *resource) override
 
void FixRefreshRateIfNecessary (const D3D10DDIARG_CREATERESOURCE *pResource) const
 
- Public Member Functions inherited from CWinSystemWin32
 CWinSystemWin32 ()
 
virtual ~CWinSystemWin32 ()
 
bool InitWindowSystem () override
 
bool DestroyWindowSystem () override
 
void FinishWindowResize (int newWidth, int newHeight) override
 
void UpdateResolutions () override
 
bool CenterWindow () override
 
virtual 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
 
std::unique_ptr< CVideoSyncGetVideoSync (void *clock) override
 
bool WindowedMode () const
 
HWND GetHwnd () const
 
bool IsAlteringWindow () const
 
bool IsMinimized () const
 
void SetMinimized (bool minimized)
 
void GetConnectedOutputs (std::vector< std::string > *outputs)
 
void SetSizeMoveMode (bool mode)
 
bool IsInSizeMoveMode () const
 
bool MessagePump () override
 
- Public Member Functions inherited from CWinSystemBase
 CWinSystemBase ()
 
virtual ~CWinSystemBase ()
 
virtual bool DestroyWindow ()
 
virtual bool MoveWindow (int topLeft, int topRight)
 
virtual void FinishModeChange (RESOLUTION res)
 
virtual bool IsCreated ()
 
virtual void NotifyAppActiveChange (bool bActivated)
 
virtual bool HasCursor ()
 
virtual int NoOfBuffers ()
 
virtual float GetDisplayLatency ()
 
virtual float GetFrameLatencyAdjustment ()
 
KODI::WINDOWING::COSScreenSaverManagerGetOSScreenSaver ()
 
unsigned int GetWidth ()
 
unsigned int GetHeight ()
 
virtual bool CanDoWindowed ()
 
bool IsFullScreen ()
 
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)
 
void RegisterRenderLoop (IRenderLoop *client)
 
void UnregisterRenderLoop (IRenderLoop *client)
 
void DriveRenderLoop ()
 
CGraphicContextGetGfxContext ()
 
- Public Member Functions inherited from CRenderSystemDX
 CRenderSystemDX ()
 
virtual ~CRenderSystemDX ()
 
bool InitRenderSystem () override
 
bool BeginRender () override
 
bool EndRender () override
 
void PresentRender (bool rendered, bool videoLayer) override
 
bool ClearBuffers (UTILS::Color color) override
 
void SetViewPort (const CRect &viewPort) override
 
void GetViewPort (CRect &viewPort) override
 
void RestoreViewPort () override
 
CRect ClipRectToScissorRect (const CRect &rect) override
 
bool ScissorsCanEffectClipping () override
 
void SetScissors (const CRect &rect) override
 
void ResetScissors () override
 
void CaptureStateBlock () override
 
void ApplyStateBlock () override
 
void SetCameraPosition (const CPoint &camera, int screenWidth, int screenHeight, float stereoFactor=0.f) override
 
void SetStereoMode (RENDER_STEREO_MODE mode, RENDER_STEREO_VIEW view) override
 
bool SupportsStereo (RENDER_STEREO_MODE mode) const override
 
void Project (float &x, float &y, float &z) override
 
bool SupportsNPOT (bool dxt) const override
 
void OnDXDeviceLost () override
 
void OnDXDeviceRestored () override
 
CGUIShaderDXGetGUIShader () const
 
bool Interlaced () const
 
bool IsFormatSupport (DXGI_FORMAT format, unsigned int usage) const
 
CRect GetBackBufferRect ()
 
CD3DTextureGetBackBuffer ()
 
void FlushGPU () const
 
void RequestDecodingTime ()
 
void ReleaseDecodingTime ()
 
void SetAlphaBlendEnable (bool enable)
 
bool IsExtSupported (const char *extension) const override
 
bool ResetRenderSystem (int width, int height) override
 
- Public Member Functions inherited from CRenderSystemBase
 CRenderSystemBase ()
 
virtual ~CRenderSystemBase ()
 
virtual std::string GetShaderPath (const std::string &filename)
 
void GetRenderVersion (unsigned int &major, unsigned int &minor) const
 
const std::string & GetRenderVendor () const
 
const std::string & GetRenderRenderer () const
 
const std::string & GetRenderVersionString () const
 
unsigned int GetMaxTextureSize () const
 
unsigned int GetMinDXTPitch () const
 
virtual void ShowSplash (const std::string &message)
 

Protected Member Functions

void SetDeviceFullScreen (bool fullScreen, RESOLUTION_INFO &res) override
 
void ReleaseBackBuffer () override
 
void CreateBackBuffer () override
 
void ResizeDeviceBuffers () override
 
bool IsStereoEnabled () override
 
void OnScreenChange (HMONITOR monitor) override
 
bool ChangeResolution (const RESOLUTION_INFO &res, bool forceChange=false) override
 
- Protected Member Functions inherited from CWinSystemWin32
virtual void UpdateStates (bool fullScreen)
 
WINDOW_STATE GetState (bool fullScreen) const
 
virtual void AdjustWindow (bool forceResize=false)
 
void CenterCursor () const
 
virtual bool CreateBlankWindows ()
 
virtual bool BlankNonActiveMonitors (bool bBlank)
 
MONITOR_DETAILSGetDisplayDetails (const std::string &name)
 
MONITOR_DETAILSGetDisplayDetails (HMONITOR handle)
 
void RestoreDesktopResolution (MONITOR_DETAILS *details)
 
RECT ScreenRect (HMONITOR handle)
 
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)
 
virtual std::unique_ptr< KODI::WINDOWING::IOSScreenSaverGetOSScreenSaverImpl ()
 
- Protected Member Functions inherited from CRenderSystemDX
bool CreateStates ()
 
bool InitGUIShader ()
 
void OnResize ()
 
void CheckInterlacedStereoView (void)
 
void CheckDeviceCaps ()
 

Protected Attributes

HMODULE m_hDriverModule
 
TRACED_HOOK_HANDLE m_hHook
 
- Protected Attributes inherited from CWinSystemWin32
HWND m_hWnd
 
HMONITOR m_hMonitor
 
std::vector< HWND > m_hBlankWindows
 
HINSTANCE m_hInstance
 
HICON m_hIcon
 
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
 
DWORD m_windowStyle
 
DWORD m_windowExStyle
 
bool m_inFocus
 
bool m_bMinimized
 
bool m_bSizeMoveEnabled = false
 
bool m_bFirstResChange = true
 
std::unique_ptr< CIRServerSuitem_irss
 
std::vector< MONITOR_DETAILSm_displays
 
- 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
 
- Protected Attributes inherited from CRenderSystemDX
CCriticalSection m_resourceSection
 
CCriticalSection m_decoderSection
 
bool m_interlaced
 
bool m_inScene { false }
 True if we're in a BeginScene()/EndScene() block. More...
 
bool m_BlendEnabled { false }
 
bool m_ScissorsEnabled { false }
 
D3D11_VIEWPORT m_viewPort
 
CRect m_scissor
 
CGUIShaderDXm_pGUIShader { nullptr }
 
Microsoft::WRL::ComPtr< ID3D11DepthStencilState > m_depthStencilState
 
Microsoft::WRL::ComPtr< ID3D11BlendState > m_BlendEnableState
 
Microsoft::WRL::ComPtr< ID3D11BlendState > m_BlendDisableState
 
Microsoft::WRL::ComPtr< ID3D11RasterizerState > m_RSScissorDisable
 
Microsoft::WRL::ComPtr< ID3D11RasterizerState > m_RSScissorEnable
 
CD3DTexture m_rightEyeTex
 
XbmcThreads::EndTime m_decodingTimer
 
XbmcThreads::ConditionVariable m_decodingEvent
 
std::shared_ptr< DX::DeviceResourcesm_deviceResources
 
- Protected Attributes inherited from CRenderSystemBase
bool m_bRenderCreated
 
bool m_bVSync
 
unsigned int m_maxTextureSize
 
unsigned int m_minDXTPitch
 
std::string m_RenderRenderer
 
std::string m_RenderVendor
 
std::string m_RenderVersion
 
int m_RenderVersionMinor
 
int m_RenderVersionMajor
 
RENDER_STEREO_VIEW m_stereoView = RENDER_STEREO_VIEW_OFF
 
RENDER_STEREO_MODE m_stereoMode = RENDER_STEREO_MODE_OFF
 
bool m_limitedColorRange = false
 
std::unique_ptr< CGUIImagem_splashImage
 
std::unique_ptr< CGUITextLayoutm_splashMessageLayout
 

Additional Inherited Members

- Public Types inherited from CWinSystemWin32
typedef BOOL(WINAPIpGetGestureInfo) (HGESTUREINFO, PGESTUREINFO)
 
typedef BOOL(WINAPIpSetGestureConfig) (HWND, DWORD, UINT, PGESTURECONFIG, UINT)
 
typedef BOOL(WINAPIpCloseGestureInfoHandle) (HGESTUREINFO)
 
typedef BOOL(WINAPIpEnableNonClientDpiScaling) (HWND)
 
- Static Public Member Functions inherited from CWinSystemBase
static std::unique_ptr< CWinSystemBaseCreateWinSystem ()
 
- Public Attributes inherited from CWinSystemWin32
pGetGestureInfo PtrGetGestureInfo
 
pSetGestureConfig PtrSetGestureConfig
 
pCloseGestureInfoHandle PtrCloseGestureInfoHandle
 
pEnableNonClientDpiScaling PtrEnableNonClientDpiScaling
 
- Public Attributes inherited from CRenderSystemDX
std::vector< AVPixelFormat > m_processorFormats
 
std::vector< AVPixelFormat > m_sharedFormats
 
std::vector< AVPixelFormat > m_shaderFormats
 
- Static Protected Member Functions inherited from CWinSystemWin32
static bool AddResolution (const RESOLUTION_INFO &res)
 Adds a resolution to the list of resolutions if we don't already have it. More...
 
static void SetForegroundWindowInternal (HWND hWnd)
 

Constructor & Destructor Documentation

◆ CWinSystemWin32DX()

CWinSystemWin32DX::CWinSystemWin32DX ( )

◆ ~CWinSystemWin32DX()

CWinSystemWin32DX::~CWinSystemWin32DX ( )

Member Function Documentation

◆ ChangeResolution()

bool CWinSystemWin32DX::ChangeResolution ( const RESOLUTION_INFO res,
bool  forceChange = false 
)
overrideprotectedvirtual

Reimplemented from CWinSystemWin32.

◆ CreateBackBuffer()

void CWinSystemWin32DX::CreateBackBuffer ( )
overrideprotectedvirtual

Implements CWinSystemWin32.

◆ CreateNewWindow()

bool CWinSystemWin32DX::CreateNewWindow ( const std::string &  name,
bool  fullScreen,
RESOLUTION_INFO res 
)
overridevirtual

Implements CWinSystemWin32.

◆ DestroyRenderSystem()

bool CWinSystemWin32DX::DestroyRenderSystem ( )
overridevirtual

Reimplemented from CRenderSystemDX.

◆ DPIChanged()

bool CWinSystemWin32DX::DPIChanged ( WORD  dpi,
RECT  windowRect 
) const
overridevirtual

Reimplemented from CWinSystemWin32.

◆ FixRefreshRateIfNecessary()

void CWinSystemWin32DX::FixRefreshRateIfNecessary ( const D3D10DDIARG_CREATERESOURCE *  pResource) const

◆ GetRenderSystem()

CRenderSystemBase * CWinSystemWin32DX::GetRenderSystem ( )
inlineoverridevirtual

Reimplemented from CWinSystemBase.

◆ InitHooks()

void CWinSystemWin32DX::InitHooks ( IDXGIOutput *  pOutput)

◆ IsStereoEnabled()

bool CWinSystemWin32DX::IsStereoEnabled ( )
overrideprotectedvirtual

Implements CWinSystemWin32.

◆ OnMove()

void CWinSystemWin32DX::OnMove ( int  x,
int  y 
)
overridevirtual

Reimplemented from CWinSystemBase.

◆ OnResize()

void CWinSystemWin32DX::OnResize ( int  width,
int  height 
)

◆ OnScreenChange()

void CWinSystemWin32DX::OnScreenChange ( HMONITOR  monitor)
overrideprotectedvirtual

Implements CWinSystemWin32.

◆ PresentRenderImpl()

void CWinSystemWin32DX::PresentRenderImpl ( bool  rendered)
overridevirtual

Implements CRenderSystemDX.

◆ Register() [1/2]

void CWinSystemWin32DX::Register ( ID3DResource resource) const
inline

Register as a dependent of the DirectX Render System Resources should call this on construction if they're dependent on the Render System for survival. Any resources that registers will get callbacks on loss and reset of device. In addition, callbacks for destruction and creation of the device are also called, where any resources dependent on the DirectX device should be destroyed and recreated.

See also
Unregister, ID3DResource

◆ Register() [2/2]

void CWinSystemWin32DX::Register ( IDispResource resource)
inlineoverridevirtual

Reimplemented from CWinSystemWin32.

◆ ReleaseBackBuffer()

void CWinSystemWin32DX::ReleaseBackBuffer ( )
overrideprotectedvirtual

Implements CWinSystemWin32.

◆ ResizeDeviceBuffers()

void CWinSystemWin32DX::ResizeDeviceBuffers ( )
overrideprotectedvirtual

Implements CWinSystemWin32.

◆ ResizeWindow()

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

Reimplemented from CWinSystemWin32.

◆ SetDeviceFullScreen()

void CWinSystemWin32DX::SetDeviceFullScreen ( bool  fullScreen,
RESOLUTION_INFO res 
)
overrideprotectedvirtual

Implements CWinSystemWin32.

◆ SetFullScreen()

bool CWinSystemWin32DX::SetFullScreen ( bool  fullScreen,
RESOLUTION_INFO res,
bool  blankOtherDisplays 
)
overridevirtual

Reimplemented from CWinSystemWin32.

◆ SetWindow()

void CWinSystemWin32DX::SetWindow ( HWND  hWnd) const

◆ UninitHooks()

void CWinSystemWin32DX::UninitHooks ( )

◆ Unregister() [1/2]

void CWinSystemWin32DX::Unregister ( ID3DResource resource) const
inline

Unregister as a dependent of the DirectX Render System Resources should call this on destruction if they're a dependent on the Render System.

See also
Register, ID3DResource

◆ Unregister() [2/2]

void CWinSystemWin32DX::Unregister ( IDispResource resource)
inlineoverridevirtual

Reimplemented from CWinSystemWin32.

Member Data Documentation

◆ m_hDriverModule

HMODULE CWinSystemWin32DX::m_hDriverModule
protected

◆ m_hHook

TRACED_HOOK_HANDLE CWinSystemWin32DX::m_hHook
protected

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