1706f2543Smrg/***************************************************************** 2706f2543SmrgCopyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. 3706f2543SmrgPermission is hereby granted, free of charge, to any person obtaining a copy 4706f2543Smrgof this software and associated documentation files (the "Software"), to deal 5706f2543Smrgin the Software without restriction, including without limitation the rights 6706f2543Smrgto use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7706f2543Smrgcopies of the Software. 8706f2543Smrg 9706f2543SmrgThe above copyright notice and this permission notice shall be included in 10706f2543Smrgall copies or substantial portions of the Software. 11706f2543Smrg 12706f2543SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13706f2543SmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14706f2543SmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15706f2543SmrgDIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, 16706f2543SmrgBUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, 17706f2543SmrgWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 18706f2543SmrgIN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19706f2543Smrg 20706f2543SmrgExcept as contained in this notice, the name of Digital Equipment Corporation 21706f2543Smrgshall not be used in advertising or otherwise to promote the sale, use or other 22706f2543Smrgdealings in this Software without prior written authorization from Digital 23706f2543SmrgEquipment Corporation. 24706f2543Smrg******************************************************************/ 25706f2543Smrg 26706f2543Smrg#ifdef HAVE_DIX_CONFIG_H 27706f2543Smrg#include <dix-config.h> 28706f2543Smrg#endif 29706f2543Smrg 30706f2543Smrg#include <stdio.h> 31706f2543Smrg#include <X11/X.h> 32706f2543Smrg#include <X11/Xproto.h> 33706f2543Smrg#include "misc.h" 34706f2543Smrg#include "cursor.h" 35706f2543Smrg#include "cursorstr.h" 36706f2543Smrg#include "extnsionst.h" 37706f2543Smrg#include "dixstruct.h" 38706f2543Smrg#include "gc.h" 39706f2543Smrg#include "gcstruct.h" 40706f2543Smrg#include "scrnintstr.h" 41706f2543Smrg#include "window.h" 42706f2543Smrg#include "windowstr.h" 43706f2543Smrg#include "pixmapstr.h" 44706f2543Smrg#include "panoramiX.h" 45706f2543Smrg#include <X11/extensions/panoramiXproto.h> 46706f2543Smrg#include "panoramiXsrv.h" 47706f2543Smrg#include "globals.h" 48706f2543Smrg#include "panoramiXh.h" 49706f2543Smrg 50706f2543Smrgstatic int 51706f2543SmrgSProcPanoramiXQueryVersion (ClientPtr client) 52706f2543Smrg{ 53706f2543Smrg REQUEST(xPanoramiXQueryVersionReq); 54706f2543Smrg int n; 55706f2543Smrg 56706f2543Smrg swaps(&stuff->length,n); 57706f2543Smrg REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq); 58706f2543Smrg return ProcPanoramiXQueryVersion(client); 59706f2543Smrg} 60706f2543Smrg 61706f2543Smrgstatic int 62706f2543SmrgSProcPanoramiXGetState(ClientPtr client) 63706f2543Smrg{ 64706f2543Smrg REQUEST(xPanoramiXGetStateReq); 65706f2543Smrg int n; 66706f2543Smrg 67706f2543Smrg swaps (&stuff->length, n); 68706f2543Smrg REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); 69706f2543Smrg swapl (&stuff->window, n); 70706f2543Smrg return ProcPanoramiXGetState(client); 71706f2543Smrg} 72706f2543Smrg 73706f2543Smrgstatic int 74706f2543SmrgSProcPanoramiXGetScreenCount(ClientPtr client) 75706f2543Smrg{ 76706f2543Smrg REQUEST(xPanoramiXGetScreenCountReq); 77706f2543Smrg int n; 78706f2543Smrg 79706f2543Smrg swaps (&stuff->length, n); 80706f2543Smrg REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); 81706f2543Smrg swapl (&stuff->window, n); 82706f2543Smrg return ProcPanoramiXGetScreenCount(client); 83706f2543Smrg} 84706f2543Smrg 85706f2543Smrgstatic int 86706f2543SmrgSProcPanoramiXGetScreenSize(ClientPtr client) 87706f2543Smrg{ 88706f2543Smrg REQUEST(xPanoramiXGetScreenSizeReq); 89706f2543Smrg int n; 90706f2543Smrg 91706f2543Smrg swaps (&stuff->length, n); 92706f2543Smrg REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); 93706f2543Smrg swapl (&stuff->window, n); 94706f2543Smrg swapl (&stuff->screen, n); 95706f2543Smrg return ProcPanoramiXGetScreenSize(client); 96706f2543Smrg} 97706f2543Smrg 98706f2543Smrg 99706f2543Smrgstatic int 100706f2543SmrgSProcXineramaIsActive(ClientPtr client) 101706f2543Smrg{ 102706f2543Smrg REQUEST(xXineramaIsActiveReq); 103706f2543Smrg int n; 104706f2543Smrg 105706f2543Smrg swaps (&stuff->length, n); 106706f2543Smrg REQUEST_SIZE_MATCH(xXineramaIsActiveReq); 107706f2543Smrg return ProcXineramaIsActive(client); 108706f2543Smrg} 109706f2543Smrg 110706f2543Smrg 111706f2543Smrgstatic int 112706f2543SmrgSProcXineramaQueryScreens(ClientPtr client) 113706f2543Smrg{ 114706f2543Smrg REQUEST(xXineramaQueryScreensReq); 115706f2543Smrg int n; 116706f2543Smrg 117706f2543Smrg swaps (&stuff->length, n); 118706f2543Smrg REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); 119706f2543Smrg return ProcXineramaQueryScreens(client); 120706f2543Smrg} 121706f2543Smrg 122706f2543Smrg 123706f2543Smrgint 124706f2543SmrgSProcPanoramiXDispatch (ClientPtr client) 125706f2543Smrg{ REQUEST(xReq); 126706f2543Smrg switch (stuff->data) 127706f2543Smrg { 128706f2543Smrg case X_PanoramiXQueryVersion: 129706f2543Smrg return SProcPanoramiXQueryVersion(client); 130706f2543Smrg case X_PanoramiXGetState: 131706f2543Smrg return SProcPanoramiXGetState(client); 132706f2543Smrg case X_PanoramiXGetScreenCount: 133706f2543Smrg return SProcPanoramiXGetScreenCount(client); 134706f2543Smrg case X_PanoramiXGetScreenSize: 135706f2543Smrg return SProcPanoramiXGetScreenSize(client); 136706f2543Smrg case X_XineramaIsActive: 137706f2543Smrg return SProcXineramaIsActive(client); 138706f2543Smrg case X_XineramaQueryScreens: 139706f2543Smrg return SProcXineramaQueryScreens(client); 140706f2543Smrg } 141706f2543Smrg return BadRequest; 142706f2543Smrg} 143