1*4882a593Smuzhiyun 2*4882a593Smuzhiyun /* 3*4882a593Smuzhiyun * Copyright (c) 1997-2003 by The XFree86 Project, Inc. 4*4882a593Smuzhiyun * 5*4882a593Smuzhiyun * Permission is hereby granted, free of charge, to any person obtaining a 6*4882a593Smuzhiyun * copy of this software and associated documentation files (the "Software"), 7*4882a593Smuzhiyun * to deal in the Software without restriction, including without limitation 8*4882a593Smuzhiyun * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9*4882a593Smuzhiyun * and/or sell copies of the Software, and to permit persons to whom the 10*4882a593Smuzhiyun * Software is furnished to do so, subject to the following conditions: 11*4882a593Smuzhiyun * 12*4882a593Smuzhiyun * The above copyright notice and this permission notice shall be included in 13*4882a593Smuzhiyun * all copies or substantial portions of the Software. 14*4882a593Smuzhiyun * 15*4882a593Smuzhiyun * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16*4882a593Smuzhiyun * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17*4882a593Smuzhiyun * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18*4882a593Smuzhiyun * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 19*4882a593Smuzhiyun * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 20*4882a593Smuzhiyun * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 21*4882a593Smuzhiyun * OTHER DEALINGS IN THE SOFTWARE. 22*4882a593Smuzhiyun * 23*4882a593Smuzhiyun * Except as contained in this notice, the name of the copyright holder(s) 24*4882a593Smuzhiyun * and author(s) shall not be used in advertising or otherwise to promote 25*4882a593Smuzhiyun * the sale, use or other dealings in this Software without prior written 26*4882a593Smuzhiyun * authorization from the copyright holder(s) and author(s). 27*4882a593Smuzhiyun */ 28*4882a593Smuzhiyun 29*4882a593Smuzhiyun /* 30*4882a593Smuzhiyun * This file contains definitions of the private XFree86 data structures/types. 31*4882a593Smuzhiyun * None of the data structures here should be used by video drivers. 32*4882a593Smuzhiyun */ 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun #ifndef _XF86PRIVSTR_H 35*4882a593Smuzhiyun #define _XF86PRIVSTR_H 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun #include "xf86str.h" 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun typedef enum { 40*4882a593Smuzhiyun XF86_GlxVisualsMinimal, 41*4882a593Smuzhiyun XF86_GlxVisualsTypical, 42*4882a593Smuzhiyun XF86_GlxVisualsAll, 43*4882a593Smuzhiyun } XF86_GlxVisuals; 44*4882a593Smuzhiyun 45*4882a593Smuzhiyun /* 46*4882a593Smuzhiyun * xf86InfoRec contains global parameters which the video drivers never 47*4882a593Smuzhiyun * need to access. Global parameters which the video drivers do need 48*4882a593Smuzhiyun * should be individual globals. 49*4882a593Smuzhiyun */ 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun typedef struct { 52*4882a593Smuzhiyun int consoleFd; 53*4882a593Smuzhiyun int vtno; 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun /* event handler part */ 56*4882a593Smuzhiyun int lastEventTime; 57*4882a593Smuzhiyun Bool vtRequestsPending; 58*4882a593Smuzhiyun #ifdef __sun 59*4882a593Smuzhiyun int vtPendingNum; 60*4882a593Smuzhiyun #endif 61*4882a593Smuzhiyun Bool dontVTSwitch; 62*4882a593Smuzhiyun Bool autoVTSwitch; 63*4882a593Smuzhiyun Bool ShareVTs; 64*4882a593Smuzhiyun Bool dontZap; 65*4882a593Smuzhiyun Bool dontZoom; 66*4882a593Smuzhiyun Bool notrapSignals; /* don't exit cleanly - die at fault */ 67*4882a593Smuzhiyun 68*4882a593Smuzhiyun /* graphics part */ 69*4882a593Smuzhiyun ScreenPtr currentScreen; 70*4882a593Smuzhiyun #if defined(CSRG_BASED) || defined(__FreeBSD_kernel__) 71*4882a593Smuzhiyun int consType; /* Which console driver? */ 72*4882a593Smuzhiyun #endif 73*4882a593Smuzhiyun 74*4882a593Smuzhiyun /* Other things */ 75*4882a593Smuzhiyun Bool allowMouseOpenFail; 76*4882a593Smuzhiyun Bool vidModeEnabled; /* VidMode extension enabled */ 77*4882a593Smuzhiyun Bool vidModeAllowNonLocal; /* allow non-local VidMode 78*4882a593Smuzhiyun * connections */ 79*4882a593Smuzhiyun Bool miscModInDevEnabled; /* Allow input devices to be 80*4882a593Smuzhiyun * changed */ 81*4882a593Smuzhiyun Bool miscModInDevAllowNonLocal; 82*4882a593Smuzhiyun Bool useSIGIO; /* Use SIGIO for handling DRI1 swaps */ 83*4882a593Smuzhiyun Bool pmFlag; 84*4882a593Smuzhiyun MessageType iglxFrom; 85*4882a593Smuzhiyun XF86_GlxVisuals glxVisuals; 86*4882a593Smuzhiyun MessageType glxVisualsFrom; 87*4882a593Smuzhiyun 88*4882a593Smuzhiyun Bool useDefaultFontPath; 89*4882a593Smuzhiyun Bool ignoreABI; 90*4882a593Smuzhiyun 91*4882a593Smuzhiyun Bool forceInputDevices; /* force xorg.conf or built-in input devices */ 92*4882a593Smuzhiyun Bool autoAddDevices; /* Whether to succeed NIDR, or ignore. */ 93*4882a593Smuzhiyun Bool autoEnableDevices; /* Whether to enable, or let the client 94*4882a593Smuzhiyun * control. */ 95*4882a593Smuzhiyun 96*4882a593Smuzhiyun Bool dri2; 97*4882a593Smuzhiyun MessageType dri2From; 98*4882a593Smuzhiyun 99*4882a593Smuzhiyun Bool autoAddGPU; 100*4882a593Smuzhiyun const char *debug; 101*4882a593Smuzhiyun } xf86InfoRec, *xf86InfoPtr; 102*4882a593Smuzhiyun 103*4882a593Smuzhiyun /* ISC's cc can't handle ~ of UL constants, so explicitly type cast them. */ 104*4882a593Smuzhiyun #define XLED1 ((unsigned long) 0x00000001) 105*4882a593Smuzhiyun #define XLED2 ((unsigned long) 0x00000002) 106*4882a593Smuzhiyun #define XLED3 ((unsigned long) 0x00000004) 107*4882a593Smuzhiyun #define XLED4 ((unsigned long) 0x00000008) 108*4882a593Smuzhiyun #define XCAPS ((unsigned long) 0x20000000) 109*4882a593Smuzhiyun #define XNUM ((unsigned long) 0x40000000) 110*4882a593Smuzhiyun #define XSCR ((unsigned long) 0x80000000) 111*4882a593Smuzhiyun #define XCOMP ((unsigned long) 0x00008000) 112*4882a593Smuzhiyun 113*4882a593Smuzhiyun /* BSD console driver types (consType) */ 114*4882a593Smuzhiyun #if defined(CSRG_BASED) || defined(__FreeBSD_kernel__) 115*4882a593Smuzhiyun #define PCCONS 0 116*4882a593Smuzhiyun #define CODRV011 1 117*4882a593Smuzhiyun #define CODRV01X 2 118*4882a593Smuzhiyun #define SYSCONS 8 119*4882a593Smuzhiyun #define PCVT 16 120*4882a593Smuzhiyun #define WSCONS 32 121*4882a593Smuzhiyun #endif 122*4882a593Smuzhiyun 123*4882a593Smuzhiyun /* Root window property to tell clients whether our VT is currently active. 124*4882a593Smuzhiyun * Name chosen to match the "XFree86_VT" property. */ 125*4882a593Smuzhiyun #define HAS_VT_ATOM_NAME "XFree86_has_VT" 126*4882a593Smuzhiyun 127*4882a593Smuzhiyun #endif /* _XF86PRIVSTR_H */ 128