VirtualBox

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

Last change on this file since 99743 was 17471, checked in by vboxsync, 16 years ago

export to OSE

  • Property svn:eol-style set to native
File size: 5.6 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 "privates.h"
33#include <X11/Xmd.h>
34
35/*
36 * direct-mapped hash table, used by resource manager to store
37 * translation from client ids to server addresses.
38 */
39
40#ifdef DEBUG
41#define MAX_REQUEST_LOG 100
42#endif
43
44extern CallbackListPtr ClientStateCallback;
45
46typedef struct {
47 ClientPtr client;
48 xConnSetupPrefix *prefix;
49 xConnSetup *setup;
50} NewClientInfoRec;
51
52typedef void (*ReplySwapPtr) (
53 ClientPtr /* pClient */,
54 int /* size */,
55 void * /* pbuf */);
56
57extern void ReplyNotSwappd (
58 ClientPtr /* pClient */,
59 int /* size */,
60 void * /* pbuf */);
61
62typedef enum {ClientStateInitial,
63 ClientStateAuthenticating,
64 ClientStateRunning,
65 ClientStateRetained,
66 ClientStateGone,
67 ClientStateCheckingSecurity,
68 ClientStateCheckedSecurity} ClientState;
69
70#ifdef XFIXES
71typedef struct _saveSet {
72 struct _Window *windowPtr;
73 Bool toRoot;
74 Bool remap;
75} SaveSetElt;
76#define SaveSetWindow(ss) ((ss).windowPtr)
77#define SaveSetToRoot(ss) ((ss).toRoot)
78#define SaveSetRemap(ss) ((ss).remap)
79#define SaveSetAssignWindow(ss,w) ((ss).windowPtr = (w))
80#define SaveSetAssignToRoot(ss,tr) ((ss).toRoot = (tr))
81#define SaveSetAssignRemap(ss,rm) ((ss).remap = (rm))
82#else
83typedef struct _Window *SaveSetElt;
84#define SaveSetWindow(ss) (ss)
85#define SaveSetToRoot(ss) FALSE
86#define SaveSetRemap(ss) TRUE
87#define SaveSetAssignWindow(ss,w) ((ss) = (w))
88#define SaveSetAssignToRoot(ss,tr)
89#define SaveSetAssignRemap(ss,rm)
90#endif
91
92typedef struct _Client {
93 int index;
94 Mask clientAsMask;
95 pointer requestBuffer;
96 pointer osPrivate; /* for OS layer, including scheduler */
97 Bool swapped;
98 ReplySwapPtr pSwapReplyFunc;
99 XID errorValue;
100 int sequence;
101 int closeDownMode;
102 int clientGone;
103 int noClientException; /* this client died or needs to be
104 * killed */
105 SaveSetElt *saveSet;
106 int numSaved;
107 pointer screenPrivate[MAXSCREENS];
108 int (**requestVector) (
109 ClientPtr /* pClient */);
110 CARD32 req_len; /* length of current request */
111 Bool big_requests; /* supports large requests */
112 int priority;
113 ClientState clientState;
114 PrivateRec *devPrivates;
115#ifdef XKB
116 unsigned short xkbClientFlags;
117 unsigned short mapNotifyMask;
118 unsigned short newKeyboardNotifyMask;
119 unsigned short vMajor,vMinor;
120 KeyCode minKC,maxKC;
121#endif
122
123#ifdef DEBUG
124 unsigned char requestLog[MAX_REQUEST_LOG];
125 int requestLogIndex;
126#endif
127 unsigned long replyBytesRemaining;
128#ifdef XAPPGROUP
129 struct _AppGroupRec* appgroup;
130#endif
131 struct _FontResolution * (*fontResFunc) ( /* no need for font.h */
132 ClientPtr /* pClient */,
133 int * /* num */);
134#ifdef SMART_SCHEDULE
135 int smart_priority;
136 long smart_start_tick;
137 long smart_stop_tick;
138 long smart_check_tick;
139#endif
140} ClientRec;
141
142#ifdef SMART_SCHEDULE
143/*
144 * Scheduling interface
145 */
146extern long SmartScheduleTime;
147extern long SmartScheduleInterval;
148extern long SmartScheduleSlice;
149extern long SmartScheduleMaxSlice;
150extern Bool SmartScheduleDisable;
151extern void SmartScheduleStartTimer(void);
152extern void SmartScheduleStopTimer(void);
153#define SMART_MAX_PRIORITY (20)
154#define SMART_MIN_PRIORITY (-20)
155
156extern Bool SmartScheduleInit(void);
157
158#endif
159
160/* This prototype is used pervasively in Xext, dix */
161#define DISPATCH_PROC(func) int func(ClientPtr /* client */)
162
163typedef struct _WorkQueue {
164 struct _WorkQueue *next;
165 Bool (*function) (
166 ClientPtr /* pClient */,
167 pointer /* closure */
168);
169 ClientPtr client;
170 pointer closure;
171} WorkQueueRec;
172
173extern TimeStamp currentTime;
174extern TimeStamp lastDeviceEventTime;
175
176extern int CompareTimeStamps(
177 TimeStamp /*a*/,
178 TimeStamp /*b*/);
179
180extern TimeStamp ClientTimeToServerTime(CARD32 /*c*/);
181
182typedef struct _CallbackRec {
183 CallbackProcPtr proc;
184 pointer data;
185 Bool deleted;
186 struct _CallbackRec *next;
187} CallbackRec, *CallbackPtr;
188
189typedef struct _CallbackList {
190 int inCallback;
191 Bool deleted;
192 int numDeleted;
193 CallbackPtr list;
194} CallbackListRec;
195
196/* proc vectors */
197
198extern int (* InitialVector[3]) (ClientPtr /*client*/);
199
200extern int (* ProcVector[256]) (ClientPtr /*client*/);
201
202extern int (* SwappedProcVector[256]) (ClientPtr /*client*/);
203
204extern ReplySwapPtr ReplySwapVector[256];
205
206extern int ProcBadRequest(ClientPtr /*client*/);
207
208#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