105b261ecSmrg/* 205b261ecSmrg * Copyright (c) 1997-2002 by The XFree86 Project, Inc. 305b261ecSmrg * 405b261ecSmrg * Permission is hereby granted, free of charge, to any person obtaining a 505b261ecSmrg * copy of this software and associated documentation files (the "Software"), 605b261ecSmrg * to deal in the Software without restriction, including without limitation 705b261ecSmrg * the rights to use, copy, modify, merge, publish, distribute, sublicense, 805b261ecSmrg * and/or sell copies of the Software, and to permit persons to whom the 905b261ecSmrg * Software is furnished to do so, subject to the following conditions: 1005b261ecSmrg * 1105b261ecSmrg * The above copyright notice and this permission notice shall be included in 1205b261ecSmrg * all copies or substantial portions of the Software. 1305b261ecSmrg * 1405b261ecSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1505b261ecSmrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1605b261ecSmrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1705b261ecSmrg * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 1805b261ecSmrg * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1905b261ecSmrg * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 2005b261ecSmrg * OTHER DEALINGS IN THE SOFTWARE. 2105b261ecSmrg * 2205b261ecSmrg * Except as contained in this notice, the name of the copyright holder(s) 2305b261ecSmrg * and author(s) shall not be used in advertising or otherwise to promote 2405b261ecSmrg * the sale, use or other dealings in this Software without prior written 2505b261ecSmrg * authorization from the copyright holder(s) and author(s). 2605b261ecSmrg */ 2705b261ecSmrg 2805b261ecSmrg/* 2905b261ecSmrg * This file contains declarations for private XFree86 functions and variables, 3005b261ecSmrg * and definitions of private macros. 3105b261ecSmrg * 3205b261ecSmrg * "private" means not available to video drivers. 3305b261ecSmrg */ 3405b261ecSmrg 3505b261ecSmrg#ifndef _XF86PRIV_H 3605b261ecSmrg#define _XF86PRIV_H 3705b261ecSmrg 3805b261ecSmrg#include "xf86Privstr.h" 3905b261ecSmrg#include "propertyst.h" 404642e01fSmrg#include "input.h" 4105b261ecSmrg 4205b261ecSmrg/* 4305b261ecSmrg * Parameters set ONLY from the command line options 4405b261ecSmrg * The global state of these things is held in xf86InfoRec (when appropriate). 4505b261ecSmrg */ 466747b715Smrgextern _X_EXPORT const char *xf86ConfigFile; 476747b715Smrgextern _X_EXPORT const char *xf86ConfigDir; 4835c4bbdfSmrgextern _X_EXPORT Bool xf86AllowMouseOpenFail; 49ed6184dfSmrgextern _X_EXPORT Bool xf86AutoBindGPUDisabled; 5035c4bbdfSmrg 5105b261ecSmrg#ifdef XF86VIDMODE 5235c4bbdfSmrgextern _X_EXPORT Bool xf86VidModeDisabled; 5335c4bbdfSmrgextern _X_EXPORT Bool xf86VidModeAllowNonLocal; 5435c4bbdfSmrg#endif 5535c4bbdfSmrgextern _X_EXPORT Bool xf86fpFlag; 5635c4bbdfSmrgextern _X_EXPORT Bool xf86sFlag; 5735c4bbdfSmrgextern _X_EXPORT Bool xf86bsEnableFlag; 5835c4bbdfSmrgextern _X_EXPORT Bool xf86bsDisableFlag; 5935c4bbdfSmrgextern _X_EXPORT Bool xf86silkenMouseDisableFlag; 6035c4bbdfSmrgextern _X_EXPORT Bool xf86xkbdirFlag; 6135c4bbdfSmrg 626747b715Smrg#ifdef HAVE_ACPI 6335c4bbdfSmrgextern _X_EXPORT Bool xf86acpiDisableFlag; 6405b261ecSmrg#endif 6535c4bbdfSmrgextern _X_EXPORT char *xf86LayoutName; 6635c4bbdfSmrgextern _X_EXPORT char *xf86ScreenName; 6735c4bbdfSmrgextern _X_EXPORT char *xf86PointerName; 6835c4bbdfSmrgextern _X_EXPORT char *xf86KeyboardName; 6935c4bbdfSmrgextern _X_EXPORT int xf86FbBpp; 7035c4bbdfSmrgextern _X_EXPORT int xf86Depth; 7135c4bbdfSmrgextern _X_EXPORT rgb xf86Weight; 729b06bd19Stsutsuiextern _X_EXPORT Bool xf86FlipPixels; 7335c4bbdfSmrgextern _X_EXPORT Gamma xf86Gamma; 7405b261ecSmrg 7505b261ecSmrg/* Other parameters */ 7605b261ecSmrg 7735c4bbdfSmrgextern _X_EXPORT xf86InfoRec xf86Info; 7835c4bbdfSmrgextern _X_EXPORT const char *xf86ModulePath; 7935c4bbdfSmrgextern _X_EXPORT MessageType xf86ModPathFrom; 8035c4bbdfSmrgextern _X_EXPORT const char *xf86LogFile; 8135c4bbdfSmrgextern _X_EXPORT MessageType xf86LogFileFrom; 8235c4bbdfSmrgextern _X_EXPORT Bool xf86LogFileWasOpened; 8335c4bbdfSmrgextern _X_EXPORT serverLayoutRec xf86ConfigLayout; 8435c4bbdfSmrg 8535c4bbdfSmrgextern _X_EXPORT DriverPtr *xf86DriverList; 8635c4bbdfSmrgextern _X_EXPORT int xf86NumDrivers; 8735c4bbdfSmrgextern _X_EXPORT Bool xf86Resetting; 881b5d61b8Smrgextern Bool xf86Initialising; 8935c4bbdfSmrgextern _X_EXPORT int xf86NumScreens; 9035c4bbdfSmrgextern _X_EXPORT const char *xf86VisualNames[]; 9135c4bbdfSmrgextern _X_EXPORT int xf86Verbose; /* verbosity level */ 9235c4bbdfSmrgextern _X_EXPORT int xf86LogVerbose; /* log file verbosity level */ 9335c4bbdfSmrg 94ed6184dfSmrgextern _X_EXPORT ScrnInfoPtr *xf86GPUScreens; /* List of pointers to ScrnInfoRecs */ 95ed6184dfSmrgextern _X_EXPORT int xf86NumGPUScreens; 961b5d61b8Smrgextern _X_EXPORT int xf86DRMMasterFd; /* Command line argument for DRM master file descriptor */ 9705b261ecSmrg#ifndef DEFAULT_VERBOSE 9805b261ecSmrg#define DEFAULT_VERBOSE 0 9905b261ecSmrg#endif 10005b261ecSmrg#ifndef DEFAULT_LOG_VERBOSE 10105b261ecSmrg#define DEFAULT_LOG_VERBOSE 3 10205b261ecSmrg#endif 10305b261ecSmrg#ifndef DEFAULT_DPI 10405b261ecSmrg#define DEFAULT_DPI 96 10505b261ecSmrg#endif 10605b261ecSmrg 10705b261ecSmrg/* Function Prototypes */ 10805b261ecSmrg#ifndef _NO_XF86_PROTOTYPES 10905b261ecSmrg 11005b261ecSmrg/* xf86Bus.c */ 1116747b715Smrgextern _X_EXPORT Bool xf86BusConfig(void); 1126747b715Smrgextern _X_EXPORT void xf86BusProbe(void); 1136747b715Smrgextern _X_EXPORT void xf86PostProbe(void); 11435c4bbdfSmrgextern _X_EXPORT void xf86ClearEntityListForScreen(ScrnInfoPtr pScrn); 1156747b715Smrgextern _X_EXPORT void xf86AddDevToEntity(int entityIndex, GDevPtr dev); 11635c4bbdfSmrgextern _X_EXPORT void xf86RemoveDevFromEntity(int entityIndex, GDevPtr dev); 11705b261ecSmrg 11805b261ecSmrg/* xf86Config.c */ 11905b261ecSmrg 1206747b715Smrgextern _X_EXPORT Bool xf86PathIsSafe(const char *path); 12105b261ecSmrg 12205b261ecSmrg/* xf86DefaultModes */ 12305b261ecSmrg 1246747b715Smrgextern _X_EXPORT const DisplayModeRec xf86DefaultModes[]; 1256747b715Smrgextern _X_EXPORT const int xf86NumDefaultModes; 12605b261ecSmrg 1274642e01fSmrg/* xf86Configure.c */ 12835c4bbdfSmrgextern _X_EXPORT void 12935c4bbdfSmrgDoConfigure(void) 13035c4bbdfSmrg _X_NORETURN; 13135c4bbdfSmrgextern _X_EXPORT void 13235c4bbdfSmrgDoShowOptions(void) 13335c4bbdfSmrg _X_NORETURN; 1344642e01fSmrg 13505b261ecSmrg/* xf86Events.c */ 13605b261ecSmrg 13735c4bbdfSmrgextern _X_EXPORT void 1381b5d61b8Smrgxf86Wakeup(void *blockData, int err); 13935c4bbdfSmrgextern _X_EXPORT void 14035c4bbdfSmrgxf86HandlePMEvents(int fd, void *data); 14135c4bbdfSmrgextern _X_EXPORT int (*xf86PMGetEventFromOs) (int fd, pmEvent * events, 14235c4bbdfSmrg int num); 14335c4bbdfSmrgextern _X_EXPORT pmWait (*xf86PMConfirmEventToOs) (int fd, pmEvent event); 14405b261ecSmrg 14505b261ecSmrg/* xf86Helper.c */ 14635c4bbdfSmrgextern _X_EXPORT void 14735c4bbdfSmrgxf86LogInit(void); 14835c4bbdfSmrgextern _X_EXPORT void 14935c4bbdfSmrgxf86CloseLog(enum ExitCode error); 15005b261ecSmrg 15105b261ecSmrg/* xf86Init.c */ 15235c4bbdfSmrgextern _X_EXPORT Bool 15335c4bbdfSmrgxf86LoadModules(const char **list, void **optlist); 15435c4bbdfSmrgextern _X_EXPORT int 15535c4bbdfSmrgxf86SetVerbosity(int verb); 15635c4bbdfSmrgextern _X_EXPORT int 15735c4bbdfSmrgxf86SetLogVerbosity(int verb); 15835c4bbdfSmrgextern _X_EXPORT Bool 15935c4bbdfSmrgxf86CallDriverProbe(struct _DriverRec *drv, Bool detect_only); 16035c4bbdfSmrgextern _X_EXPORT Bool 16135c4bbdfSmrgxf86PrivsElevated(void); 162ed6184dfSmrgextern _X_EXPORT Bool 163ed6184dfSmrgxf86HasTTYs(void); 16435c4bbdfSmrg 16535c4bbdfSmrg#endif /* _NO_XF86_PROTOTYPES */ 16635c4bbdfSmrg 16735c4bbdfSmrg#endif /* _XF86PRIV_H */ 168