summaryrefslogblamecommitdiffstats
path: root/src/x11util.h
blob: 6389a7c8d78733cd379c9b5aeb36a2bb23035ecf (plain) (tree)



























                                                                                       
#ifndef _X11_UTIL_H_
#define _X11_UTIL_H_

#include <stdbool.h>
#include <time.h>

#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