VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.4.2/dixstruct.h@ 81043

Last change on this file since 81043 was 43272, checked in by vboxsync, 12 years ago

Additions/x11: more original X server headers.

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