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

Class handling application support for screensavers, dpms and shutdown timers. More...

#include <ApplicationPowerHandling.h>

Inheritance diagram for CApplicationPowerHandling:
IApplicationComponent

Public Member Functions

bool IsInScreenSaver () const
 
bool IsScreenSaverInhibited () const
 
void ResetScreenSaver ()
 
void SetScreenSaverLockFailed ()
 
void SetScreenSaverUnlocked ()
 
void StopScreenSaverTimer ()
 
const std::string & ScreensaverIdInUse () const
 
bool GetRenderGUI () const
 
void SetRenderGUI (bool renderGUI)
 
int GlobalIdleTime ()
 
void ResetSystemIdleTimer ()
 
bool IsIdleShutdownInhibited () const
 
void ResetShutdownTimers ()
 
void StopShutdownTimer ()
 
void ResetNavigationTimer ()
 
bool IsDPMSActive () const
 
bool ToggleDPMS (bool manual)
 
bool WakeUpScreenSaverAndDPMS (bool bPowerOffKeyPressed=false)
 
bool OnSettingChanged (const CSetting &setting)
 
bool OnSettingAction (const CSetting &setting)
 
- Public Member Functions inherited from IApplicationComponent
virtual ~IApplicationComponent ()=default
 

Protected Member Functions

void ActivateScreenSaver (bool forceType=false)
 
void CheckOSScreenSaverInhibitionSetting ()
 
void CheckScreenSaverAndDPMS ()
 
void InhibitScreenSaver (bool inhibit)
 
void ResetScreenSaverTimer ()
 
bool WakeUpScreenSaver (bool bPowerOffKeyPressed=false)
 
void InhibitIdleShutdown (bool inhibit)
 
void HandleShutdownMessage ()
 Helper method to determine how to handle TMSG_SHUTDOWN.
 
void CheckShutdown ()
 
float NavigationIdleTime ()
 

Protected Attributes

bool m_renderGUI {false}
 
bool m_bInhibitScreenSaver = false
 
bool m_bResetScreenSaver = false
 
ADDON::AddonPtr m_pythonScreenSaver
 
bool m_screensaverActive = false
 
int m_iScreenSaveLock = 0
 
std::string m_screensaverIdInUse
 
bool m_dpmsIsActive = false
 
bool m_dpmsIsManual = false
 
bool m_bInhibitIdleShutdown = false
 
CStopWatch m_navigationTimer
 
CStopWatch m_shutdownTimer
 
CStopWatch m_idleTimer
 
CStopWatch m_screenSaverTimer
 
KODI::WINDOWING::COSScreenSaverInhibitor m_globalScreensaverInhibitor
 
KODI::WINDOWING::COSScreenSaverInhibitor m_screensaverInhibitor
 

Friends

class CApplication
 

Detailed Description

Class handling application support for screensavers, dpms and shutdown timers.

Member Function Documentation

◆ ActivateScreenSaver()

void CApplicationPowerHandling::ActivateScreenSaver ( bool forceType = false)
protected

◆ CheckOSScreenSaverInhibitionSetting()

void CApplicationPowerHandling::CheckOSScreenSaverInhibitionSetting ( )
protected

◆ CheckScreenSaverAndDPMS()

void CApplicationPowerHandling::CheckScreenSaverAndDPMS ( )
protected

◆ CheckShutdown()

void CApplicationPowerHandling::CheckShutdown ( )
protected

◆ GetRenderGUI()

bool CApplicationPowerHandling::GetRenderGUI ( ) const
inline

◆ GlobalIdleTime()

int CApplicationPowerHandling::GlobalIdleTime ( )

◆ HandleShutdownMessage()

void CApplicationPowerHandling::HandleShutdownMessage ( )
protected

Helper method to determine how to handle TMSG_SHUTDOWN.

◆ InhibitIdleShutdown()

void CApplicationPowerHandling::InhibitIdleShutdown ( bool inhibit)
protected

◆ InhibitScreenSaver()

void CApplicationPowerHandling::InhibitScreenSaver ( bool inhibit)
protected

◆ IsDPMSActive()

bool CApplicationPowerHandling::IsDPMSActive ( ) const
inline

◆ IsIdleShutdownInhibited()

bool CApplicationPowerHandling::IsIdleShutdownInhibited ( ) const

◆ IsInScreenSaver()

bool CApplicationPowerHandling::IsInScreenSaver ( ) const
inline

◆ IsScreenSaverInhibited()

bool CApplicationPowerHandling::IsScreenSaverInhibited ( ) const

◆ NavigationIdleTime()

float CApplicationPowerHandling::NavigationIdleTime ( )
protected

◆ OnSettingAction()

bool CApplicationPowerHandling::OnSettingAction ( const CSetting & setting)

◆ OnSettingChanged()

bool CApplicationPowerHandling::OnSettingChanged ( const CSetting & setting)

◆ ResetNavigationTimer()

void CApplicationPowerHandling::ResetNavigationTimer ( )

◆ ResetScreenSaver()

void CApplicationPowerHandling::ResetScreenSaver ( )

◆ ResetScreenSaverTimer()

void CApplicationPowerHandling::ResetScreenSaverTimer ( )
protected

◆ ResetShutdownTimers()

void CApplicationPowerHandling::ResetShutdownTimers ( )

◆ ResetSystemIdleTimer()

void CApplicationPowerHandling::ResetSystemIdleTimer ( )

◆ ScreensaverIdInUse()

const std::string & CApplicationPowerHandling::ScreensaverIdInUse ( ) const
inline

◆ SetRenderGUI()

void CApplicationPowerHandling::SetRenderGUI ( bool renderGUI)

◆ SetScreenSaverLockFailed()

void CApplicationPowerHandling::SetScreenSaverLockFailed ( )
inline

◆ SetScreenSaverUnlocked()

void CApplicationPowerHandling::SetScreenSaverUnlocked ( )
inline

◆ StopScreenSaverTimer()

void CApplicationPowerHandling::StopScreenSaverTimer ( )

◆ StopShutdownTimer()

void CApplicationPowerHandling::StopShutdownTimer ( )

◆ ToggleDPMS()

bool CApplicationPowerHandling::ToggleDPMS ( bool manual)

◆ WakeUpScreenSaver()

bool CApplicationPowerHandling::WakeUpScreenSaver ( bool bPowerOffKeyPressed = false)
protected

◆ WakeUpScreenSaverAndDPMS()

bool CApplicationPowerHandling::WakeUpScreenSaverAndDPMS ( bool bPowerOffKeyPressed = false)
Todo
if screensaver lock is specified but screensaver is not active (DPMS came first), activate screensaver now.

Friends And Related Symbol Documentation

◆ CApplication

friend class CApplication
friend

Member Data Documentation

◆ m_bInhibitIdleShutdown

bool CApplicationPowerHandling::m_bInhibitIdleShutdown = false
protected

◆ m_bInhibitScreenSaver

bool CApplicationPowerHandling::m_bInhibitScreenSaver = false
protected

◆ m_bResetScreenSaver

bool CApplicationPowerHandling::m_bResetScreenSaver = false
protected

◆ m_dpmsIsActive

bool CApplicationPowerHandling::m_dpmsIsActive = false
protected

◆ m_dpmsIsManual

bool CApplicationPowerHandling::m_dpmsIsManual = false
protected

◆ m_globalScreensaverInhibitor

KODI::WINDOWING::COSScreenSaverInhibitor CApplicationPowerHandling::m_globalScreensaverInhibitor
protected

◆ m_idleTimer

CStopWatch CApplicationPowerHandling::m_idleTimer
protected

◆ m_iScreenSaveLock

int CApplicationPowerHandling::m_iScreenSaveLock = 0
protected

◆ m_navigationTimer

CStopWatch CApplicationPowerHandling::m_navigationTimer
protected

◆ m_pythonScreenSaver

ADDON::AddonPtr CApplicationPowerHandling::m_pythonScreenSaver
protected

◆ m_renderGUI

bool CApplicationPowerHandling::m_renderGUI {false}
protected

◆ m_screensaverActive

bool CApplicationPowerHandling::m_screensaverActive = false
protected

◆ m_screensaverIdInUse

std::string CApplicationPowerHandling::m_screensaverIdInUse
protected

◆ m_screensaverInhibitor

KODI::WINDOWING::COSScreenSaverInhibitor CApplicationPowerHandling::m_screensaverInhibitor
protected

◆ m_screenSaverTimer

CStopWatch CApplicationPowerHandling::m_screenSaverTimer
protected

◆ m_shutdownTimer

CStopWatch CApplicationPowerHandling::m_shutdownTimer
protected

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