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 XF86_GlxVisualsMinimal, 41 XF86_GlxVisualsTypical, 42 XF86_GlxVisualsAll, 43 } XF86_GlxVisuals; 44 45 /* 46 * xf86InfoRec contains global parameters which the video drivers never 47 * need to access. Global parameters which the video drivers do need 48 * should be individual globals. 49 */ 50 51 typedef struct { 52 int consoleFd; 53 int vtno; 54 55 /* event handler part */ 56 int lastEventTime; 57 Bool vtRequestsPending; 58 #ifdef __sun 59 int vtPendingNum; 60 #endif 61 Bool dontVTSwitch; 62 Bool autoVTSwitch; 63 Bool ShareVTs; 64 Bool dontZap; 65 Bool dontZoom; 66 Bool notrapSignals; /* don't exit cleanly - die at fault */ 67 68 /* graphics part */ 69 ScreenPtr currentScreen; 70 #if defined(CSRG_BASED) || defined(__FreeBSD_kernel__) 71 int consType; /* Which console driver? */ 72 #endif 73 74 /* Other things */ 75 Bool allowMouseOpenFail; 76 Bool vidModeEnabled; /* VidMode extension enabled */ 77 Bool vidModeAllowNonLocal; /* allow non-local VidMode 78 * connections */ 79 Bool miscModInDevEnabled; /* Allow input devices to be 80 * changed */ 81 Bool miscModInDevAllowNonLocal; 82 Bool useSIGIO; /* Use SIGIO for handling DRI1 swaps */ 83 Bool pmFlag; 84 MessageType iglxFrom; 85 XF86_GlxVisuals glxVisuals; 86 MessageType glxVisualsFrom; 87 88 Bool useDefaultFontPath; 89 Bool ignoreABI; 90 91 Bool forceInputDevices; /* force xorg.conf or built-in input devices */ 92 Bool autoAddDevices; /* Whether to succeed NIDR, or ignore. */ 93 Bool autoEnableDevices; /* Whether to enable, or let the client 94 * control. */ 95 96 Bool dri2; 97 MessageType dri2From; 98 99 Bool autoAddGPU; 100 const char *debug; 101 } xf86InfoRec, *xf86InfoPtr; 102 103 /* ISC's cc can't handle ~ of UL constants, so explicitly type cast them. */ 104 #define XLED1 ((unsigned long) 0x00000001) 105 #define XLED2 ((unsigned long) 0x00000002) 106 #define XLED3 ((unsigned long) 0x00000004) 107 #define XLED4 ((unsigned long) 0x00000008) 108 #define XCAPS ((unsigned long) 0x20000000) 109 #define XNUM ((unsigned long) 0x40000000) 110 #define XSCR ((unsigned long) 0x80000000) 111 #define XCOMP ((unsigned long) 0x00008000) 112 113 /* BSD console driver types (consType) */ 114 #if defined(CSRG_BASED) || defined(__FreeBSD_kernel__) 115 #define PCCONS 0 116 #define CODRV011 1 117 #define CODRV01X 2 118 #define SYSCONS 8 119 #define PCVT 16 120 #define WSCONS 32 121 #endif 122 123 /* Root window property to tell clients whether our VT is currently active. 124 * Name chosen to match the "XFree86_VT" property. */ 125 #define HAS_VT_ATOM_NAME "XFree86_has_VT" 126 127 #endif /* _XF86PRIVSTR_H */ 128