1 /***********************************************************
2 Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
6 Permission to use, copy, modify, and distribute this software and its
7 documentation for any purpose and without fee is hereby granted,
8 provided that the above copyright notice appear in all copies and that
9 both that copyright notice and this permission notice appear in
10 supporting documentation, and that the name of Digital not be
11 used in advertising or publicity pertaining to distribution of the
12 software without specific, written prior permission.
14 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
15 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
16 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
17 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
18 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
19 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
22 ******************************************************************/
23 /* $XConsortium: dixstruct.h /main/43 1996/12/15 21:25:06 rws $ */
24 /* $XFree86: xc/programs/Xserver/include/dixstruct.h,v 3.8 1996/12/24 02:27:28 dawes Exp $ */
37 * direct-mapped hash table, used by resource manager to store
38 * translation from client ids to server addresses.
42 #define MAX_REQUEST_LOG 100
45 extern CallbackListPtr ClientStateCallback;
49 xConnSetupPrefix *prefix;
53 typedef void (*ReplySwapPtr) (
54 #if NeedNestedPrototypes
55 ClientPtr /* pClient */,
61 extern void ReplyNotSwappd (
62 #if NeedNestedPrototypes
63 ClientPtr /* pClient */,
69 typedef enum {ClientStateInitial,
70 ClientStateAuthenticating,
74 ClientStateCheckingSecurity,
75 ClientStateCheckedSecurity} ClientState;
77 typedef struct _Client {
80 pointer requestBuffer;
81 pointer osPrivate; /* for OS layer, including scheduler */
83 ReplySwapPtr pSwapReplyFunc;
88 int noClientException; /* this client died or needs to be
90 DrawablePtr lastDrawable;
91 Drawable lastDrawableID;
96 pointer screenPrivate[MAXSCREENS];
97 int (**requestVector) (
98 #if NeedNestedPrototypes
99 ClientPtr /* pClient */
102 CARD32 req_len; /* length of current request */
103 Bool big_requests; /* supports large requests */
105 ClientState clientState;
106 DevUnion *devPrivates;
108 unsigned short xkbClientFlags;
109 unsigned short mapNotifyMask;
110 unsigned short newKeyboardNotifyMask;
111 unsigned short vMajor,vMinor;
116 unsigned char requestLog[MAX_REQUEST_LOG];
121 #if NeedNestedPrototypes
126 unsigned long replyBytesRemaining;
129 unsigned int trustLevel;
130 pointer (* CheckAccess)(
131 #if NeedNestedPrototypes
132 ClientPtr /*pClient*/,
135 Mask /*access_mode*/,
136 pointer /*resourceval*/
141 struct _AppGroupRec* appgroup;
143 struct _FontResolution * (*fontResFunc) ( /* no need for font.h */
144 #if NeedNestedPrototypes
145 ClientPtr /* pClient */,
151 /* This prototype is used pervasively in Xext, dix */
152 #if NeedFunctionPrototypes
153 #define DISPATCH_PROC(func) int func(ClientPtr /* client */)
155 #define DISPATCH_PROC(func) int func(/* ClientPtr client */)
158 typedef struct _WorkQueue {
159 struct _WorkQueue *next;
161 #if NeedNestedPrototypes
162 ClientPtr /* pClient */,
163 pointer /* closure */
170 extern TimeStamp currentTime;
171 extern TimeStamp lastDeviceEventTime;
173 extern int CompareTimeStamps(
174 #if NeedFunctionPrototypes
180 extern TimeStamp ClientTimeToServerTime(
181 #if NeedFunctionPrototypes
186 typedef struct _CallbackRec {
187 CallbackProcPtr proc;
190 struct _CallbackRec *next;
191 } CallbackRec, *CallbackPtr;
193 typedef struct _CallbackList {
194 CallbackFuncsRec funcs;
203 extern int (* InitialVector[3]) (
204 #if NeedNestedPrototypes
209 extern int (* ProcVector[256]) (
210 #if NeedNestedPrototypes
215 extern int (* SwappedProcVector[256]) (
216 #if NeedNestedPrototypes
222 extern int (*k5_Vector[256])() =
223 #if NeedNestedPrototypes
229 extern void (* ReplySwapVector[256]) ();
231 extern int ProcBadRequest(
232 #if NeedFunctionPrototypes
237 #endif /* DIXSTRUCT_H */