namespace sd::tools { enumclass IdleState { /** When GetIdleState() returns this value, then the system is idle.
*/
Idle = 0x0000,
/** There are system event pending.
*/
SystemEventPending = 0x0001,
/** A full screen slide show is running and is active. In contrast theremaybeafullscreenshowberunninginaninactivewindow, i.e.inthebackground.
*/
FullScreenShowActive = 0x0002,
/** A slide show is running in a window.
*/
WindowShowActive = 0x0004,
/** A window is being painted.
*/
WindowPainting = 0x0008,
};
} // end of namespace ::sd::tools namespace o3tl { template<> struct typed_flags<::sd::tools::IdleState> : is_typed_flags<::sd::tools::IdleState, 0x0f> {};
}
namespace sd::tools {
/** Detect whether the system is idle and some time consuming operation may becarriedout.Thisclassdistinguishesbetweendifferentstatesof idle-ness.
*/ class IdleDetection
{ public: /** Determine whether the system is idle. @parampWindow WhenavalidWindowpointerisgiventhenitischecked whetherthewindowiscurrentlybeingpainting. @return ThismethodeitherreturnsIdleState::Idleoracombinationof IdleStatesvaluesor-edtogetherthatdescribewhatthesystem iscurrentlydoingsothatthecallercandecidewhattodo.
*/ static IdleState GetIdleState (const vcl::Window* pWindow);
private: /** Check whether there are input events pending.
*/ static IdleState CheckInputPending();
/** Check whether a slide show is running full screen or in a window.
*/ static IdleState CheckSlideShowRunning();
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.