~ubuntu-branches/ubuntu/intrepid/xserver-xgl/intrepid

« back to all changes in this revision

Viewing changes to dix/globals.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthew Garrett
  • Date: 2006-02-13 14:21:43 UTC
  • Revision ID: james.westby@ubuntu.com-20060213142143-mad6z9xzem7hzxz9
Tags: upstream-7.0.0
ImportĀ upstreamĀ versionĀ 7.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
/************************************************************
 
4
 
 
5
Copyright 1987, 1998  The Open Group
 
6
 
 
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
 
11
documentation.
 
12
 
 
13
The above copyright notice and this permission notice shall be included in
 
14
all copies or substantial portions of the Software.
 
15
 
 
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.
 
22
 
 
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.
 
26
 
 
27
 
 
28
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
 
29
 
 
30
                        All Rights Reserved
 
31
 
 
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.  
 
39
 
 
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
 
46
SOFTWARE.
 
47
 
 
48
********************************************************/
 
49
 
 
50
/* $Xorg: globals.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */
 
51
 
 
52
#ifdef HAVE_DIX_CONFIG_H
 
53
#include <dix-config.h>
 
54
#endif
 
55
 
 
56
#include <X11/X.h>
 
57
#include <X11/Xmd.h>
 
58
#include "misc.h"
 
59
#include "windowstr.h"
 
60
#include "scrnintstr.h"
 
61
#include "input.h"
 
62
#include "dixfont.h"
 
63
#include "site.h"
 
64
#include "dixstruct.h"
 
65
#include "os.h"
 
66
 
 
67
ScreenInfo screenInfo;
 
68
KeybdCtrl defaultKeyboardControl = {
 
69
        DEFAULT_KEYBOARD_CLICK,
 
70
        DEFAULT_BELL,
 
71
        DEFAULT_BELL_PITCH,
 
72
        DEFAULT_BELL_DURATION,
 
73
        DEFAULT_AUTOREPEAT,
 
74
        DEFAULT_AUTOREPEATS,
 
75
        DEFAULT_LEDS,
 
76
        0};
 
77
 
 
78
PtrCtrl defaultPointerControl = {
 
79
        DEFAULT_PTR_NUMERATOR,
 
80
        DEFAULT_PTR_DENOMINATOR,
 
81
        DEFAULT_PTR_THRESHOLD,
 
82
        0};
 
83
 
 
84
ClientPtr *clients;
 
85
ClientPtr  serverClient;
 
86
int  currentMaxClients;   /* current size of clients array */
 
87
long maxBigRequestSize = MAX_BIG_REQUEST_SIZE;
 
88
 
 
89
WindowPtr *WindowTable;
 
90
 
 
91
unsigned long globalSerialNumber = 0;
 
92
unsigned long serverGeneration = 0;
 
93
 
 
94
/* these next four are initialized in main.c */
 
95
CARD32 ScreenSaverTime;
 
96
CARD32 ScreenSaverInterval;
 
97
int  ScreenSaverBlanking;
 
98
int  ScreenSaverAllowExposures;
 
99
 
 
100
#ifdef DPMSExtension
 
101
# ifndef DEFAULT_STANDBY_TIME
 
102
#  define DEFAULT_STANDBY_TIME DEFAULT_SCREEN_SAVER_TIME * 2
 
103
# endif
 
104
# ifndef DEFAULT_SUSPEND_TIME
 
105
#  define DEFAULT_SUSPEND_TIME DEFAULT_SCREEN_SAVER_TIME * 3
 
106
# endif
 
107
# ifndef DEFAULT_OFF_TIME
 
108
#  define DEFAULT_OFF_TIME DEFAULT_SCREEN_SAVER_TIME * 4
 
109
# endif
 
110
# ifndef DEFAULT_DPMS_ENABLED
 
111
#  define DEFAULT_DPMS_ENABLED FALSE
 
112
# endif
 
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;
 
123
CARD32 DPMSOffTime;
 
124
Bool DPMSEnabled;
 
125
#endif
 
126
 
 
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;
 
131
#ifndef NOLOGOHACK
 
132
int  logoScreenSaver = DEFAULT_LOGO_SCREEN_SAVER;
 
133
#endif
 
134
 
 
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? */
 
146
 
 
147
TimeStamp currentTime;
 
148
TimeStamp lastDeviceEventTime;
 
149
 
 
150
Bool permitOldBugs = FALSE; /* turn off some error checking, to permit certain
 
151
                             * old broken clients (like R2/R3 xterms) to work
 
152
                             */
 
153
 
 
154
int defaultColorVisualClass = -1;
 
155
int monitorResolution = 0;
 
156
 
 
157
char *display;
 
158
 
 
159
CARD32 TimeOutValue = DEFAULT_TIMEOUT * MILLI_PER_SECOND;
 
160
int     argcGlobal;
 
161
char    **argvGlobal;
 
162
 
 
163
DDXPointRec dixScreenOrigins[MAXSCREENS];