home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / x / xtrapv33.zip / extensions / server / xtrap / xtrapditbl.c < prev   
C/C++ Source or Header  |  1992-09-14  |  8KB  |  236 lines

  1. /****************************************************************************
  2. Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA
  3.  
  4. Permission to use, copy, modify, and distribute this software and its 
  5. documentation for any purpose and without fee is hereby granted, 
  6. provided that the above copyright notice appear in all copies and that
  7. both that copyright notice and this permission notice appear in 
  8. supporting documentation, and that the name of Digital not be
  9. used in advertising or publicity pertaining to distribution of the
  10. software without specific, written prior permission.  
  11.  
  12. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  13. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  14. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  15. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  16. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  17. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  18. SOFTWARE.
  19.  
  20. *****************************************************************************/
  21. /*
  22.  *  ABSTRACT:
  23.  *
  24.  *      This module is contains Vector tables used for swapping and general   
  25.  *      dispatch by the XTrap server extension.
  26.  *
  27.  *  CONTRIBUTORS:
  28.  *
  29.  *      Ken Miller
  30.  *      Marc Evans
  31.  *
  32.  */
  33. #ifndef lint
  34. static char RCSID[] = "$Header$";
  35. #endif
  36.  
  37. /*-----------------*
  38.  *  Include Files  *
  39.  *-----------------*/
  40. #include "X.h"
  41. #define NEED_REPLIES
  42. #define NEED_EVENTS
  43. #include "Xproto.h"
  44. #include "Xprotostr.h"
  45. #include "xtrapdi.h"
  46. #include "input.h"          /* Server DevicePtr definitions */
  47. #include "misc.h"
  48. #include "dixstruct.h"
  49. #include "xtrapddmi.h"      /* has to be after misc.h & dixstruct.h for U*IX */
  50. #include "xtrapproto.h"
  51.  
  52. globaldef void_function XETSwProcVector[256L] =
  53. {
  54.     (void_function)ProcBadRequest,
  55.     XETSwCreateWindow,
  56.     XETSwChangeWindowAttributes,
  57.     XETSwResourceReq,            /* GetWindowAttributes */
  58.     XETSwResourceReq,            /* DestroyWindow */
  59.     XETSwResourceReq,            /* 5 DestroySubwindows */
  60.     XETSwResourceReq,            /* XETSwChangeSaveSet, */
  61.     XETSwReparentWindow,
  62.     XETSwResourceReq,            /* MapWindow */
  63.     XETSwResourceReq,            /* MapSubwindows */
  64.     XETSwResourceReq,            /* 10 UnmapWindow */
  65.     XETSwResourceReq,            /* UnmapSubwindows */
  66.     XETSwConfigureWindow,
  67.     XETSwResourceReq,            /* XETSwCirculateWindow, */
  68.     XETSwResourceReq,            /* GetGeometry */
  69.     XETSwResourceReq,            /* 15 QueryTree */
  70.     XETSwInternAtom,
  71.     XETSwResourceReq,            /* XETSwGetAtomName, */
  72.     XETSwChangeProperty,
  73.     XETSwDeleteProperty,
  74.     XETSwGetProperty,            /* 20 */
  75.     XETSwResourceReq,            /* XETSwListProperties, */
  76.     XETSwSetSelectionOwner,
  77.     XETSwResourceReq,             /* XETSwGetSelectionOwner, */
  78.     XETSwConvertSelection,
  79.     XETSwSendEvent,            /* 25 */
  80.     XETSwGrabPointer,
  81.     XETSwResourceReq,             /* XETSwUngrabPointer, */
  82.     XETSwGrabButton,
  83.     XETSwUngrabButton,
  84.     XETSwChangeActivePointerGrab,    /* 30 */
  85.     XETSwGrabKeyboard,
  86.     XETSwResourceReq,            /* XETSwUngrabKeyboard, */
  87.     XETSwGrabKey,
  88.     XETSwUngrabKey,
  89.     XETSwResourceReq,            /* 35 XETSwAllowEvents, */
  90.     XETSwSimpleReq,            /* XETSwGrabServer, */
  91.     XETSwSimpleReq,            /* XETSwUngrabServer, */
  92.     XETSwResourceReq,            /* XETSwQueryPointer, */
  93.     XETSwGetMotionEvents,
  94.     XETSwTranslateCoords,        /*40 */
  95.     XETSwWarpPointer,
  96.     XETSwSetInputFocus,
  97.     XETSwSimpleReq,            /* XETSwGetInputFocus, */
  98.     XETSwSimpleReq,            /* QueryKeymap, */
  99.     XETSwOpenFont,            /* 45 */
  100.     XETSwResourceReq,            /* XETSwCloseFont, */
  101.     XETSwResourceReq,             /* XETSwQueryFont, */
  102.     XETSwResourceReq,            /* XETSwQueryTextExtents,  */
  103.     XETSwListFonts,
  104.     XETSwListFontsWithInfo,        /* 50 */
  105.     XETSwSetFontPath,
  106.     XETSwSimpleReq,            /* GetFontPath, */
  107.     XETSwCreatePixmap,
  108.     XETSwResourceReq,            /* XETSwFreePixmap, */
  109.     XETSwCreateGC,            /* 55 */
  110.     XETSwChangeGC,
  111.     XETSwCopyGC,
  112.     XETSwSetDashes,
  113.     XETSwSetClipRectangles,
  114.     XETSwResourceReq,            /* 60 XETSwFreeGC, */
  115.     XETSwClearToBackground,
  116.     XETSwCopyArea,
  117.     XETSwCopyPlane,
  118.     XETSwPoly,                /* PolyPoint, */
  119.     XETSwPoly,                /* 65 PolyLine */
  120.     XETSwPoly,                /* PolySegment, */
  121.     XETSwPoly,                /* PolyRectangle, */
  122.     XETSwPoly,                /* PolyArc, */
  123.     XETSwFillPoly,
  124.     XETSwPoly,                /* 70 PolyFillRectangle */
  125.     XETSwPoly,                /* PolyFillArc, */
  126.     XETSwPutImage,
  127.     XETSwGetImage,
  128.     XETSwPolyText,
  129.     XETSwPolyText,            /* 75 */
  130.     XETSwImageText,
  131.     XETSwImageText,
  132.     XETSwCreateColormap,
  133.     XETSwResourceReq,            /* XETSwFreeColormap, */
  134.     XETSwCopyColormapAndFree,        /* 80 */
  135.     XETSwResourceReq,            /* XETSwInstallColormap, */
  136.     XETSwResourceReq,            /* XETSwUninstallColormap, */
  137.     XETSwResourceReq,             /* XETSwListInstalledColormaps, */
  138.     XETSwAllocColor,
  139.     XETSwAllocNamedColor,        /* 85 */
  140.     XETSwAllocColorCells,
  141.     XETSwAllocColorPlanes,
  142.     XETSwFreeColors,
  143.     XETSwStoreColors,
  144.     XETSwStoreNamedColor,        /* 90 */
  145.     XETSwQueryColors,
  146.     XETSwLookupColor,
  147.     XETSwCreateCursor,
  148.     XETSwCreateGlyphCursor,
  149.     XETSwResourceReq,            /* 95 XETSwFreeCursor, */
  150.     XETSwRecolorCursor,
  151.     XETSwQueryBestSize,
  152.     XETSwQueryExtension,
  153.     XETSwSimpleReq,            /* ListExtensions, */
  154.     XETSwChangeKeyboardMapping,        /* 100 */
  155.     XETSwSimpleReq,            /* GetKeyboardMapping, */
  156.     XETSwChangeKeyboardControl,
  157.     XETSwSimpleReq,            /* GetKeyboardControl, */
  158.     XETSwSimpleReq,            /* Bell, */
  159.     XETSwChangePointerControl,        /* 105 */
  160.     XETSwSimpleReq,            /* GetPointerControl, */
  161.     XETSwSetScreenSaver,
  162.     XETSwSimpleReq,            /* GetScreenSaver, */
  163.     XETSwChangeHosts,
  164.     XETSwSimpleReq,            /* 110 ListHosts, */
  165.     XETSwSimpleReq,            /* XETSwChangeAccessControl, */
  166.     XETSwSimpleReq,            /* XETSwChangeCloseDownMode, */
  167.     XETSwResourceReq,            /* XETSwKillClient, */
  168.     XETSwRotateProperties,
  169.     XETSwSimpleReq,            /* 115 ForceScreenSaver */
  170.     XETSwSimpleReq,            /* SetPointerMapping, */
  171.     XETSwSimpleReq,            /* GetPointerMapping, */
  172.     XETSwSimpleReq,            /* SetModifierMapping, */
  173.     XETSwSimpleReq,            /* GetModifierMapping, */
  174.     NotImplemented,            /* 120 */
  175.     NotImplemented,
  176.     NotImplemented,
  177.     NotImplemented,
  178.     NotImplemented,
  179.     NotImplemented,            /* 125 */
  180.     NotImplemented,
  181.     XETSwNoOperation
  182. };
  183.  
  184. /* NOTE: This array must align with the values of the constants used
  185.  * as minor_opcode values in the request structure. Failure to do this
  186.  * could result in random code paths.
  187.  */
  188. globaldef int_function XETrapDispatchVector[10L] = 
  189. {
  190.     XETrapReset,            /* 0 XETrap_Reset */
  191.     XETrapGetAvailable,     /* 1 XETrap_GetAvailable */
  192.     XETrapConfig,           /* 2 XETrap_Config */
  193.     XETrapStartTrap,        /* 3 XETrap_StartTrap */
  194.     XETrapStopTrap,         /* 4 XETrap_StopTrap */
  195.     XETrapGetCurrent,       /* 5 XETrap_GetCurrent */
  196.     XETrapGetStatistics,    /* 6 XETrap_GetStatistics */
  197. #ifndef _XINPUT
  198.     XETrapSimulateXEvent,   /* 7 XETrap_SimulateXEvent */
  199. #endif
  200.     XETrapGetVersion,       /* 8 XETrap_GetVersion */
  201.     XETrapGetLastInpTime,   /* 9 XETrap_GetLastInpTime */
  202. };
  203.  
  204. /* NOTE: This array must align with the values of the constants used
  205.  * as minor_opcode values in the request structure. Failure to do this
  206.  * could result in random code paths.
  207.  */
  208. globaldef int_function XETSwDispatchVector[10L] = 
  209. {
  210.     sXETrapReset,           /* 0 XETrap_Reset */
  211.     sXETrapGetAvailable,    /* 1 XETrap_GetAvailable */
  212.     sXETrapConfig,          /* 2 XETrap_Config */
  213.     sXETrapStartTrap,       /* 3 XETrap_StartTrap */
  214.     sXETrapStopTrap,        /* 4 XETrap_StopTrap */
  215.     sXETrapGetCurrent,      /* 5 XETrap_GetCurrent */
  216.     sXETrapGetStatistics,   /* 6 XETrap_GetStatistics */
  217. #ifndef _XINPUT
  218.     sXETrapSimulateXEvent,  /* 7 XETrap_SimulateXEvent */
  219. #endif
  220.     sXETrapGetVersion,      /* 8 XETrap_GetVersion */
  221.     sXETrapGetLastInpTime,  /* 9 XETrap_GetLastInpTime */
  222. };
  223.  
  224. /* ProcVector shadow vector */
  225. globaldef int_function XETrapProcVector[256L]       = {XETrapRequestVector};
  226. /*
  227.  * Events are faked as if they're vectored since that's
  228.  * the way it'll eventually be (X11 R5?).
  229.  */
  230. #ifndef VECTORED_EVENTS
  231. globaldef int_function EventProcVector[XETrapCoreEvents]       = {NULL};
  232. #endif
  233. globaldef int_function XETrapEventProcVector[XETrapCoreEvents] = {NULL};
  234.  
  235.  
  236.