VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/XFree86-4.3/Xserver/dixstruct.h@ 108832

Last change on this file since 108832 was 69098, checked in by vboxsync, 8 years ago

Clean up XFree86 driver header files.
bugref:3810: X11 Guest Additions maintenance
Over the years we have cleaned up the layout in the tree of the X.Org
header files we use to build drivers. The XFree86 ones were still in their
original, rather sub-optimal layout. This change fixes that.

  • Property svn:eol-style set to native
File size: 6.3 KB
Line 
1/* $XFree86: xc/programs/Xserver/include/dixstruct.h,v 3.18 2003/01/12 02:44:27 dawes Exp $ */
2/***********************************************************
3Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
4
5 All Rights Reserved
6
7Permission to use, copy, modify, and distribute this software and its
8documentation for any purpose and without fee is hereby granted,
9provided that the above copyright notice appear in all copies and that
10both that copyright notice and this permission notice appear in
11supporting documentation, and that the name of Digital not be
12used in advertising or publicity pertaining to distribution of the
13software without specific, written prior permission.
14
15DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
16ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
17DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
18ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
19WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
20ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
21SOFTWARE.
22
23******************************************************************/
24/* $Xorg: dixstruct.h,v 1.3 2000/08/17 19:53:29 cpqbld Exp $ */
25
26#ifndef DIXSTRUCT_H
27#define DIXSTRUCT_H
28
29#include "dix.h"
30#include "resource.h"
31#include "cursor.h"
32#include "gc.h"
33#include "pixmap.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
41#ifdef DEBUG
42#define MAX_REQUEST_LOG 100
43#endif
44
45extern CallbackListPtr ClientStateCallback;
46
47typedef struct {
48 ClientPtr client;
49 xConnSetupPrefix *prefix;
50 xConnSetup *setup;
51} NewClientInfoRec;
52
53typedef void (*ReplySwapPtr) (
54#if NeedNestedPrototypes
55 ClientPtr /* pClient */,
56 int /* size */,
57 void * /* pbuf */
58#endif
59);
60
61extern void ReplyNotSwappd (
62#if NeedNestedPrototypes
63 ClientPtr /* pClient */,
64 int /* size */,
65 void * /* pbuf */
66#endif
67);
68
69typedef enum {ClientStateInitial,
70 ClientStateAuthenticating,
71 ClientStateRunning,
72 ClientStateRetained,
73 ClientStateGone,
74 ClientStateCheckingSecurity,
75 ClientStateCheckedSecurity} ClientState;
76
77typedef struct _Client {
78 int index;
79 Mask clientAsMask;
80 pointer requestBuffer;
81 pointer osPrivate; /* for OS layer, including scheduler */
82 Bool swapped;
83 ReplySwapPtr pSwapReplyFunc;
84 XID errorValue;
85 int sequence;
86 int closeDownMode;
87 int clientGone;
88 int noClientException; /* this client died or needs to be
89 * killed */
90 DrawablePtr lastDrawable;
91 Drawable lastDrawableID;
92 GCPtr lastGC;
93 GContext lastGCID;
94 pointer *saveSet;
95 int numSaved;
96 pointer screenPrivate[MAXSCREENS];
97 int (**requestVector) (
98#if NeedNestedPrototypes
99 ClientPtr /* pClient */
100#endif
101);
102 CARD32 req_len; /* length of current request */
103 Bool big_requests; /* supports large requests */
104 int priority;
105 ClientState clientState;
106 DevUnion *devPrivates;
107#ifdef XKB
108 unsigned short xkbClientFlags;
109 unsigned short mapNotifyMask;
110 unsigned short newKeyboardNotifyMask;
111 unsigned short vMajor,vMinor;
112 KeyCode minKC,maxKC;
113#endif
114
115#ifdef DEBUG
116 unsigned char requestLog[MAX_REQUEST_LOG];
117 int requestLogIndex;
118#endif
119#ifdef LBX
120 int (*readRequest)(
121#if NeedNestedPrototypes
122 ClientPtr /*client*/
123#endif
124);
125#endif
126 unsigned long replyBytesRemaining;
127#ifdef XCSECURITY
128 XID authId;
129 unsigned int trustLevel;
130 pointer (* CheckAccess)(
131#if NeedNestedPrototypes
132 ClientPtr /*pClient*/,
133 XID /*id*/,
134 RESTYPE /*classes*/,
135 Mask /*access_mode*/,
136 pointer /*resourceval*/
137#endif
138);
139#endif
140#ifdef XAPPGROUP
141 struct _AppGroupRec* appgroup;
142#endif
143 struct _FontResolution * (*fontResFunc) ( /* no need for font.h */
144#if NeedNestedPrototypes
145 ClientPtr /* pClient */,
146 int * /* num */
147#endif
148);
149#ifdef SMART_SCHEDULE
150 int smart_priority;
151 long smart_start_tick;
152 long smart_stop_tick;
153 long smart_check_tick;
154#endif
155} ClientRec;
156
157#ifdef SMART_SCHEDULE
158/*
159 * Scheduling interface
160 */
161extern long SmartScheduleTime;
162extern long SmartScheduleInterval;
163extern long SmartScheduleSlice;
164extern long SmartScheduleMaxSlice;
165extern unsigned long SmartScheduleIdleCount;
166extern Bool SmartScheduleDisable;
167extern Bool SmartScheduleIdle;
168extern Bool SmartScheduleTimerStopped;
169extern Bool SmartScheduleStartTimer(void);
170#define SMART_MAX_PRIORITY 20
171#define SMART_MIN_PRIORITY -20
172
173extern Bool SmartScheduleInit(
174#ifdef NeedFunctionPrototypes
175 void
176#endif
177);
178
179#endif
180
181/* This prototype is used pervasively in Xext, dix */
182#if NeedFunctionPrototypes
183#define DISPATCH_PROC(func) int func(ClientPtr /* client */)
184#else
185#define DISPATCH_PROC(func) int func(/* ClientPtr client */)
186#endif
187
188typedef struct _WorkQueue {
189 struct _WorkQueue *next;
190 Bool (*function) (
191#if NeedNestedPrototypes
192 ClientPtr /* pClient */,
193 pointer /* closure */
194#endif
195);
196 ClientPtr client;
197 pointer closure;
198} WorkQueueRec;
199
200extern TimeStamp currentTime;
201extern TimeStamp lastDeviceEventTime;
202
203extern int CompareTimeStamps(
204#if NeedFunctionPrototypes
205 TimeStamp /*a*/,
206 TimeStamp /*b*/
207#endif
208);
209
210extern TimeStamp ClientTimeToServerTime(
211#if NeedFunctionPrototypes
212 CARD32 /*c*/
213#endif
214);
215
216typedef struct _CallbackRec {
217 CallbackProcPtr proc;
218 pointer data;
219 Bool deleted;
220 struct _CallbackRec *next;
221} CallbackRec, *CallbackPtr;
222
223typedef struct _CallbackList {
224 CallbackFuncsRec funcs;
225 int inCallback;
226 Bool deleted;
227 int numDeleted;
228 CallbackPtr list;
229} CallbackListRec;
230
231/* proc vectors */
232
233extern int (* InitialVector[3]) (
234#if NeedNestedPrototypes
235 ClientPtr /*client*/
236#endif
237);
238
239extern int (* ProcVector[256]) (
240#if NeedNestedPrototypes
241 ClientPtr /*client*/
242#endif
243);
244
245extern int (* SwappedProcVector[256]) (
246#if NeedNestedPrototypes
247 ClientPtr /*client*/
248#endif
249);
250
251#ifdef K5AUTH
252extern int (*k5_Vector[256])() =
253#if NeedNestedPrototypes
254 ClientPtr /*client*/
255#endif
256);
257#endif
258
259extern ReplySwapPtr ReplySwapVector[256];
260
261extern int ProcBadRequest(
262#if NeedFunctionPrototypes
263 ClientPtr /*client*/
264#endif
265);
266
267#endif /* DIXSTRUCT_H */
Note: See TracBrowser for help on using the repository browser.

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