11 #include "application/IApplicationComponent.h" 14 #include "powermanagement/WinIdleTimer.h" 16 #include "utils/Stopwatch.h" 17 #include "windowing/OSScreenSaver.h" 24 using AddonPtr = std::shared_ptr<IAddon>;
39 bool IsInScreenSaver()
const {
return m_screensaverActive; }
40 bool IsScreenSaverInhibited()
const;
41 void ResetScreenSaver();
42 void SetScreenSaverLockFailed() { m_iScreenSaveLock = -1; }
43 void SetScreenSaverUnlocked() { m_iScreenSaveLock = 1; }
44 void StopScreenSaverTimer();
45 std::string ScreensaverIdInUse()
const {
return m_screensaverIdInUse; }
47 bool GetRenderGUI()
const {
return m_renderGUI; }
48 void SetRenderGUI(
bool renderGUI);
51 void ResetSystemIdleTimer();
52 bool IsIdleShutdownInhibited()
const;
54 void ResetShutdownTimers();
55 void StopShutdownTimer();
57 void ResetNavigationTimer();
59 bool IsDPMSActive()
const {
return m_dpmsIsActive; }
60 bool ToggleDPMS(
bool manual);
63 bool WakeUpScreenSaverAndDPMS(
bool bPowerOffKeyPressed =
false);
69 void ActivateScreenSaver(
bool forceType =
false);
70 void CheckOSScreenSaverInhibitionSetting();
72 void CheckScreenSaverAndDPMS();
73 void InhibitScreenSaver(
bool inhibit);
74 void ResetScreenSaverTimer();
75 bool WakeUpScreenSaver(
bool bPowerOffKeyPressed =
false);
77 void InhibitIdleShutdown(
bool inhibit);
81 void HandleShutdownMessage();
84 float NavigationIdleTime();
86 bool m_renderGUI{
false};
88 bool m_bInhibitScreenSaver =
false;
89 bool m_bResetScreenSaver =
false;
92 bool m_screensaverActive =
false;
94 int m_iScreenSaveLock = 0;
95 std::string m_screensaverIdInUse;
97 bool m_dpmsIsActive =
false;
98 bool m_dpmsIsManual =
false;
100 bool m_bInhibitIdleShutdown =
false;
104 #ifdef TARGET_WINDOWS Class handling application support for screensavers, dpms and shutdown timers.
Definition: ApplicationPowerHandling.h:34
Definition: Stopwatch.h:14
Inhibit the OS screen saver as long as this object is alive.
Definition: OSScreenSaver.h:31
Setting base class containing all the properties which are common to all settings independent of the ...
Definition: Setting.h:46
Definition: Application.h:84
Base class for application components.
Definition: IApplicationComponent.h:12
Definition: WinIdleTimer.h:13
void OnSettingChanged(const std::shared_ptr< const CSetting > &setting) override
The value of the given setting has changed.
Definition: ApplicationSettingsHandling.cpp:106
void OnSettingAction(const std::shared_ptr< const CSetting > &setting) override
The given setting has been activated.
Definition: ApplicationSettingsHandling.cpp:138