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

#include <WinSystemOSX.h>

Inheritance diagram for CWinSystemOSX:
CWinSystemBase ITimerCallback CWinSystemOSXGL

Classes

struct  ScreenResolution
 

Public Member Functions

 CWinSystemOSX ()
 
 ~CWinSystemOSX () override
 
void OnTimeout () override
 
bool InitWindowSystem () override
 
bool DestroyWindowSystem () override
 
bool CreateNewWindow (const std::string &name, bool fullScreen, RESOLUTION_INFO &res) override
 
bool DestroyWindow () override
 
bool ResizeWindow (int newWidth, int newHeight, int newLeft, int newTop) override
 
bool SetFullScreen (bool fullScreen, RESOLUTION_INFO &res, bool blankOtherDisplays) override
 
void UpdateResolutions () override
 
bool Minimize () override
 
bool Restore () override
 
bool Hide () override
 
bool HasCursor () override
 
bool Show (bool raise=true) override
 
unsigned int GetScreenId (const std::string &screen) override
 Get the screen ID provided the screen name.
 
void MoveToScreen (unsigned int screenIdx) override
 Window was requested to move to the given screen.
 
void OnMove (int x, int y) override
 
void OnChangeScreen (unsigned int screenIdx) override
 Used to signal the windowing system about the change of the current screen.
 
bool HasValidResolution () const
 
std::string GetClipboardText () override
 
void Register (IDispResource *resource) override
 
void Unregister (IDispResource *resource) override
 
std::unique_ptr< CVideoSyncGetVideoSync (CVideoReferenceClock *clock) override
 
void WindowChangedScreen ()
 
void AnnounceOnLostDevice ()
 
void AnnounceOnResetDevice ()
 
void HandleOnResetDevice ()
 
void StartLostDeviceTimer ()
 
void StopLostDeviceTimer ()
 
int CheckDisplayChanging (uint32_t flags)
 
void SetFullscreenWillToggle (bool toggle)
 
bool GetFullscreenWillToggle ()
 
void SignalFullScreenStateChanged (bool fullscreenState)
 
CGLContextObj GetCGLContextObj ()
 
std::vector< std::string > GetConnectedOutputs () override
 
bool MessagePump () override
 
NSRect GetWindowDimensions ()
 
void enableInputEvents ()
 
void disableInputEvents ()
 
void signalMouseEntered ()
 
void signalMouseExited ()
 
void SendInputEvent (NSEvent *nsEvent)
 
- Public Member Functions inherited from CWinSystemBase
 CWinSystemBase ()
 
virtual ~CWinSystemBase ()
 
virtual CRenderSystemBaseGetRenderSystem ()
 
virtual const std::string GetName ()
 
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 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.
 
KODI::WINDOWING::COSScreenSaverManagerGetOSScreenSaver ()
 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.
 
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 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)
 
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.
 
- Public Member Functions inherited from ITimerCallback
virtual ~ITimerCallback ()=default
 

Protected Member Functions

std::unique_ptr< KODI::WINDOWING::IOSScreenSaverGetOSScreenSaverImpl () override
 
ScreenResolution GetScreenResolution (unsigned long screenIdx)
 
void EnableVSync (bool enable)
 
bool SwitchToVideoMode (RESOLUTION_INFO &res)
 
void FillInVideoModes ()
 
bool FlushBuffer ()
 
bool DestroyWindowInternal ()
 
- 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)
 

Protected Attributes

std::unique_ptr< CWinEventsOSXm_winEvents
 
std::string m_name
 
NSWindow * m_appWindow
 
OSXGLViewm_glView
 
unsigned long m_lastDisplayNr
 
double m_refreshRate
 
CCriticalSection m_resourceSection
 
std::vector< IDispResource * > m_resources
 
CTimer m_lostDeviceTimer
 
bool m_delayDispReset
 
XbmcThreads::EndTime m_dispResetTimer
 
bool m_fullscreenWillToggle
 
bool m_hasCursor {false}
 
std::optional< unsigned long > m_fullScreenMovingToScreen
 Set while moving the fullscreen window to another screen. Stores the target screen id.
 
CCriticalSection m_critSection
 
- 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

◆ CWinSystemOSX()

CWinSystemOSX::CWinSystemOSX ( )

◆ ~CWinSystemOSX()

CWinSystemOSX::~CWinSystemOSX ( )
overridedefault

Member Function Documentation

◆ AnnounceOnLostDevice()

void CWinSystemOSX::AnnounceOnLostDevice ( )

◆ AnnounceOnResetDevice()

void CWinSystemOSX::AnnounceOnResetDevice ( )

◆ CheckDisplayChanging()

int CWinSystemOSX::CheckDisplayChanging ( uint32_t flags)

◆ CreateNewWindow()

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

Implements CWinSystemBase.

◆ DestroyWindow()

bool CWinSystemOSX::DestroyWindow ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ DestroyWindowInternal()

bool CWinSystemOSX::DestroyWindowInternal ( )
protected

◆ DestroyWindowSystem()

bool CWinSystemOSX::DestroyWindowSystem ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ disableInputEvents()

void CWinSystemOSX::disableInputEvents ( )

◆ enableInputEvents()

void CWinSystemOSX::enableInputEvents ( )

◆ EnableVSync()

void CWinSystemOSX::EnableVSync ( bool enable)
protected

◆ FillInVideoModes()

void CWinSystemOSX::FillInVideoModes ( )
protected

◆ FlushBuffer()

bool CWinSystemOSX::FlushBuffer ( )
protected

◆ GetCGLContextObj()

CGLContextObj CWinSystemOSX::GetCGLContextObj ( )

◆ GetClipboardText()

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

Reimplemented from CWinSystemBase.

◆ GetConnectedOutputs()

std::vector< std::string > CWinSystemOSX::GetConnectedOutputs ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ GetFullscreenWillToggle()

bool CWinSystemOSX::GetFullscreenWillToggle ( )
inline

◆ GetOSScreenSaverImpl()

std::unique_ptr< IOSScreenSaver > CWinSystemOSX::GetOSScreenSaverImpl ( )
overrideprotectedvirtual

Reimplemented from CWinSystemBase.

◆ GetScreenId()

unsigned int CWinSystemOSX::GetScreenId ( const std::string & screen)
overridevirtual

Get the screen ID provided the screen name.

Parameters
screenthe name of the screen as presented on the application display settings
Returns
the screen index as known by the windowing system implementation (or the default screen by default)

Reimplemented from CWinSystemBase.

◆ GetScreenResolution()

CWinSystemOSX::ScreenResolution CWinSystemOSX::GetScreenResolution ( unsigned long screenIdx)
protected

◆ GetVideoSync()

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

Reimplemented from CWinSystemBase.

◆ GetWindowDimensions()

NSRect CWinSystemOSX::GetWindowDimensions ( )

◆ HandleOnResetDevice()

void CWinSystemOSX::HandleOnResetDevice ( )

◆ HasCursor()

bool CWinSystemOSX::HasCursor ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ HasValidResolution()

bool CWinSystemOSX::HasValidResolution ( ) const

◆ Hide()

bool CWinSystemOSX::Hide ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ InitWindowSystem()

bool CWinSystemOSX::InitWindowSystem ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ MessagePump()

bool CWinSystemOSX::MessagePump ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ Minimize()

bool CWinSystemOSX::Minimize ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ MoveToScreen()

void CWinSystemOSX::MoveToScreen ( unsigned int screenIdx)
overridevirtual

Window was requested to move to the given screen.

Parameters
screenIdxthe screen index as known by the windowing system implementation

Reimplemented from CWinSystemBase.

◆ OnChangeScreen()

void CWinSystemOSX::OnChangeScreen ( unsigned int screenIdx)
overridevirtual

Used to signal the windowing system about the change of the current screen.

Parameters
screenIdxthe screen index as known by the windowing system implementation

Reimplemented from CWinSystemBase.

◆ OnMove()

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

Reimplemented from CWinSystemBase.

◆ OnTimeout()

void CWinSystemOSX::OnTimeout ( )
overridevirtual

Implements ITimerCallback.

◆ Register()

void CWinSystemOSX::Register ( IDispResource * resource)
overridevirtual

Implements CWinSystemBase.

◆ ResizeWindow()

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

Implements CWinSystemBase.

Reimplemented in CWinSystemOSXGL.

◆ Restore()

bool CWinSystemOSX::Restore ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ SendInputEvent()

void CWinSystemOSX::SendInputEvent ( NSEvent * nsEvent)

◆ SetFullScreen()

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

Implements CWinSystemBase.

Reimplemented in CWinSystemOSXGL.

◆ SetFullscreenWillToggle()

void CWinSystemOSX::SetFullscreenWillToggle ( bool toggle)
inline

◆ Show()

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

Reimplemented from CWinSystemBase.

◆ SignalFullScreenStateChanged()

void CWinSystemOSX::SignalFullScreenStateChanged ( bool fullscreenState)

◆ signalMouseEntered()

void CWinSystemOSX::signalMouseEntered ( )

◆ signalMouseExited()

void CWinSystemOSX::signalMouseExited ( )

◆ StartLostDeviceTimer()

void CWinSystemOSX::StartLostDeviceTimer ( )

◆ StopLostDeviceTimer()

void CWinSystemOSX::StopLostDeviceTimer ( )

◆ SwitchToVideoMode()

bool CWinSystemOSX::SwitchToVideoMode ( RESOLUTION_INFO & res)
protected

◆ Unregister()

void CWinSystemOSX::Unregister ( IDispResource * resource)
overridevirtual

Implements CWinSystemBase.

◆ UpdateResolutions()

void CWinSystemOSX::UpdateResolutions ( )
overridevirtual

Reimplemented from CWinSystemBase.

◆ WindowChangedScreen()

void CWinSystemOSX::WindowChangedScreen ( )

Member Data Documentation

◆ m_appWindow

NSWindow* CWinSystemOSX::m_appWindow
protected

◆ m_critSection

CCriticalSection CWinSystemOSX::m_critSection
protected

◆ m_delayDispReset

bool CWinSystemOSX::m_delayDispReset
protected

◆ m_dispResetTimer

XbmcThreads::EndTime CWinSystemOSX::m_dispResetTimer
protected

◆ m_fullScreenMovingToScreen

std::optional<unsigned long> CWinSystemOSX::m_fullScreenMovingToScreen
protected

Set while moving the fullscreen window to another screen. Stores the target screen id.

◆ m_fullscreenWillToggle

bool CWinSystemOSX::m_fullscreenWillToggle
protected

◆ m_glView

OSXGLView* CWinSystemOSX::m_glView
protected

◆ m_hasCursor

bool CWinSystemOSX::m_hasCursor {false}
protected

◆ m_lastDisplayNr

unsigned long CWinSystemOSX::m_lastDisplayNr
protected

◆ m_lostDeviceTimer

CTimer CWinSystemOSX::m_lostDeviceTimer
protected

◆ m_name

std::string CWinSystemOSX::m_name
protected

◆ m_refreshRate

double CWinSystemOSX::m_refreshRate
protected

◆ m_resources

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

◆ m_resourceSection

CCriticalSection CWinSystemOSX::m_resourceSection
protected

◆ m_winEvents

std::unique_ptr<CWinEventsOSX> CWinSystemOSX::m_winEvents
protected

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