http://www.ibiblio.org/pub/historic-linux/ftp-archives/sunsite.unc.edu/Sep-29-1996...
[xscreensaver] / driver / xscreensaver.h
1 /* xscreensaver, Copyright (c) 1993, 1995 Jamie Zawinski <jwz@netscape.com>
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 #if __STDC__
13 # include <stdlib.h>
14 # include <unistd.h>
15 #endif
16
17 #include <stdio.h>
18
19 #if __STDC__
20 # define P(x)x
21 #else
22 # define P(x)()
23 # ifndef const
24 #  define const /**/
25 # endif
26 #endif
27
28 #ifdef NO_MOTIF
29 # define NO_DEMO_MODE
30
31   /* #### If anyone ever finishes the Athena locking code, remove this.
32      Until then, Locking requires Motif. */
33 # ifndef NO_LOCKING
34 #  define NO_LOCKING
35 # endif
36
37 #endif
38
39 extern char *progname, *progclass;
40 extern char *screensaver_version;
41
42 extern Display *dpy;
43 extern Screen *screen;
44 extern Visual *visual;
45 extern int visual_depth;
46
47 extern Bool verbose_p;
48
49 extern FILE *real_stderr;
50 extern FILE *real_stdout;
51
52 extern void initialize_screensaver_window P((void));
53 extern void raise_window P((Bool inhibit_fade, Bool between_hacks_p));
54 extern void blank_screen P((void));
55 extern void unblank_screen P((void));
56 extern void restart_process P((void));
57
58 extern void restore_real_vroot P((void));
59
60 extern void spawn_screenhack P((Bool));
61 extern void kill_screenhack P((void));
62
63 extern Colormap copy_colormap P((Display *, Colormap, Colormap));
64 extern void fade_colormap P((Display*, Colormap, Colormap, int, int, Bool));
65 extern void blacken_colormap P((Display *, Colormap));
66
67 extern int BadWindow_ehandler P((Display *dpy, XErrorEvent *error));
68
69 extern char *timestring P((void));
70 extern Bool window_exists_p P((Display *dpy, Window window));