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 | pointer private);
|
---|
132 | /* Obsolete! don't use */
|
---|
133 | extern _X_EXPORT Bool xf86ConfigActivePciEntity(ScrnInfoPtr pScrn,
|
---|
134 | int entityIndex,
|
---|
135 | PciChipsets * p_chip,
|
---|
136 | void *dummy, EntityProc init,
|
---|
137 | EntityProc enter,
|
---|
138 | EntityProc leave,
|
---|
139 | pointer private);
|
---|
140 | #else
|
---|
141 | #define xf86VGAarbiterInit() do {} while (0)
|
---|
142 | #define xf86VGAarbiterFini() do {} while (0)
|
---|
143 | #define xf86VGAarbiterLock(x) do {} while (0)
|
---|
144 | #define xf86VGAarbiterUnlock(x) do {} while (0)
|
---|
145 | #define xf86VGAarbiterScrnInit(x) do {} while (0)
|
---|
146 | #define xf86VGAarbiterDeviceDecodes() do {} while (0)
|
---|
147 | #define xf86VGAarbiterWrapFunctions() do {} while (0)
|
---|
148 | #endif
|
---|
149 |
|
---|
150 | /* xf86Bus.c */
|
---|
151 |
|
---|
152 | extern _X_EXPORT int xf86GetFbInfoForScreen(int scrnIndex);
|
---|
153 | extern _X_EXPORT int xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev,
|
---|
154 | Bool active);
|
---|
155 | extern _X_EXPORT int xf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev,
|
---|
156 | Bool active);
|
---|
157 | extern _X_EXPORT Bool xf86DriverHasEntities(DriverPtr drvp);
|
---|
158 | extern _X_EXPORT void xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex);
|
---|
159 | extern _X_EXPORT void xf86SetEntityInstanceForScreen(ScrnInfoPtr pScrn,
|
---|
160 | int entityIndex,
|
---|
161 | int instance);
|
---|
162 | extern _X_EXPORT int xf86GetNumEntityInstances(int entityIndex);
|
---|
163 | extern _X_EXPORT GDevPtr xf86GetDevFromEntity(int entityIndex, int instance);
|
---|
164 | extern _X_EXPORT void xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn,
|
---|
165 | int entityIndex);
|
---|
166 | extern _X_EXPORT EntityInfoPtr xf86GetEntityInfo(int entityIndex);
|
---|
167 | extern _X_EXPORT Bool xf86SetEntityFuncs(int entityIndex, EntityProc init,
|
---|
168 | EntityProc enter, EntityProc leave,
|
---|
169 | pointer);
|
---|
170 | extern _X_EXPORT Bool xf86IsEntityPrimary(int entityIndex);
|
---|
171 | extern _X_EXPORT ScrnInfoPtr xf86FindScreenForEntity(int entityIndex);
|
---|
172 |
|
---|
173 | extern _X_EXPORT int xf86GetLastScrnFlag(int entityIndex);
|
---|
174 | extern _X_EXPORT void xf86SetLastScrnFlag(int entityIndex, int scrnIndex);
|
---|
175 | extern _X_EXPORT Bool xf86IsEntityShared(int entityIndex);
|
---|
176 | extern _X_EXPORT void xf86SetEntityShared(int entityIndex);
|
---|
177 | extern _X_EXPORT Bool xf86IsEntitySharable(int entityIndex);
|
---|
178 | extern _X_EXPORT void xf86SetEntitySharable(int entityIndex);
|
---|
179 | extern _X_EXPORT Bool xf86IsPrimInitDone(int entityIndex);
|
---|
180 | extern _X_EXPORT void xf86SetPrimInitDone(int entityIndex);
|
---|
181 | extern _X_EXPORT void xf86ClearPrimInitDone(int entityIndex);
|
---|
182 | extern _X_EXPORT int xf86AllocateEntityPrivateIndex(void);
|
---|
183 | extern _X_EXPORT DevUnion *xf86GetEntityPrivate(int entityIndex, int privIndex);
|
---|
184 |
|
---|
185 | /* xf86Configure.c */
|
---|
186 | extern _X_EXPORT GDevPtr xf86AddBusDeviceToConfigure(const char *driver,
|
---|
187 | BusType bus, void *busData,
|
---|
188 | int chipset);
|
---|
189 |
|
---|
190 | /* xf86Cursor.c */
|
---|
191 |
|
---|
192 | extern _X_EXPORT void xf86LockZoom(ScreenPtr pScreen, int lock);
|
---|
193 | extern _X_EXPORT void xf86InitViewport(ScrnInfoPtr pScr);
|
---|
194 | extern _X_EXPORT void xf86SetViewport(ScreenPtr pScreen, int x, int y);
|
---|
195 | extern _X_EXPORT void xf86ZoomViewport(ScreenPtr pScreen, int zoom);
|
---|
196 | extern _X_EXPORT Bool xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode);
|
---|
197 | extern _X_EXPORT void *xf86GetPointerScreenFuncs(void);
|
---|
198 | extern _X_EXPORT void xf86InitOrigins(void);
|
---|
199 | extern _X_EXPORT void xf86ReconfigureLayout(void);
|
---|
200 |
|
---|
201 | /* xf86cvt.c */
|
---|
202 | extern _X_EXPORT DisplayModePtr xf86CVTMode(int HDisplay, int VDisplay,
|
---|
203 | float VRefresh, Bool Reduced,
|
---|
204 | Bool Interlaced);
|
---|
205 |
|
---|
206 | /* xf86DPMS.c */
|
---|
207 |
|
---|
208 | extern _X_EXPORT Bool xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set,
|
---|
209 | int flags);
|
---|
210 |
|
---|
211 | #ifdef DPMSExtension
|
---|
212 | extern _X_EXPORT int DPMSSet(ClientPtr client, int level);
|
---|
213 | extern _X_EXPORT Bool DPMSSupported(void);
|
---|
214 | #endif
|
---|
215 |
|
---|
216 | /* xf86DGA.c */
|
---|
217 |
|
---|
218 | #ifdef XFreeXDGA
|
---|
219 | extern _X_EXPORT Bool DGAInit(ScreenPtr pScreen, DGAFunctionPtr funcs,
|
---|
220 | DGAModePtr modes, int num);
|
---|
221 | extern _X_EXPORT Bool DGAReInitModes(ScreenPtr pScreen, DGAModePtr modes,
|
---|
222 | int num);
|
---|
223 | extern _X_EXPORT xf86SetDGAModeProc xf86SetDGAMode;
|
---|
224 | #endif
|
---|
225 |
|
---|
226 | /* xf86Events.c */
|
---|
227 |
|
---|
228 | extern _X_EXPORT void SetTimeSinceLastInputEvent(void);
|
---|
229 | extern _X_EXPORT pointer xf86AddInputHandler(int fd, InputHandlerProc proc,
|
---|
230 | pointer data);
|
---|
231 | extern _X_EXPORT int xf86RemoveInputHandler(pointer handler);
|
---|
232 | extern _X_EXPORT void xf86DisableInputHandler(pointer handler);
|
---|
233 | extern _X_EXPORT void xf86EnableInputHandler(pointer handler);
|
---|
234 | extern _X_EXPORT pointer xf86AddGeneralHandler(int fd, InputHandlerProc proc,
|
---|
235 | pointer data);
|
---|
236 | extern _X_EXPORT int xf86RemoveGeneralHandler(pointer handler);
|
---|
237 | extern _X_EXPORT void xf86DisableGeneralHandler(pointer handler);
|
---|
238 | extern _X_EXPORT void xf86EnableGeneralHandler(pointer handler);
|
---|
239 | extern _X_EXPORT InputHandlerProc xf86SetConsoleHandler(InputHandlerProc
|
---|
240 | handler, pointer data);
|
---|
241 | extern _X_EXPORT void xf86InterceptSignals(int *signo);
|
---|
242 | extern _X_EXPORT void xf86InterceptSigIll(void (*sigillhandler) (void));
|
---|
243 | extern _X_EXPORT Bool xf86EnableVTSwitch(Bool new);
|
---|
244 | extern _X_EXPORT void xf86ProcessActionEvent(ActionEvent action, void *arg);
|
---|
245 | extern _X_EXPORT void xf86PrintBacktrace(void);
|
---|
246 |
|
---|
247 | /* xf86Helper.c */
|
---|
248 |
|
---|
249 | extern _X_EXPORT void xf86AddDriver(DriverPtr driver, pointer module,
|
---|
250 | int flags);
|
---|
251 | extern _X_EXPORT void xf86DeleteDriver(int drvIndex);
|
---|
252 | extern _X_EXPORT ScrnInfoPtr xf86AllocateScreen(DriverPtr drv, int flags);
|
---|
253 | extern _X_EXPORT void xf86DeleteScreen(ScrnInfoPtr pScrn);
|
---|
254 | extern _X_EXPORT int xf86AllocateScrnInfoPrivateIndex(void);
|
---|
255 | extern _X_EXPORT Bool xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp,
|
---|
256 | int pad);
|
---|
257 | extern _X_EXPORT Bool xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int bpp,
|
---|
258 | int fbbpp, int depth24flags);
|
---|
259 | extern _X_EXPORT void xf86PrintDepthBpp(ScrnInfoPtr scrp);
|
---|
260 | extern _X_EXPORT Bool xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask);
|
---|
261 | extern _X_EXPORT Bool xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual);
|
---|
262 | extern _X_EXPORT Bool xf86SetGamma(ScrnInfoPtr scrp, Gamma newGamma);
|
---|
263 | extern _X_EXPORT void xf86SetDpi(ScrnInfoPtr pScrn, int x, int y);
|
---|
264 | extern _X_EXPORT void xf86SetBlackWhitePixels(ScreenPtr pScreen);
|
---|
265 | extern _X_EXPORT void xf86EnableDisableFBAccess(ScrnInfoPtr pScrn, Bool enable);
|
---|
266 | extern _X_EXPORT void
|
---|
267 | xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb,
|
---|
268 | const char *format, va_list args)
|
---|
269 | _X_ATTRIBUTE_PRINTF(4, 0);
|
---|
270 | extern _X_EXPORT void
|
---|
271 | xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb,
|
---|
272 | const char *format, ...)
|
---|
273 | _X_ATTRIBUTE_PRINTF(4, 5);
|
---|
274 | extern _X_EXPORT void
|
---|
275 | xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...)
|
---|
276 | _X_ATTRIBUTE_PRINTF(3, 4);
|
---|
277 | extern _X_EXPORT void
|
---|
278 | xf86MsgVerb(MessageType type, int verb, const char *format, ...)
|
---|
279 | _X_ATTRIBUTE_PRINTF(3, 4);
|
---|
280 | extern _X_EXPORT void
|
---|
281 | xf86Msg(MessageType type, const char *format, ...)
|
---|
282 | _X_ATTRIBUTE_PRINTF(2, 3);
|
---|
283 | extern _X_EXPORT void
|
---|
284 | xf86ErrorFVerb(int verb, const char *format, ...)
|
---|
285 | _X_ATTRIBUTE_PRINTF(2, 3);
|
---|
286 | extern _X_EXPORT void
|
---|
287 | xf86ErrorF(const char *format, ...)
|
---|
288 | _X_ATTRIBUTE_PRINTF(1, 2);
|
---|
289 | extern _X_EXPORT const char *
|
---|
290 | xf86TokenToString(SymTabPtr table, int token);
|
---|
291 | extern _X_EXPORT int
|
---|
292 | xf86StringToToken(SymTabPtr table, const char *string);
|
---|
293 | extern _X_EXPORT void
|
---|
294 | xf86ShowClocks(ScrnInfoPtr scrp, MessageType from);
|
---|
295 | extern _X_EXPORT void
|
---|
296 | xf86PrintChipsets(const char *drvname, const char *drvmsg, SymTabPtr chips);
|
---|
297 | extern _X_EXPORT int
|
---|
298 | xf86MatchDevice(const char *drivername, GDevPtr ** driversectlist);
|
---|
299 | extern _X_EXPORT const char *
|
---|
300 | xf86GetVisualName(int visual);
|
---|
301 | extern _X_EXPORT int
|
---|
302 | xf86GetVerbosity(void);
|
---|
303 | extern _X_EXPORT Pix24Flags
|
---|
304 | xf86GetPix24(void);
|
---|
305 | extern _X_EXPORT int
|
---|
306 | xf86GetDepth(void);
|
---|
307 | extern _X_EXPORT rgb
|
---|
308 | xf86GetWeight(void);
|
---|
309 | extern _X_EXPORT Gamma
|
---|
310 | xf86GetGamma(void);
|
---|
311 | extern _X_EXPORT Bool
|
---|
312 | xf86GetFlipPixels(void);
|
---|
313 | extern _X_EXPORT const char *
|
---|
314 | xf86GetServerName(void);
|
---|
315 | extern _X_EXPORT Bool
|
---|
316 | xf86ServerIsExiting(void);
|
---|
317 | extern _X_EXPORT Bool
|
---|
318 | xf86ServerIsResetting(void);
|
---|
319 | extern _X_EXPORT Bool
|
---|
320 | xf86ServerIsInitialising(void);
|
---|
321 | extern _X_EXPORT Bool
|
---|
322 | xf86ServerIsOnlyDetecting(void);
|
---|
323 | extern _X_EXPORT Bool
|
---|
324 | xf86CaughtSignal(void);
|
---|
325 | extern _X_EXPORT Bool
|
---|
326 | xf86GetVidModeAllowNonLocal(void);
|
---|
327 | extern _X_EXPORT Bool
|
---|
328 | xf86GetVidModeEnabled(void);
|
---|
329 | extern _X_EXPORT Bool
|
---|
330 | xf86GetModInDevAllowNonLocal(void);
|
---|
331 | extern _X_EXPORT Bool
|
---|
332 | xf86GetModInDevEnabled(void);
|
---|
333 | extern _X_EXPORT Bool
|
---|
334 | xf86GetAllowMouseOpenFail(void);
|
---|
335 | extern _X_EXPORT void
|
---|
336 | xf86DisableRandR(void);
|
---|
337 | extern _X_EXPORT CARD32
|
---|
338 | xorgGetVersion(void);
|
---|
339 | extern _X_EXPORT CARD32
|
---|
340 | xf86GetModuleVersion(pointer module);
|
---|
341 | extern _X_EXPORT pointer
|
---|
342 | xf86LoadDrvSubModule(DriverPtr drv, const char *name);
|
---|
343 | extern _X_EXPORT pointer
|
---|
344 | xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name);
|
---|
345 | extern _X_EXPORT pointer
|
---|
346 | xf86LoadOneModule(char *name, pointer optlist);
|
---|
347 | extern _X_EXPORT void
|
---|
348 | xf86UnloadSubModule(pointer mod);
|
---|
349 | extern _X_EXPORT Bool
|
---|
350 | xf86LoaderCheckSymbol(const char *name);
|
---|
351 | extern _X_EXPORT void
|
---|
352 | xf86SetBackingStore(ScreenPtr pScreen);
|
---|
353 | extern _X_EXPORT void
|
---|
354 | xf86SetSilkenMouse(ScreenPtr pScreen);
|
---|
355 | extern _X_EXPORT pointer
|
---|
356 | xf86FindXvOptions(ScrnInfoPtr pScrn, int adapt_index, char *port_name,
|
---|
357 | char **adaptor_name, pointer *adaptor_options);
|
---|
358 | extern _X_EXPORT void
|
---|
359 | xf86GetOS(const char **name, int *major, int *minor, int *teeny);
|
---|
360 | extern _X_EXPORT ScrnInfoPtr
|
---|
361 | xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag,
|
---|
362 | int entityIndex, EntityProc init,
|
---|
363 | EntityProc enter, EntityProc leave, pointer private);
|
---|
364 |
|
---|
365 | extern _X_EXPORT Bool
|
---|
366 | xf86IsScreenPrimary(ScrnInfoPtr pScrn);
|
---|
367 | extern _X_EXPORT int
|
---|
368 | xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type,
|
---|
369 | int format, unsigned long len, pointer value);
|
---|
370 | extern _X_EXPORT Bool
|
---|
371 | xf86IsUnblank(int mode);
|
---|
372 |
|
---|
373 | /* xf86Init.c */
|
---|
374 |
|
---|
375 | extern _X_EXPORT PixmapFormatPtr
|
---|
376 | xf86GetPixFormat(ScrnInfoPtr pScrn, int depth);
|
---|
377 | extern _X_EXPORT int
|
---|
378 | xf86GetBppFromDepth(ScrnInfoPtr pScrn, int depth);
|
---|
379 |
|
---|
380 | /* xf86Mode.c */
|
---|
381 |
|
---|
382 | extern _X_EXPORT int
|
---|
383 | xf86GetNearestClock(ScrnInfoPtr scrp, int freq, Bool allowDiv2,
|
---|
384 | int DivFactor, int MulFactor, int *divider);
|
---|
385 | extern _X_EXPORT const char *
|
---|
386 | xf86ModeStatusToString(ModeStatus status);
|
---|
387 | extern _X_EXPORT ModeStatus
|
---|
388 | xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep,
|
---|
389 | ClockRangePtr clockRanges, LookupModeFlags strategy);
|
---|
390 | extern _X_EXPORT ModeStatus
|
---|
391 | xf86CheckModeForMonitor(DisplayModePtr mode, MonPtr monitor);
|
---|
392 | extern _X_EXPORT ModeStatus
|
---|
393 | xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode,
|
---|
394 | ClockRangePtr clockRanges,
|
---|
395 | LookupModeFlags strategy,
|
---|
396 | int maxPitch, int virtualX, int virtualY);
|
---|
397 | extern _X_EXPORT ModeStatus
|
---|
398 | xf86CheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, int flags);
|
---|
399 | extern _X_EXPORT int
|
---|
400 | xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
|
---|
401 | char **modeNames, ClockRangePtr clockRanges,
|
---|
402 | int *linePitches, int minPitch, int maxPitch,
|
---|
403 | int minHeight, int maxHeight, int pitchInc,
|
---|
404 | int virtualX, int virtualY, int apertureSize,
|
---|
405 | LookupModeFlags strategy);
|
---|
406 | extern _X_EXPORT void
|
---|
407 | xf86DeleteMode(DisplayModePtr * modeList, DisplayModePtr mode);
|
---|
408 | extern _X_EXPORT void
|
---|
409 | xf86PruneDriverModes(ScrnInfoPtr scrp);
|
---|
410 | extern _X_EXPORT void
|
---|
411 | xf86SetCrtcForModes(ScrnInfoPtr scrp, int adjustFlags);
|
---|
412 | extern _X_EXPORT void
|
---|
413 | xf86PrintModes(ScrnInfoPtr scrp);
|
---|
414 | extern _X_EXPORT void
|
---|
415 | xf86ShowClockRanges(ScrnInfoPtr scrp, ClockRangePtr clockRanges);
|
---|
416 | extern _X_EXPORT double
|
---|
417 | xf86ModeHSync(const DisplayModeRec * mode);
|
---|
418 | extern _X_EXPORT double
|
---|
419 | xf86ModeVRefresh(const DisplayModeRec * mode);
|
---|
420 | extern _X_EXPORT void
|
---|
421 | xf86SetModeDefaultName(DisplayModePtr mode);
|
---|
422 | extern _X_EXPORT void
|
---|
423 | xf86SetModeCrtc(DisplayModePtr p, int adjustFlags);
|
---|
424 | extern _X_EXPORT DisplayModePtr
|
---|
425 | xf86DuplicateMode(const DisplayModeRec * pMode);
|
---|
426 | extern _X_EXPORT void
|
---|
427 | xf86SaveModeContents(DisplayModePtr intern, const DisplayModeRec * pMode);
|
---|
428 | extern _X_EXPORT DisplayModePtr
|
---|
429 | xf86DuplicateModes(ScrnInfoPtr pScrn, DisplayModePtr modeList);
|
---|
430 | extern _X_EXPORT Bool
|
---|
431 | xf86ModesEqual(const DisplayModeRec * pMode1, const DisplayModeRec * pMode2);
|
---|
432 | extern _X_EXPORT void
|
---|
433 | xf86PrintModeline(int scrnIndex, DisplayModePtr mode);
|
---|
434 | extern _X_EXPORT DisplayModePtr
|
---|
435 | xf86ModesAdd(DisplayModePtr modes, DisplayModePtr new);
|
---|
436 |
|
---|
437 | /* xf86Option.c */
|
---|
438 |
|
---|
439 | extern _X_EXPORT void
|
---|
440 | xf86CollectOptions(ScrnInfoPtr pScrn, XF86OptionPtr extraOpts);
|
---|
441 |
|
---|
442 | /* xf86RandR.c */
|
---|
443 | #ifdef RANDR
|
---|
444 | extern _X_EXPORT Bool
|
---|
445 | xf86RandRInit(ScreenPtr pScreen);
|
---|
446 | extern _X_EXPORT Rotation
|
---|
447 | xf86GetRotation(ScreenPtr pScreen);
|
---|
448 | extern _X_EXPORT Bool
|
---|
449 | xf86RandRSetNewVirtualAndDimensions(ScreenPtr pScreen,
|
---|
450 | int newvirtX, int newvirtY,
|
---|
451 | int newmmWidth, int newmmHeight,
|
---|
452 | Bool resetMode);
|
---|
453 | #endif
|
---|
454 |
|
---|
455 | /* xf86Extensions.c */
|
---|
456 | extern void xf86ExtensionInit(void);
|
---|
457 |
|
---|
458 | /* convert ScreenPtr to ScrnInfoPtr */
|
---|
459 | extern _X_EXPORT ScrnInfoPtr xf86ScreenToScrn(ScreenPtr pScreen);
|
---|
460 | /* convert ScrnInfoPtr to ScreenPtr */
|
---|
461 | extern _X_EXPORT ScreenPtr xf86ScrnToScreen(ScrnInfoPtr pScrn);
|
---|
462 |
|
---|
463 | #endif /* _NO_XF86_PROTOTYPES */
|
---|
464 |
|
---|
465 | #define XF86_HAS_SCRN_CONV 1 /* define for drivers to use in api compat */
|
---|
466 |
|
---|
467 | #define XF86_SCRN_INTERFACE 1 /* define for drivers to use in api compat */
|
---|
468 |
|
---|
469 | /* flags passed to xf86 allocate screen */
|
---|
470 | #define XF86_ALLOCATE_GPU_SCREEN 1
|
---|
471 |
|
---|
472 | /* Update the internal total dimensions of all ScreenRecs together */
|
---|
473 | extern _X_EXPORT void
|
---|
474 | xf86UpdateDesktopDimensions(void);
|
---|
475 |
|
---|
476 | #endif /* _XF86_H */
|
---|