mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-21 01:52:01 +03:00
504bfa2def
and untested. also some known problems: not detecting an xscreensaver started after us and not detecting built-in screen saver activation (not sure if we can without using ugly extensions).
31 lines
823 B
C++
31 lines
823 B
C++
#ifndef ISCREENSAVER_H
|
|
#define ISCREENSAVER_H
|
|
|
|
#include "IInterface.h"
|
|
|
|
class IScreenSaver : public IInterface {
|
|
public:
|
|
// note -- the c'tor/d'tor must *not* enable/disable the screen saver
|
|
|
|
// manipulators
|
|
|
|
// enable/disable the screen saver. enable() should restore the
|
|
// screen saver settings to what they were when disable() was
|
|
// previously called. if disable() wasn't previously called then
|
|
// it should keep the current settings or use reasonable defaults.
|
|
virtual void enable() = 0;
|
|
virtual void disable() = 0;
|
|
|
|
// activate/deactivate (i.e. show/hide) the screen saver.
|
|
// deactivate() also resets the screen saver timer.
|
|
virtual void activate() = 0;
|
|
virtual void deactivate() = 0;
|
|
|
|
// accessors
|
|
|
|
// returns true iff the screen saver is active
|
|
virtual bool isActive() const = 0;
|
|
};
|
|
|
|
#endif
|