VirtualBox

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

Last change on this file since 78406 was 45134, checked in by vboxsync, 12 years ago

Additions/X11: build vboxvideo_drv.so for X.Org Server 1.14.

  • 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 "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 ClientStateRunning,
60 ClientStateRetained,
61 ClientStateGone
62} ClientState;
63
64#ifdef XFIXES
65typedef struct _saveSet {
66 struct _Window *windowPtr;
67 Bool toRoot;
68 Bool map;
69} SaveSetElt;
70#define SaveSetWindow(ss) ((ss).windowPtr)
71#define SaveSetToRoot(ss) ((ss).toRoot)
72#define SaveSetShouldMap(ss) ((ss).map)
73#define SaveSetAssignWindow(ss,w) ((ss).windowPtr = (w))
74#define SaveSetAssignToRoot(ss,tr) ((ss).toRoot = (tr))
75#define SaveSetAssignMap(ss,m) ((ss).map = (m))
76#else
77typedef struct _Window *SaveSetElt;
78
79#define SaveSetWindow(ss) (ss)
80#define SaveSetToRoot(ss) FALSE
81#define SaveSetShouldMap(ss) TRUE
82#define SaveSetAssignWindow(ss,w) ((ss) = (w))
83#define SaveSetAssignToRoot(ss,tr)
84#define SaveSetAssignMap(ss,m)
85#endif
86
87typedef struct _Client {
88 pointer requestBuffer;
89 pointer osPrivate; /* for OS layer, including scheduler */
90 Mask clientAsMask;
91 short index;
92 unsigned char majorOp, minorOp;
93 unsigned int swapped:1;
94 unsigned int local:1;
95 unsigned int big_requests:1; /* supports large requests */
96 unsigned int clientGone:1;
97 unsigned int closeDownMode:2;
98 unsigned int clientState:2;
99 char smart_priority;
100 short noClientException; /* this client died or needs to be killed */
101 int priority;
102 ReplySwapPtr pSwapReplyFunc;
103 XID errorValue;
104 int sequence;
105 int ignoreCount; /* count for Attend/IgnoreClient */
106 int numSaved;
107 SaveSetElt *saveSet;
108 int (**requestVector) (ClientPtr /* pClient */ );
109 CARD32 req_len; /* length of current request */
110 unsigned int replyBytesRemaining;
111 PrivateRec *devPrivates;
112 unsigned short xkbClientFlags;
113 unsigned short mapNotifyMask;
114 unsigned short newKeyboardNotifyMask;
115 unsigned short vMajor, vMinor;
116 KeyCode minKC, maxKC;
117
118 int smart_start_tick;
119 int smart_stop_tick;
120 int smart_check_tick;
121
122 DeviceIntPtr clientPtr;
123 ClientIdPtr clientIds;
124} ClientRec;
125
126/*
127 * Scheduling interface
128 */
129extern _X_EXPORT long SmartScheduleTime;
130extern _X_EXPORT long SmartScheduleInterval;
131extern _X_EXPORT long SmartScheduleSlice;
132extern _X_EXPORT long SmartScheduleMaxSlice;
133extern _X_EXPORT Bool SmartScheduleDisable;
134extern _X_EXPORT void
135SmartScheduleStartTimer(void);
136extern _X_EXPORT void
137SmartScheduleStopTimer(void);
138
139#define SMART_MAX_PRIORITY (20)
140#define SMART_MIN_PRIORITY (-20)
141
142extern _X_EXPORT void
143SmartScheduleInit(void);
144
145/* This prototype is used pervasively in Xext, dix */
146#define DISPATCH_PROC(func) int func(ClientPtr /* client */)
147
148typedef struct _WorkQueue {
149 struct _WorkQueue *next;
150 Bool (*function) (ClientPtr /* pClient */ ,
151 pointer /* closure */
152 );
153 ClientPtr client;
154 pointer closure;
155} WorkQueueRec;
156
157extern _X_EXPORT TimeStamp currentTime;
158extern _X_EXPORT TimeStamp lastDeviceEventTime[MAXDEVICES];
159
160extern _X_EXPORT int
161CompareTimeStamps(TimeStamp /*a */ ,
162 TimeStamp /*b */ );
163
164extern _X_EXPORT TimeStamp
165ClientTimeToServerTime(CARD32 /*c */ );
166
167typedef struct _CallbackRec {
168 CallbackProcPtr proc;
169 pointer data;
170 Bool deleted;
171 struct _CallbackRec *next;
172} CallbackRec, *CallbackPtr;
173
174typedef struct _CallbackList {
175 int inCallback;
176 Bool deleted;
177 int numDeleted;
178 CallbackPtr list;
179} CallbackListRec;
180
181/* proc vectors */
182
183extern _X_EXPORT int (*InitialVector[3]) (ClientPtr /*client */ );
184
185extern _X_EXPORT int (*ProcVector[256]) (ClientPtr /*client */ );
186
187extern _X_EXPORT int (*SwappedProcVector[256]) (ClientPtr /*client */ );
188
189extern _X_EXPORT ReplySwapPtr ReplySwapVector[256];
190
191extern _X_EXPORT int
192ProcBadRequest(ClientPtr /*client */ );
193
194#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