dtwm: basic multihead(xinerama only) support
[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 #include <Dt/Dt.h>
45
46 #define MAXSCREENS 3
47 #define NUMCOLORS 64
48
49 typedef struct {
50     Screen     *screen;
51     int         npixels;        /* number of valid entries in pixels */
52     u_long      pixels[NUMCOLORS];      /* pixel values in the colormap */
53 }           perscreen;
54
55 typedef struct {
56     Window      w; /* window id */
57     GC          gc; /* graphics context for animation */
58     perscreen  *perscreen; /* screen info for this window */
59     void       *data; /* mode data */
60 }           perwindow;
61
62 extern Display *dsp;
63
64 extern char *ProgramName;
65 extern char *display;
66 extern char *mode;
67 extern float saturation;
68 extern int  nicelevel;
69 extern int  delay;
70 extern int  batchcount;
71 extern int  reinittime;
72 extern Bool usefirst;
73 extern Bool mono;
74 extern Bool create;
75 extern void (*callback) ();
76 extern void (*init) ();
77
78 extern void GetResources();
79 extern void CheckResources();
80 extern void hsbramp();
81 extern void error();
82 extern long seconds();
83 extern void usage();
84 extern void hide_hft_ring();
85 extern void unhide_hft_ring();
86
87
88 /* System V Release 4 redefinitions of BSD functions and structures */
89
90 #if defined (SYSV) || defined (SVR4)
91
92 #include <sys/time.h>
93 #define passwd spwd
94 #define pw_passwd sp_pwdp
95 #if defined(AIXV3) || defined(hpux)
96 #undef NULL
97 #define NULL 0
98 #include <sys/poll.h>
99
100 struct passwd {
101         char    *pw_name;
102         char    *pw_passwd;
103         uid_t   pw_uid;
104         gid_t   pw_gid;
105         char    *pw_gecos;
106         char    *pw_dir;
107         char    *pw_shell;
108 };
109 #else
110 #include <poll.h>
111 #include <shadow.h>
112 #define getpwnam getspnam
113 #endif
114 #if !(defined(_AIX) || defined(hpux) || defined(sun))
115 # define srandom srand
116 # define random rand
117 # define MAXRAND (32767.0)
118 #else
119 # define MAXRAND (2147483648.0)
120 #endif
121
122 #else
123
124 #define MAXRAND (2147483648.0)
125
126 #endif