1 /***********************************************************
3 Copyright (c) 1987 X Consortium
5 Permission is hereby granted, free of charge, to any person obtaining a copy
6 of this software and associated documentation files (the "Software"), to deal
7 in the Software without restriction, including without limitation the rights
8 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 copies of the Software, and to permit persons to whom the Software is
10 furnished to do so, subject to the following conditions:
12 The above copyright notice and this permission notice shall be included in
13 all copies or substantial portions of the Software.
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 Except as contained in this notice, the name of the X Consortium shall not be
23 used in advertising or otherwise to promote the sale, use or other dealings
24 in this Software without prior written authorization from the X Consortium.
27 Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
31 Permission to use, copy, modify, and distribute this software and its
32 documentation for any purpose and without fee is hereby granted,
33 provided that the above copyright notice appear in all copies and that
34 both that copyright notice and this permission notice appear in
35 supporting documentation, and that the name of Digital not be
36 used in advertising or publicity pertaining to distribution of the
37 software without specific, written prior permission.
39 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
40 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
41 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
42 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
43 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
44 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
47 ******************************************************************/
48 /* $XConsortium: tables.c,v 1.25 94/04/17 20:26:46 gildea Exp $ */
49 /* $XFree86: xc/programs/Xserver/dix/tables.c,v 3.1 1996/05/06 05:56:25 dawes Exp $ */
55 #include "windowstr.h"
56 #include "extnsionst.h"
57 #include "dixstruct.h"
64 k5_stage1(), k5_stage2(), k5_stage3(), k5_bad();
67 int (* InitialVector[3]) (
68 #if NeedNestedPrototypes
69 ClientPtr /* client */
74 ProcInitialConnection,
75 ProcEstablishConnection
78 int (* ProcVector[256]) (
79 #if NeedNestedPrototypes
80 ClientPtr /* client */
86 ProcChangeWindowAttributes,
87 ProcGetWindowAttributes,
89 ProcDestroySubwindows, /* 5 */
94 ProcUnmapWindow, /* 10 */
99 ProcQueryTree, /* 15 */
104 ProcGetProperty, /* 20 */
106 ProcSetSelectionOwner,
107 ProcGetSelectionOwner,
108 ProcConvertSelection,
109 ProcSendEvent, /* 25 */
114 ProcChangeActivePointerGrab, /* 30 */
119 ProcAllowEvents, /* 35 */
124 ProcTranslateCoords, /* 40 */
129 ProcOpenFont, /* 45 */
132 ProcQueryTextExtents,
134 ProcListFontsWithInfo, /* 50 */
139 ProcCreateGC, /* 55 */
143 ProcSetClipRectangles,
145 ProcClearToBackground,
149 ProcPolyLine, /* 65 */
154 ProcPolyFillRectangle, /* 70 */
159 ProcPolyText, /* 75 */
164 ProcCopyColormapAndFree, /* 80 */
166 ProcUninstallColormap,
167 ProcListInstalledColormaps,
169 ProcAllocNamedColor, /* 85 */
171 ProcAllocColorPlanes,
174 ProcStoreNamedColor, /* 90 */
178 ProcCreateGlyphCursor,
179 ProcFreeCursor, /* 95 */
184 ProcChangeKeyboardMapping, /* 100 */
185 ProcGetKeyboardMapping,
186 ProcChangeKeyboardControl,
187 ProcGetKeyboardControl,
189 ProcChangePointerControl, /* 105 */
190 ProcGetPointerControl,
194 ProcListHosts, /* 110 */
195 ProcChangeAccessControl,
196 ProcChangeCloseDownMode,
198 ProcRotateProperties,
199 ProcForceScreenSaver, /* 115 */
200 ProcSetPointerMapping,
201 ProcGetPointerMapping,
202 ProcSetModifierMapping,
203 ProcGetModifierMapping,
214 int (* SwappedProcVector[256]) (
215 #if NeedNestedPrototypes
216 ClientPtr /* client */
222 SProcChangeWindowAttributes,
223 SProcResourceReq, /* GetWindowAttributes */
224 SProcResourceReq, /* DestroyWindow */
225 SProcResourceReq, /* 5 DestroySubwindows */
226 SProcResourceReq, /* SProcChangeSaveSet, */
228 SProcResourceReq, /* MapWindow */
229 SProcResourceReq, /* MapSubwindows */
230 SProcResourceReq, /* 10 UnmapWindow */
231 SProcResourceReq, /* UnmapSubwindows */
232 SProcConfigureWindow,
233 SProcResourceReq, /* SProcCirculateWindow, */
234 SProcResourceReq, /* GetGeometry */
235 SProcResourceReq, /* 15 QueryTree */
237 SProcResourceReq, /* SProcGetAtomName, */
240 SProcGetProperty, /* 20 */
241 SProcResourceReq, /* SProcListProperties, */
242 SProcSetSelectionOwner,
243 SProcResourceReq, /* SProcGetSelectionOwner, */
244 SProcConvertSelection,
245 SProcSendEvent, /* 25 */
247 SProcResourceReq, /* SProcUngrabPointer, */
250 SProcChangeActivePointerGrab, /* 30 */
252 SProcResourceReq, /* SProcUngrabKeyboard, */
255 SProcResourceReq, /* 35 SProcAllowEvents, */
256 SProcSimpleReq, /* SProcGrabServer, */
257 SProcSimpleReq, /* SProcUngrabServer, */
258 SProcResourceReq, /* SProcQueryPointer, */
259 SProcGetMotionEvents,
260 SProcTranslateCoords, /*40 */
263 SProcSimpleReq, /* SProcGetInputFocus, */
264 SProcSimpleReq, /* QueryKeymap, */
265 SProcOpenFont, /* 45 */
266 SProcResourceReq, /* SProcCloseFont, */
267 SProcResourceReq, /* SProcQueryFont, */
268 SProcResourceReq, /* SProcQueryTextExtents, */
270 SProcListFontsWithInfo, /* 50 */
272 SProcSimpleReq, /* GetFontPath, */
274 SProcResourceReq, /* SProcFreePixmap, */
275 SProcCreateGC, /* 55 */
279 SProcSetClipRectangles,
280 SProcResourceReq, /* 60 SProcFreeGC, */
281 SProcClearToBackground,
284 SProcPoly, /* PolyPoint, */
285 SProcPoly, /* 65 PolyLine */
286 SProcPoly, /* PolySegment, */
287 SProcPoly, /* PolyRectangle, */
288 SProcPoly, /* PolyArc, */
290 SProcPoly, /* 70 PolyFillRectangle */
291 SProcPoly, /* PolyFillArc, */
295 SProcPolyText, /* 75 */
299 SProcResourceReq, /* SProcFreeColormap, */
300 SProcCopyColormapAndFree, /* 80 */
301 SProcResourceReq, /* SProcInstallColormap, */
302 SProcResourceReq, /* SProcUninstallColormap, */
303 SProcResourceReq, /* SProcListInstalledColormaps, */
305 SProcAllocNamedColor, /* 85 */
306 SProcAllocColorCells,
307 SProcAllocColorPlanes,
310 SProcStoreNamedColor, /* 90 */
314 SProcCreateGlyphCursor,
315 SProcResourceReq, /* 95 SProcFreeCursor, */
319 SProcSimpleReq, /* ListExtensions, */
320 SProcChangeKeyboardMapping, /* 100 */
321 SProcSimpleReq, /* GetKeyboardMapping, */
322 SProcChangeKeyboardControl,
323 SProcSimpleReq, /* GetKeyboardControl, */
324 SProcSimpleReq, /* Bell, */
325 SProcChangePointerControl, /* 105 */
326 SProcSimpleReq, /* GetPointerControl, */
328 SProcSimpleReq, /* GetScreenSaver, */
330 SProcSimpleReq, /* 110 ListHosts, */
331 SProcSimpleReq, /* SProcChangeAccessControl, */
332 SProcSimpleReq, /* SProcChangeCloseDownMode, */
333 SProcResourceReq, /* SProcKillClient, */
334 SProcRotateProperties,
335 SProcSimpleReq, /* 115 ForceScreenSaver */
336 SProcSimpleReq, /* SetPointerMapping, */
337 SProcSimpleReq, /* GetPointerMapping, */
338 SProcSimpleReq, /* SetModifierMapping, */
339 SProcSimpleReq, /* GetModifierMapping, */
350 EventSwapPtr EventSwapVector[128] =
352 (EventSwapPtr)SErrorEvent,
357 SKeyButtonPtrEvent, /* 5 */
362 SFocusEvent, /* 10 */
365 SGraphicsExposureEvent,
367 SVisibilityEvent, /* 15 */
372 SMapRequestEvent, /* 20 */
374 SConfigureNotifyEvent,
375 SConfigureRequestEvent,
377 SResizeRequestEvent, /* 25 */
381 SSelectionClearEvent,
382 SSelectionRequestEvent, /* 30 */
383 SSelectionNotifyEvent,
390 ReplySwapPtr ReplySwapVector[256] =
395 (ReplySwapPtr)SGetWindowAttributesReply,
397 ReplyNotSwappd, /* 5 */
402 ReplyNotSwappd, /* 10 */
406 (ReplySwapPtr)SGetGeometryReply,
407 (ReplySwapPtr)SQueryTreeReply, /* 15 */
408 (ReplySwapPtr)SInternAtomReply,
409 (ReplySwapPtr)SGetAtomNameReply,
412 (ReplySwapPtr)SGetPropertyReply, /* 20 */
413 (ReplySwapPtr)SListPropertiesReply,
415 (ReplySwapPtr)SGetSelectionOwnerReply,
417 ReplyNotSwappd, /* 25 */
418 (ReplySwapPtr)SGenericReply, /* SGrabPointerReply, */
422 ReplyNotSwappd, /* 30 */
423 (ReplySwapPtr)SGenericReply, /* SGrabKeyboardReply, */
427 ReplyNotSwappd, /* 35 */
430 (ReplySwapPtr)SQueryPointerReply,
431 (ReplySwapPtr)SGetMotionEventsReply,
432 (ReplySwapPtr)STranslateCoordsReply, /* 40 */
435 (ReplySwapPtr)SGetInputFocusReply,
436 (ReplySwapPtr)SQueryKeymapReply,
437 ReplyNotSwappd, /* 45 */
439 (ReplySwapPtr)SQueryFontReply,
440 (ReplySwapPtr)SQueryTextExtentsReply,
441 (ReplySwapPtr)SListFontsReply,
442 (ReplySwapPtr)SListFontsWithInfoReply, /* 50 */
444 (ReplySwapPtr)SGetFontPathReply,
447 ReplyNotSwappd, /* 55 */
452 ReplyNotSwappd, /* 60 */
457 ReplyNotSwappd, /* 65 */
462 ReplyNotSwappd, /* 70 */
465 (ReplySwapPtr)SGetImageReply,
467 ReplyNotSwappd, /* 75 */
472 ReplyNotSwappd, /* 80 */
475 (ReplySwapPtr)SListInstalledColormapsReply,
476 (ReplySwapPtr)SAllocColorReply,
477 (ReplySwapPtr)SAllocNamedColorReply, /* 85 */
478 (ReplySwapPtr)SAllocColorCellsReply,
479 (ReplySwapPtr)SAllocColorPlanesReply,
482 ReplyNotSwappd, /* 90 */
483 (ReplySwapPtr)SQueryColorsReply,
484 (ReplySwapPtr)SLookupColorReply,
487 ReplyNotSwappd, /* 95 */
489 (ReplySwapPtr)SQueryBestSizeReply,
490 (ReplySwapPtr)SGenericReply, /* SQueryExtensionReply, */
491 (ReplySwapPtr)SListExtensionsReply,
492 ReplyNotSwappd, /* 100 */
493 (ReplySwapPtr)SGetKeyboardMappingReply,
495 (ReplySwapPtr)SGetKeyboardControlReply,
497 ReplyNotSwappd, /* 105 */
498 (ReplySwapPtr)SGetPointerControlReply,
500 (ReplySwapPtr)SGetScreenSaverReply,
502 (ReplySwapPtr)SListHostsReply, /* 110 */
507 ReplyNotSwappd, /* 115 */
508 (ReplySwapPtr)SGenericReply, /* SetPointerMapping */
509 (ReplySwapPtr)SGetPointerMappingReply,
510 (ReplySwapPtr)SGenericReply, /* SetModifierMapping */
511 (ReplySwapPtr)SGetModifierMappingReply, /* 119 */
512 ReplyNotSwappd, /* 120 */
513 ReplyNotSwappd, /* 121 */
514 ReplyNotSwappd, /* 122 */
515 ReplyNotSwappd, /* 123 */
516 ReplyNotSwappd, /* 124 */
517 ReplyNotSwappd, /* 125 */
518 ReplyNotSwappd, /* 126 */
519 ReplyNotSwappd, /* NoOperation */
524 int (*k5_Vector[256])() =