home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / server / include / dixstruct.h.orig < prev    next >
Encoding:
Text File  |  1991-02-14  |  2.8 KB  |  93 lines

  1.  
  2. /***********************************************************
  3. Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
  4. and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
  5.  
  6.                         All Rights Reserved
  7.  
  8. Permission to use, copy, modify, and distribute this software and its
  9. documentation for any purpose and without fee is hereby granted,
  10. provided that the above copyright notice appear in all copies and that
  11. both that copyright notice and this permission notice appear in
  12. supporting documentation, and that the names of Digital or MIT not be
  13. used in advertising or publicity pertaining to distribution of the
  14. software without specific, written prior permission.
  15.  
  16. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  17. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  18. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  19. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  20. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  21. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  22. SOFTWARE.
  23.  
  24. ******************************************************************/
  25. /* $XConsortium: dixstruct.h,v 1.15 91/02/14 19:35:59 keith Exp $ */
  26.  
  27. #ifndef DIXSTRUCT_H
  28. #define DIXSTRUCT_H
  29.  
  30. #include "dix.h"
  31. #include "resource.h"
  32. #include "cursor.h"
  33. #include "gc.h"
  34. #include "pixmap.h"
  35.  
  36. /*
  37.  *     direct-mapped hash table, used by resource manager to store
  38.  *      translation from client ids to server addresses.
  39.  */
  40.  
  41. typedef struct _TimeStamp {
  42.     unsigned long months;    /* really ~49.7 days */
  43.     unsigned long milliseconds;
  44. }           TimeStamp;
  45.  
  46. #ifdef DEBUG
  47. #define MAX_REQUEST_LOG 100
  48. #endif
  49.  
  50. typedef struct _Client {
  51.     int         index;
  52.     Mask        clientAsMask;
  53.     pointer     requestBuffer;
  54.     pointer     osPrivate;    /* for OS layer, including scheduler */
  55.     Bool        swapped;
  56.     void        (*pSwapReplyFunc) ();
  57.     XID         errorValue;
  58.     int         sequence;
  59.     int         closeDownMode;
  60.     int         clientGone;
  61.     int         noClientException;    /* this client died or needs to be
  62.                      * killed */
  63.     DrawablePtr lastDrawable;
  64.     Drawable    lastDrawableID;
  65.     GCPtr       lastGC;
  66.     GContext    lastGCID;
  67.     pointer    *saveSet;
  68.     int         numSaved;
  69.     pointer     screenPrivate[MAXSCREENS];
  70.     int         (**requestVector) ();
  71.  
  72. #ifdef DEBUG
  73.     unsigned char requestLog[MAX_REQUEST_LOG];
  74.     int         requestLogIndex;
  75. #endif
  76. }           ClientRec;
  77.  
  78. typedef struct _WorkQueue {
  79.     struct _WorkQueue *next;
  80.     Bool        (*function) ();
  81.     ClientPtr   client;
  82.     pointer     closure;
  83. }           WorkQueueRec;
  84.  
  85. extern TimeStamp currentTime;
  86. extern void CloseDownClient();
  87.  
  88. extern TimeStamp ClientTimeToServerTime();
  89. extern void UpdateCurrentTime();
  90. extern void UpdateCurrentTimeIf();
  91.  
  92. #endif                /* DIXSTRUCT_H */
  93.