1 | /* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Privstr.h,v 1.41 2004/01/27 01:31:45 dawes Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
|
---|
5 | *
|
---|
6 | * Permission is hereby granted, free of charge, to any person obtaining a
|
---|
7 | * copy of this software and associated documentation files (the "Software"),
|
---|
8 | * to deal in the Software without restriction, including without limitation
|
---|
9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
---|
10 | * and/or sell copies of the Software, and to permit persons to whom the
|
---|
11 | * Software is furnished to do so, subject to the following conditions:
|
---|
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
|
---|
19 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
---|
20 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
---|
21 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
---|
22 | * OTHER DEALINGS IN THE SOFTWARE.
|
---|
23 | *
|
---|
24 | * Except as contained in this notice, the name of the copyright holder(s)
|
---|
25 | * and author(s) shall not be used in advertising or otherwise to promote
|
---|
26 | * the sale, use or other dealings in this Software without prior written
|
---|
27 | * authorization from the copyright holder(s) and author(s).
|
---|
28 | */
|
---|
29 |
|
---|
30 | /*
|
---|
31 | * This file contains definitions of the private XFree86 data structures/types.
|
---|
32 | * None of the data structures here should be used by video drivers.
|
---|
33 | */
|
---|
34 |
|
---|
35 | #ifndef _XF86PRIVSTR_H
|
---|
36 | #define _XF86PRIVSTR_H
|
---|
37 |
|
---|
38 | #include "xf86Pci.h"
|
---|
39 | #include "xf86str.h"
|
---|
40 |
|
---|
41 | /* PCI probe flags */
|
---|
42 |
|
---|
43 | typedef enum {
|
---|
44 | PCIProbe1 = 0,
|
---|
45 | PCIProbe2,
|
---|
46 | PCIForceConfig1,
|
---|
47 | PCIForceConfig2,
|
---|
48 | PCIForceNone,
|
---|
49 | PCIOsConfig
|
---|
50 | } PciProbeType;
|
---|
51 |
|
---|
52 | typedef enum {
|
---|
53 | LogNone,
|
---|
54 | LogFlush,
|
---|
55 | LogSync
|
---|
56 | } Log;
|
---|
57 |
|
---|
58 | typedef enum {
|
---|
59 | SKNever,
|
---|
60 | SKWhenNeeded,
|
---|
61 | SKAlways
|
---|
62 | } SpecialKeysInDDX;
|
---|
63 |
|
---|
64 | /*
|
---|
65 | * xf86InfoRec contains global parameters which the video drivers never
|
---|
66 | * need to access. Global parameters which the video drivers do need
|
---|
67 | * should be individual globals.
|
---|
68 | */
|
---|
69 |
|
---|
70 | typedef struct {
|
---|
71 |
|
---|
72 | /* keyboard part */
|
---|
73 | DeviceIntPtr pKeyboard;
|
---|
74 | DeviceProc kbdProc; /* procedure for initializing */
|
---|
75 | void (* kbdEvents)(void); /* proc for processing events */
|
---|
76 | int consoleFd;
|
---|
77 | int kbdFd;
|
---|
78 | int vtno;
|
---|
79 | int kbdType; /* AT84 / AT101 */
|
---|
80 | int kbdRate;
|
---|
81 | int kbdDelay;
|
---|
82 | int bell_pitch;
|
---|
83 | int bell_duration;
|
---|
84 | Bool autoRepeat;
|
---|
85 | unsigned long leds;
|
---|
86 | unsigned long xleds;
|
---|
87 | char * vtinit;
|
---|
88 | int scanPrefix; /* scancode-state */
|
---|
89 | Bool capsLock;
|
---|
90 | Bool numLock;
|
---|
91 | Bool scrollLock;
|
---|
92 | Bool modeSwitchLock;
|
---|
93 | Bool composeLock;
|
---|
94 | Bool vtSysreq;
|
---|
95 | SpecialKeysInDDX ddxSpecialKeys;
|
---|
96 | Bool ActionKeyBindingsSet;
|
---|
97 | #if defined(SVR4) && defined(i386)
|
---|
98 | Bool panix106;
|
---|
99 | #endif /* SVR4 && i386 */
|
---|
100 | #if defined(__OpenBSD__) || defined(__NetBSD__)
|
---|
101 | int wsKbdType;
|
---|
102 | #endif
|
---|
103 |
|
---|
104 | /* mouse part */
|
---|
105 | DeviceIntPtr pMouse;
|
---|
106 | #ifdef XINPUT
|
---|
107 | pointer mouseLocal;
|
---|
108 | #endif
|
---|
109 |
|
---|
110 | /* event handler part */
|
---|
111 | int lastEventTime;
|
---|
112 | Bool vtRequestsPending;
|
---|
113 | Bool inputPending;
|
---|
114 | Bool dontVTSwitch;
|
---|
115 | Bool dontZap;
|
---|
116 | Bool dontZoom;
|
---|
117 | Bool notrapSignals; /* don't exit cleanly - die at fault */
|
---|
118 | Bool caughtSignal;
|
---|
119 |
|
---|
120 | /* graphics part */
|
---|
121 | Bool sharedMonitor;
|
---|
122 | ScreenPtr currentScreen;
|
---|
123 | #if defined(CSRG_BASED) || defined(__FreeBSD_kernel__)
|
---|
124 | int screenFd; /* fd for memory mapped access to
|
---|
125 | * vga card */
|
---|
126 | int consType; /* Which console driver? */
|
---|
127 | #endif
|
---|
128 |
|
---|
129 | #ifdef XKB
|
---|
130 | /*
|
---|
131 | * would like to use an XkbComponentNamesRec here but can't without
|
---|
132 | * pulling in a bunch of header files. :-(
|
---|
133 | */
|
---|
134 | char * xkbkeymap;
|
---|
135 | char * xkbkeycodes;
|
---|
136 | char * xkbtypes;
|
---|
137 | char * xkbcompat;
|
---|
138 | char * xkbsymbols;
|
---|
139 | char * xkbgeometry;
|
---|
140 | Bool xkbcomponents_specified;
|
---|
141 | char * xkbrules;
|
---|
142 | char * xkbmodel;
|
---|
143 | char * xkblayout;
|
---|
144 | char * xkbvariant;
|
---|
145 | char * xkboptions;
|
---|
146 | #endif
|
---|
147 |
|
---|
148 | /* Other things */
|
---|
149 | Bool allowMouseOpenFail;
|
---|
150 | Bool vidModeEnabled; /* VidMode extension enabled */
|
---|
151 | Bool vidModeAllowNonLocal; /* allow non-local VidMode
|
---|
152 | * connections */
|
---|
153 | Bool miscModInDevEnabled; /* Allow input devices to be
|
---|
154 | * changed */
|
---|
155 | Bool miscModInDevAllowNonLocal;
|
---|
156 | PciProbeType pciFlags;
|
---|
157 | Pix24Flags pixmap24;
|
---|
158 | MessageType pix24From;
|
---|
159 | #if defined(i386) || defined(__i386__)
|
---|
160 | Bool pc98;
|
---|
161 | #endif
|
---|
162 | Bool pmFlag;
|
---|
163 | Log log;
|
---|
164 | int estimateSizesAggressively;
|
---|
165 | Bool kbdCustomKeycodes;
|
---|
166 | Bool disableRandR;
|
---|
167 | MessageType randRFrom;
|
---|
168 | struct {
|
---|
169 | Bool disabled; /* enable/disable deactivating
|
---|
170 | * grabs or closing the
|
---|
171 | * connection to the grabbing
|
---|
172 | * client */
|
---|
173 | ClientPtr override; /* client that disabled
|
---|
174 | * grab deactivation.
|
---|
175 | */
|
---|
176 | Bool allowDeactivate;
|
---|
177 | Bool allowClosedown;
|
---|
178 | ServerGrabInfoRec server;
|
---|
179 | } grabInfo;
|
---|
180 | } xf86InfoRec, *xf86InfoPtr;
|
---|
181 |
|
---|
182 | #ifdef DPMSExtension
|
---|
183 | /* Private info for DPMS */
|
---|
184 | typedef struct {
|
---|
185 | CloseScreenProcPtr CloseScreen;
|
---|
186 | Bool Enabled;
|
---|
187 | int Flags;
|
---|
188 | } DPMSRec, *DPMSPtr;
|
---|
189 | #endif
|
---|
190 |
|
---|
191 | #ifdef XF86VIDMODE
|
---|
192 | /* Private info for Video Mode Extentsion */
|
---|
193 | typedef struct {
|
---|
194 | DisplayModePtr First;
|
---|
195 | DisplayModePtr Next;
|
---|
196 | int Flags;
|
---|
197 | CloseScreenProcPtr CloseScreen;
|
---|
198 | } VidModeRec, *VidModePtr;
|
---|
199 | #endif
|
---|
200 |
|
---|
201 | /* Information for root window properties. */
|
---|
202 | typedef struct _RootWinProp {
|
---|
203 | struct _RootWinProp * next;
|
---|
204 | char * name;
|
---|
205 | Atom type;
|
---|
206 | short format;
|
---|
207 | long size;
|
---|
208 | pointer data;
|
---|
209 | } RootWinProp, *RootWinPropPtr;
|
---|
210 |
|
---|
211 | /* private resource types */
|
---|
212 | #define ResNoAvoid ResBios
|
---|
213 |
|
---|
214 | /* ISC's cc can't handle ~ of UL constants, so explicitly type cast them. */
|
---|
215 | #define XLED1 ((unsigned long) 0x00000001)
|
---|
216 | #define XLED2 ((unsigned long) 0x00000002)
|
---|
217 | #define XLED3 ((unsigned long) 0x00000004)
|
---|
218 | #define XLED4 ((unsigned long) 0x00000008)
|
---|
219 | #define XCAPS ((unsigned long) 0x20000000)
|
---|
220 | #define XNUM ((unsigned long) 0x40000000)
|
---|
221 | #define XSCR ((unsigned long) 0x80000000)
|
---|
222 | #define XCOMP ((unsigned long) 0x00008000)
|
---|
223 |
|
---|
224 | /* BSD console driver types (consType) */
|
---|
225 | #if defined(CSRG_BASED) || defined(__FreeBSD_kernel__)
|
---|
226 | #define PCCONS 0
|
---|
227 | #define CODRV011 1
|
---|
228 | #define CODRV01X 2
|
---|
229 | #define SYSCONS 8
|
---|
230 | #define PCVT 16
|
---|
231 | #define WSCONS 32
|
---|
232 | #endif
|
---|
233 |
|
---|
234 | #endif /* _XF86PRIVSTR_H */
|
---|