ftp://ftp.smr.ru/pub/0/FreeBSD/releases/distfiles/xscreensaver-3.16.tar.gz
[xscreensaver] / driver / prefs.h
1 /* xscreensaver, Copyright (c) 1993-1998 Jamie Zawinski <jwz@jwz.org>
2  *
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 
9  * implied warranty.
10  */
11
12 #ifndef __XSCREENSAVER_PREFS_H__
13 #define __XSCREENSAVER_PREFS_H__
14
15 typedef struct saver_preferences saver_preferences;
16
17
18 /* This structure holds all the user-specified parameters, read from the
19    command line, the resource database, or entered through a dialog box.
20  */
21 struct saver_preferences {
22
23   XrmDatabase db;               /* The resource database into which the
24                                    init file is merged, and out of which the
25                                    preferences are parsed. */
26
27   time_t init_file_date;        /* The date (from stat()) of the .xscreensaver
28                                    file the last time this process read or
29                                    wrote it. */
30
31   Bool verbose_p;               /* whether to print out lots of status info */
32   Bool timestamp_p;             /* whether to mark messages with a timestamp */
33   Bool debug_p;                 /* pay no mind to the man behind the curtain */
34   Bool xsync_p;                 /* whether XSynchronize has been called */
35
36   Bool lock_p;                  /* whether to lock as well as save */
37   Bool lock_vt_p;               /* whether to lock VTs too, if possible */
38
39   Bool fade_p;                  /* whether to fade to black, if possible */
40   Bool unfade_p;                /* whether to fade from black, if possible */
41   int fade_seconds;             /* how long that should take */
42   int fade_ticks;               /* how many ticks should be used */
43
44   Bool install_cmap_p;          /* whether we should use our own colormap
45                                    when using the screen's default visual. */
46
47   char **screenhacks;           /* the programs to run */
48   int screenhacks_count;
49
50   int nice_inferior;            /* nice value for subprocs */
51
52   Time initial_delay;           /* how long to sleep after launch */
53   Time splash_duration;         /* how long the splash screen stays up */
54   Time timeout;                 /* how much idle time before activation */
55   Time lock_timeout;            /* how long after activation locking starts */
56   Time cycle;                   /* how long each hack should run */
57   Time passwd_timeout;          /* how much time before pw dialog goes down */
58   Time pointer_timeout;         /* how often to check mouse position */
59   Time notice_events_timeout;   /* how long after window creation to select */
60   Time watchdog_timeout;        /* how often to re-raise and re-blank screen */
61
62   Bool use_xidle_extension;     /* which extension to use, if possible */
63   Bool use_mit_saver_extension;
64   Bool use_sgi_saver_extension;
65   Bool use_proc_interrupts;
66
67   char *shell;                  /* where to find /bin/sh */
68
69   char *demo_command;           /* How to enter demo mode. */
70   char *prefs_command;          /* How to edit preferences. */
71   char *help_url;               /* Where the help document resides. */
72   char *load_url_command;       /* How one loads URLs. */
73 };
74
75
76 extern void load_init_file (saver_preferences *p);
77 extern Bool init_file_changed_p (saver_preferences *p);
78 extern void write_init_file (saver_preferences *p, const char *version_string);
79 const char *init_file_name (void);
80
81 #endif /* __XSCREENSAVER_PREFS_H__ */