#ifndef _X11_UTIL_H_ #define _X11_UTIL_H_ #include #include #define SAVER_OFF (0) #define SAVER_ACTIVE (1) #define SAVER_LOCKED (2) #define SCREEN_UNKNOWN (0) #define SCREEN_ON (1) #define SCREEN_OFF (2) struct x11state { time_t lockTimestamp; int idleSeconds; int saverState; int screenStandby; }; bool getX11IdleTimes( const char *xauth, const char *display, struct x11state *state ); void setScreenDpms( const char *xauth, const char *display, int mode ); void enableScreenSaver( const char *xauth, const char *display, const int state ); #endif