xf86Priv.h (5581B)
1 /* 2 * Copyright (c) 1997-2002 by The XFree86 Project, Inc. 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and associated documentation files (the "Software"), 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the 9 * Software is furnished to do so, subject to the following conditions: 10 * 11 * The above copyright notice and this permission notice shall be included in 12 * all copies or substantial portions of the Software. 13 * 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20 * OTHER DEALINGS IN THE SOFTWARE. 21 * 22 * Except as contained in this notice, the name of the copyright holder(s) 23 * and author(s) shall not be used in advertising or otherwise to promote 24 * the sale, use or other dealings in this Software without prior written 25 * authorization from the copyright holder(s) and author(s). 26 */ 27 28 /* 29 * This file contains declarations for private XFree86 functions and variables, 30 * and definitions of private macros. 31 * 32 * "private" means not available to video drivers. 33 */ 34 35 #ifndef _XF86PRIV_H 36 #define _XF86PRIV_H 37 38 #include "xf86Privstr.h" 39 #include "propertyst.h" 40 #include "input.h" 41 42 /* 43 * Parameters set ONLY from the command line options 44 * The global state of these things is held in xf86InfoRec (when appropriate). 45 */ 46 extern _X_EXPORT const char *xf86ConfigFile; 47 extern _X_EXPORT const char *xf86ConfigDir; 48 extern _X_EXPORT Bool xf86AllowMouseOpenFail; 49 extern _X_EXPORT Bool xf86AutoBindGPUDisabled; 50 51 #ifdef XF86VIDMODE 52 extern _X_EXPORT Bool xf86VidModeDisabled; 53 extern _X_EXPORT Bool xf86VidModeAllowNonLocal; 54 #endif 55 extern _X_EXPORT Bool xf86fpFlag; 56 extern _X_EXPORT Bool xf86sFlag; 57 extern _X_EXPORT Bool xf86bsEnableFlag; 58 extern _X_EXPORT Bool xf86bsDisableFlag; 59 extern _X_EXPORT Bool xf86silkenMouseDisableFlag; 60 extern _X_EXPORT Bool xf86xkbdirFlag; 61 62 #ifdef HAVE_ACPI 63 extern _X_EXPORT Bool xf86acpiDisableFlag; 64 #endif 65 extern _X_EXPORT char *xf86LayoutName; 66 extern _X_EXPORT char *xf86ScreenName; 67 extern _X_EXPORT char *xf86PointerName; 68 extern _X_EXPORT char *xf86KeyboardName; 69 extern _X_EXPORT int xf86FbBpp; 70 extern _X_EXPORT int xf86Depth; 71 extern _X_EXPORT rgb xf86Weight; 72 extern _X_EXPORT Gamma xf86Gamma; 73 74 /* Other parameters */ 75 76 extern _X_EXPORT xf86InfoRec xf86Info; 77 extern _X_EXPORT const char *xf86ModulePath; 78 extern _X_EXPORT MessageType xf86ModPathFrom; 79 extern _X_EXPORT const char *xf86LogFile; 80 extern _X_EXPORT MessageType xf86LogFileFrom; 81 extern _X_EXPORT Bool xf86LogFileWasOpened; 82 extern _X_EXPORT serverLayoutRec xf86ConfigLayout; 83 84 extern _X_EXPORT DriverPtr *xf86DriverList; 85 extern _X_EXPORT int xf86NumDrivers; 86 extern _X_EXPORT Bool xf86Resetting; 87 extern Bool xf86Initialising; 88 extern _X_EXPORT int xf86NumScreens; 89 extern _X_EXPORT const char *xf86VisualNames[]; 90 extern _X_EXPORT int xf86Verbose; /* verbosity level */ 91 extern _X_EXPORT int xf86LogVerbose; /* log file verbosity level */ 92 93 extern _X_EXPORT ScrnInfoPtr *xf86GPUScreens; /* List of pointers to ScrnInfoRecs */ 94 extern _X_EXPORT int xf86NumGPUScreens; 95 extern _X_EXPORT int xf86DRMMasterFd; /* Command line argument for DRM master file descriptor */ 96 #ifndef DEFAULT_VERBOSE 97 #define DEFAULT_VERBOSE 0 98 #endif 99 #ifndef DEFAULT_LOG_VERBOSE 100 #define DEFAULT_LOG_VERBOSE 3 101 #endif 102 #ifndef DEFAULT_DPI 103 #define DEFAULT_DPI 96 104 #endif 105 106 /* Function Prototypes */ 107 #ifndef _NO_XF86_PROTOTYPES 108 109 /* xf86Bus.c */ 110 extern _X_EXPORT Bool xf86BusConfig(void); 111 extern _X_EXPORT void xf86BusProbe(void); 112 extern _X_EXPORT void xf86PostProbe(void); 113 extern _X_EXPORT void xf86ClearEntityListForScreen(ScrnInfoPtr pScrn); 114 extern _X_EXPORT void xf86AddDevToEntity(int entityIndex, GDevPtr dev); 115 extern _X_EXPORT void xf86RemoveDevFromEntity(int entityIndex, GDevPtr dev); 116 117 /* xf86Config.c */ 118 119 extern _X_EXPORT Bool xf86PathIsSafe(const char *path); 120 121 /* xf86DefaultModes */ 122 123 extern _X_EXPORT const DisplayModeRec xf86DefaultModes[]; 124 extern _X_EXPORT const int xf86NumDefaultModes; 125 126 /* xf86Configure.c */ 127 extern _X_EXPORT void 128 DoConfigure(void) 129 _X_NORETURN; 130 extern _X_EXPORT void 131 DoShowOptions(void) 132 _X_NORETURN; 133 134 /* xf86Events.c */ 135 136 extern _X_EXPORT void 137 xf86Wakeup(void *blockData, int err); 138 extern _X_EXPORT void 139 xf86HandlePMEvents(int fd, void *data); 140 extern _X_EXPORT int (*xf86PMGetEventFromOs) (int fd, pmEvent * events, 141 int num); 142 extern _X_EXPORT pmWait (*xf86PMConfirmEventToOs) (int fd, pmEvent event); 143 144 /* xf86Helper.c */ 145 extern _X_EXPORT void 146 xf86LogInit(void); 147 extern _X_EXPORT void 148 xf86CloseLog(enum ExitCode error); 149 150 /* xf86Init.c */ 151 extern _X_EXPORT Bool 152 xf86LoadModules(const char **list, void **optlist); 153 extern _X_EXPORT int 154 xf86SetVerbosity(int verb); 155 extern _X_EXPORT int 156 xf86SetLogVerbosity(int verb); 157 extern _X_EXPORT Bool 158 xf86CallDriverProbe(struct _DriverRec *drv, Bool detect_only); 159 extern _X_EXPORT Bool 160 xf86PrivsElevated(void); 161 extern _X_EXPORT Bool 162 xf86HasTTYs(void); 163 164 #endif /* _NO_XF86_PROTOTYPES */ 165 166 #endif /* _XF86PRIV_H */