VirtualBox

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

Last change on this file since 58634 was 32163, checked in by vboxsync, 14 years ago

Additions/x11/x11include: additional headers for building drivers for X.Org Server 1.9

  • Property svn:eol-style set to native
File size: 5.5 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
40extern _X_EXPORT CallbackListPtr ClientStateCallback;
41
42typedef struct {
43 ClientPtr client;
44 xConnSetupPrefix *prefix;
45 xConnSetup *setup;
46} NewClientInfoRec;
47
48typedef void (*ReplySwapPtr) (
49 ClientPtr /* pClient */,
50 int /* size */,
51 void * /* pbuf */);
52
53extern _X_EXPORT void ReplyNotSwappd (
54 ClientPtr /* pClient */,
55 int /* size */,
56 void * /* pbuf */) _X_NORETURN;
57
58typedef enum {ClientStateInitial,
59 ClientStateAuthenticating,
60 ClientStateRunning,
61 ClientStateRetained,
62 ClientStateGone,
63 ClientStateCheckingSecurity,
64 ClientStateCheckedSecurity} ClientState;
65
66#ifdef XFIXES
67typedef struct _saveSet {
68 struct _Window *windowPtr;
69 Bool toRoot;
70 Bool map;
71} SaveSetElt;
72#define SaveSetWindow(ss) ((ss).windowPtr)
73#define SaveSetToRoot(ss) ((ss).toRoot)
74#define SaveSetShouldMap(ss) ((ss).map)
75#define SaveSetAssignWindow(ss,w) ((ss).windowPtr = (w))
76#define SaveSetAssignToRoot(ss,tr) ((ss).toRoot = (tr))
77#define SaveSetAssignMap(ss,m) ((ss).map = (m))
78#else
79typedef struct _Window *SaveSetElt;
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) (
105 ClientPtr /* pClient */);
106 CARD32 req_len; /* length of current request */
107 Bool big_requests; /* supports large requests */
108 int priority;
109 ClientState clientState;
110 PrivateRec *devPrivates;
111 unsigned short xkbClientFlags;
112 unsigned short mapNotifyMask;
113 unsigned short newKeyboardNotifyMask;
114 unsigned short vMajor,vMinor;
115 KeyCode minKC,maxKC;
116
117 unsigned long replyBytesRemaining;
118 int smart_priority;
119 long smart_start_tick;
120 long smart_stop_tick;
121 long smart_check_tick;
122
123 DeviceIntPtr clientPtr;
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 SmartScheduleStartTimer(void);
135extern _X_EXPORT void SmartScheduleStopTimer(void);
136#define SMART_MAX_PRIORITY (20)
137#define SMART_MIN_PRIORITY (-20)
138
139extern _X_EXPORT Bool SmartScheduleInit(void);
140
141
142/* This prototype is used pervasively in Xext, dix */
143#define DISPATCH_PROC(func) int func(ClientPtr /* client */)
144
145typedef struct _WorkQueue {
146 struct _WorkQueue *next;
147 Bool (*function) (
148 ClientPtr /* pClient */,
149 pointer /* closure */
150);
151 ClientPtr client;
152 pointer closure;
153} WorkQueueRec;
154
155extern _X_EXPORT TimeStamp currentTime;
156extern _X_EXPORT TimeStamp lastDeviceEventTime;
157
158extern _X_EXPORT int CompareTimeStamps(
159 TimeStamp /*a*/,
160 TimeStamp /*b*/);
161
162extern _X_EXPORT TimeStamp ClientTimeToServerTime(CARD32 /*c*/);
163
164typedef struct _CallbackRec {
165 CallbackProcPtr proc;
166 pointer data;
167 Bool deleted;
168 struct _CallbackRec *next;
169} CallbackRec, *CallbackPtr;
170
171typedef struct _CallbackList {
172 int inCallback;
173 Bool deleted;
174 int numDeleted;
175 CallbackPtr list;
176} CallbackListRec;
177
178/* proc vectors */
179
180extern _X_EXPORT int (* InitialVector[3]) (ClientPtr /*client*/);
181
182extern _X_EXPORT int (* ProcVector[256]) (ClientPtr /*client*/);
183
184extern _X_EXPORT int (* SwappedProcVector[256]) (ClientPtr /*client*/);
185
186extern _X_EXPORT ReplySwapPtr ReplySwapVector[256];
187
188extern _X_EXPORT int ProcBadRequest(ClientPtr /*client*/);
189
190#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