1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-12-28 20:35:12 +02:00
gmenu2x/src/powersaver.h

31 lines
517 B
C
Raw Normal View History

2011-06-02 06:04:35 +03:00
#ifndef POWERSAVER_H
#define POWERSAVER_H
2011-06-02 06:04:35 +03:00
#include <SDL.h>
2011-06-02 06:04:35 +03:00
class PowerSaver {
public:
static PowerSaver *getInstance();
static bool isRunning();
~PowerSaver();
void resetScreenTimer();
2011-06-02 06:04:35 +03:00
void enableScreen();
void disableScreen();
2011-06-02 06:04:35 +03:00
void setScreenTimeout(unsigned int seconds);
2011-06-02 06:04:35 +03:00
private:
PowerSaver();
void addScreenTimer();
void setScreenBlanking(bool state);
static PowerSaver *instance;
bool screenState;
unsigned int screenTimeout;
unsigned int timeout_startms;
SDL_TimerID screenTimer;
2011-06-02 06:04:35 +03:00
};
2011-06-02 06:04:35 +03:00
#endif