1 /* 2 * $XFree86: mit/server/ddx/x386/common/x386Priv.h,v 2.7 1993/09/23 15:45:21 dawes Exp $ 3 * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany. 4 * 5 * Permission to use, copy, modify, distribute, and sell this software and its 6 * documentation for any purpose is hereby granted without fee, provided that 7 * the above copyright notice appear in all copies and that both that 8 * copyright notice and this permission notice appear in supporting 9 * documentation, and that the name of Thomas Roell not be used in 10 * advertising or publicity pertaining to distribution of the software without 11 * specific, written prior permission. Thomas Roell makes no representations 12 * about the suitability of this software for any purpose. It is provided 13 * "as is" without express or implied warranty. 14 * 15 * THOMAS ROELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 16 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 17 * EVENT SHALL THOMAS ROELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR 18 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 19 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 20 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 21 * PERFORMANCE OF THIS SOFTWARE. 22 * 23 * $Header: /proj/X11/mit/server/ddx/x386/RCS/x386Priv.h,v 1.3 1991/06/30 21:02:53 root Exp $ 24 */ 25 26 #ifndef _X386PRIV_H 27 #define _X386PRIV_H 28 29 30 typedef struct { 31 32 /* keyboard part */ 33 DevicePtr pKeyboard; 34 int (* kbdProc)(); /* procedure for initializing */ 35 void (* kbdEvents)(); /* proc for processing events */ 36 #ifndef _MINIX 37 int consoleFd; 38 #else 39 int kbdFd; 40 char kbdBuf[16]; 41 int kbdAvail; 42 int kbdInprogress; 43 #endif /* _MINIX */ 44 #if defined(MACH386) || defined(__OSF__) 45 int kbdFd; 46 #endif /* MACH386 || __OSF__ */ 47 int vtno; 48 int kbdType; /* AT84 / AT101 */ 49 int kbdRate; 50 int kbdDelay; 51 int bell_pitch; 52 int bell_duration; 53 Bool autoRepeat; 54 unsigned long leds; 55 unsigned long xleds; 56 char *vtinit; 57 int *specialKeyMap; 58 int scanPrefix; /* scancode-state */ 59 Bool capsLock; 60 Bool numLock; 61 Bool scrollLock; 62 Bool modeSwitchLock; 63 Bool serverNumLock; 64 Bool composeLock; 65 66 /* pointer part */ 67 DevicePtr pPointer; 68 int (* mseProc)(); /* procedure for initializing */ 69 void (* mseEvents)(); /* proc for processing events */ 70 int mseFd; 71 #ifdef _MINIX 72 char mseBuf[16]; 73 int mseAvail; 74 int mseInprogress; 75 #endif /* _MINIX */ 76 char *mseDevice; 77 int mseType; 78 int baudRate; 79 int sampleRate; 80 int lastButtons; 81 int threshold, num, den; /* acceleration */ 82 int emulateState; /* automata state for 2 button mode */ 83 Bool emulate3Buttons; 84 Bool chordMiddle; 85 #if defined(SYSV386) || defined(linux) || defined(__386BSD__) 86 Bool clearDTR; /* Clear DTR after opening mouse dev */ 87 #endif 88 89 /* xque part */ 90 int xqueFd; 91 int xqueSema; 92 93 /* event handler part */ 94 int lastEventTime; 95 Bool vtRequestsPending; 96 Bool inputPending; 97 Bool dontZap; 98 Bool notrapSignals; /* don't exit cleanly - die at fault */ 99 Bool caughtSignal; 100 101 /* graphics part */ 102 Bool sharedMonitor; 103 ScreenPtr currentScreen; 104 #if defined(__386BSD__) || defined(_MINIX) 105 int screenFd; /* fd for memory mapped access to vga card */ 106 #endif 107 #ifdef __386BSD__ 108 int consType; /* Which console driver? */ 109 #endif 110 #ifdef _MINIX 111 void *screenPtrRaw; 112 #endif 113 #if defined(AMOEBA) || defined(_MINIX) 114 void *screenPtr; 115 #endif 116 117 } x386InfoRec, *x386InfoPtr; 118 119 extern x386InfoRec x386Info; 120 121 /* ISC's cc can't handle ~ of UL constants, so explicitly type cast them. */ 122 #define XLED1 ((unsigned long) 0x00000001) 123 #define XLED2 ((unsigned long) 0x00000002) 124 #define XLED3 ((unsigned long) 0x00000004) 125 #define XCAPS ((unsigned long) 0x20000000) 126 #define XNUM ((unsigned long) 0x40000000) 127 #define XSCR ((unsigned long) 0x80000000) 128 #define XCOMP ((unsigned long) 0x00008000) 129 130 /* 386BSD console driver types (consType) */ 131 #ifdef __386BSD__ 132 #define PCCONS 0 133 #define CODRV011 1 134 #define CODRV01X 2 135 #define SYSCONS 8 136 #endif 137 138 extern int x386ScreenIndex; 139 140 #define X386SCRNINFO(p) ((ScrnInfoPtr)((p)->devPrivates[x386ScreenIndex].ptr)) 141 142 extern int x386MaxScreens; 143 extern ScrnInfoPtr x386Screens[]; 144 extern int xf86ScreenNames[]; 145 146 extern char x386ConfigFile[]; 147 extern Bool x386Verbose; 148 extern unsigned short xf86MouseCflags[]; 149 extern Bool xf86SupportedMouseTypes[]; 150 extern int xf86NumMouseTypes; 151 152 #endif /* _X386PRIV_H */ 153 154 155