VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.1.0/lbxserve.h@ 78293

Last change on this file since 78293 was 51223, checked in by vboxsync, 11 years ago

Additions/x11/x11include: added header files for X.Org Server 1.0 and 1.1.

  • Property svn:eol-style set to native
File size: 11.7 KB
Line 
1/* $Xorg: lbxserve.h,v 1.4 2001/02/09 02:05:17 xorgcvs Exp $ */
2/*
3
4Copyright 1996, 1998 The Open Group
5
6Permission to use, copy, modify, distribute, and sell this software and its
7documentation for any purpose is hereby granted without fee, provided that
8the above copyright notice appear in all copies and that both that
9copyright notice and this permission notice appear in supporting
10documentation.
11
12The above copyright notice and this permission notice shall be included in
13all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22Except as contained in this notice, the name of The Open Group shall not be
23used in advertising or otherwise to promote the sale, use or other dealings
24in this Software without prior written authorization from The Open Group.
25
26*/
27/*
28 * Copyright 1992 Network Computing Devices
29 *
30 * Permission to use, copy, modify, distribute, and sell this software and its
31 * documentation for any purpose is hereby granted without fee, provided that
32 * the above copyright notice appear in all copies and that both that
33 * copyright notice and this permission notice appear in supporting
34 * documentation, and that the name of NCD. not be used in advertising or
35 * publicity pertaining to distribution of the software without specific,
36 * written prior permission. NCD. makes no representations about the
37 * suitability of this software for any purpose. It is provided "as is"
38 * without express or implied warranty.
39 *
40 * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
41 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD.
42 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
43 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
44 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
45 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
46 *
47 */
48/* $XFree86: xc/programs/Xserver/lbx/lbxserve.h,v 1.4 2001/08/01 00:44:58 tsi Exp $ */
49
50#ifdef HAVE_DIX_CONFIG_H
51#include <dix-config.h>
52#endif
53
54#ifndef _LBXSERVE_H_
55
56#include "colormap.h"
57#include "property.h"
58
59#define _LBXSERVE_H_
60#define _XLBX_SERVER_
61#include <X11/extensions/lbxstr.h>
62#include <X11/extensions/lbxdeltastr.h>
63#include <X11/extensions/lbxopts.h>
64
65#define MAX_LBX_CLIENTS MAXCLIENTS
66#define MAX_NUM_PROXIES (MAXCLIENTS >> 1)
67
68typedef struct _LbxClient *LbxClientPtr;
69typedef struct _LbxProxy *LbxProxyPtr;
70
71typedef struct _LbxClient {
72 CARD32 id;
73 ClientPtr client;
74 LbxProxyPtr proxy;
75 Bool ignored;
76 Bool input_blocked;
77 int reqs_pending;
78 long bytes_in_reply;
79 long bytes_remaining;
80 Drawable drawableCache[GFX_CACHE_SIZE];
81 GContext gcontextCache[GFX_CACHE_SIZE];
82 pointer gfx_buffer; /* tmp buffer for unpacking gfx requests */
83 unsigned long gb_size;
84} LbxClientRec;
85
86typedef struct _connectionOutput *OSBufPtr;
87
88typedef struct _LbxProxy {
89 LbxProxyPtr next;
90 /* this array is indexed by lbx proxy index */
91 LbxClientPtr lbxClients[MAX_LBX_CLIENTS];
92 LbxClientPtr curRecv,
93 curDix;
94 int fd;
95 int pid; /* proxy ID */
96 int uid;
97 int numClients;
98 int maxIndex;
99 Bool aborted;
100 int grabClient;
101 pointer compHandle;
102 Bool dosquishing;
103 Bool useTags;
104 LBXDeltasRec indeltas;
105 LBXDeltasRec outdeltas;
106 char *iDeltaBuf;
107 char *replyBuf;
108 char *oDeltaBuf;
109 OSBufPtr ofirst;
110 OSBufPtr olast;
111 CARD32 cur_send_id;
112
113 LbxStreamOpts streamOpts;
114
115 int numBitmapCompMethods;
116 unsigned char *bitmapCompMethods; /* array of indices */
117 int numPixmapCompMethods;
118 unsigned char *pixmapCompMethods; /* array of indices */
119 int **pixmapCompDepths; /* depths supported from each method */
120
121 struct _ColormapRec *grabbedCmaps; /* chained via lbx private */
122 int motion_allowed_events;
123 lbxMotionCache motionCache;
124} LbxProxyRec;
125
126/* This array is indexed by server client index, not lbx proxy index */
127
128extern LbxClientPtr lbxClients[MAXCLIENTS];
129
130#define LbxClient(client) (lbxClients[(client)->index])
131#define LbxProxy(client) (LbxClient(client)->proxy)
132#define LbxMaybeProxy(client) (LbxClient(client) ? LbxProxy(client) : 0)
133#define LbxProxyID(client) (LbxProxy(client)->pid)
134#define LbxProxyClient(proxy) ((proxy)->lbxClients[0]->client)
135
136extern int LbxEventCode;
137
138
139/* os/connection.c */
140extern ClientPtr AllocLbxClientConnection ( ClientPtr client,
141 LbxProxyPtr proxy );
142extern void LbxProxyConnection ( ClientPtr client, LbxProxyPtr proxy );
143
144/* os/libxio.c */
145extern int UncompressedWriteToClient ( ClientPtr who, int count, char *buf );
146extern void LbxForceOutput ( LbxProxyPtr proxy );
147extern void SwitchClientInput ( ClientPtr client, Bool pending );
148extern int PrepareLargeReqBuffer ( ClientPtr client );
149extern Bool AppendFakeRequest ( ClientPtr client, char *data, int count );
150extern void LbxFreeOsBuffers ( LbxProxyPtr proxy );
151extern Bool AllocateLargeReqBuffer ( ClientPtr client, int size );
152extern Bool AddToLargeReqBuffer ( ClientPtr client, char *data, int size );
153extern void LbxPrimeInput ( ClientPtr client, LbxProxyPtr proxy );
154
155/* lbxcmap.c */
156extern int LbxCmapInit ( void );
157extern Bool LbxCheckColorRequest ( ClientPtr client, ColormapPtr pmap,
158 xReq *req );
159extern int LbxCheckCmapGrabbed ( ColormapPtr pmap );
160extern void LbxDisableSmartGrab ( ColormapPtr pmap );
161extern void LbxBeginFreeCellsEvent ( ColormapPtr pmap );
162extern void LbxAddFreeCellToEvent ( ColormapPtr pmap, Pixel pixel );
163extern void LbxEndFreeCellsEvent ( ColormapPtr pmap );
164extern void LbxSortPixelList ( Pixel *pixels, int count );
165extern int ProcLbxGrabCmap ( ClientPtr client );
166extern void LbxReleaseCmap ( ColormapPtr pmap, Bool smart );
167extern int ProcLbxReleaseCmap ( ClientPtr client );
168extern int ProcLbxAllocColor ( ClientPtr client );
169extern int ProcLbxIncrementPixel ( ClientPtr client );
170
171/* lbxdix.h */
172extern void LbxDixInit ( void );
173extern void LbxResetTags ( void );
174extern int LbxSendConnSetup ( ClientPtr client, char *reason );
175extern int LbxGetModifierMapping ( ClientPtr client );
176extern int LbxGetKeyboardMapping ( ClientPtr client );
177extern int LbxQueryFont ( ClientPtr client );
178extern int LbxTagData ( ClientPtr client, XID tag, unsigned long len,
179 pointer data );
180extern int LbxInvalidateTag ( ClientPtr client, XID tag );
181extern void LbxAllowMotion ( ClientPtr client, int num );
182extern void LbxFlushModifierMapTag ( void );
183extern void LbxFlushKeyboardMapTag ( void );
184extern void LbxFreeFontTag ( FontPtr pfont );
185extern void LbxSendInvalidateTag ( ClientPtr client, XID tag, int tagtype );
186extern Bool LbxFlushQTag ( XID tag );
187extern void ProcessQTagZombies ( void );
188extern void LbxQueryTagData ( ClientPtr client, int owner_pid, XID tag,
189 int tagtype );
190
191/* lbxexts.c */
192extern Bool LbxAddExtension ( char *name, int opcode, int ev_base,
193 int err_base );
194extern Bool LbxAddExtensionAlias ( int idx, char *alias );
195extern void LbxDeclareExtensionSecurity ( char *extname, Bool secure );
196extern Bool LbxRegisterExtensionGenerationMasks ( int idx, int num_reqs,
197 char *rep_mask,
198 char *ev_mask );
199extern int LbxQueryExtension ( ClientPtr client, char *ename, int nlen );
200extern void LbxCloseDownExtensions ( void );
201extern void LbxSetReqMask ( CARD8 *mask, int req, Bool on );
202
203/* lbxgfx.c */
204extern int LbxDecodePoly( ClientPtr client, CARD8 xreqtype,
205 int (*decode_rtn)(char *, char *, short *) );
206extern int LbxDecodeFillPoly ( ClientPtr client );
207extern int LbxDecodeCopyArea ( ClientPtr client );
208extern int LbxDecodeCopyPlane ( ClientPtr client );
209extern int LbxDecodePolyText ( ClientPtr client );
210extern int LbxDecodeImageText ( ClientPtr client );
211extern int LbxDecodePutImage ( ClientPtr client );
212extern int LbxDecodeGetImage ( ClientPtr client );
213extern int LbxDecodePoints ( char *in, char *inend, short *out );
214extern int LbxDecodeSegment ( char *in, char *inend, short *out );
215extern int LbxDecodeRectangle ( char *in, char *inend, short *out );
216extern int LbxDecodeArc ( char *in, char *inend, short *out );
217
218/* lbxmain.c */
219extern LbxProxyPtr LbxPidToProxy ( int pid );
220extern void LbxReencodeOutput ( ClientPtr client, char *pbuf, int *pcount,
221 char *cbuf, int *ccount );
222extern void LbxExtensionInit ( void );
223extern void LbxCloseClient ( ClientPtr client );
224extern void LbxSetForBlock ( LbxClientPtr lbxClient );
225extern int ProcLbxDispatch ( ClientPtr client );
226extern int ProcLbxSwitch ( ClientPtr client );
227extern int ProcLbxQueryVersion ( ClientPtr client );
228extern int ProcLbxStartProxy ( ClientPtr client );
229extern int ProcLbxStopProxy ( ClientPtr client );
230extern int ProcLbxBeginLargeRequest ( ClientPtr client );
231extern int ProcLbxLargeRequestData ( ClientPtr client );
232extern int ProcLbxEndLargeRequest ( ClientPtr client );
233extern int ProcLbxInternAtoms ( ClientPtr client );
234extern int ProcLbxGetWinAttrAndGeom ( ClientPtr client );
235extern int ProcLbxNewClient ( ClientPtr client );
236extern int ProcLbxEstablishConnection ( ClientPtr client );
237extern int ProcLbxCloseClient ( ClientPtr client );
238extern int ProcLbxModifySequence ( ClientPtr client );
239extern int ProcLbxAllowMotion ( ClientPtr client );
240extern int ProcLbxGetModifierMapping ( ClientPtr client );
241extern int ProcLbxGetKeyboardMapping ( ClientPtr client );
242extern int ProcLbxQueryFont ( ClientPtr client );
243extern int ProcLbxChangeProperty ( ClientPtr client );
244extern int ProcLbxGetProperty ( ClientPtr client );
245extern int ProcLbxTagData ( ClientPtr client );
246extern int ProcLbxInvalidateTag ( ClientPtr client );
247extern int ProcLbxPolyPoint ( ClientPtr client );
248extern int ProcLbxPolyLine ( ClientPtr client );
249extern int ProcLbxPolySegment ( ClientPtr client );
250extern int ProcLbxPolyRectangle ( ClientPtr client );
251extern int ProcLbxPolyArc ( ClientPtr client );
252extern int ProcLbxFillPoly ( ClientPtr client );
253extern int ProcLbxPolyFillRectangle ( ClientPtr client );
254extern int ProcLbxPolyFillArc ( ClientPtr client );
255extern int ProcLbxCopyArea ( ClientPtr client );
256extern int ProcLbxCopyPlane ( ClientPtr client );
257extern int ProcLbxPolyText ( ClientPtr client );
258extern int ProcLbxImageText ( ClientPtr client );
259extern int ProcLbxQueryExtension ( ClientPtr client );
260extern int ProcLbxPutImage ( ClientPtr client );
261extern int ProcLbxGetImage ( ClientPtr client );
262extern int ProcLbxSync ( ClientPtr client );
263
264/* lbxprop.c */
265extern int LbxChangeProperty ( ClientPtr client );
266extern int LbxGetProperty ( ClientPtr client );
267extern void LbxStallPropRequest ( ClientPtr client, PropertyPtr pProp );
268extern int LbxChangeWindowProperty ( ClientPtr client, WindowPtr pWin,
269 Atom property, Atom type, int format,
270 int mode, unsigned long len,
271 Bool have_data, pointer value,
272 Bool sendevent, XID *tag );
273/* lbxsquish.c */
274extern int LbxSquishEvent ( char *buf );
275
276/* lbwswap.c */
277extern int SProcLbxDispatch( ClientPtr client );
278extern int SProcLbxSwitch ( ClientPtr client );
279extern int SProcLbxBeginLargeRequest ( ClientPtr client );
280extern int SProcLbxLargeRequestData ( ClientPtr client );
281extern int SProcLbxEndLargeRequest ( ClientPtr client );
282extern void LbxWriteSConnSetupPrefix ( ClientPtr pClient,
283 xLbxConnSetupPrefix *pcsp );
284extern void LbxSwapFontInfo ( xLbxFontInfo *pr, Bool compressed );
285
286/* lbxzerorep.c */
287extern void ZeroReplyPadBytes ( char *buf, int reqType );
288
289#endif /* _LBXSERVE_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