1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-20 00:04:05 +02:00
gmenu2x/src/powersaver.h

31 lines
517 B
C++

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