Link with C++ linker
[oweals/cde.git] / cde / programs / dtscreen / dtscreen.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: dtscreen.h /main/5 1996/05/13 16:54:19 rswiston $ */
24 /*
25  */
26 /*                                                                      *
27  * (c) Copyright 1993, 1994 Hewlett-Packard Company                     *
28  * (c) Copyright 1993, 1994 International Business Machines Corp.       *
29  * (c) Copyright 1993, 1994 Sun Microsystems, Inc.                      *
30  * (c) Copyright 1993, 1994 Novell, Inc.                                *
31  */
32 /*-
33  *
34  * xlock.h - external interfaces for new modes and SYSV OS defines.
35  *
36  * Copyright (c) 1991 by Patrick J. Naughton.
37  *
38  */
39
40 #include <X11/Xlib.h>
41 #include <X11/Xutil.h>
42 #include <X11/Xos.h>
43
44 #define MAXSCREENS 3
45 #define NUMCOLORS 64
46
47 typedef struct {
48     Screen     *screen;
49     int         npixels;        /* number of valid entries in pixels */
50     u_long      pixels[NUMCOLORS];      /* pixel values in the colormap */
51 }           perscreen;
52
53 typedef struct {
54     Window      w; /* window id */
55     GC          gc; /* graphics context for animation */
56     perscreen  *perscreen; /* screen info for this window */
57     void       *data; /* mode data */
58 }           perwindow;
59
60 extern Display *dsp;
61
62 extern char *ProgramName;
63 extern char *display;
64 extern char *mode;
65 extern float saturation;
66 extern int  nicelevel;
67 extern int  delay;
68 extern int  batchcount;
69 extern int  reinittime;
70 extern Bool usefirst;
71 extern Bool mono;
72 extern Bool create;
73 extern void (*callback) ();
74 extern void (*init) ();
75
76 extern void GetResources();
77 extern void hsbramp();
78 extern void error();
79 extern long seconds();
80 extern void usage();
81 extern void hide_hft_ring();
82 extern void unhide_hft_ring();
83
84
85 /* System V Release 4 redefinitions of BSD functions and structures */
86
87 #if defined (SYSV) || defined (SVR4)
88
89 #include <sys/time.h>
90 #define passwd spwd
91 #define pw_passwd sp_pwdp
92 #if defined(AIXV3) || defined(hpux)
93 #undef NULL
94 #define NULL 0
95 #include <sys/poll.h>
96
97 struct passwd {
98         char    *pw_name;
99         char    *pw_passwd;
100         uid_t   pw_uid;
101         gid_t   pw_gid;
102         char    *pw_gecos;
103         char    *pw_dir;
104         char    *pw_shell;
105 };
106 #else
107 #include <poll.h>
108 #include <shadow.h>
109 #define getpwnam getspnam
110 #endif
111 #if !(defined(_AIX) || defined(hpux))
112 # define srandom srand
113 # define random rand
114 # define MAXRAND (32767.0)
115 #else
116 # define MAXRAND (2147483648.0)
117 #endif
118
119 #else
120
121 #define MAXRAND (2147483648.0)
122
123 #endif