1 /* xscreensaver, Copyright (c) 1993-2001 Jamie Zawinski <jwz@jwz.org>
3 * Permission to use, copy, modify, distribute, and sell this software and its
4 * documentation for any purpose is hereby granted without fee, provided that
5 * the above copyright notice appear in all copies and that both that
6 * copyright notice and this permission notice appear in supporting
7 * documentation. No representations are made about the suitability of this
8 * software for any purpose. It is provided "as is" without express or
12 #ifndef __XSCREENSAVER_PREFS_H__
13 #define __XSCREENSAVER_PREFS_H__
15 typedef struct screenhack screenhack;
23 typedef struct saver_preferences saver_preferences;
26 /* This structure holds all the user-specified parameters, read from the
27 command line, the resource database, or entered through a dialog box.
29 struct saver_preferences {
31 XrmDatabase db; /* The resource database into which the
32 init file is merged, and out of which the
33 preferences are parsed. */
35 time_t init_file_date; /* The date (from stat()) of the .xscreensaver
36 file the last time this process read or
39 Bool verbose_p; /* whether to print out lots of status info */
40 Bool timestamp_p; /* whether to mark messages with a timestamp */
41 Bool capture_stderr_p; /* whether to redirect stdout/stderr */
42 Bool debug_p; /* pay no mind to the man behind the curtain */
43 Bool xsync_p; /* whether XSynchronize has been called */
45 Bool lock_p; /* whether to lock as well as save */
46 Bool lock_vt_p; /* whether to lock VTs too, if possible */
48 Bool fade_p; /* whether to fade to black, if possible */
49 Bool unfade_p; /* whether to fade from black, if possible */
50 Time fade_seconds; /* how long that should take */
51 int fade_ticks; /* how many ticks should be used */
52 Bool splash_p; /* whether to do a splash screen at startup */
54 Bool install_cmap_p; /* whether we should use our own colormap
55 when using the screen's default visual. */
57 screenhack **screenhacks; /* the programs to run */
58 int screenhacks_count;
60 int nice_inferior; /* nice value for subprocs */
62 Time initial_delay; /* how long to sleep after launch */
63 Time splash_duration; /* how long the splash screen stays up */
64 Time timeout; /* how much idle time before activation */
65 Time lock_timeout; /* how long after activation locking starts */
66 Time cycle; /* how long each hack should run */
67 Time passwd_timeout; /* how much time before pw dialog goes down */
68 Time pointer_timeout; /* how often to check mouse position */
69 Time notice_events_timeout; /* how long after window creation to select */
70 Time watchdog_timeout; /* how often to re-raise and re-blank screen */
72 Bool dpms_enabled_p; /* Whether to power down the monitor */
73 Time dpms_standby; /* how long until monitor goes black */
74 Time dpms_suspend; /* how long until monitor power-saves */
75 Time dpms_off; /* how long until monitor powers down */
77 Bool use_xidle_extension; /* which extension to use, if possible */
78 Bool use_mit_saver_extension;
79 Bool use_sgi_saver_extension;
80 Bool use_proc_interrupts;
82 char *shell; /* where to find /bin/sh */
84 char *demo_command; /* How to enter demo mode. */
85 char *prefs_command; /* How to edit preferences. */
86 char *help_url; /* Where the help document resides. */
87 char *load_url_command; /* How one loads URLs. */
91 extern void load_init_file (saver_preferences *p);
92 extern Bool init_file_changed_p (saver_preferences *p);
93 extern int write_init_file (saver_preferences *p, const char *version_string,
95 const char *init_file_name (void);
97 extern screenhack *parse_screenhack (const char *line);
98 extern void free_screenhack (screenhack *hack);
99 extern char *format_hack (screenhack *hack, Bool wrap_p);
100 char *make_hack_name (const char *shell_command);
103 extern void sync_server_dpms_settings (Display *dpy, Bool enabled_p,
104 int standby_secs, int suspend_secs,
108 #endif /* __XSCREENSAVER_PREFS_H__ */