ede/ede-screensaver-conf/XScreenSaver.h

49 lines
1001 B
C
Raw Normal View History

2009-01-09 19:32:14 +03:00
#ifndef __XSCREENSAVER_H__
#define __XSCREENSAVER_H__
#include <X11/Xproto.h>
2009-01-09 19:32:14 +03:00
#include <edelib/List.h>
#include <edelib/String.h>
struct SaverHack {
edelib::String name;
edelib::String exec;
unsigned int sindex;
2009-01-09 19:32:14 +03:00
};
/* TODO: edelib list::sort() bug */
inline bool saver_hack_cmp(SaverHack* const& s1, SaverHack* const& s2)
{ return s1->name < s2->name; }
2009-01-09 19:32:14 +03:00
typedef edelib::list<SaverHack*> HackList;
typedef edelib::list<SaverHack*>::iterator HackListIter;
enum SaverMode {
SAVER_OFF,
SAVER_BLANK,
SAVER_ONE,
SAVER_RANDOM
};
2009-01-09 19:32:14 +03:00
struct SaverPrefs {
HackList hacks;
unsigned int curr_hack;
int timeout;
SaverMode mode;
2009-01-09 19:32:14 +03:00
bool dpms_enabled;
int dpms_standby;
int dpms_suspend;
int dpms_off;
};
bool xscreensaver_run_daemon(Display* py);
2009-01-09 19:32:14 +03:00
SaverPrefs *xscreensaver_read_config(void);
void xscreensaver_save_config(SaverPrefs *sp);
void xscreensaver_preview(int id, const char* name);
void xscreensaver_kill_preview(void);
2009-01-09 19:32:14 +03:00
#endif