Root/src/powersaver.h

1#ifndef POWERSAVER_H
2#define POWERSAVER_H
3#include <SDL.h>
4class PowerSaver {
5
6    public:
7        static PowerSaver* getInstance();
8        ~PowerSaver();
9        void addScreenTimer();
10        void resetScreenTimer();
11
12        void enableScreen();
13        void disableScreen();
14
15        void setScreenTimeout( unsigned int seconds );
16    private:
17        PowerSaver( );
18        static PowerSaver* instance;
19        bool screenState;
20        unsigned int screenTimeout;
21        SDL_TimerID screenTimer;
22    
23        void setScreenBlanking( bool state );
24};
25#endif
26

Archive Download this file



interactive