VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/7.1/xorg/dixstruct.h@ 38013

Last change on this file since 38013 was 17236, checked in by vboxsync, 16 years ago

Additions/x11/x11include: blast! Reverted r43555 and r43556

  • Property svn:eol-style set to native
File size: 6.3 KB
Line 
1/* $XFree86: xc/programs/Xserver/include/dixstruct.h,v 3.19tsi Exp $ */
2/***********************************************************
3Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
4
5 All Rights Reserved
6
7Permission to use, copy, modify, and distribute this software and its
8documentation for any purpose and without fee is hereby granted,
9provided that the above copyright notice appear in all copies and that
10both that copyright notice and this permission notice appear in
11supporting documentation, and that the name of Digital not be
12used in advertising or publicity pertaining to distribution of the
13software without specific, written prior permission.
14
15DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
16ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
17DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
18ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
19WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
20ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
21SOFTWARE.
22
23******************************************************************/
24/* $Xorg: dixstruct.h,v 1.3 2000/08/17 19:53:29 cpqbld Exp $ */
25
26#ifndef DIXSTRUCT_H
27#define DIXSTRUCT_H
28
29#include "dix.h"
30#include "resource.h"
31#include "cursor.h"
32#include "gc.h"
33#include "pixmap.h"
34#include <X11/Xmd.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#ifdef DEBUG
42#define MAX_REQUEST_LOG 100
43#endif
44
45extern CallbackListPtr ClientStateCallback;
46
47typedef struct {
48 ClientPtr client;
49 xConnSetupPrefix *prefix;
50 xConnSetup *setup;
51} NewClientInfoRec;
52
53typedef void (*ReplySwapPtr) (
54 ClientPtr /* pClient */,
55 int /* size */,
56 void * /* pbuf */);
57
58extern void ReplyNotSwappd (
59 ClientPtr /* pClient */,
60 int /* size */,
61 void * /* pbuf */);
62
63typedef enum {ClientStateInitial,
64 ClientStateAuthenticating,
65 ClientStateRunning,
66 ClientStateRetained,
67 ClientStateGone,
68 ClientStateCheckingSecurity,
69 ClientStateCheckedSecurity} ClientState;
70
71#ifdef XFIXES
72typedef struct _saveSet {
73 struct _Window *windowPtr;
74 Bool toRoot;
75 Bool remap;
76} SaveSetElt;
77#define SaveSetWindow(ss) ((ss).windowPtr)
78#define SaveSetToRoot(ss) ((ss).toRoot)
79#define SaveSetRemap(ss) ((ss).remap)
80#define SaveSetAssignWindow(ss,w) ((ss).windowPtr = (w))
81#define SaveSetAssignToRoot(ss,tr) ((ss).toRoot = (tr))
82#define SaveSetAssignRemap(ss,rm) ((ss).remap = (rm))
83#else
84typedef struct _Window *SaveSetElt;
85#define SaveSetWindow(ss) (ss)
86#define SaveSetToRoot(ss) FALSE
87#define SaveSetRemap(ss) TRUE
88#define SaveSetAssignWindow(ss,w) ((ss) = (w))
89#define SaveSetAssignToRoot(ss,tr)
90#define SaveSetAssignRemap(ss,rm)
91#endif
92
93typedef struct _Client {
94 int index;
95 Mask clientAsMask;
96 pointer requestBuffer;
97 pointer osPrivate; /* for OS layer, including scheduler */
98 Bool swapped;
99 ReplySwapPtr pSwapReplyFunc;
100 XID errorValue;
101 int sequence;
102 int closeDownMode;
103 int clientGone;
104 int noClientException; /* this client died or needs to be
105 * killed */
106 DrawablePtr lastDrawable;
107 Drawable lastDrawableID;
108 GCPtr lastGC;
109 GContext lastGCID;
110 SaveSetElt *saveSet;
111 int numSaved;
112 pointer screenPrivate[MAXSCREENS];
113 int (**requestVector) (
114 ClientPtr /* pClient */);
115 CARD32 req_len; /* length of current request */
116 Bool big_requests; /* supports large requests */
117 int priority;
118 ClientState clientState;
119 DevUnion *devPrivates;
120#ifdef XKB
121 unsigned short xkbClientFlags;
122 unsigned short mapNotifyMask;
123 unsigned short newKeyboardNotifyMask;
124 unsigned short vMajor,vMinor;
125 KeyCode minKC,maxKC;
126#endif
127
128#ifdef DEBUG
129 unsigned char requestLog[MAX_REQUEST_LOG];
130 int requestLogIndex;
131#endif
132#ifdef LBX
133 int (*readRequest)(ClientPtr /*client*/);
134#endif
135 unsigned long replyBytesRemaining;
136#ifdef XCSECURITY
137 XID authId;
138 unsigned int trustLevel;
139 pointer (* CheckAccess)(
140 ClientPtr /*pClient*/,
141 XID /*id*/,
142 RESTYPE /*classes*/,
143 Mask /*access_mode*/,
144 pointer /*resourceval*/);
145#endif
146#ifdef XAPPGROUP
147 struct _AppGroupRec* appgroup;
148#endif
149 struct _FontResolution * (*fontResFunc) ( /* no need for font.h */
150 ClientPtr /* pClient */,
151 int * /* num */);
152#ifdef SMART_SCHEDULE
153 int smart_priority;
154 long smart_start_tick;
155 long smart_stop_tick;
156 long smart_check_tick;
157#endif
158} ClientRec;
159
160#ifdef SMART_SCHEDULE
161/*
162 * Scheduling interface
163 */
164extern long SmartScheduleTime;
165extern long SmartScheduleInterval;
166extern long SmartScheduleSlice;
167extern long SmartScheduleMaxSlice;
168extern unsigned long SmartScheduleIdleCount;
169extern Bool SmartScheduleDisable;
170extern Bool SmartScheduleIdle;
171extern Bool SmartScheduleTimerStopped;
172extern Bool SmartScheduleStartTimer(void);
173#define SMART_MAX_PRIORITY (20)
174#define SMART_MIN_PRIORITY (-20)
175
176extern Bool SmartScheduleInit(void);
177
178#endif
179
180/* This prototype is used pervasively in Xext, dix */
181#define DISPATCH_PROC(func) int func(ClientPtr /* client */)
182
183typedef struct _WorkQueue {
184 struct _WorkQueue *next;
185 Bool (*function) (
186 ClientPtr /* pClient */,
187 pointer /* closure */
188);
189 ClientPtr client;
190 pointer closure;
191} WorkQueueRec;
192
193extern TimeStamp currentTime;
194extern TimeStamp lastDeviceEventTime;
195
196extern int CompareTimeStamps(
197 TimeStamp /*a*/,
198 TimeStamp /*b*/);
199
200extern TimeStamp ClientTimeToServerTime(CARD32 /*c*/);
201
202typedef struct _CallbackRec {
203 CallbackProcPtr proc;
204 pointer data;
205 Bool deleted;
206 struct _CallbackRec *next;
207} CallbackRec, *CallbackPtr;
208
209typedef struct _CallbackList {
210 CallbackFuncsRec funcs;
211 int inCallback;
212 Bool deleted;
213 int numDeleted;
214 CallbackPtr list;
215} CallbackListRec;
216
217/* proc vectors */
218
219extern int (* InitialVector[3]) (ClientPtr /*client*/);
220
221extern int (* ProcVector[256]) (ClientPtr /*client*/);
222
223extern int (* SwappedProcVector[256]) (ClientPtr /*client*/);
224
225#ifdef K5AUTH
226extern int (*k5_Vector[256])(ClientPtr /*client*/);
227#endif
228
229extern ReplySwapPtr ReplySwapVector[256];
230
231extern int ProcBadRequest(ClientPtr /*client*/);
232
233#endif /* DIXSTRUCT_H */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette