]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/xserver.git/blob - Xext/panoramiXSwap.c
Imported Upstream version 1.11.4
[glsdk/xserver.git] / Xext / panoramiXSwap.c
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 #ifdef HAVE_DIX_CONFIG_H
27 #include <dix-config.h>
28 #endif
30 #include <stdio.h>
31 #include <X11/X.h>
32 #include <X11/Xproto.h>
33 #include "misc.h"
34 #include "cursor.h"
35 #include "cursorstr.h"
36 #include "extnsionst.h"
37 #include "dixstruct.h"
38 #include "gc.h"
39 #include "gcstruct.h"
40 #include "scrnintstr.h"
41 #include "window.h"
42 #include "windowstr.h"
43 #include "pixmapstr.h"
44 #include "panoramiX.h"
45 #include <X11/extensions/panoramiXproto.h>
46 #include "panoramiXsrv.h"
47 #include "globals.h"
48 #include "panoramiXh.h"
50 static int
51 SProcPanoramiXQueryVersion (ClientPtr client)
52 {
53         REQUEST(xPanoramiXQueryVersionReq);
54         int n;
56         swaps(&stuff->length,n);
57         REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq);
58         return ProcPanoramiXQueryVersion(client);
59 }
61 static int
62 SProcPanoramiXGetState(ClientPtr client)
63 {
64         REQUEST(xPanoramiXGetStateReq);
65         int n;
67         swaps (&stuff->length, n);      
68         REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
69         swapl (&stuff->window, n);
70         return ProcPanoramiXGetState(client);
71 }
73 static int 
74 SProcPanoramiXGetScreenCount(ClientPtr client)
75 {
76         REQUEST(xPanoramiXGetScreenCountReq);
77         int n;
79         swaps (&stuff->length, n);
80         REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
81         swapl (&stuff->window, n);
82         return ProcPanoramiXGetScreenCount(client);
83 }
85 static int 
86 SProcPanoramiXGetScreenSize(ClientPtr client)
87 {
88         REQUEST(xPanoramiXGetScreenSizeReq);
89         int n;
91         swaps (&stuff->length, n);
92         REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
93         swapl (&stuff->window, n);
94         swapl (&stuff->screen, n);
95         return ProcPanoramiXGetScreenSize(client);
96 }
99 static int 
100 SProcXineramaIsActive(ClientPtr client)
102         REQUEST(xXineramaIsActiveReq);
103         int n;
105         swaps (&stuff->length, n);
106         REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
107         return ProcXineramaIsActive(client);
111 static int 
112 SProcXineramaQueryScreens(ClientPtr client)
114         REQUEST(xXineramaQueryScreensReq);
115         int n;
117         swaps (&stuff->length, n);
118         REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
119         return ProcXineramaQueryScreens(client);
123 int
124 SProcPanoramiXDispatch (ClientPtr client)
125 {   REQUEST(xReq);
126     switch (stuff->data)
127     {
128         case X_PanoramiXQueryVersion:
129              return SProcPanoramiXQueryVersion(client);
130         case X_PanoramiXGetState:
131              return SProcPanoramiXGetState(client);
132         case X_PanoramiXGetScreenCount:
133              return SProcPanoramiXGetScreenCount(client);
134         case X_PanoramiXGetScreenSize:
135              return SProcPanoramiXGetScreenSize(client);
136         case X_XineramaIsActive:
137              return SProcXineramaIsActive(client);
138         case X_XineramaQueryScreens:
139              return SProcXineramaQueryScreens(client);
140     }
141     return BadRequest;