1
/* $XdotOrg: xserver/xorg/dix/globals.c,v 1.7 2005/07/03 08:53:38 daniels Exp $ */
2
/* $XFree86: xc/programs/Xserver/dix/globals.c,v 1.12tsi Exp $ */
3
/************************************************************
5
Copyright 1987, 1998 The Open Group
7
Permission to use, copy, modify, distribute, and sell this software and its
8
documentation for any purpose is hereby granted without fee, provided that
9
the above copyright notice appear in all copies and that both that
10
copyright notice and this permission notice appear in supporting
13
The above copyright notice and this permission notice shall be included in
14
all copies or substantial portions of the Software.
16
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
Except as contained in this notice, the name of The Open Group shall not be
24
used in advertising or otherwise to promote the sale, use or other dealings
25
in this Software without prior written authorization from The Open Group.
28
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
32
Permission to use, copy, modify, and distribute this software and its
33
documentation for any purpose and without fee is hereby granted,
34
provided that the above copyright notice appear in all copies and that
35
both that copyright notice and this permission notice appear in
36
supporting documentation, and that the name of Digital not be
37
used in advertising or publicity pertaining to distribution of the
38
software without specific, written prior permission.
40
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
41
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
42
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
43
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
44
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
45
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
48
********************************************************/
50
/* $Xorg: globals.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */
52
#ifdef HAVE_DIX_CONFIG_H
53
#include <dix-config.h>
59
#include "windowstr.h"
60
#include "scrnintstr.h"
64
#include "dixstruct.h"
67
ScreenInfo screenInfo;
68
KeybdCtrl defaultKeyboardControl = {
69
DEFAULT_KEYBOARD_CLICK,
72
DEFAULT_BELL_DURATION,
78
PtrCtrl defaultPointerControl = {
79
DEFAULT_PTR_NUMERATOR,
80
DEFAULT_PTR_DENOMINATOR,
81
DEFAULT_PTR_THRESHOLD,
85
ClientPtr serverClient;
86
int currentMaxClients; /* current size of clients array */
87
long maxBigRequestSize = MAX_BIG_REQUEST_SIZE;
89
WindowPtr *WindowTable;
91
unsigned long globalSerialNumber = 0;
92
unsigned long serverGeneration = 0;
94
/* these next four are initialized in main.c */
95
CARD32 ScreenSaverTime;
96
CARD32 ScreenSaverInterval;
97
int ScreenSaverBlanking;
98
int ScreenSaverAllowExposures;
101
# ifndef DEFAULT_STANDBY_TIME
102
# define DEFAULT_STANDBY_TIME DEFAULT_SCREEN_SAVER_TIME * 2
104
# ifndef DEFAULT_SUSPEND_TIME
105
# define DEFAULT_SUSPEND_TIME DEFAULT_SCREEN_SAVER_TIME * 3
107
# ifndef DEFAULT_OFF_TIME
108
# define DEFAULT_OFF_TIME DEFAULT_SCREEN_SAVER_TIME * 4
110
# ifndef DEFAULT_DPMS_ENABLED
111
# define DEFAULT_DPMS_ENABLED FALSE
113
CARD32 defaultDPMSStandbyTime = DEFAULT_STANDBY_TIME;
114
CARD32 defaultDPMSSuspendTime = DEFAULT_SUSPEND_TIME;
115
CARD32 defaultDPMSOffTime = DEFAULT_OFF_TIME;
116
CARD16 DPMSPowerLevel = 0;
117
Bool defaultDPMSEnabled = DEFAULT_DPMS_ENABLED;
118
Bool DPMSEnabledSwitch = FALSE; /* these denote the DPMS command line */
119
Bool DPMSDisabledSwitch = FALSE; /* switch states */
120
Bool DPMSCapableFlag = FALSE;
121
CARD32 DPMSStandbyTime;
122
CARD32 DPMSSuspendTime;
127
CARD32 defaultScreenSaverTime = DEFAULT_SCREEN_SAVER_TIME;
128
CARD32 defaultScreenSaverInterval = DEFAULT_SCREEN_SAVER_INTERVAL;
129
int defaultScreenSaverBlanking = DEFAULT_SCREEN_SAVER_BLANKING;
130
int defaultScreenSaverAllowExposures = DEFAULT_SCREEN_SAVER_EXPOSURES;
132
int logoScreenSaver = DEFAULT_LOGO_SCREEN_SAVER;
135
char *defaultFontPath = COMPILEDDEFAULTFONTPATH;
136
char *defaultTextFont = COMPILEDDEFAULTFONT;
137
char *defaultCursorFont = COMPILEDCURSORFONT;
138
char *rgbPath = RGB_DB;
139
char *defaultDisplayClass = COMPILEDDISPLAYCLASS;
140
FontPtr defaultFont; /* not declared in dix.h to avoid including font.h in
141
every compilation of dix code */
142
Bool loadableFonts = FALSE;
143
CursorPtr rootCursor;
144
Bool blackRoot=FALSE;
145
ClientPtr requestingClient; /* XXX this should be obsolete now, remove? */
147
TimeStamp currentTime;
148
TimeStamp lastDeviceEventTime;
150
Bool permitOldBugs = FALSE; /* turn off some error checking, to permit certain
151
* old broken clients (like R2/R3 xterms) to work
154
int defaultColorVisualClass = -1;
155
int monitorResolution = 0;
159
CARD32 TimeOutValue = DEFAULT_TIMEOUT * MILLI_PER_SECOND;
163
DDXPointRec dixScreenOrigins[MAXSCREENS];