libnick 2024.12.0
A cross-platform base for native Nickvision applications.
|
An object to prevent the system from suspending. More...
#include <suspendinhibitor.h>
Public Member Functions | |
SuspendInhibitor () | |
Constructs a SuspendInhibitor. | |
SuspendInhibitor (const SuspendInhibitor &inhibitor) | |
Copies a SuspendInhibitor object. | |
SuspendInhibitor (SuspendInhibitor &&inhibitor) noexcept | |
Moves a SuspendInhibitor object. | |
~SuspendInhibitor () | |
Destructs a SuspendInhibitor. | |
bool | isInhibiting () const |
Gets whether or not the system is being inhibited from suspending. | |
bool | inhibit () |
Inhibits the system from suspending. | |
bool | uninhibit () |
Uninhibits the system from suspending. | |
SuspendInhibitor & | operator= (const SuspendInhibitor &inhibitor) |
Copies a SuspendInhibitor object. | |
SuspendInhibitor & | operator= (SuspendInhibitor &&inhibitor) noexcept |
Moves a SuspendInhibitor object. | |
An object to prevent the system from suspending.
Nickvision::System::SuspendInhibitor::SuspendInhibitor | ( | ) |
Constructs a SuspendInhibitor.
This will not inhibit the system from suspending until the inhibit() function is called.
Nickvision::System::SuspendInhibitor::SuspendInhibitor | ( | const SuspendInhibitor & | inhibitor | ) |
Copies a SuspendInhibitor object.
inhibitor | The object to move |
|
noexcept |
Moves a SuspendInhibitor object.
inhibitor | The object to move |
Nickvision::System::SuspendInhibitor::~SuspendInhibitor | ( | ) |
Destructs a SuspendInhibitor.
If the system is being inhibited, it will uninhibit.
bool Nickvision::System::SuspendInhibitor::inhibit | ( | ) |
Inhibits the system from suspending.
bool Nickvision::System::SuspendInhibitor::isInhibiting | ( | ) | const |
Gets whether or not the system is being inhibited from suspending.
SuspendInhibitor & Nickvision::System::SuspendInhibitor::operator= | ( | const SuspendInhibitor & | inhibitor | ) |
|
noexcept |
bool Nickvision::System::SuspendInhibitor::uninhibit | ( | ) |
Uninhibits the system from suspending.