2009-01-23 16:12:52 +03:00
|
|
|
/*
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* ede-screensaver-conf, a tool to configure screensaver
|
|
|
|
* Part of Equinox Desktop Environment (EDE).
|
|
|
|
* Copyright (c) 2009 Sanel Zukan <karijes@equinox-project.org>
|
|
|
|
*
|
|
|
|
* This program is licensed under the terms of the
|
|
|
|
* GNU General Public License version 2 or later.
|
|
|
|
* See COPYING for the details.
|
|
|
|
*/
|
|
|
|
|
2009-01-09 19:32:14 +03:00
|
|
|
#ifndef __XSCREENSAVER_H__
|
|
|
|
#define __XSCREENSAVER_H__
|
|
|
|
|
2009-01-12 16:49:54 +03:00
|
|
|
#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;
|
2009-01-12 16:49:54 +03:00
|
|
|
edelib::String exec;
|
|
|
|
unsigned int sindex;
|
2009-01-09 19:32:14 +03:00
|
|
|
};
|
|
|
|
|
2009-01-12 16:49:54 +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;
|
|
|
|
|
2009-01-13 16:38:54 +03:00
|
|
|
enum SaverMode {
|
|
|
|
SAVER_OFF,
|
|
|
|
SAVER_BLANK,
|
|
|
|
SAVER_ONE,
|
|
|
|
SAVER_RANDOM
|
|
|
|
};
|
|
|
|
|
2009-01-09 19:32:14 +03:00
|
|
|
struct SaverPrefs {
|
2009-01-12 16:49:54 +03:00
|
|
|
HackList hacks;
|
|
|
|
unsigned int curr_hack;
|
|
|
|
int timeout;
|
2009-01-13 16:38:54 +03:00
|
|
|
SaverMode mode;
|
2009-01-09 19:32:14 +03:00
|
|
|
|
|
|
|
bool dpms_enabled;
|
|
|
|
int dpms_standby;
|
|
|
|
int dpms_suspend;
|
|
|
|
int dpms_off;
|
|
|
|
};
|
|
|
|
|
2009-01-12 16:49:54 +03:00
|
|
|
bool xscreensaver_run_daemon(Display* py);
|
|
|
|
|
2009-01-09 19:32:14 +03:00
|
|
|
SaverPrefs *xscreensaver_read_config(void);
|
2009-01-12 16:49:54 +03:00
|
|
|
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
|