First import
[xorg_rtime.git] / xorg-server-1.4 / hw / xfree86 / loader / dixsym.c
blob5d06b05c725ee307e45f1dbb75ae71b9c7ba2ca4
1 /*
2 * Copyright 1995-1998 by Metro Link, Inc.
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that
7 * copyright notice and this permission notice appear in supporting
8 * documentation, and that the name of Metro Link, Inc. not be used in
9 * advertising or publicity pertaining to distribution of the software without
10 * specific, written prior permission. Metro Link, Inc. makes no
11 * representations about the suitability of this software for any purpose.
12 * It is provided "as is" without express or implied warranty.
14 * METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16 * EVENT SHALL METRO LINK, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20 * PERFORMANCE OF THIS SOFTWARE.
23 * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
25 * Permission is hereby granted, free of charge, to any person obtaining a
26 * copy of this software and associated documentation files (the "Software"),
27 * to deal in the Software without restriction, including without limitation
28 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
29 * and/or sell copies of the Software, and to permit persons to whom the
30 * Software is furnished to do so, subject to the following conditions:
32 * The above copyright notice and this permission notice shall be included in
33 * all copies or substantial portions of the Software.
35 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
36 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
37 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
38 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
39 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
40 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
41 * OTHER DEALINGS IN THE SOFTWARE.
43 * Except as contained in this notice, the name of the copyright holder(s)
44 * and author(s) shall not be used in advertising or otherwise to promote
45 * the sale, use or other dealings in this Software without prior written
46 * authorization from the copyright holder(s) and author(s).
49 #undef DBMALLOC
50 #ifdef HAVE_XORG_CONFIG_H
51 #include <xorg-config.h>
52 #endif
54 #include "sym.h"
55 #include "colormap.h"
56 #include "cursor.h"
57 #include "cursorstr.h"
58 #include "dix.h"
59 #include "dixevents.h"
60 #include "dixfont.h"
61 #include "dixstruct.h"
62 #include "misc.h"
63 #include "globals.h"
64 #include "os.h"
65 #include "osdep.h"
66 #include "resource.h"
67 #include "servermd.h"
68 #include "scrnintstr.h"
69 #include "windowstr.h"
70 #include "extension.h"
71 #define EXTENSION_PROC_ARGS void *
72 #include "extnsionst.h"
73 #include "swaprep.h"
74 #include "swapreq.h"
75 #include "inputstr.h"
76 #include <X11/extensions/XIproto.h>
77 #include "exevents.h"
78 #include "extinit.h"
79 #ifdef XV
80 #include "xvmodproc.h"
81 #endif
82 #include "dgaproc.h"
83 #ifdef RENDER
84 #include "mipict.h"
85 #include "renderedge.h"
86 #endif
87 #include "selection.h"
88 #ifdef XKB
89 #include <xkbsrv.h>
90 extern int XkbDfltRepeatDelay, XkbDfltRepeatInterval;
91 #endif
93 extern Selection *CurrentSelections;
94 extern int NumCurrentSelections;
96 /* DIX things */
98 _X_HIDDEN void *dixLookupTab[] = {
100 /* dix */
101 /* atom.c */
102 SYMFUNC(MakeAtom)
103 SYMFUNC(ValidAtom)
104 /* colormap.c */
105 SYMFUNC(AllocColor)
106 SYMFUNC(CreateColormap)
107 SYMFUNC(FakeAllocColor)
108 SYMFUNC(FakeFreeColor)
109 SYMFUNC(FreeColors)
110 SYMFUNC(StoreColors)
111 SYMFUNC(TellLostMap)
112 SYMFUNC(TellGainedMap)
113 SYMFUNC(QueryColors)
114 /* cursor.c */
115 SYMFUNC(FreeCursor)
116 /* devices.c */
117 SYMFUNC(Ones)
118 SYMFUNC(InitButtonClassDeviceStruct)
119 SYMFUNC(InitFocusClassDeviceStruct)
120 SYMFUNC(InitLedFeedbackClassDeviceStruct)
121 SYMFUNC(InitPtrFeedbackClassDeviceStruct)
122 SYMFUNC(InitKbdFeedbackClassDeviceStruct)
123 SYMFUNC(InitIntegerFeedbackClassDeviceStruct)
124 SYMFUNC(InitStringFeedbackClassDeviceStruct)
125 SYMFUNC(InitBellFeedbackClassDeviceStruct)
126 SYMFUNC(InitValuatorClassDeviceStruct)
127 SYMFUNC(InitKeyClassDeviceStruct)
128 SYMFUNC(InitKeyboardDeviceStruct)
129 SYMFUNC(SendMappingNotify)
130 SYMFUNC(InitPointerDeviceStruct)
131 SYMFUNC(LookupKeyboardDevice)
132 SYMFUNC(LookupPointerDevice)
133 /* dispatch.c */
134 SYMFUNC(SetInputCheck)
135 SYMFUNC(SendErrorToClient)
136 SYMFUNC(UpdateCurrentTime)
137 SYMFUNC(UpdateCurrentTimeIf)
138 SYMFUNC(ProcBadRequest)
139 SYMVAR(dispatchException)
140 SYMVAR(isItTimeToYield)
141 SYMVAR(ClientStateCallback)
142 SYMVAR(ServerGrabCallback)
143 SYMVAR(CurrentSelections)
144 SYMVAR(NumCurrentSelections)
145 /* dixfonts.c */
146 SYMFUNC(CloseFont)
147 SYMFUNC(FontToXError)
148 SYMFUNC(LoadGlyphs)
149 SYMVAR(fpe_functions)
150 /* dixutils.c */
151 SYMFUNC(AddCallback)
152 SYMFUNC(ClientSleep)
153 SYMFUNC(ClientTimeToServerTime)
154 SYMFUNC(ClientWakeup)
155 SYMFUNC(CompareTimeStamps)
156 SYMFUNC(CopyISOLatin1Lowered)
157 SYMFUNC(DeleteCallback)
158 SYMFUNC(dixLookupDrawable)
159 SYMFUNC(dixLookupWindow)
160 SYMFUNC(dixLookupClient)
161 SYMFUNC(dixLookupGC)
162 /* following are deprecated */
163 SYMFUNC(LookupClient)
164 SYMFUNC(LookupDrawable)
165 SYMFUNC(LookupWindow)
166 SYMFUNC(SecurityLookupDrawable)
167 SYMFUNC(SecurityLookupWindow)
168 /* end deprecated */
169 SYMFUNC(NoopDDA)
170 SYMFUNC(QueueWorkProc)
171 SYMFUNC(RegisterBlockAndWakeupHandlers)
172 SYMFUNC(RemoveBlockAndWakeupHandlers)
173 /* events.c */
174 SYMFUNC(CheckCursorConfinement)
175 SYMFUNC(DeliverEvents)
176 SYMFUNC(NewCurrentScreen)
177 SYMFUNC(PointerConfinedToScreen)
178 SYMFUNC(TryClientEvents)
179 SYMFUNC(WriteEventsToClient)
180 SYMFUNC(GetCurrentRootWindow)
181 SYMFUNC(GetSpritePosition)
182 SYMFUNC(GetSpriteWindow)
183 SYMFUNC(GetSpriteCursor)
184 SYMFUNC(WindowsRestructured)
185 SYMVAR(DeviceEventCallback)
186 SYMVAR(EventCallback)
187 SYMVAR(inputInfo)
188 SYMFUNC(SetCriticalEvent)
189 #ifdef PANORAMIX
190 SYMFUNC(XineramaGetCursorScreen)
191 #endif
192 /* property.c */
193 SYMFUNC(ChangeWindowProperty)
194 /* extension.c */
195 SYMFUNC(AddExtension)
196 SYMFUNC(AddExtensionAlias)
197 SYMFUNC(CheckExtension)
198 SYMFUNC(DeclareExtensionSecurity)
199 SYMFUNC(MinorOpcodeOfRequest)
200 SYMFUNC(StandardMinorOpcode)
201 #ifdef XEVIE
202 SYMVAR(xeviehot)
203 SYMVAR(xeviewin)
204 #endif
205 /* gc.c */
206 SYMFUNC(CopyGC)
207 SYMFUNC(CreateGC)
208 SYMFUNC(CreateScratchGC)
209 SYMFUNC(ChangeGC)
210 SYMFUNC(dixChangeGC)
211 SYMFUNC(DoChangeGC)
212 SYMFUNC(FreeGC)
213 SYMFUNC(FreeScratchGC)
214 SYMFUNC(GetScratchGC)
215 SYMFUNC(SetClipRects)
216 SYMFUNC(ValidateGC)
217 SYMFUNC(VerifyRectOrder)
218 SYMFUNC(SetDashes)
219 /* globals.c */
220 SYMVAR(ScreenSaverTime)
221 #ifdef DPMSExtension
222 SYMVAR(DPMSEnabled)
223 SYMVAR(DPMSCapableFlag)
224 SYMVAR(DPMSOffTime)
225 SYMVAR(DPMSPowerLevel)
226 SYMVAR(DPMSStandbyTime)
227 SYMVAR(DPMSSuspendTime)
228 SYMVAR(DPMSEnabledSwitch)
229 SYMVAR(DPMSDisabledSwitch)
230 SYMVAR(defaultDPMSEnabled)
231 #endif
232 /* bigreq */
233 SYMVAR(maxBigRequestSize)
234 #ifdef XV
235 /* XXX These are exported from the DDX, not DIX. */
236 SYMVAR(XvScreenInitProc)
237 SYMVAR(XvGetScreenIndexProc)
238 SYMVAR(XvGetRTPortProc)
239 SYMVAR(XvMCScreenInitProc)
240 #endif
241 SYMVAR(ScreenSaverBlanking)
242 SYMVAR(WindowTable)
243 SYMVAR(clients)
244 SYMVAR(currentMaxClients)
245 SYMVAR(currentTime)
246 SYMVAR(defaultColorVisualClass)
247 SYMVAR(display)
248 SYMVAR(globalSerialNumber)
249 SYMVAR(lastDeviceEventTime)
250 SYMVAR(monitorResolution)
251 SYMVAR(screenInfo)
252 SYMVAR(serverClient)
253 SYMVAR(serverGeneration)
254 /* main.c */
255 SYMFUNC(NotImplemented)
256 SYMVAR(PixmapWidthPaddingInfo)
257 /* pixmap.c */
258 SYMFUNC(AllocatePixmap)
259 SYMFUNC(GetScratchPixmapHeader)
260 SYMFUNC(FreeScratchPixmapHeader)
261 /* privates.c */
262 SYMFUNC(AllocateExtensionPrivate)
263 SYMFUNC(AllocateExtensionPrivateIndex)
264 SYMFUNC(AllocateClientPrivate)
265 SYMFUNC(AllocateClientPrivateIndex)
266 SYMFUNC(AllocateGCPrivate)
267 SYMFUNC(AllocateGCPrivateIndex)
268 SYMFUNC(AllocateWindowPrivate)
269 SYMFUNC(AllocateWindowPrivateIndex)
270 SYMFUNC(AllocateScreenPrivateIndex)
271 SYMFUNC(AllocateColormapPrivateIndex)
272 SYMFUNC(AllocateDevicePrivateIndex)
273 SYMFUNC(AllocateDevicePrivate)
274 SYMFUNC(AllocatePixmapPrivateIndex)
275 SYMFUNC(AllocatePixmapPrivate)
276 /* resource.c */
277 SYMFUNC(AddResource)
278 SYMFUNC(ChangeResourceValue)
279 SYMFUNC(CreateNewResourceClass)
280 SYMFUNC(CreateNewResourceType)
281 SYMFUNC(FakeClientID)
282 SYMFUNC(FreeResource)
283 SYMFUNC(FreeResourceByType)
284 SYMFUNC(GetXIDList)
285 SYMFUNC(GetXIDRange)
286 SYMFUNC(LookupIDByType)
287 SYMFUNC(LookupIDByClass)
288 SYMFUNC(LegalNewID)
289 SYMFUNC(SecurityLookupIDByClass)
290 SYMFUNC(SecurityLookupIDByType)
291 SYMFUNC(FindClientResourcesByType)
292 SYMFUNC(FindAllClientResources)
293 SYMVAR(lastResourceType)
294 SYMVAR(TypeMask)
295 #ifdef RES
296 SYMFUNC(RegisterResourceName)
297 SYMVAR(ResourceNames)
298 #endif
299 /* swaprep.c */
300 SYMFUNC(CopySwap32Write)
301 SYMFUNC(Swap32Write)
302 SYMFUNC(SwapConnSetupInfo)
303 SYMFUNC(SwapConnSetupPrefix)
304 /* swapreq.c */
305 SYMFUNC(SwapShorts)
306 SYMFUNC(SwapLongs)
307 SYMFUNC(SwapColorItem)
308 /* tables.c */
309 SYMVAR(EventSwapVector)
310 SYMVAR(ReplySwapVector)
311 SYMVAR(ProcVector)
312 /* window.c */
313 SYMFUNC(ChangeWindowAttributes)
314 SYMFUNC(CheckWindowOptionalNeed)
315 SYMFUNC(CreateUnclippedWinSize)
316 SYMFUNC(CreateWindow)
317 SYMFUNC(FindWindowWithOptional)
318 SYMFUNC(GravityTranslate)
319 SYMFUNC(MakeWindowOptional)
320 SYMFUNC(MapWindow)
321 SYMFUNC(MoveWindowInStack)
322 SYMFUNC(NotClippedByChildren)
323 SYMFUNC(ResizeChildrenWinSize)
324 SYMFUNC(SaveScreens)
325 SYMFUNC(SendVisibilityNotify)
326 SYMFUNC(SetWinSize)
327 SYMFUNC(SetBorderSize)
328 SYMFUNC(TraverseTree)
329 SYMFUNC(UnmapWindow)
330 SYMFUNC(WalkTree)
331 SYMVAR(deltaSaveUndersViewable)
332 SYMVAR(numSaveUndersViewable)
333 SYMVAR(savedScreenInfo)
334 SYMVAR(screenIsSaved)
336 /*os/ */
337 /* access.c */
338 SYMFUNC(LocalClient)
339 /* utils.c */
340 SYMFUNC(Xstrdup)
341 SYMFUNC(XNFstrdup)
342 SYMVAR(Must_have_memory)
343 SYMFUNC(AdjustWaitForDelay)
344 SYMVAR(noTestExtensions)
345 SYMFUNC(GiveUp)
347 #ifdef BIGREQS
348 SYMVAR(noBigReqExtension)
349 #endif
350 #ifdef COMPOSITE
351 SYMVAR(noCompositeExtension)
352 #endif
353 #ifdef DAMAGE
354 SYMVAR(noDamageExtension)
355 #endif
356 #ifdef DBE
357 SYMVAR(noDbeExtension)
358 #endif
359 #ifdef DPMSExtension
360 SYMVAR(noDPMSExtension)
361 #endif
362 #ifdef EVI
363 SYMVAR(noEVIExtension)
364 #endif
365 #ifdef FONTCACHE
366 SYMVAR(noFontCacheExtension)
367 #endif
368 #ifdef GLXEXT
369 SYMVAR(noGlxExtension)
370 #endif
371 #ifdef SCREENSAVER
372 SYMVAR(noScreenSaverExtension)
373 #endif
374 #ifdef MITSHM
375 SYMVAR(noMITShmExtension)
376 #endif
377 #ifdef MITMISC
378 SYMVAR(noMITMiscExtension)
379 #endif
380 #ifdef MULTIBUFFER
381 SYMVAR(noMultibufferExtension)
382 #endif
383 #ifdef RANDR
384 SYMVAR(noRRExtension)
385 #endif
386 #ifdef RENDER
387 SYMVAR(noRenderExtension)
388 #endif
389 #ifdef SHAPE
390 SYMVAR(noShapeExtension)
391 #endif
392 #ifdef XCSECURITY
393 SYMVAR(noSecurityExtension)
394 #endif
395 #ifdef XSYNC
396 SYMVAR(noSyncExtension)
397 #endif
398 #ifdef TOGCUP
399 SYMVAR(noXcupExtension)
400 #endif
401 #ifdef RES
402 SYMVAR(noResExtension)
403 #endif
404 #ifdef XAPPGROUP
405 SYMVAR(noXagExtension)
406 #endif
407 #ifdef XCMISC
408 SYMVAR(noXCMiscExtension)
409 #endif
410 #ifdef XEVIE
411 SYMVAR(noXevieExtension)
412 #endif
413 #ifdef XF86BIGFONT
414 SYMVAR(noXFree86BigfontExtension)
415 #endif
416 #ifdef XFreeXDGA
417 SYMVAR(noXFree86DGAExtension)
418 #endif
419 #ifdef XF86DRI
420 SYMVAR(noXFree86DRIExtension)
421 #endif
422 #ifdef XF86MISC
423 SYMVAR(noXFree86MiscExtension)
424 #endif
425 #ifdef XF86VIDMODE
426 SYMVAR(noXFree86VidModeExtension)
427 #endif
428 #ifdef XFIXES
429 SYMVAR(noXFixesExtension)
430 #endif
431 #ifdef XKB
432 /* |noXkbExtension| is defined in xc/programs/Xserver/xkb/xkbInit.c */
433 SYMVAR(noXkbExtension)
434 #endif
435 #ifdef PANORAMIX
436 SYMVAR(noPanoramiXExtension)
437 #endif
438 #ifdef XINPUT
439 SYMVAR(noXInputExtension)
440 #endif
441 #ifdef XIDLE
442 SYMVAR(noXIdleExtension)
443 #endif
444 #ifdef XV
445 SYMVAR(noXvExtension)
446 #endif
448 /* log.c */
449 SYMFUNC(LogVWrite)
450 SYMFUNC(LogWrite)
451 SYMFUNC(LogVMessageVerb)
452 SYMFUNC(LogMessageVerb)
453 SYMFUNC(LogMessage)
454 SYMFUNC(FatalError)
455 SYMFUNC(VErrorF)
456 SYMFUNC(ErrorF)
457 SYMFUNC(Error)
458 /* xalloc.c */
459 SYMFUNC(XNFalloc)
460 SYMFUNC(XNFcalloc)
461 SYMFUNC(XNFrealloc)
462 SYMFUNC(Xalloc)
463 SYMFUNC(Xcalloc)
464 SYMFUNC(Xfree)
465 SYMFUNC(Xrealloc)
466 /* WaitFor.c */
467 SYMFUNC(TimerFree)
468 SYMFUNC(TimerSet)
469 SYMFUNC(TimerCancel)
470 /* io.c */
471 SYMFUNC(WriteToClient)
472 SYMFUNC(SetCriticalOutputPending)
473 SYMVAR(FlushCallback)
474 SYMVAR(ReplyCallback)
475 SYMVAR(SkippedRequestsCallback)
476 SYMFUNC(ResetCurrentRequest)
477 /* connection.c */
478 SYMFUNC(IgnoreClient)
479 SYMFUNC(AttendClient)
480 SYMFUNC(AddEnabledDevice)
481 SYMFUNC(RemoveEnabledDevice)
482 SYMFUNC(MakeClientGrabPervious)
483 SYMFUNC(MakeClientGrabImpervious)
484 SYMVAR(GrabInProgress)
486 #ifdef XKB
487 /* xkb/xkbInit.c */
488 SYMFUNC(XkbInitKeyboardDeviceStruct)
489 SYMFUNC(XkbSetRulesDflts)
490 SYMVAR(XkbDfltRepeatDelay)
491 SYMVAR(XkbDfltRepeatInterval)
492 #endif
494 #ifdef XINPUT
495 /* Xi */
496 /* exevents.c */
497 SYMFUNC(InitValuatorAxisStruct)
498 SYMFUNC(InitProximityClassDeviceStruct)
499 /* extinit.c */
500 SYMFUNC(AssignTypeAndName)
501 #endif
503 /* xf86DGA.c */
504 /* XXX This is exported from the DDX, not DIX. */
505 SYMVAR(XDGAEventBase)
507 /* librender.a */
508 #ifdef RENDER
509 /* picture.c */
510 SYMFUNC(PictureInit)
511 SYMFUNC(PictureTransformPoint)
512 SYMFUNC(PictureTransformPoint3d)
513 SYMFUNC(PictureGetSubpixelOrder)
514 SYMFUNC(PictureSetSubpixelOrder)
515 SYMVAR(PictureScreenPrivateIndex)
516 /* mipict.c */
517 SYMFUNC(miPictureInit)
518 SYMFUNC(miComputeCompositeRegion)
519 /* miglyph.c */
520 SYMFUNC(miGlyphs)
521 /* mirect.c */
522 SYMFUNC(miCompositeRects)
523 /* filter.c */
524 SYMFUNC(PictureAddFilter)
525 SYMFUNC(PictureSetFilterAlias)
526 /* renderedge.c */
527 SYMFUNC(RenderSampleCeilY)
528 SYMFUNC(RenderSampleFloorY)
529 SYMFUNC(RenderEdgeStep)
530 SYMFUNC(RenderEdgeInit)
531 SYMFUNC(RenderLineFixedEdgeInit)
532 #endif