1 | /*
|
---|
2 | * Copyright (c) 1997-2003 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 public XFree86 functions and variables,
|
---|
30 | * and definitions of public macros.
|
---|
31 | *
|
---|
32 | * "public" means available to video drivers.
|
---|
33 | */
|
---|
34 |
|
---|
35 | #ifndef _XF86_H
|
---|
36 | #define _XF86_H
|
---|
37 |
|
---|
38 | #if HAVE_XORG_CONFIG_H
|
---|
39 | #include <xorg-config.h>
|
---|
40 | #elif HAVE_DIX_CONFIG_H
|
---|
41 | #include <dix-config.h>
|
---|
42 | #endif
|
---|
43 |
|
---|
44 | #include "xf86str.h"
|
---|
45 | #include "xf86Opt.h"
|
---|
46 | #include <X11/Xfuncproto.h>
|
---|
47 | #include <stdarg.h>
|
---|
48 | #ifdef RANDR
|
---|
49 | #include <X11/extensions/randr.h>
|
---|
50 | #endif
|
---|
51 |
|
---|
52 | #include "propertyst.h"
|
---|
53 |
|
---|
54 | /* General parameters */
|
---|
55 | extern _X_EXPORT int xf86DoConfigure;
|
---|
56 | extern _X_EXPORT int xf86DoShowOptions;
|
---|
57 | extern _X_EXPORT Bool xf86DoConfigurePass1;
|
---|
58 | extern _X_EXPORT Bool xorgHWAccess;
|
---|
59 |
|
---|
60 | extern _X_EXPORT DevPrivateKeyRec xf86ScreenKeyRec;
|
---|
61 |
|
---|
62 | #define xf86ScreenKey (&xf86ScreenKeyRec)
|
---|
63 |
|
---|
64 | extern _X_EXPORT DevPrivateKeyRec xf86CreateRootWindowKeyRec;
|
---|
65 |
|
---|
66 | #define xf86CreateRootWindowKey (&xf86CreateRootWindowKeyRec)
|
---|
67 |
|
---|
68 | extern _X_EXPORT ScrnInfoPtr *xf86Screens; /* List of pointers to ScrnInfoRecs */
|
---|
69 | extern _X_EXPORT const unsigned char byte_reversed[256];
|
---|
70 | extern _X_EXPORT Bool fbSlotClaimed;
|
---|
71 |
|
---|
72 | #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__)
|
---|
73 | extern _X_EXPORT Bool sbusSlotClaimed;
|
---|
74 | #endif
|
---|
75 |
|
---|
76 | #if defined(XSERVER_PLATFORM_BUS)
|
---|
77 | extern _X_EXPORT int platformSlotClaimed;
|
---|
78 | #endif
|
---|
79 |
|
---|
80 | extern _X_EXPORT confDRIRec xf86ConfigDRI;
|
---|
81 | extern _X_EXPORT Bool xf86DRI2Enabled(void);
|
---|
82 |
|
---|
83 | extern _X_EXPORT Bool VTSwitchEnabled; /* kbd driver */
|
---|
84 |
|
---|
85 | #define XF86SCRNINFO(p) xf86ScreenToScrn(p)
|
---|
86 |
|
---|
87 | #define XF86FLIP_PIXELS() \
|
---|
88 | do { \
|
---|
89 | if (xf86GetFlipPixels()) { \
|
---|
90 | pScreen->whitePixel = (pScreen->whitePixel) ? 0 : 1; \
|
---|
91 | pScreen->blackPixel = (pScreen->blackPixel) ? 0 : 1; \
|
---|
92 | } \
|
---|
93 | while (0)
|
---|
94 |
|
---|
95 | #define BOOLTOSTRING(b) ((b) ? "TRUE" : "FALSE")
|
---|
96 |
|
---|
97 | #define PIX24TOBPP(p) (((p) == Pix24Use24) ? 24 : \
|
---|
98 | (((p) == Pix24Use32) ? 32 : 0))
|
---|
99 |
|
---|
100 | /* Function Prototypes */
|
---|
101 | #ifndef _NO_XF86_PROTOTYPES
|
---|
102 |
|
---|
103 | /* PCI related */
|
---|
104 | #ifdef XSERVER_LIBPCIACCESS
|
---|
105 | #include <pciaccess.h>
|
---|
106 | extern _X_EXPORT int pciSlotClaimed;
|
---|
107 |
|
---|
108 | extern _X_EXPORT Bool xf86CheckPciSlot(const struct pci_device *);
|
---|
109 | extern _X_EXPORT int xf86ClaimPciSlot(struct pci_device *, DriverPtr drvp,
|
---|
110 | int chipset, GDevPtr dev, Bool active);
|
---|
111 | extern _X_EXPORT void xf86UnclaimPciSlot(struct pci_device *, GDevPtr dev);
|
---|
112 | extern _X_EXPORT Bool xf86ParsePciBusString(const char *busID, int *bus,
|
---|
113 | int *device, int *func);
|
---|
114 | extern _X_EXPORT Bool xf86ComparePciBusString(const char *busID, int bus,
|
---|
115 | int device, int func);
|
---|
116 | extern _X_EXPORT Bool xf86IsPrimaryPci(struct pci_device *pPci);
|
---|
117 | extern _X_EXPORT Bool xf86CheckPciMemBase(struct pci_device *pPci,
|
---|
118 | memType base);
|
---|
119 | extern _X_EXPORT struct pci_device *xf86GetPciInfoForEntity(int entityIndex);
|
---|
120 | extern _X_EXPORT int xf86MatchPciInstances(const char *driverName,
|
---|
121 | int vendorID, SymTabPtr chipsets,
|
---|
122 | PciChipsets * PCIchipsets,
|
---|
123 | GDevPtr * devList, int numDevs,
|
---|
124 | DriverPtr drvp, int **foundEntities);
|
---|
125 | extern _X_EXPORT ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn,
|
---|
126 | int scrnFlag, int entityIndex,
|
---|
127 | PciChipsets * p_chip,
|
---|
128 | void *dummy, EntityProc init,
|
---|
129 | EntityProc enter,
|
---|
130 | EntityProc leave,
|
---|
131 | void *private);
|
---|
132 | #else
|
---|
133 | #define xf86VGAarbiterInit() do {} while (0)
|
---|
134 | #define xf86VGAarbiterFini() do {} while (0)
|
---|
135 | #define xf86VGAarbiterLock(x) do {} while (0)
|
---|
136 | #define xf86VGAarbiterUnlock(x) do {} while (0)
|
---|
137 | #define xf86VGAarbiterScrnInit(x) do {} while (0)
|
---|
138 | #define xf86VGAarbiterDeviceDecodes() do {} while (0)
|
---|
139 | #define xf86VGAarbiterWrapFunctions() do {} while (0)
|
---|
140 | #endif
|
---|
141 |
|
---|
142 | /* xf86Bus.c */
|
---|
143 |
|
---|
144 | extern _X_EXPORT int xf86GetFbInfoForScreen(int scrnIndex);
|
---|
145 | extern _X_EXPORT int xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev,
|
---|
146 | Bool active);
|
---|
147 | extern _X_EXPORT int xf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev,
|
---|
148 | Bool active);
|
---|
149 | extern _X_EXPORT Bool xf86DriverHasEntities(DriverPtr drvp);
|
---|
150 | extern _X_EXPORT void xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex);
|
---|
151 | extern _X_EXPORT void xf86SetEntityInstanceForScreen(ScrnInfoPtr pScrn,
|
---|
152 | int entityIndex,
|
---|
153 | int instance);
|
---|
154 | extern _X_EXPORT int xf86GetNumEntityInstances(int entityIndex);
|
---|
155 | extern _X_EXPORT GDevPtr xf86GetDevFromEntity(int entityIndex, int instance);
|
---|
156 | extern _X_EXPORT void xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn,
|
---|
157 | int entityIndex);
|
---|
158 | extern _X_EXPORT EntityInfoPtr xf86GetEntityInfo(int entityIndex);
|
---|
159 | extern _X_EXPORT Bool xf86SetEntityFuncs(int entityIndex, EntityProc init,
|
---|
160 | EntityProc enter, EntityProc leave,
|
---|
161 | void *);
|
---|
162 | extern _X_EXPORT Bool xf86IsEntityPrimary(int entityIndex);
|
---|
163 | extern _X_EXPORT ScrnInfoPtr xf86FindScreenForEntity(int entityIndex);
|
---|
164 |
|
---|
165 | extern _X_EXPORT int xf86GetLastScrnFlag(int entityIndex);
|
---|
166 | extern _X_EXPORT void xf86SetLastScrnFlag(int entityIndex, int scrnIndex);
|
---|
167 | extern _X_EXPORT Bool xf86IsEntityShared(int entityIndex);
|
---|
168 | extern _X_EXPORT void xf86SetEntityShared(int entityIndex);
|
---|
169 | extern _X_EXPORT Bool xf86IsEntitySharable(int entityIndex);
|
---|
170 | extern _X_EXPORT void xf86SetEntitySharable(int entityIndex);
|
---|
171 | extern _X_EXPORT Bool xf86IsPrimInitDone(int entityIndex);
|
---|
172 | extern _X_EXPORT void xf86SetPrimInitDone(int entityIndex);
|
---|
173 | extern _X_EXPORT void xf86ClearPrimInitDone(int entityIndex);
|
---|
174 | extern _X_EXPORT int xf86AllocateEntityPrivateIndex(void);
|
---|
175 | extern _X_EXPORT DevUnion *xf86GetEntityPrivate(int entityIndex, int privIndex);
|
---|
176 |
|
---|
177 | /* xf86Configure.c */
|
---|
178 | extern _X_EXPORT GDevPtr xf86AddBusDeviceToConfigure(const char *driver,
|
---|
179 | BusType bus, void *busData,
|
---|
180 | int chipset);
|
---|
181 |
|
---|
182 | /* xf86Cursor.c */
|
---|
183 |
|
---|
184 | extern _X_EXPORT void xf86LockZoom(ScreenPtr pScreen, int lock);
|
---|
185 | extern _X_EXPORT void xf86InitViewport(ScrnInfoPtr pScr);
|
---|
186 | extern _X_EXPORT void xf86SetViewport(ScreenPtr pScreen, int x, int y);
|
---|
187 | extern _X_EXPORT void xf86ZoomViewport(ScreenPtr pScreen, int zoom);
|
---|
188 | extern _X_EXPORT Bool xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode);
|
---|
189 | extern _X_EXPORT void *xf86GetPointerScreenFuncs(void);
|
---|
190 | extern _X_EXPORT void xf86InitOrigins(void);
|
---|
191 | extern _X_EXPORT void xf86ReconfigureLayout(void);
|
---|
192 |
|
---|
193 | /* xf86DPMS.c */
|
---|
194 |
|
---|
195 | extern _X_EXPORT Bool xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set,
|
---|
196 | int flags);
|
---|
197 |
|
---|
198 | /* xf86DGA.c */
|
---|
199 |
|
---|
200 | #ifdef XFreeXDGA
|
---|
201 | extern _X_EXPORT Bool DGAInit(ScreenPtr pScreen, DGAFunctionPtr funcs,
|
---|
202 | DGAModePtr modes, int num);
|
---|
203 | extern _X_EXPORT Bool DGAReInitModes(ScreenPtr pScreen, DGAModePtr modes,
|
---|
204 | int num);
|
---|
205 | extern _X_EXPORT xf86SetDGAModeProc xf86SetDGAMode;
|
---|
206 | #endif
|
---|
207 |
|
---|
208 | /* xf86Events.c */
|
---|
209 |
|
---|
210 | typedef struct _InputInfoRec *InputInfoPtr;
|
---|
211 |
|
---|
212 | extern _X_EXPORT void SetTimeSinceLastInputEvent(void);
|
---|
213 | extern _X_EXPORT void *xf86AddInputHandler(int fd, InputHandlerProc proc,
|
---|
214 | void *data);
|
---|
215 | extern _X_EXPORT int xf86RemoveInputHandler(void *handler);
|
---|
216 | extern _X_EXPORT void xf86DisableInputHandler(void *handler);
|
---|
217 | extern _X_EXPORT void xf86EnableInputHandler(void *handler);
|
---|
218 | extern _X_EXPORT void *xf86AddGeneralHandler(int fd, InputHandlerProc proc,
|
---|
219 | void *data);
|
---|
220 | extern _X_EXPORT int xf86RemoveGeneralHandler(void *handler);
|
---|
221 | extern _X_EXPORT void xf86DisableGeneralHandler(void *handler);
|
---|
222 | extern _X_EXPORT void xf86EnableGeneralHandler(void *handler);
|
---|
223 | extern _X_EXPORT InputHandlerProc xf86SetConsoleHandler(InputHandlerProc
|
---|
224 | handler, void *data);
|
---|
225 | extern _X_EXPORT void xf86InterceptSignals(int *signo);
|
---|
226 | extern _X_EXPORT void xf86InterceptSigIll(void (*sigillhandler) (void));
|
---|
227 | extern _X_EXPORT Bool xf86EnableVTSwitch(Bool new);
|
---|
228 | extern _X_EXPORT void xf86ProcessActionEvent(ActionEvent action, void *arg);
|
---|
229 | extern _X_EXPORT void xf86PrintBacktrace(void);
|
---|
230 | extern _X_EXPORT Bool xf86VTOwner(void);
|
---|
231 | extern _X_EXPORT void xf86VTLeave(void);
|
---|
232 | extern _X_EXPORT void xf86VTEnter(void);
|
---|
233 | extern _X_EXPORT void xf86EnableInputDeviceForVTSwitch(InputInfoPtr pInfo);
|
---|
234 | extern _X_EXPORT void xf86DisableInputDeviceForVTSwitch(InputInfoPtr pInfo);
|
---|
235 |
|
---|
236 | /* xf86Helper.c */
|
---|
237 |
|
---|
238 | extern _X_EXPORT void xf86AddDriver(DriverPtr driver, void *module,
|
---|
239 | int flags);
|
---|
240 | extern _X_EXPORT void xf86DeleteDriver(int drvIndex);
|
---|
241 | extern _X_EXPORT ScrnInfoPtr xf86AllocateScreen(DriverPtr drv, int flags);
|
---|
242 | extern _X_EXPORT void xf86DeleteScreen(ScrnInfoPtr pScrn);
|
---|
243 | extern _X_EXPORT int xf86AllocateScrnInfoPrivateIndex(void);
|
---|
244 | extern _X_EXPORT Bool xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp,
|
---|
245 | int pad);
|
---|
246 | extern _X_EXPORT Bool xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int bpp,
|
---|
247 | int fbbpp, int depth24flags);
|
---|
248 | extern _X_EXPORT void xf86PrintDepthBpp(ScrnInfoPtr scrp);
|
---|
249 | extern _X_EXPORT Bool xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask);
|
---|
250 | extern _X_EXPORT Bool xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual);
|
---|
251 | extern _X_EXPORT Bool xf86SetGamma(ScrnInfoPtr scrp, Gamma newGamma);
|
---|
252 | extern _X_EXPORT void xf86SetDpi(ScrnInfoPtr pScrn, int x, int y);
|
---|
253 | extern _X_EXPORT void xf86SetBlackWhitePixels(ScreenPtr pScreen);
|
---|
254 | extern _X_EXPORT void xf86EnableDisableFBAccess(ScrnInfoPtr pScrn, Bool enable);
|
---|
255 | extern _X_EXPORT void
|
---|
256 | xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb,
|
---|
257 | const char *format, va_list args)
|
---|
258 | _X_ATTRIBUTE_PRINTF(4, 0);
|
---|
259 | extern _X_EXPORT void
|
---|
260 | xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb,
|
---|
261 | const char *format, ...)
|
---|
262 | _X_ATTRIBUTE_PRINTF(4, 5);
|
---|
263 | extern _X_EXPORT void
|
---|
264 | xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...)
|
---|
265 | _X_ATTRIBUTE_PRINTF(3, 4);
|
---|
266 | extern _X_EXPORT void
|
---|
267 | xf86MsgVerb(MessageType type, int verb, const char *format, ...)
|
---|
268 | _X_ATTRIBUTE_PRINTF(3, 4);
|
---|
269 | extern _X_EXPORT void
|
---|
270 | xf86Msg(MessageType type, const char *format, ...)
|
---|
271 | _X_ATTRIBUTE_PRINTF(2, 3);
|
---|
272 | extern _X_EXPORT void
|
---|
273 | xf86ErrorFVerb(int verb, const char *format, ...)
|
---|
274 | _X_ATTRIBUTE_PRINTF(2, 3);
|
---|
275 | extern _X_EXPORT void
|
---|
276 | xf86ErrorF(const char *format, ...)
|
---|
277 | _X_ATTRIBUTE_PRINTF(1, 2);
|
---|
278 | extern _X_EXPORT const char *
|
---|
279 | xf86TokenToString(SymTabPtr table, int token);
|
---|
280 | extern _X_EXPORT int
|
---|
281 | xf86StringToToken(SymTabPtr table, const char *string);
|
---|
282 | extern _X_EXPORT void
|
---|
283 | xf86ShowClocks(ScrnInfoPtr scrp, MessageType from);
|
---|
284 | extern _X_EXPORT void
|
---|
285 | xf86PrintChipsets(const char *drvname, const char *drvmsg, SymTabPtr chips);
|
---|
286 | extern _X_EXPORT int
|
---|
287 | xf86MatchDevice(const char *drivername, GDevPtr ** driversectlist);
|
---|
288 | extern _X_EXPORT const char *
|
---|
289 | xf86GetVisualName(int visual);
|
---|
290 | extern _X_EXPORT int
|
---|
291 | xf86GetVerbosity(void);
|
---|
292 | extern _X_EXPORT Pix24Flags
|
---|
293 | xf86GetPix24(void);
|
---|
294 | extern _X_EXPORT int
|
---|
295 | xf86GetDepth(void);
|
---|
296 | extern _X_EXPORT rgb
|
---|
297 | xf86GetWeight(void);
|
---|
298 | extern _X_EXPORT Gamma
|
---|
299 | xf86GetGamma(void);
|
---|
300 | extern _X_EXPORT Bool
|
---|
301 | xf86GetFlipPixels(void);
|
---|
302 | extern _X_EXPORT const char *
|
---|
303 | xf86GetServerName(void);
|
---|
304 | extern _X_EXPORT Bool
|
---|
305 | xf86ServerIsExiting(void);
|
---|
306 | extern _X_EXPORT Bool
|
---|
307 | xf86ServerIsResetting(void);
|
---|
308 | extern _X_EXPORT Bool
|
---|
309 | xf86ServerIsInitialising(void);
|
---|
310 | extern _X_EXPORT Bool
|
---|
311 | xf86ServerIsOnlyDetecting(void);
|
---|
312 | extern _X_EXPORT Bool
|
---|
313 | xf86CaughtSignal(void);
|
---|
314 | extern _X_EXPORT Bool
|
---|
315 | xf86GetVidModeAllowNonLocal(void);
|
---|
316 | extern _X_EXPORT Bool
|
---|
317 | xf86GetVidModeEnabled(void);
|
---|
318 | extern _X_EXPORT Bool
|
---|
319 | xf86GetModInDevAllowNonLocal(void);
|
---|
320 | extern _X_EXPORT Bool
|
---|
321 | xf86GetModInDevEnabled(void);
|
---|
322 | extern _X_EXPORT Bool
|
---|
323 | xf86GetAllowMouseOpenFail(void);
|
---|
324 | extern _X_EXPORT void
|
---|
325 | xf86DisableRandR(void);
|
---|
326 | extern _X_EXPORT CARD32
|
---|
327 | xorgGetVersion(void);
|
---|
328 | extern _X_EXPORT CARD32
|
---|
329 | xf86GetModuleVersion(void *module);
|
---|
330 | extern _X_EXPORT void *
|
---|
331 | xf86LoadDrvSubModule(DriverPtr drv, const char *name);
|
---|
332 | extern _X_EXPORT void *
|
---|
333 | xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name);
|
---|
334 | extern _X_EXPORT void *
|
---|
335 | xf86LoadOneModule(const char *name, void *optlist);
|
---|
336 | extern _X_EXPORT void
|
---|
337 | xf86UnloadSubModule(void *mod);
|
---|
338 | extern _X_EXPORT Bool
|
---|
339 | xf86LoaderCheckSymbol(const char *name);
|
---|
340 | extern _X_EXPORT void
|
---|
341 | xf86SetBackingStore(ScreenPtr pScreen);
|
---|
342 | extern _X_EXPORT void
|
---|
343 | xf86SetSilkenMouse(ScreenPtr pScreen);
|
---|
344 | extern _X_EXPORT void *
|
---|
345 | xf86FindXvOptions(ScrnInfoPtr pScrn, int adapt_index, const char *port_name,
|
---|
346 | const char **adaptor_name, void **adaptor_options);
|
---|
347 | extern _X_EXPORT void
|
---|
348 | xf86GetOS(const char **name, int *major, int *minor, int *teeny);
|
---|
349 | extern _X_EXPORT ScrnInfoPtr
|
---|
350 | xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag,
|
---|
351 | int entityIndex, EntityProc init,
|
---|
352 | EntityProc enter, EntityProc leave, void *private);
|
---|
353 |
|
---|
354 | extern _X_EXPORT Bool
|
---|
355 | xf86IsScreenPrimary(ScrnInfoPtr pScrn);
|
---|
356 | extern _X_EXPORT int
|
---|
357 | xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type,
|
---|
358 | int format, unsigned long len, void *value);
|
---|
359 | extern _X_EXPORT Bool
|
---|
360 | xf86IsUnblank(int mode);
|
---|
361 |
|
---|
362 | /* xf86Init.c */
|
---|
363 |
|
---|
364 | extern _X_EXPORT PixmapFormatPtr
|
---|
365 | xf86GetPixFormat(ScrnInfoPtr pScrn, int depth);
|
---|
366 | extern _X_EXPORT int
|
---|
367 | xf86GetBppFromDepth(ScrnInfoPtr pScrn, int depth);
|
---|
368 |
|
---|
369 | /* xf86Mode.c */
|
---|
370 |
|
---|
371 | extern _X_EXPORT int
|
---|
372 | xf86GetNearestClock(ScrnInfoPtr scrp, int freq, Bool allowDiv2,
|
---|
373 | int DivFactor, int MulFactor, int *divider);
|
---|
374 | extern _X_EXPORT const char *
|
---|
375 | xf86ModeStatusToString(ModeStatus status);
|
---|
376 | extern _X_EXPORT ModeStatus
|
---|
377 | xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep,
|
---|
378 | ClockRangePtr clockRanges, LookupModeFlags strategy);
|
---|
379 | extern _X_EXPORT ModeStatus
|
---|
380 | xf86CheckModeForMonitor(DisplayModePtr mode, MonPtr monitor);
|
---|
381 | extern _X_EXPORT ModeStatus
|
---|
382 | xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode,
|
---|
383 | ClockRangePtr clockRanges,
|
---|
384 | LookupModeFlags strategy,
|
---|
385 | int maxPitch, int virtualX, int virtualY);
|
---|
386 | extern _X_EXPORT ModeStatus
|
---|
387 | xf86CheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, int flags);
|
---|
388 | extern _X_EXPORT int
|
---|
389 | xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
|
---|
390 | const char **modeNames, ClockRangePtr clockRanges,
|
---|
391 | int *linePitches, int minPitch, int maxPitch,
|
---|
392 | int minHeight, int maxHeight, int pitchInc,
|
---|
393 | int virtualX, int virtualY, int apertureSize,
|
---|
394 | LookupModeFlags strategy);
|
---|
395 | extern _X_EXPORT void
|
---|
396 | xf86DeleteMode(DisplayModePtr * modeList, DisplayModePtr mode);
|
---|
397 | extern _X_EXPORT void
|
---|
398 | xf86PruneDriverModes(ScrnInfoPtr scrp);
|
---|
399 | extern _X_EXPORT void
|
---|
400 | xf86SetCrtcForModes(ScrnInfoPtr scrp, int adjustFlags);
|
---|
401 | extern _X_EXPORT void
|
---|
402 | xf86PrintModes(ScrnInfoPtr scrp);
|
---|
403 | extern _X_EXPORT void
|
---|
404 | xf86ShowClockRanges(ScrnInfoPtr scrp, ClockRangePtr clockRanges);
|
---|
405 |
|
---|
406 | /* xf86Option.c */
|
---|
407 |
|
---|
408 | extern _X_EXPORT void
|
---|
409 | xf86CollectOptions(ScrnInfoPtr pScrn, XF86OptionPtr extraOpts);
|
---|
410 |
|
---|
411 | /* xf86RandR.c */
|
---|
412 | #ifdef RANDR
|
---|
413 | extern _X_EXPORT Bool
|
---|
414 | xf86RandRInit(ScreenPtr pScreen);
|
---|
415 | extern _X_EXPORT Rotation
|
---|
416 | xf86GetRotation(ScreenPtr pScreen);
|
---|
417 | extern _X_EXPORT Bool
|
---|
418 | xf86RandRSetNewVirtualAndDimensions(ScreenPtr pScreen,
|
---|
419 | int newvirtX, int newvirtY,
|
---|
420 | int newmmWidth, int newmmHeight,
|
---|
421 | Bool resetMode);
|
---|
422 | #endif
|
---|
423 |
|
---|
424 | /* xf86Extensions.c */
|
---|
425 | extern void xf86ExtensionInit(void);
|
---|
426 |
|
---|
427 | /* convert ScreenPtr to ScrnInfoPtr */
|
---|
428 | extern _X_EXPORT ScrnInfoPtr xf86ScreenToScrn(ScreenPtr pScreen);
|
---|
429 | /* convert ScrnInfoPtr to ScreenPtr */
|
---|
430 | extern _X_EXPORT ScreenPtr xf86ScrnToScreen(ScrnInfoPtr pScrn);
|
---|
431 |
|
---|
432 | #endif /* _NO_XF86_PROTOTYPES */
|
---|
433 |
|
---|
434 | #define XF86_HAS_SCRN_CONV 1 /* define for drivers to use in api compat */
|
---|
435 |
|
---|
436 | #define XF86_SCRN_INTERFACE 1 /* define for drivers to use in api compat */
|
---|
437 |
|
---|
438 | /* flags passed to xf86 allocate screen */
|
---|
439 | #define XF86_ALLOCATE_GPU_SCREEN 1
|
---|
440 |
|
---|
441 | /* Update the internal total dimensions of all ScreenRecs together */
|
---|
442 | extern _X_EXPORT void
|
---|
443 | xf86UpdateDesktopDimensions(void);
|
---|
444 |
|
---|
445 | #endif /* _XF86_H */
|
---|