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