Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
CWinSystemWin32 Class Referenceabstract

#include <WinSystemWin32.h>

Inheritance diagram for CWinSystemWin32:
CWinSystemBase CWinSystemWin32DX

Public Types

typedef BOOL(WINAPIpGetGestureInfo) (HGESTUREINFO, PGESTUREINFO)
 
typedef BOOL(WINAPIpSetGestureConfig) (HWND, DWORD, UINT, PGESTURECONFIG, UINT)
 
typedef BOOL(WINAPIpCloseGestureInfoHandle) (HGESTUREINFO)
 
typedef BOOL(WINAPIpEnableNonClientDpiScaling) (HWND)
 

Public Member Functions

 CWinSystemWin32 ()
 
virtual ~CWinSystemWin32 ()
 
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 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
 
bool SetFullScreen (bool fullScreen, RESOLUTION_INFO &res, bool blankOtherDisplays) override
 
HWND GetHwnd () const
 
bool IsAlteringWindow () const
 
virtual bool DPIChanged (WORD dpi, RECT windowRect) 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 CRenderSystemBaseGetRenderSystem ()
 
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 ()
 
virtual void OnMove (int x, int y)
 
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 Attributes

pGetGestureInfo PtrGetGestureInfo
 
pSetGestureConfig PtrSetGestureConfig
 
pCloseGestureInfoHandle PtrCloseGestureInfoHandle
 
pEnableNonClientDpiScaling PtrEnableNonClientDpiScaling
 

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 OnScreenChange (HMONITOR monitor)=0
 
virtual void AdjustWindow (bool forceResize=false)
 
void CenterCursor () const
 
virtual void Register (IDispResource *resource)
 
virtual void Unregister (IDispResource *resource)
 
virtual bool ChangeResolution (const RESOLUTION_INFO &res, bool forceChange=false)
 
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 ()
 

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. More...
 
static void SetForegroundWindowInternal (HWND hWnd)
 

Protected Attributes

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
 

Additional Inherited Members

- Static Public Member Functions inherited from CWinSystemBase
static std::unique_ptr< CWinSystemBaseCreateWinSystem ()
 

Member Typedef Documentation

◆ pCloseGestureInfoHandle

typedef BOOL(WINAPI * CWinSystemWin32::pCloseGestureInfoHandle) (HGESTUREINFO)

◆ pEnableNonClientDpiScaling

typedef BOOL(WINAPI * CWinSystemWin32::pEnableNonClientDpiScaling) (HWND)

◆ pGetGestureInfo

typedef BOOL(WINAPI * CWinSystemWin32::pGetGestureInfo) (HGESTUREINFO, PGESTUREINFO)

◆ pSetGestureConfig

typedef BOOL(WINAPI * CWinSystemWin32::pSetGestureConfig) (HWND, DWORD, UINT, PGESTURECONFIG, UINT)

Constructor & Destructor Documentation

◆ CWinSystemWin32()

CWinSystemWin32::CWinSystemWin32 ( )

◆ ~CWinSystemWin32()

CWinSystemWin32::~CWinSystemWin32 ( )
virtual

Member Function Documentation

◆ AddResolution()

bool CWinSystemWin32::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 CWinSystemWin32::AdjustWindow ( bool  forceResize = false)
protectedvirtual

◆ BlankNonActiveMonitors()

bool CWinSystemWin32::BlankNonActiveMonitors ( bool  bBlank)
protectedvirtual

◆ CenterCursor()

void CWinSystemWin32::CenterCursor ( ) const
protected

◆ CenterWindow()

bool CWinSystemWin32::CenterWindow ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ ChangeResolution()

bool CWinSystemWin32::ChangeResolution ( const RESOLUTION_INFO res,
bool  forceChange = false 
)
protectedvirtual

Reimplemented in CWinSystemWin32DX.

◆ CreateBackBuffer()

virtual void CWinSystemWin32::CreateBackBuffer ( )
protectedpure virtual

Implemented in CWinSystemWin32DX.

◆ CreateBlankWindows()

bool CWinSystemWin32::CreateBlankWindows ( )
protectedvirtual

◆ CreateNewWindow()

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

Implements CWinSystemBase.

Implemented in CWinSystemWin32DX.

◆ DestroyWindowSystem()

bool CWinSystemWin32::DestroyWindowSystem ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ DPIChanged()

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

Reimplemented in CWinSystemWin32DX.

◆ FinishWindowResize()

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

Reimplemented from CWinSystemBase.

◆ GetClipboardText()

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

Reimplemented from CWinSystemBase.

◆ GetConnectedDisplays()

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

◆ GetConnectedOutputs()

void CWinSystemWin32::GetConnectedOutputs ( std::vector< std::string > *  outputs)

◆ GetDisplayDetails() [1/2]

MONITOR_DETAILS * CWinSystemWin32::GetDisplayDetails ( const std::string &  name)
protected

◆ GetDisplayDetails() [2/2]

MONITOR_DETAILS * CWinSystemWin32::GetDisplayDetails ( HMONITOR  handle)
protected

◆ GetHwnd()

HWND CWinSystemWin32::GetHwnd ( ) const
inline

◆ GetState()

WINDOW_STATE CWinSystemWin32::GetState ( bool  fullScreen) const
protected

◆ GetVideoSync()

std::unique_ptr< CVideoSync > CWinSystemWin32::GetVideoSync ( void clock)
overridevirtual

Reimplemented from CWinSystemBase.

◆ HasInertialGestures()

bool CWinSystemWin32::HasInertialGestures ( )
inlineoverridevirtual

Reimplemented from CWinSystemBase.

◆ Hide()

bool CWinSystemWin32::Hide ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ InitWindowSystem()

bool CWinSystemWin32::InitWindowSystem ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ IsAlteringWindow()

bool CWinSystemWin32::IsAlteringWindow ( ) const
inline

◆ IsInSizeMoveMode()

bool CWinSystemWin32::IsInSizeMoveMode ( ) const
inline

◆ IsMinimized()

bool CWinSystemWin32::IsMinimized ( ) const
inline

◆ IsStereoEnabled()

virtual bool CWinSystemWin32::IsStereoEnabled ( )
protectedpure virtual

Implemented in CWinSystemWin32DX.

◆ MessagePump()

bool CWinSystemWin32::MessagePump ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ Minimize()

bool CWinSystemWin32::Minimize ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ NotifyAppFocusChange()

void CWinSystemWin32::NotifyAppFocusChange ( bool  bGaining)
overridevirtual

Reimplemented from CWinSystemBase.

◆ OnDisplayBack()

void CWinSystemWin32::OnDisplayBack ( )
protected

◆ OnDisplayLost()

void CWinSystemWin32::OnDisplayLost ( )
protected

◆ OnDisplayReset()

void CWinSystemWin32::OnDisplayReset ( )
protected

◆ OnScreenChange()

virtual void CWinSystemWin32::OnScreenChange ( HMONITOR  monitor)
protectedpure virtual

Implemented in CWinSystemWin32DX.

◆ Register()

void CWinSystemWin32::Register ( IDispResource resource)
protectedvirtual

Implements CWinSystemBase.

Reimplemented in CWinSystemWin32DX.

◆ ReleaseBackBuffer()

virtual void CWinSystemWin32::ReleaseBackBuffer ( )
protectedpure virtual

Implemented in CWinSystemWin32DX.

◆ ResizeDeviceBuffers()

virtual void CWinSystemWin32::ResizeDeviceBuffers ( )
protectedpure virtual

Implemented in CWinSystemWin32DX.

◆ ResizeWindow()

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

Implements CWinSystemBase.

Reimplemented in CWinSystemWin32DX.

◆ ResolutionChanged()

void CWinSystemWin32::ResolutionChanged ( )
protected

◆ Restore()

bool CWinSystemWin32::Restore ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ RestoreDesktopResolution()

void CWinSystemWin32::RestoreDesktopResolution ( MONITOR_DETAILS details)
protected

◆ ScreenRect()

RECT CWinSystemWin32::ScreenRect ( HMONITOR  handle)
protected

◆ SetDeviceFullScreen()

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

Implemented in CWinSystemWin32DX.

◆ SetForegroundWindowInternal()

void CWinSystemWin32::SetForegroundWindowInternal ( HWND  hWnd)
staticprotected

◆ SetFullScreen()

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

Implements CWinSystemBase.

Reimplemented in CWinSystemWin32DX.

◆ SetMinimized()

void CWinSystemWin32::SetMinimized ( bool  minimized)
inline

◆ SetSizeMoveMode()

void CWinSystemWin32::SetSizeMoveMode ( bool  mode)
inline

◆ Show()

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

Reimplemented from CWinSystemBase.

◆ ShowOSMouse()

void CWinSystemWin32::ShowOSMouse ( bool  show)
overridevirtual

Reimplemented from CWinSystemBase.

◆ Unregister()

void CWinSystemWin32::Unregister ( IDispResource resource)
protectedvirtual

Implements CWinSystemBase.

Reimplemented in CWinSystemWin32DX.

◆ UpdateResolutions()

void CWinSystemWin32::UpdateResolutions ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ UpdateStates()

void CWinSystemWin32::UpdateStates ( bool  fullScreen)
protectedvirtual

◆ UseLimitedColor()

bool CWinSystemWin32::UseLimitedColor ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ WindowedMode()

bool CWinSystemWin32::WindowedMode ( ) const
inline

Member Data Documentation

◆ m_bFirstResChange

bool CWinSystemWin32::m_bFirstResChange = true
protected

◆ m_bMinimized

bool CWinSystemWin32::m_bMinimized
protected

◆ m_bSizeMoveEnabled

bool CWinSystemWin32::m_bSizeMoveEnabled = false
protected

◆ m_delayDispReset

bool CWinSystemWin32::m_delayDispReset
protected

◆ m_displays

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

◆ m_dispResetTimer

XbmcThreads::EndTime CWinSystemWin32::m_dispResetTimer
protected

◆ m_fullscreenState

WINDOW_FULLSCREEN_STATE CWinSystemWin32::m_fullscreenState
protected

◆ m_hBlankWindows

std::vector<HWND> CWinSystemWin32::m_hBlankWindows
protected

◆ m_hIcon

HICON CWinSystemWin32::m_hIcon
protected

◆ m_hInstance

HINSTANCE CWinSystemWin32::m_hInstance
protected

◆ m_hMonitor

HMONITOR CWinSystemWin32::m_hMonitor
protected

◆ m_hWnd

HWND CWinSystemWin32::m_hWnd
protected

◆ m_inFocus

bool CWinSystemWin32::m_inFocus
protected

◆ m_irss

std::unique_ptr<CIRServerSuite> CWinSystemWin32::m_irss
protected

◆ m_IsAlteringWindow

bool CWinSystemWin32::m_IsAlteringWindow
protected

◆ m_resources

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

◆ m_resourceSection

CCriticalSection CWinSystemWin32::m_resourceSection
protected

◆ m_state

WINDOW_STATE CWinSystemWin32::m_state
protected

◆ m_ValidWindowedPosition

bool CWinSystemWin32::m_ValidWindowedPosition
protected

◆ m_windowExStyle

DWORD CWinSystemWin32::m_windowExStyle
protected

◆ m_windowState

WINDOW_WINDOW_STATE CWinSystemWin32::m_windowState
protected

◆ m_windowStyle

DWORD CWinSystemWin32::m_windowStyle
protected

◆ PtrCloseGestureInfoHandle

pCloseGestureInfoHandle CWinSystemWin32::PtrCloseGestureInfoHandle

◆ PtrEnableNonClientDpiScaling

pEnableNonClientDpiScaling CWinSystemWin32::PtrEnableNonClientDpiScaling

◆ PtrGetGestureInfo

pGetGestureInfo CWinSystemWin32::PtrGetGestureInfo

◆ PtrSetGestureConfig

pSetGestureConfig CWinSystemWin32::PtrSetGestureConfig

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