VirtualBox

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

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

Additions/x11: added a full header set for X.Org server 1.5 and 1.6

  • 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 map;
75} SaveSetElt;
76#define SaveSetWindow(ss) ((ss).windowPtr)
77#define SaveSetToRoot(ss) ((ss).toRoot)
78#define SaveSetShouldMap(ss) ((ss).map)
79#define SaveSetAssignWindow(ss,w) ((ss).windowPtr = (w))
80#define SaveSetAssignToRoot(ss,tr) ((ss).toRoot = (tr))
81#define SaveSetAssignMap(ss,m) ((ss).map = (m))
82#else
83typedef struct _Window *SaveSetElt;
84#define SaveSetWindow(ss) (ss)
85#define SaveSetToRoot(ss) FALSE
86#define SaveSetShouldMap(ss) TRUE
87#define SaveSetAssignWindow(ss,w) ((ss) = (w))
88#define SaveSetAssignToRoot(ss,tr)
89#define SaveSetAssignMap(ss,m)
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 void *appgroup; /* Can't remove, ABI */
129 struct _FontResolution * (*fontResFunc) ( /* no need for font.h */
130 ClientPtr /* pClient */,
131 int * /* num */);
132 int smart_priority;
133 long smart_start_tick;
134 long smart_stop_tick;
135 long smart_check_tick;
136
137 DeviceIntPtr clientPtr;
138} ClientRec;
139
140/*
141 * Scheduling interface
142 */
143extern long SmartScheduleTime;
144extern long SmartScheduleInterval;
145extern long SmartScheduleSlice;
146extern long SmartScheduleMaxSlice;
147extern Bool SmartScheduleDisable;
148extern void SmartScheduleStartTimer(void);
149extern void SmartScheduleStopTimer(void);
150#define SMART_MAX_PRIORITY (20)
151#define SMART_MIN_PRIORITY (-20)
152
153extern Bool SmartScheduleInit(void);
154
155
156/* This prototype is used pervasively in Xext, dix */
157#define DISPATCH_PROC(func) int func(ClientPtr /* client */)
158
159typedef struct _WorkQueue {
160 struct _WorkQueue *next;
161 Bool (*function) (
162 ClientPtr /* pClient */,
163 pointer /* closure */
164);
165 ClientPtr client;
166 pointer closure;
167} WorkQueueRec;
168
169extern TimeStamp currentTime;
170extern TimeStamp lastDeviceEventTime;
171
172extern int CompareTimeStamps(
173 TimeStamp /*a*/,
174 TimeStamp /*b*/);
175
176extern TimeStamp ClientTimeToServerTime(CARD32 /*c*/);
177
178typedef struct _CallbackRec {
179 CallbackProcPtr proc;
180 pointer data;
181 Bool deleted;
182 struct _CallbackRec *next;
183} CallbackRec, *CallbackPtr;
184
185typedef struct _CallbackList {
186 int inCallback;
187 Bool deleted;
188 int numDeleted;
189 CallbackPtr list;
190} CallbackListRec;
191
192/* proc vectors */
193
194extern int (* InitialVector[3]) (ClientPtr /*client*/);
195
196extern int (* ProcVector[256]) (ClientPtr /*client*/);
197
198extern int (* SwappedProcVector[256]) (ClientPtr /*client*/);
199
200extern ReplySwapPtr ReplySwapVector[256];
201
202extern int ProcBadRequest(ClientPtr /*client*/);
203
204#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