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 "xf86str.h"
|
---|
38 |
|
---|
39 | typedef enum {
|
---|
40 | LogNone,
|
---|
41 | LogFlush,
|
---|
42 | LogSync
|
---|
43 | } Log;
|
---|
44 |
|
---|
45 | typedef enum {
|
---|
46 | XF86_GlxVisualsMinimal,
|
---|
47 | XF86_GlxVisualsTypical,
|
---|
48 | XF86_GlxVisualsAll,
|
---|
49 | } XF86_GlxVisuals;
|
---|
50 |
|
---|
51 | /*
|
---|
52 | * xf86InfoRec contains global parameters which the video drivers never
|
---|
53 | * need to access. Global parameters which the video drivers do need
|
---|
54 | * should be individual globals.
|
---|
55 | */
|
---|
56 |
|
---|
57 | typedef struct {
|
---|
58 | int consoleFd;
|
---|
59 | int vtno;
|
---|
60 |
|
---|
61 | /* event handler part */
|
---|
62 | int lastEventTime;
|
---|
63 | Bool vtRequestsPending;
|
---|
64 | #ifdef sun
|
---|
65 | int vtPendingNum;
|
---|
66 | #endif
|
---|
67 | Bool dontVTSwitch;
|
---|
68 | Bool autoVTSwitch;
|
---|
69 | Bool ShareVTs;
|
---|
70 | Bool dontZap;
|
---|
71 | Bool dontZoom;
|
---|
72 | Bool notrapSignals; /* don't exit cleanly - die at fault */
|
---|
73 | Bool caughtSignal;
|
---|
74 |
|
---|
75 | /* graphics part */
|
---|
76 | ScreenPtr currentScreen;
|
---|
77 | #if defined(CSRG_BASED) || defined(__FreeBSD_kernel__)
|
---|
78 | int consType; /* Which console driver? */
|
---|
79 | #endif
|
---|
80 |
|
---|
81 | /* Other things */
|
---|
82 | Bool allowMouseOpenFail;
|
---|
83 | Bool vidModeEnabled; /* VidMode extension enabled */
|
---|
84 | Bool vidModeAllowNonLocal; /* allow non-local VidMode
|
---|
85 | * connections */
|
---|
86 | Bool miscModInDevEnabled; /* Allow input devices to be
|
---|
87 | * changed */
|
---|
88 | Bool miscModInDevAllowNonLocal;
|
---|
89 | Bool useSIGIO; /* Use SIGIO for handling
|
---|
90 | input device events */
|
---|
91 | Pix24Flags pixmap24;
|
---|
92 | MessageType pix24From;
|
---|
93 | Bool pmFlag;
|
---|
94 | Log log;
|
---|
95 | Bool disableRandR;
|
---|
96 | MessageType randRFrom;
|
---|
97 | Bool aiglx;
|
---|
98 | MessageType aiglxFrom;
|
---|
99 | XF86_GlxVisuals glxVisuals;
|
---|
100 | MessageType glxVisualsFrom;
|
---|
101 |
|
---|
102 | Bool useDefaultFontPath;
|
---|
103 | MessageType useDefaultFontPathFrom;
|
---|
104 | Bool ignoreABI;
|
---|
105 |
|
---|
106 | Bool forceInputDevices; /* force xorg.conf or built-in input devices */
|
---|
107 | Bool autoAddDevices; /* Whether to succeed NIDR, or ignore. */
|
---|
108 | Bool autoEnableDevices; /* Whether to enable, or let the client
|
---|
109 | * control. */
|
---|
110 |
|
---|
111 | Bool dri2;
|
---|
112 | MessageType dri2From;
|
---|
113 | } xf86InfoRec, *xf86InfoPtr;
|
---|
114 |
|
---|
115 | #ifdef DPMSExtension
|
---|
116 | /* Private info for DPMS */
|
---|
117 | typedef struct {
|
---|
118 | CloseScreenProcPtr CloseScreen;
|
---|
119 | Bool Enabled;
|
---|
120 | int Flags;
|
---|
121 | } DPMSRec, *DPMSPtr;
|
---|
122 | #endif
|
---|
123 |
|
---|
124 | #ifdef XF86VIDMODE
|
---|
125 | /* Private info for Video Mode Extentsion */
|
---|
126 | typedef struct {
|
---|
127 | DisplayModePtr First;
|
---|
128 | DisplayModePtr Next;
|
---|
129 | int Flags;
|
---|
130 | CloseScreenProcPtr CloseScreen;
|
---|
131 | } VidModeRec, *VidModePtr;
|
---|
132 | #endif
|
---|
133 |
|
---|
134 | /* Information for root window properties. */
|
---|
135 | typedef struct _RootWinProp {
|
---|
136 | struct _RootWinProp * next;
|
---|
137 | char * name;
|
---|
138 | Atom type;
|
---|
139 | short format;
|
---|
140 | long size;
|
---|
141 | pointer data;
|
---|
142 | } RootWinProp, *RootWinPropPtr;
|
---|
143 |
|
---|
144 | /* ISC's cc can't handle ~ of UL constants, so explicitly type cast them. */
|
---|
145 | #define XLED1 ((unsigned long) 0x00000001)
|
---|
146 | #define XLED2 ((unsigned long) 0x00000002)
|
---|
147 | #define XLED3 ((unsigned long) 0x00000004)
|
---|
148 | #define XLED4 ((unsigned long) 0x00000008)
|
---|
149 | #define XCAPS ((unsigned long) 0x20000000)
|
---|
150 | #define XNUM ((unsigned long) 0x40000000)
|
---|
151 | #define XSCR ((unsigned long) 0x80000000)
|
---|
152 | #define XCOMP ((unsigned long) 0x00008000)
|
---|
153 |
|
---|
154 | /* BSD console driver types (consType) */
|
---|
155 | #if defined(CSRG_BASED) || defined(__FreeBSD_kernel__)
|
---|
156 | #define PCCONS 0
|
---|
157 | #define CODRV011 1
|
---|
158 | #define CODRV01X 2
|
---|
159 | #define SYSCONS 8
|
---|
160 | #define PCVT 16
|
---|
161 | #define WSCONS 32
|
---|
162 | #endif
|
---|
163 |
|
---|
164 | #endif /* _XF86PRIVSTR_H */
|
---|