VirtualBox

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

最後變更 在這個檔案從81245是 43251,由 vboxsync 提交於 12 年 前

Additions/x11: added headers for X.Org Server 1.13.

  • 屬性 svn:eol-style 設為 native
檔案大小: 5.6 KB
 
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 "client.h"
28#include "dix.h"
29#include "resource.h"
30#include "cursor.h"
31#include "gc.h"
32#include "pixmap.h"
33#include "privates.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
41extern _X_EXPORT CallbackListPtr ClientStateCallback;
42
43typedef struct {
44 ClientPtr client;
45 xConnSetupPrefix *prefix;
46 xConnSetup *setup;
47} NewClientInfoRec;
48
49typedef void (*ReplySwapPtr) (ClientPtr /* pClient */ ,
50 int /* size */ ,
51 void * /* pbuf */ );
52
53extern _X_EXPORT void
54ReplyNotSwappd(ClientPtr /* pClient */ ,
55 int /* size */ ,
56 void * /* pbuf */ ) _X_NORETURN;
57
58typedef enum { ClientStateInitial,
59 /* 1 is unused now, was ClientStateAuthenticating */
60 ClientStateRunning = 2,
61 ClientStateRetained,
62 ClientStateGone
63} ClientState;
64
65#ifdef XFIXES
66typedef struct _saveSet {
67 struct _Window *windowPtr;
68 Bool toRoot;
69 Bool map;
70} SaveSetElt;
71#define SaveSetWindow(ss) ((ss).windowPtr)
72#define SaveSetToRoot(ss) ((ss).toRoot)
73#define SaveSetShouldMap(ss) ((ss).map)
74#define SaveSetAssignWindow(ss,w) ((ss).windowPtr = (w))
75#define SaveSetAssignToRoot(ss,tr) ((ss).toRoot = (tr))
76#define SaveSetAssignMap(ss,m) ((ss).map = (m))
77#else
78typedef struct _Window *SaveSetElt;
79
80#define SaveSetWindow(ss) (ss)
81#define SaveSetToRoot(ss) FALSE
82#define SaveSetShouldMap(ss) TRUE
83#define SaveSetAssignWindow(ss,w) ((ss) = (w))
84#define SaveSetAssignToRoot(ss,tr)
85#define SaveSetAssignMap(ss,m)
86#endif
87
88typedef struct _Client {
89 int index;
90 Mask clientAsMask;
91 pointer requestBuffer;
92 pointer osPrivate; /* for OS layer, including scheduler */
93 Bool swapped;
94 ReplySwapPtr pSwapReplyFunc;
95 XID errorValue;
96 int sequence;
97 int closeDownMode;
98 int clientGone;
99 int noClientException; /* this client died or needs to be
100 * killed */
101 int ignoreCount; /* count for Attend/IgnoreClient */
102 SaveSetElt *saveSet;
103 int numSaved;
104 int (**requestVector) (ClientPtr /* pClient */ );
105 CARD32 req_len; /* length of current request */
106 Bool big_requests; /* supports large requests */
107 int priority;
108 ClientState clientState;
109 PrivateRec *devPrivates;
110 unsigned short xkbClientFlags;
111 unsigned short mapNotifyMask;
112 unsigned short newKeyboardNotifyMask;
113 unsigned short vMajor, vMinor;
114 KeyCode minKC, maxKC;
115
116 unsigned long replyBytesRemaining;
117 int smart_priority;
118 long smart_start_tick;
119 long smart_stop_tick;
120 long smart_check_tick;
121
122 DeviceIntPtr clientPtr;
123 ClientIdPtr clientIds;
124 unsigned short majorOp, minorOp;
125} ClientRec;
126
127/*
128 * Scheduling interface
129 */
130extern _X_EXPORT long SmartScheduleTime;
131extern _X_EXPORT long SmartScheduleInterval;
132extern _X_EXPORT long SmartScheduleSlice;
133extern _X_EXPORT long SmartScheduleMaxSlice;
134extern _X_EXPORT Bool SmartScheduleDisable;
135extern _X_EXPORT void
136SmartScheduleStartTimer(void);
137extern _X_EXPORT void
138SmartScheduleStopTimer(void);
139
140#define SMART_MAX_PRIORITY (20)
141#define SMART_MIN_PRIORITY (-20)
142
143extern _X_EXPORT void
144SmartScheduleInit(void);
145
146/* This prototype is used pervasively in Xext, dix */
147#define DISPATCH_PROC(func) int func(ClientPtr /* client */)
148
149typedef struct _WorkQueue {
150 struct _WorkQueue *next;
151 Bool (*function) (ClientPtr /* pClient */ ,
152 pointer /* closure */
153 );
154 ClientPtr client;
155 pointer closure;
156} WorkQueueRec;
157
158extern _X_EXPORT TimeStamp currentTime;
159extern _X_EXPORT TimeStamp lastDeviceEventTime[MAXDEVICES];
160
161extern _X_EXPORT int
162CompareTimeStamps(TimeStamp /*a */ ,
163 TimeStamp /*b */ );
164
165extern _X_EXPORT TimeStamp
166ClientTimeToServerTime(CARD32 /*c */ );
167
168typedef struct _CallbackRec {
169 CallbackProcPtr proc;
170 pointer data;
171 Bool deleted;
172 struct _CallbackRec *next;
173} CallbackRec, *CallbackPtr;
174
175typedef struct _CallbackList {
176 int inCallback;
177 Bool deleted;
178 int numDeleted;
179 CallbackPtr list;
180} CallbackListRec;
181
182/* proc vectors */
183
184extern _X_EXPORT int (*InitialVector[3]) (ClientPtr /*client */ );
185
186extern _X_EXPORT int (*ProcVector[256]) (ClientPtr /*client */ );
187
188extern _X_EXPORT int (*SwappedProcVector[256]) (ClientPtr /*client */ );
189
190extern _X_EXPORT ReplySwapPtr ReplySwapVector[256];
191
192extern _X_EXPORT int
193ProcBadRequest(ClientPtr /*client */ );
194
195#endif /* DIXSTRUCT_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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