1 /***********************************************************
3 Copyright 1987, 1998 The Open Group
5 Permission to use, copy, modify, distribute, and sell this software and its
6 documentation for any purpose is hereby granted without fee, provided that
7 the above copyright notice appear in all copies and that both that
8 copyright notice and this permission notice appear in supporting
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
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 THE
17 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 Except as contained in this notice, the name of The Open Group shall not be
22 used in advertising or otherwise to promote the sale, use or other dealings
23 in this Software without prior written authorization from The Open Group.
25 Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
29 Permission to use, copy, modify, and distribute this software and its
30 documentation for any purpose and without fee is hereby granted,
31 provided that the above copyright notice appear in all copies and that
32 both that copyright notice and this permission notice appear in
33 supporting documentation, and that the name of Digital not be
34 used in advertising or publicity pertaining to distribution of the
35 software without specific, written prior permission.
37 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
38 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
39 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
40 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
41 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
42 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
45 ******************************************************************/
47 #ifdef HAVE_DIX_CONFIG_H
48 #include <dix-config.h>
52 #include <X11/Xproto.h>
53 #include "windowstr.h"
54 #include "extnsionst.h"
55 #include "dixstruct.h"
56 #include "dixevents.h"
61 int (*InitialVector
[3]) (ClientPtr
/* client */) = {
63 ProcInitialConnection
,
64 ProcEstablishConnection
67 int (*ProcVector
[256]) (ClientPtr
/* client */) = {
70 ProcChangeWindowAttributes
,
71 ProcGetWindowAttributes
,
73 ProcDestroySubwindows
, /* 5 */
78 ProcUnmapWindow
, /* 10 */
83 ProcQueryTree
, /* 15 */
88 ProcGetProperty
, /* 20 */
90 ProcSetSelectionOwner
,
91 ProcGetSelectionOwner
,
93 ProcSendEvent
, /* 25 */
98 ProcChangeActivePointerGrab
, /* 30 */
103 ProcAllowEvents
, /* 35 */
108 ProcTranslateCoords
, /* 40 */
113 ProcOpenFont
, /* 45 */
116 ProcQueryTextExtents
,
118 ProcListFontsWithInfo
, /* 50 */
123 ProcCreateGC
, /* 55 */
127 ProcSetClipRectangles
,
129 ProcClearToBackground
,
133 ProcPolyLine
, /* 65 */
138 ProcPolyFillRectangle
, /* 70 */
143 ProcPolyText
, /* 75 */
148 ProcCopyColormapAndFree
, /* 80 */
150 ProcUninstallColormap
,
151 ProcListInstalledColormaps
,
153 ProcAllocNamedColor
, /* 85 */
155 ProcAllocColorPlanes
,
158 ProcStoreNamedColor
, /* 90 */
162 ProcCreateGlyphCursor
,
163 ProcFreeCursor
, /* 95 */
168 ProcChangeKeyboardMapping
, /* 100 */
169 ProcGetKeyboardMapping
,
170 ProcChangeKeyboardControl
,
171 ProcGetKeyboardControl
,
173 ProcChangePointerControl
, /* 105 */
174 ProcGetPointerControl
,
178 ProcListHosts
, /* 110 */
179 ProcChangeAccessControl
,
180 ProcChangeCloseDownMode
,
182 ProcRotateProperties
,
183 ProcForceScreenSaver
, /* 115 */
184 ProcSetPointerMapping
,
185 ProcGetPointerMapping
,
186 ProcSetModifierMapping
,
187 ProcGetModifierMapping
,
188 ProcBadRequest
, /* 120 */
193 ProcBadRequest
, /* 125 */
326 int (*SwappedProcVector
[256]) (ClientPtr
/* client */) = {
329 SProcChangeWindowAttributes
,
330 SProcResourceReq
, /* GetWindowAttributes */
331 SProcResourceReq
, /* DestroyWindow */
332 SProcResourceReq
, /* 5 DestroySubwindows */
333 SProcResourceReq
, /* SProcChangeSaveSet, */
335 SProcResourceReq
, /* MapWindow */
336 SProcResourceReq
, /* MapSubwindows */
337 SProcResourceReq
, /* 10 UnmapWindow */
338 SProcResourceReq
, /* UnmapSubwindows */
339 SProcConfigureWindow
,
340 SProcResourceReq
, /* SProcCirculateWindow, */
341 SProcResourceReq
, /* GetGeometry */
342 SProcResourceReq
, /* 15 QueryTree */
344 SProcResourceReq
, /* SProcGetAtomName, */
347 SProcGetProperty
, /* 20 */
348 SProcResourceReq
, /* SProcListProperties, */
349 SProcSetSelectionOwner
,
350 SProcResourceReq
, /* SProcGetSelectionOwner, */
351 SProcConvertSelection
,
352 SProcSendEvent
, /* 25 */
354 SProcResourceReq
, /* SProcUngrabPointer, */
357 SProcChangeActivePointerGrab
, /* 30 */
359 SProcResourceReq
, /* SProcUngrabKeyboard, */
362 SProcResourceReq
, /* 35 SProcAllowEvents, */
363 SProcSimpleReq
, /* SProcGrabServer, */
364 SProcSimpleReq
, /* SProcUngrabServer, */
365 SProcResourceReq
, /* SProcQueryPointer, */
366 SProcGetMotionEvents
,
367 SProcTranslateCoords
, /*40 */
370 SProcSimpleReq
, /* SProcGetInputFocus, */
371 SProcSimpleReq
, /* QueryKeymap, */
372 SProcOpenFont
, /* 45 */
373 SProcResourceReq
, /* SProcCloseFont, */
374 SProcResourceReq
, /* SProcQueryFont, */
375 SProcResourceReq
, /* SProcQueryTextExtents, */
377 SProcListFontsWithInfo
, /* 50 */
379 SProcSimpleReq
, /* GetFontPath, */
381 SProcResourceReq
, /* SProcFreePixmap, */
382 SProcCreateGC
, /* 55 */
386 SProcSetClipRectangles
,
387 SProcResourceReq
, /* 60 SProcFreeGC, */
388 SProcClearToBackground
,
391 SProcPoly
, /* PolyPoint, */
392 SProcPoly
, /* 65 PolyLine */
393 SProcPoly
, /* PolySegment, */
394 SProcPoly
, /* PolyRectangle, */
395 SProcPoly
, /* PolyArc, */
397 SProcPoly
, /* 70 PolyFillRectangle */
398 SProcPoly
, /* PolyFillArc, */
402 SProcPolyText
, /* 75 */
406 SProcResourceReq
, /* SProcFreeColormap, */
407 SProcCopyColormapAndFree
, /* 80 */
408 SProcResourceReq
, /* SProcInstallColormap, */
409 SProcResourceReq
, /* SProcUninstallColormap, */
410 SProcResourceReq
, /* SProcListInstalledColormaps, */
412 SProcAllocNamedColor
, /* 85 */
413 SProcAllocColorCells
,
414 SProcAllocColorPlanes
,
417 SProcStoreNamedColor
, /* 90 */
421 SProcCreateGlyphCursor
,
422 SProcResourceReq
, /* 95 SProcFreeCursor, */
426 SProcSimpleReq
, /* ListExtensions, */
427 SProcChangeKeyboardMapping
, /* 100 */
428 SProcSimpleReq
, /* GetKeyboardMapping, */
429 SProcChangeKeyboardControl
,
430 SProcSimpleReq
, /* GetKeyboardControl, */
431 SProcSimpleReq
, /* Bell, */
432 SProcChangePointerControl
, /* 105 */
433 SProcSimpleReq
, /* GetPointerControl, */
435 SProcSimpleReq
, /* GetScreenSaver, */
437 SProcSimpleReq
, /* 110 ListHosts, */
438 SProcSimpleReq
, /* SProcChangeAccessControl, */
439 SProcSimpleReq
, /* SProcChangeCloseDownMode, */
440 SProcResourceReq
, /* SProcKillClient, */
441 SProcRotateProperties
,
442 SProcSimpleReq
, /* 115 ForceScreenSaver */
443 SProcSimpleReq
, /* SetPointerMapping, */
444 SProcSimpleReq
, /* GetPointerMapping, */
445 SProcSimpleReq
, /* SetModifierMapping, */
446 SProcSimpleReq
, /* GetModifierMapping, */
447 ProcBadRequest
, /* 120 */
452 ProcBadRequest
, /* 125 */
585 EventSwapPtr EventSwapVector
[MAXEVENTS
] = {
586 (EventSwapPtr
) SErrorEvent
,
591 SKeyButtonPtrEvent
, /* 5 */
596 SFocusEvent
, /* 10 */
599 SGraphicsExposureEvent
,
601 SVisibilityEvent
, /* 15 */
606 SMapRequestEvent
, /* 20 */
608 SConfigureNotifyEvent
,
609 SConfigureRequestEvent
,
611 SResizeRequestEvent
, /* 25 */
615 SSelectionClearEvent
,
616 SSelectionRequestEvent
, /* 30 */
617 SSelectionNotifyEvent
,
716 ReplySwapPtr ReplySwapVector
[256] = {
720 (ReplySwapPtr
) SGetWindowAttributesReply
,
722 ReplyNotSwappd
, /* 5 */
727 ReplyNotSwappd
, /* 10 */
731 (ReplySwapPtr
) SGetGeometryReply
,
732 (ReplySwapPtr
) SQueryTreeReply
, /* 15 */
733 (ReplySwapPtr
) SInternAtomReply
,
734 (ReplySwapPtr
) SGetAtomNameReply
,
737 (ReplySwapPtr
) SGetPropertyReply
, /* 20 */
738 (ReplySwapPtr
) SListPropertiesReply
,
740 (ReplySwapPtr
) SGetSelectionOwnerReply
,
742 ReplyNotSwappd
, /* 25 */
743 (ReplySwapPtr
) SGenericReply
, /* SGrabPointerReply, */
747 ReplyNotSwappd
, /* 30 */
748 (ReplySwapPtr
) SGenericReply
, /* SGrabKeyboardReply, */
752 ReplyNotSwappd
, /* 35 */
755 (ReplySwapPtr
) SQueryPointerReply
,
756 (ReplySwapPtr
) SGetMotionEventsReply
,
757 (ReplySwapPtr
) STranslateCoordsReply
, /* 40 */
760 (ReplySwapPtr
) SGetInputFocusReply
,
761 (ReplySwapPtr
) SQueryKeymapReply
,
762 ReplyNotSwappd
, /* 45 */
764 (ReplySwapPtr
) SQueryFontReply
,
765 (ReplySwapPtr
) SQueryTextExtentsReply
,
766 (ReplySwapPtr
) SListFontsReply
,
767 (ReplySwapPtr
) SListFontsWithInfoReply
, /* 50 */
769 (ReplySwapPtr
) SGetFontPathReply
,
772 ReplyNotSwappd
, /* 55 */
777 ReplyNotSwappd
, /* 60 */
782 ReplyNotSwappd
, /* 65 */
787 ReplyNotSwappd
, /* 70 */
790 (ReplySwapPtr
) SGetImageReply
,
792 ReplyNotSwappd
, /* 75 */
797 ReplyNotSwappd
, /* 80 */
800 (ReplySwapPtr
) SListInstalledColormapsReply
,
801 (ReplySwapPtr
) SAllocColorReply
,
802 (ReplySwapPtr
) SAllocNamedColorReply
, /* 85 */
803 (ReplySwapPtr
) SAllocColorCellsReply
,
804 (ReplySwapPtr
) SAllocColorPlanesReply
,
807 ReplyNotSwappd
, /* 90 */
808 (ReplySwapPtr
) SQueryColorsReply
,
809 (ReplySwapPtr
) SLookupColorReply
,
812 ReplyNotSwappd
, /* 95 */
814 (ReplySwapPtr
) SQueryBestSizeReply
,
815 (ReplySwapPtr
) SGenericReply
, /* SQueryExtensionReply, */
816 (ReplySwapPtr
) SListExtensionsReply
,
817 ReplyNotSwappd
, /* 100 */
818 (ReplySwapPtr
) SGetKeyboardMappingReply
,
820 (ReplySwapPtr
) SGetKeyboardControlReply
,
822 ReplyNotSwappd
, /* 105 */
823 (ReplySwapPtr
) SGetPointerControlReply
,
825 (ReplySwapPtr
) SGetScreenSaverReply
,
827 (ReplySwapPtr
) SListHostsReply
, /* 110 */
832 ReplyNotSwappd
, /* 115 */
833 (ReplySwapPtr
) SGenericReply
, /* SetPointerMapping */
834 (ReplySwapPtr
) SGetPointerMappingReply
,
835 (ReplySwapPtr
) SGenericReply
, /* SetModifierMapping */
836 (ReplySwapPtr
) SGetModifierMappingReply
, /* 119 */
837 ReplyNotSwappd
, /* 120 */
838 ReplyNotSwappd
, /* 121 */
839 ReplyNotSwappd
, /* 122 */
840 ReplyNotSwappd
, /* 123 */
841 ReplyNotSwappd
, /* 124 */
842 ReplyNotSwappd
, /* 125 */
843 ReplyNotSwappd
, /* 126 */
844 ReplyNotSwappd
, /* NoOperation */