ci: Check for DDXen to be built
[xserver.git] / Xext / panoramiXSwap.c
blob4257696a15dc4a76dd68a3aa0eebd90137fe4bd8
1 /*****************************************************************
2 Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
3 Permission is hereby granted, free of charge, to any person obtaining a copy
4 of this software and associated documentation files (the "Software"), to deal
5 in the Software without restriction, including without limitation the rights
6 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 copies of the Software.
9 The above copyright notice and this permission notice shall be included in
10 all copies or substantial portions of the Software.
12 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
15 DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
16 BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
17 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
18 IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 Except as contained in this notice, the name of Digital Equipment Corporation
21 shall not be used in advertising or otherwise to promote the sale, use or other
22 dealings in this Software without prior written authorization from Digital
23 Equipment Corporation.
24 ******************************************************************/
26 #include <dix-config.h>
28 #include <stdio.h>
29 #include <X11/X.h>
30 #include <X11/Xproto.h>
31 #include "misc.h"
32 #include "cursor.h"
33 #include "cursorstr.h"
34 #include "extnsionst.h"
35 #include "dixstruct.h"
36 #include "gc.h"
37 #include "gcstruct.h"
38 #include "scrnintstr.h"
39 #include "window.h"
40 #include "windowstr.h"
41 #include "pixmapstr.h"
42 #include "panoramiX.h"
43 #include <X11/extensions/panoramiXproto.h>
44 #include "panoramiXsrv.h"
45 #include "globals.h"
46 #include "panoramiXh.h"
48 static int _X_COLD
49 SProcPanoramiXQueryVersion(ClientPtr client)
51 REQUEST(xPanoramiXQueryVersionReq);
53 swaps(&stuff->length);
54 REQUEST_SIZE_MATCH(xPanoramiXQueryVersionReq);
55 return ProcPanoramiXQueryVersion(client);
58 static int _X_COLD
59 SProcPanoramiXGetState(ClientPtr client)
61 REQUEST(xPanoramiXGetStateReq);
63 swaps(&stuff->length);
64 REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
65 swapl(&stuff->window);
66 return ProcPanoramiXGetState(client);
69 static int _X_COLD
70 SProcPanoramiXGetScreenCount(ClientPtr client)
72 REQUEST(xPanoramiXGetScreenCountReq);
74 swaps(&stuff->length);
75 REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
76 swapl(&stuff->window);
77 return ProcPanoramiXGetScreenCount(client);
80 static int _X_COLD
81 SProcPanoramiXGetScreenSize(ClientPtr client)
83 REQUEST(xPanoramiXGetScreenSizeReq);
85 swaps(&stuff->length);
86 REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
87 swapl(&stuff->window);
88 swapl(&stuff->screen);
89 return ProcPanoramiXGetScreenSize(client);
92 static int _X_COLD
93 SProcXineramaIsActive(ClientPtr client)
95 REQUEST(xXineramaIsActiveReq);
97 swaps(&stuff->length);
98 REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
99 return ProcXineramaIsActive(client);
102 static int _X_COLD
103 SProcXineramaQueryScreens(ClientPtr client)
105 REQUEST(xXineramaQueryScreensReq);
107 swaps(&stuff->length);
108 REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
109 return ProcXineramaQueryScreens(client);
112 int _X_COLD
113 SProcPanoramiXDispatch(ClientPtr client)
115 REQUEST(xReq);
116 switch (stuff->data) {
117 case X_PanoramiXQueryVersion:
118 return SProcPanoramiXQueryVersion(client);
119 case X_PanoramiXGetState:
120 return SProcPanoramiXGetState(client);
121 case X_PanoramiXGetScreenCount:
122 return SProcPanoramiXGetScreenCount(client);
123 case X_PanoramiXGetScreenSize:
124 return SProcPanoramiXGetScreenSize(client);
125 case X_XineramaIsActive:
126 return SProcXineramaIsActive(client);
127 case X_XineramaQueryScreens:
128 return SProcXineramaQueryScreens(client);
130 return BadRequest;