1 |
|
---|
2 | /*
|
---|
3 | * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
|
---|
4 | *
|
---|
5 | * Permission is hereby granted, free of charge, to any person obtaining a
|
---|
6 | * copy of this software and associated documentation files (the "Software"),
|
---|
7 | * to deal in the Software without restriction, including without limitation
|
---|
8 | * the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
---|
9 | * and/or sell copies of the Software, and to permit persons to whom the
|
---|
10 | * Software is furnished to do so, subject to the following conditions:
|
---|
11 | *
|
---|
12 | * The above copyright notice and this permission notice shall be included in
|
---|
13 | * all copies or substantial portions of the Software.
|
---|
14 | *
|
---|
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
---|
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
---|
18 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
---|
19 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
---|
20 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
---|
21 | * OTHER DEALINGS IN THE SOFTWARE.
|
---|
22 | *
|
---|
23 | * Except as contained in this notice, the name of the copyright holder(s)
|
---|
24 | * and author(s) shall not be used in advertising or otherwise to promote
|
---|
25 | * the sale, use or other dealings in this Software without prior written
|
---|
26 | * authorization from the copyright holder(s) and author(s).
|
---|
27 | */
|
---|
28 |
|
---|
29 | /*
|
---|
30 | * This file contains definitions of the private XFree86 data structures/types.
|
---|
31 | * None of the data structures here should be used by video drivers.
|
---|
32 | */
|
---|
33 |
|
---|
34 | #ifndef _XF86PRIVSTR_H
|
---|
35 | #define _XF86PRIVSTR_H
|
---|
36 |
|
---|
37 | #include "xf86Pci.h"
|
---|
38 | #include "xf86str.h"
|
---|
39 |
|
---|
40 | typedef enum {
|
---|
41 | LogNone,
|
---|
42 | LogFlush,
|
---|
43 | LogSync
|
---|
44 | } Log;
|
---|
45 |
|
---|
46 | typedef enum {
|
---|
47 | SKNever,
|
---|
48 | SKWhenNeeded,
|
---|
49 | SKAlways
|
---|
50 | } SpecialKeysInDDX;
|
---|
51 |
|
---|
52 | typedef enum {
|
---|
53 | XF86_GlxVisualsMinimal,
|
---|
54 | XF86_GlxVisualsTypical,
|
---|
55 | XF86_GlxVisualsAll,
|
---|
56 | } XF86_GlxVisuals;
|
---|
57 |
|
---|
58 | /*
|
---|
59 | * xf86InfoRec contains global parameters which the video drivers never
|
---|
60 | * need to access. Global parameters which the video drivers do need
|
---|
61 | * should be individual globals.
|
---|
62 | */
|
---|
63 |
|
---|
64 | typedef struct {
|
---|
65 | int consoleFd;
|
---|
66 | int vtno;
|
---|
67 | Bool vtSysreq;
|
---|
68 | SpecialKeysInDDX ddxSpecialKeys;
|
---|
69 |
|
---|
70 | /* event handler part */
|
---|
71 | int lastEventTime;
|
---|
72 | Bool vtRequestsPending;
|
---|
73 | Bool dontVTSwitch;
|
---|
74 | Bool dontZap;
|
---|
75 | Bool dontZoom;
|
---|
76 | Bool notrapSignals; /* don't exit cleanly - die at fault */
|
---|
77 | Bool caughtSignal;
|
---|
78 |
|
---|
79 | /* graphics part */
|
---|
80 | ScreenPtr currentScreen;
|
---|
81 | #if defined(CSRG_BASED) || defined(__FreeBSD_kernel__)
|
---|
82 | int screenFd; /* fd for memory mapped access to
|
---|
83 | * vga card */
|
---|
84 | int consType; /* Which console driver? */
|
---|
85 | #endif
|
---|
86 |
|
---|
87 | /* Other things */
|
---|
88 | Bool allowMouseOpenFail;
|
---|
89 | Bool vidModeEnabled; /* VidMode extension enabled */
|
---|
90 | Bool vidModeAllowNonLocal; /* allow non-local VidMode
|
---|
91 | * connections */
|
---|
92 | Bool miscModInDevEnabled; /* Allow input devices to be
|
---|
93 | * changed */
|
---|
94 | Bool miscModInDevAllowNonLocal;
|
---|
95 | Pix24Flags pixmap24;
|
---|
96 | MessageType pix24From;
|
---|
97 | #ifdef __i386__
|
---|
98 | Bool pc98;
|
---|
99 | #endif
|
---|
100 | Bool pmFlag;
|
---|
101 | Log log;
|
---|
102 | Bool kbdCustomKeycodes;
|
---|
103 | Bool disableRandR;
|
---|
104 | MessageType randRFrom;
|
---|
105 | Bool aiglx;
|
---|
106 | MessageType aiglxFrom;
|
---|
107 | XF86_GlxVisuals glxVisuals;
|
---|
108 | MessageType glxVisualsFrom;
|
---|
109 |
|
---|
110 | Bool useDefaultFontPath;
|
---|
111 | MessageType useDefaultFontPathFrom;
|
---|
112 | Bool ignoreABI;
|
---|
113 |
|
---|
114 | Bool allowEmptyInput; /* Allow the server to start with no input
|
---|
115 | * devices. */
|
---|
116 | Bool autoAddDevices; /* Whether to succeed NIDR, or ignore. */
|
---|
117 | Bool autoEnableDevices; /* Whether to enable, or let the client
|
---|
118 | * control. */
|
---|
119 |
|
---|
120 | Bool dri2;
|
---|
121 | MessageType dri2From;
|
---|
122 | } xf86InfoRec, *xf86InfoPtr;
|
---|
123 |
|
---|
124 | #ifdef DPMSExtension
|
---|
125 | /* Private info for DPMS */
|
---|
126 | typedef struct {
|
---|
127 | CloseScreenProcPtr CloseScreen;
|
---|
128 | Bool Enabled;
|
---|
129 | int Flags;
|
---|
130 | } DPMSRec, *DPMSPtr;
|
---|
131 | #endif
|
---|
132 |
|
---|
133 | #ifdef XF86VIDMODE
|
---|
134 | /* Private info for Video Mode Extentsion */
|
---|
135 | typedef struct {
|
---|
136 | DisplayModePtr First;
|
---|
137 | DisplayModePtr Next;
|
---|
138 | int Flags;
|
---|
139 | CloseScreenProcPtr CloseScreen;
|
---|
140 | } VidModeRec, *VidModePtr;
|
---|
141 | #endif
|
---|
142 |
|
---|
143 | /* Information for root window properties. */
|
---|
144 | typedef struct _RootWinProp {
|
---|
145 | struct _RootWinProp * next;
|
---|
146 | char * name;
|
---|
147 | Atom type;
|
---|
148 | short format;
|
---|
149 | long size;
|
---|
150 | pointer data;
|
---|
151 | } RootWinProp, *RootWinPropPtr;
|
---|
152 |
|
---|
153 | /* private resource types */
|
---|
154 | #define ResNoAvoid ResBios
|
---|
155 |
|
---|
156 | /* ISC's cc can't handle ~ of UL constants, so explicitly type cast them. */
|
---|
157 | #define XLED1 ((unsigned long) 0x00000001)
|
---|
158 | #define XLED2 ((unsigned long) 0x00000002)
|
---|
159 | #define XLED3 ((unsigned long) 0x00000004)
|
---|
160 | #define XLED4 ((unsigned long) 0x00000008)
|
---|
161 | #define XCAPS ((unsigned long) 0x20000000)
|
---|
162 | #define XNUM ((unsigned long) 0x40000000)
|
---|
163 | #define XSCR ((unsigned long) 0x80000000)
|
---|
164 | #define XCOMP ((unsigned long) 0x00008000)
|
---|
165 |
|
---|
166 | /* BSD console driver types (consType) */
|
---|
167 | #if defined(CSRG_BASED) || defined(__FreeBSD_kernel__)
|
---|
168 | #define PCCONS 0
|
---|
169 | #define CODRV011 1
|
---|
170 | #define CODRV01X 2
|
---|
171 | #define SYSCONS 8
|
---|
172 | #define PCVT 16
|
---|
173 | #define WSCONS 32
|
---|
174 | #endif
|
---|
175 |
|
---|
176 | #endif /* _XF86PRIVSTR_H */
|
---|