VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xextproto-7.1.1/X11/extensions/lbxproto.h@ 47412

Last change on this file since 47412 was 22660, checked in by vboxsync, 15 years ago

export more X11 stuff to OSE

  • Property svn:eol-style set to native
File size: 25.2 KB
Line 
1/*
2 * Copyright 1992 Network Computing Devices
3 *
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that
7 * copyright notice and this permission notice appear in supporting
8 * documentation, and that the name of NCD. not be used in advertising or
9 * publicity pertaining to distribution of the software without specific,
10 * written prior permission. NCD. makes no representations about the
11 * suitability of this software for any purpose. It is provided "as is"
12 * without express or implied warranty.
13 *
14 * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD.
16 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
18 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
19 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 *
21 */
22
23#ifndef _LBXPROTO_H_
24#define _LBXPROTO_H_
25
26#include <X11/extensions/lbx.h>
27/*
28 * NOTE: any changes or additions to the opcodes needs to be reflected
29 * in the lbxCacheable array in Xserver/lbx/lbxmain.c
30 */
31
32#define X_LbxQueryVersion 0
33#define X_LbxStartProxy 1
34#define X_LbxStopProxy 2
35#define X_LbxSwitch 3
36#define X_LbxNewClient 4
37#define X_LbxCloseClient 5
38#define X_LbxModifySequence 6
39#define X_LbxAllowMotion 7
40#define X_LbxIncrementPixel 8
41#define X_LbxDelta 9
42#define X_LbxGetModifierMapping 10
43#define X_LbxInvalidateTag 12
44#define X_LbxPolyPoint 13
45#define X_LbxPolyLine 14
46#define X_LbxPolySegment 15
47#define X_LbxPolyRectangle 16
48#define X_LbxPolyArc 17
49#define X_LbxFillPoly 18
50#define X_LbxPolyFillRectangle 19
51#define X_LbxPolyFillArc 20
52#define X_LbxGetKeyboardMapping 21
53#define X_LbxQueryFont 22
54#define X_LbxChangeProperty 23
55#define X_LbxGetProperty 24
56#define X_LbxTagData 25
57
58#define X_LbxCopyArea 26
59#define X_LbxCopyPlane 27
60#define X_LbxPolyText8 28
61#define X_LbxPolyText16 29
62#define X_LbxImageText8 30
63#define X_LbxImageText16 31
64
65#define X_LbxQueryExtension 32
66#define X_LbxPutImage 33
67#define X_LbxGetImage 34
68
69#define X_LbxBeginLargeRequest 35
70#define X_LbxLargeRequestData 36
71#define X_LbxEndLargeRequest 37
72
73#define X_LbxInternAtoms 38
74#define X_LbxGetWinAttrAndGeom 39
75
76#define X_LbxGrabCmap 40
77#define X_LbxReleaseCmap 41
78#define X_LbxAllocColor 42
79
80#define X_LbxSync 43
81
82/*
83 * Redefine some basic types used by structures defined herein. This removes
84 * any possibility on 64-bit architectures of one entity viewing communicated
85 * data as 32-bit quantities and another entity viewing the same data as 64-bit
86 * quantities.
87 */
88#define XID CARD32
89#define Atom CARD32
90#define Colormap CARD32
91#define Drawable CARD32
92#define VisualID CARD32
93#define Window CARD32
94
95typedef struct {
96 BOOL success; /* TRUE */
97 BOOL changeType;
98 CARD16 majorVersion B16,
99 minorVersion B16;
100 CARD16 length B16; /* 1/4 additional bytes in setup info */
101 CARD32 tag B32;
102} xLbxConnSetupPrefix;
103
104typedef struct _LbxQueryVersion {
105 CARD8 reqType; /* always LbxReqCode */
106 CARD8 lbxReqType; /* always X_LbxQueryVersion */
107 CARD16 length B16;
108} xLbxQueryVersionReq;
109#define sz_xLbxQueryVersionReq 4
110
111typedef struct {
112 BYTE type; /* X_Reply */
113 CARD8 unused;
114 CARD16 sequenceNumber B16;
115 CARD32 length B32;
116 CARD16 majorVersion B16; /* major version of LBX protocol */
117 CARD16 minorVersion B16; /* minor version of LBX protocol */
118 CARD32 pad0 B32;
119 CARD32 pad1 B32;
120 CARD32 pad2 B32;
121 CARD32 pad3 B32;
122 CARD32 pad4 B32;
123} xLbxQueryVersionReply;
124#define sz_xLbxQueryVersionReply 32
125
126typedef struct _LbxStartProxy {
127 CARD8 reqType; /* always LbxReqCode */
128 CARD8 lbxReqType; /* always X_LbxStartProxy */
129 CARD16 length B16;
130} xLbxStartProxyReq;
131#define sz_xLbxStartProxyReq 4
132
133typedef struct _LbxStopProxy {
134 CARD8 reqType; /* always LbxReqCode */
135 CARD8 lbxReqType; /* always X_LbxStopProxy */
136 CARD16 length B16;
137} xLbxStopProxyReq;
138#define sz_xLbxStopProxyReq 4
139
140typedef struct _LbxSwitch {
141 CARD8 reqType; /* always LbxReqCode */
142 CARD8 lbxReqType; /* always X_LbxSwitch */
143 CARD16 length B16;
144 CARD32 client B32; /* new client */
145} xLbxSwitchReq;
146#define sz_xLbxSwitchReq 8
147
148typedef struct _LbxNewClient {
149 CARD8 reqType; /* always LbxReqCode */
150 CARD8 lbxReqType; /* always X_LbxNewClient */
151 CARD16 length B16;
152 CARD32 client B32; /* new client */
153} xLbxNewClientReq;
154#define sz_xLbxNewClientReq 8
155
156typedef struct _LbxCloseClient {
157 CARD8 reqType; /* always LbxReqCode */
158 CARD8 lbxReqType; /* always X_LbxCloseClient */
159 CARD16 length B16;
160 CARD32 client B32; /* new client */
161} xLbxCloseClientReq;
162#define sz_xLbxCloseClientReq 8
163
164typedef struct _LbxModifySequence {
165 CARD8 reqType; /* always LbxReqCode */
166 CARD8 lbxReqType; /* always X_LbxModifySequence */
167 CARD16 length B16;
168 CARD32 adjust B32;
169} xLbxModifySequenceReq;
170#define sz_xLbxModifySequenceReq 8
171
172typedef struct _LbxAllowMotion {
173 CARD8 reqType; /* always LbxReqCode */
174 CARD8 lbxReqType; /* always X_LbxAllowMotion */
175 CARD16 length B16;
176 CARD32 num B32;
177} xLbxAllowMotionReq;
178#define sz_xLbxAllowMotionReq 8
179
180typedef struct {
181 CARD8 reqType; /* always LbxReqCode */
182 CARD8 lbxReqType; /* always X_LbxGrabCmap */
183 CARD16 length B16;
184 Colormap cmap B32;
185} xLbxGrabCmapReq;
186#define sz_xLbxGrabCmapReq 8
187
188#define LBX_SMART_GRAB 0x80
189#define LBX_AUTO_RELEASE 0x40
190#define LBX_3CHANNELS 0x20
191#define LBX_2BYTE_PIXELS 0x10
192#define LBX_RGB_BITS_MASK 0x0f
193
194#define LBX_LIST_END 0
195#define LBX_PIXEL_PRIVATE 1
196#define LBX_PIXEL_SHARED 2
197#define LBX_PIXEL_RANGE_PRIVATE 3
198#define LBX_PIXEL_RANGE_SHARED 4
199#define LBX_NEXT_CHANNEL 5
200
201typedef struct {
202 BYTE type; /* X_Reply */
203 CARD8 flags;
204 CARD16 sequenceNumber B16;
205 CARD32 length B32;
206 CARD32 pad0 B16;
207 CARD32 pad1 B32;
208 CARD32 pad2 B32;
209 CARD32 pad3 B32;
210 CARD32 pad4 B32;
211 CARD32 pad5 B16;
212} xLbxGrabCmapReply;
213#define sz_xLbxGrabCmapReply 32
214#define sz_xLbxGrabCmapReplyHdr 8
215
216
217typedef struct {
218 CARD8 reqType; /* always LbxReqCode */
219 CARD8 lbxReqType; /* always X_LbxReleaseCmap */
220 CARD16 length B16;
221 Colormap cmap B32;
222} xLbxReleaseCmapReq;
223#define sz_xLbxReleaseCmapReq 8
224
225typedef struct {
226 CARD8 reqType; /* always LbxReqCode */
227 CARD8 lbxReqType; /* always X_LbxAllocColor */
228 CARD16 length B16;
229 Colormap cmap B32;
230 CARD32 pixel B32;
231 CARD16 red B16, green B16, blue B16;
232 CARD16 pad B16;
233} xLbxAllocColorReq;
234#define sz_xLbxAllocColorReq 20
235
236typedef struct _LbxIncrementPixel {
237 CARD8 reqType; /* always LbxReqCode */
238 CARD8 lbxReqType; /* always X_LbxIncrementPixel */
239 CARD16 length B16;
240 CARD32 cmap B32;
241 CARD32 pixel B32;
242} xLbxIncrementPixelReq;
243#define sz_xLbxIncrementPixelReq 12
244
245typedef struct _LbxDelta {
246 CARD8 reqType; /* always LbxReqCode */
247 CARD8 lbxReqType; /* always X_LbxDelta */
248 CARD16 length B16;
249 CARD8 diffs; /* number of diffs */
250 CARD8 cindex; /* cache index */
251 /* list of diffs follows */
252} xLbxDeltaReq;
253#define sz_xLbxDeltaReq 6
254
255typedef struct _LbxGetModifierMapping {
256 CARD8 reqType; /* always LbxReqCode */
257 CARD8 lbxReqType; /* always X_LbxGetModifierMapping */
258 CARD16 length B16;
259} xLbxGetModifierMappingReq;
260#define sz_xLbxGetModifierMappingReq 4
261
262typedef struct {
263 BYTE type; /* X_Reply */
264 CARD8 keyspermod;
265 CARD16 sequenceNumber B16;
266 CARD32 length B32;
267 CARD32 tag B32;
268 CARD32 pad0 B32;
269 CARD32 pad1 B32;
270 CARD32 pad2 B32;
271 CARD32 pad3 B32;
272 CARD32 pad4 B32;
273} xLbxGetModifierMappingReply;
274#define sz_xLbxGetModifierMappingReply 32
275
276typedef struct _LbxGetKeyboardMapping {
277 CARD8 reqType; /* always LbxReqCode */
278 CARD8 lbxReqType; /* always X_LbxGetKeyboardMapping */
279 CARD16 length B16;
280 KeyCode firstKeyCode;
281 CARD8 count;
282 CARD16 pad1 B16;
283} xLbxGetKeyboardMappingReq;
284#define sz_xLbxGetKeyboardMappingReq 8
285
286typedef struct {
287 BYTE type; /* X_Reply */
288 CARD8 keysperkeycode;
289 CARD16 sequenceNumber B16;
290 CARD32 length B32;
291 CARD32 tag B32;
292 CARD32 pad0 B32;
293 CARD32 pad1 B32;
294 CARD32 pad2 B32;
295 CARD32 pad3 B32;
296 CARD32 pad4 B32;
297} xLbxGetKeyboardMappingReply;
298#define sz_xLbxGetKeyboardMappingReply 32
299
300typedef struct _LbxQueryFont {
301 CARD8 reqType; /* always LbxReqCode */
302 CARD8 lbxReqType; /* always X_LbxQueryFont */
303 CARD16 length B16;
304 CARD32 fid B32;
305} xLbxQueryFontReq;
306#define sz_xLbxQueryFontReq 8
307
308typedef struct _LbxInternAtoms {
309 CARD8 reqType; /* always LbxReqCode */
310 CARD8 lbxReqType; /* always X_LbxInternAtoms */
311 CARD16 length B16;
312 CARD16 num B16;
313} xLbxInternAtomsReq;
314#define sz_xLbxInternAtomsReq 6
315
316typedef struct {
317 BYTE type; /* X_Reply */
318 CARD8 unused;
319 CARD16 sequenceNumber B16;
320 CARD32 length B32;
321 CARD32 atomsStart B32;
322 CARD32 pad0 B32;
323 CARD32 pad1 B32;
324 CARD32 pad2 B32;
325 CARD32 pad3 B32;
326 CARD32 pad4 B32;
327} xLbxInternAtomsReply;
328#define sz_xLbxInternAtomsReply 32
329#define sz_xLbxInternAtomsReplyHdr 8
330
331
332typedef struct _LbxGetWinAttrAndGeom {
333 CARD8 reqType; /* always LbxReqCode */
334 CARD8 lbxReqType; /* always X_LbxGetWinAttrAndGeom */
335 CARD16 length B16;
336 CARD32 id B32; /* window id */
337} xLbxGetWinAttrAndGeomReq;
338#define sz_xLbxGetWinAttrAndGeomReq 8
339
340typedef struct {
341 BYTE type; /* X_Reply */
342 CARD8 backingStore;
343 CARD16 sequenceNumber B16;
344 CARD32 length B32; /* NOT 0; this is an extra-large reply */
345 VisualID visualID B32;
346#if defined(__cplusplus) || defined(c_plusplus)
347 CARD16 c_class B16;
348#else
349 CARD16 class B16;
350#endif
351 CARD8 bitGravity;
352 CARD8 winGravity;
353 CARD32 backingBitPlanes B32;
354 CARD32 backingPixel B32;
355 BOOL saveUnder;
356 BOOL mapInstalled;
357 CARD8 mapState;
358 BOOL override;
359 Colormap colormap B32;
360 CARD32 allEventMasks B32;
361 CARD32 yourEventMask B32;
362 CARD16 doNotPropagateMask B16;
363 CARD16 pad1 B16;
364 Window root B32;
365 INT16 x B16, y B16;
366 CARD16 width B16, height B16;
367 CARD16 borderWidth B16;
368 CARD8 depth;
369 CARD8 pad2;
370} xLbxGetWinAttrAndGeomReply;
371#define sz_xLbxGetWinAttrAndGeomReply 60
372
373
374typedef struct {
375 CARD8 reqType; /* always LbxReqCode */
376 CARD8 lbxReqType; /* always X_LbxSync */
377 CARD16 length B16;
378} xLbxSyncReq;
379#define sz_xLbxSyncReq 4
380
381typedef struct {
382 BYTE type; /* X_Reply */
383 CARD8 pad0;
384 CARD16 sequenceNumber B16;
385 CARD32 length B32;
386 CARD32 pad1 B32;
387 CARD32 pad2 B32;
388 CARD32 pad3 B32;
389 CARD32 pad4 B32;
390 CARD32 pad5 B32;
391 CARD32 pad6 B32;
392} xLbxSyncReply;
393#define sz_xLbxSyncReply 32
394
395
396/* an LBX squished charinfo packs the data in a CARD32 as follows */
397#define LBX_WIDTH_SHIFT 26
398#define LBX_LEFT_SHIFT 20
399#define LBX_RIGHT_SHIFT 13
400#define LBX_ASCENT_SHIFT 7
401#define LBX_DESCENT_SHIFT 0
402
403#define LBX_WIDTH_BITS 6
404#define LBX_LEFT_BITS 6
405#define LBX_RIGHT_BITS 7
406#define LBX_ASCENT_BITS 6
407#define LBX_DESCENT_BITS 7
408
409#define LBX_WIDTH_MASK 0xfc000000
410#define LBX_LEFT_MASK 0x03f00000
411#define LBX_RIGHT_MASK 0x000fe000
412#define LBX_ASCENT_MASK 0x00001f80
413#define LBX_DESCENT_MASK 0x0000007f
414
415#define LBX_MASK_BITS(val, n) ((unsigned int) ((val) & ((1 << (n)) - 1)))
416
417typedef struct {
418 CARD32 metrics B32;
419} xLbxCharInfo;
420
421/* note that this is identical to xQueryFontReply except for missing
422 * first 2 words
423 */
424typedef struct {
425 xCharInfo minBounds;
426/* XXX do we need to leave this gunk? */
427#ifndef WORD64
428 CARD32 walign1 B32;
429#endif
430 xCharInfo maxBounds;
431#ifndef WORD64
432 CARD32 walign2 B32;
433#endif
434 CARD16 minCharOrByte2 B16, maxCharOrByte2 B16;
435 CARD16 defaultChar B16;
436 CARD16 nFontProps B16; /* followed by this many xFontProp structures */
437 CARD8 drawDirection;
438 CARD8 minByte1, maxByte1;
439 BOOL allCharsExist;
440 INT16 fontAscent B16, fontDescent B16;
441 CARD32 nCharInfos B32; /* followed by this many xLbxCharInfo structures */
442} xLbxFontInfo;
443
444typedef struct {
445 BYTE type; /* X_Reply */
446 CARD8 compression;
447 CARD16 sequenceNumber B16;
448 CARD32 length B32;
449 CARD32 tag B32;
450 CARD32 pad0 B32;
451 CARD32 pad1 B32;
452 CARD32 pad2 B32;
453 CARD32 pad3 B32;
454 CARD32 pad4 B32;
455 /* X_QueryFont sticks much of the data in the base reply packet,
456 * but we hope that it won't be needed, (and it won't fit in 32 bytes
457 * with the tag anyways)
458 *
459 * if any additional data is needed, its sent in a xLbxFontInfo
460 */
461} xLbxQueryFontReply;
462#define sz_xLbxQueryFontReply 32
463
464typedef struct _LbxChangeProperty {
465 CARD8 reqType; /* always LbxReqCode */
466 CARD8 lbxReqType; /* always X_LbxChangeProperty */
467 CARD16 length B16;
468 Window window B32;
469 Atom property B32;
470 Atom type B32;
471 CARD8 format;
472 CARD8 mode;
473 BYTE pad[2];
474 CARD32 nUnits B32;
475} xLbxChangePropertyReq;
476#define sz_xLbxChangePropertyReq 24
477
478typedef struct {
479 BYTE type; /* X_Reply */
480 CARD8 pad;
481 CARD16 sequenceNumber B16;
482 CARD32 length B32;
483 CARD32 tag B32;
484 CARD32 pad0 B32;
485 CARD32 pad1 B32;
486 CARD32 pad2 B32;
487 CARD32 pad3 B32;
488 CARD32 pad4 B32;
489} xLbxChangePropertyReply;
490#define sz_xLbxChangePropertyReply 32
491
492typedef struct _LbxGetProperty {
493 CARD8 reqType; /* always LbxReqCode */
494 CARD8 lbxReqType; /* always X_LbxGetProperty */
495 CARD16 length B16;
496 Window window B32;
497 Atom property B32;
498 Atom type B32;
499 CARD8 delete;
500 BYTE pad[3];
501 CARD32 longOffset B32;
502 CARD32 longLength B32;
503} xLbxGetPropertyReq;
504#define sz_xLbxGetPropertyReq 28
505
506typedef struct {
507 BYTE type; /* X_Reply */
508 CARD8 format;
509 CARD16 sequenceNumber B16;
510 CARD32 length B32;
511 Atom propertyType B32;
512 CARD32 bytesAfter B32;
513 CARD32 nItems B32;
514 CARD32 tag B32;
515 CARD32 pad1 B32;
516 CARD32 pad2 B32;
517} xLbxGetPropertyReply;
518#define sz_xLbxGetPropertyReply 32
519
520typedef struct _LbxTagData {
521 CARD8 reqType; /* always LbxReqCode */
522 CARD8 lbxReqType; /* always X_LbxTagData */
523 CARD16 length B16;
524 XID tag B32;
525 CARD32 real_length B32;
526 /* data */
527} xLbxTagDataReq;
528#define sz_xLbxTagDataReq 12
529
530typedef struct _LbxInvalidateTag {
531 CARD8 reqType; /* always LbxReqCode */
532 CARD8 lbxReqType; /* always X_LbxInvalidateTag */
533 CARD16 length B16;
534 CARD32 tag B32;
535} xLbxInvalidateTagReq;
536#define sz_xLbxInvalidateTagReq 8
537
538typedef struct _LbxPutImage {
539 CARD8 reqType; /* always LbxReqCode */
540 CARD8 lbxReqType; /* always X_LbxPutImage */
541 CARD16 length B16;
542 CARD8 compressionMethod;
543 CARD8 cacheEnts;
544 CARD8 bitPacked;
545 /* rest is variable */
546} xLbxPutImageReq;
547#define sz_xLbxPutImageReq 7
548
549typedef struct {
550 CARD8 reqType; /* always LbxReqCode */
551 CARD8 lbxReqType; /* always X_LbxGetImage */
552 CARD16 length B16;
553 Drawable drawable B32;
554 INT16 x B16, y B16;
555 CARD16 width B16, height B16;
556 CARD32 planeMask B32;
557 CARD8 format;
558 CARD8 pad1;
559 CARD16 pad2 B16;
560} xLbxGetImageReq;
561
562#define sz_xLbxGetImageReq 24
563
564typedef struct {
565 BYTE type; /* X_Reply */
566 CARD8 depth;
567 CARD16 sequenceNumber B16;
568 CARD32 lbxLength B32;
569 CARD32 xLength B32;
570 VisualID visual B32;
571 CARD8 compressionMethod;
572 CARD8 pad1;
573 CARD16 pad2 B16;
574 CARD32 pad3 B32;
575 CARD32 pad4 B32;
576 CARD32 pad5 B32;
577} xLbxGetImageReply;
578
579#define sz_xLbxGetImageReply 32
580
581/* Following used for LbxPolyPoint, LbxPolyLine, LbxPolySegment,
582 LbxPolyRectangle, LbxPolyArc, LbxPolyFillRectangle and LbxPolyFillArc */
583
584#define GFX_CACHE_SIZE 15
585
586#define GFXdCacheEnt(e) ((e) & 0xf)
587#define GFXgCacheEnt(e) (((e) >> 4) & 0xf)
588#define GFXCacheEnts(d,g) (((d) & 0xf) | (((g) & 0xf) << 4))
589
590#define GFXCacheNone 0xf
591
592typedef struct _LbxPolyPoint {
593 CARD8 reqType; /* always LbxReqCode */
594 CARD8 lbxReqType;
595 CARD16 length B16;
596 CARD8 cacheEnts;
597 CARD8 padBytes;
598} xLbxPolyPointReq;
599
600#define sz_xLbxPolyPointReq 6
601
602typedef xLbxPolyPointReq xLbxPolyLineReq;
603typedef xLbxPolyPointReq xLbxPolySegmentReq;
604typedef xLbxPolyPointReq xLbxPolyRectangleReq;
605typedef xLbxPolyPointReq xLbxPolyArcReq;
606typedef xLbxPolyPointReq xLbxPolyFillRectangleReq;
607typedef xLbxPolyPointReq xLbxPolyFillArcReq;
608
609#define sz_xLbxPolyLineReq sz_xLbxPolyPointReq
610#define sz_xLbxPolySegmentReq sz_xLbxPolyPointReq
611#define sz_xLbxPolyRectangleReq sz_xLbxPolyPointReq
612#define sz_xLbxPolyArcReq sz_xLbxPolyPointReq
613#define sz_xLbxPolyFillRectangleReq sz_xLbxPolyPointReq
614#define sz_xLbxPolyFillArc sz_xLbxPolyPointReq
615
616typedef struct _LbxFillPoly {
617 CARD8 reqType; /* always LbxReqCode */
618 CARD8 lbxReqType;
619 CARD16 length B16;
620 CARD8 cacheEnts;
621 BYTE shape;
622 CARD8 padBytes;
623} xLbxFillPolyReq;
624#define sz_xLbxFillPolyReq 7
625
626typedef struct _LbxCopyArea {
627 CARD8 reqType; /* always LbxReqCode */
628 CARD8 lbxReqType;
629 CARD16 length B16;
630 CARD8 srcCache; /* source drawable */
631 CARD8 cacheEnts; /* dest drawable and gc */
632 /* followed by encoded src x, src y, dst x, dst y, width, height */
633} xLbxCopyAreaReq;
634
635#define sz_xLbxCopyAreaReq 6
636
637typedef struct _LbxCopyPlane {
638 CARD8 reqType; /* always LbxReqCode */
639 CARD8 lbxReqType;
640 CARD16 length B16;
641 CARD32 bitPlane B32;
642 CARD8 srcCache; /* source drawable */
643 CARD8 cacheEnts; /* dest drawable and gc */
644 /* followed by encoded src x, src y, dst x, dst y, width, height */
645} xLbxCopyPlaneReq;
646
647#define sz_xLbxCopyPlaneReq 10
648
649typedef struct _LbxPolyText {
650 CARD8 reqType; /* always LbxReqCode */
651 CARD8 lbxReqType;
652 CARD16 length B16;
653 CARD8 cacheEnts;
654 /* followed by encoded src x, src y coordinates and text elts */
655} xLbxPolyTextReq;
656
657#define sz_xLbxPolyTextReq 5
658
659typedef xLbxPolyTextReq xLbxPolyText8Req;
660typedef xLbxPolyTextReq xLbxPolyText16Req;
661
662#define sz_xLbxPolyTextReq 5
663#define sz_xLbxPolyText8Req 5
664#define sz_xLbxPolyText16Req 5
665
666typedef struct _LbxImageText {
667 CARD8 reqType; /* always LbxReqCode */
668 CARD8 lbxReqType;
669 CARD16 length B16;
670 CARD8 cacheEnts;
671 CARD8 nChars;
672 /* followed by encoded src x, src y coordinates and string */
673} xLbxImageTextReq;
674
675typedef xLbxImageTextReq xLbxImageText8Req;
676typedef xLbxImageTextReq xLbxImageText16Req;
677
678#define sz_xLbxImageTextReq 6
679#define sz_xLbxImageText8Req 6
680#define sz_xLbxImageText16Req 6
681
682typedef struct {
683 CARD8 offset;
684 CARD8 diff;
685} xLbxDiffItem;
686#define sz_xLbxDiffItem 2
687
688typedef struct {
689 BYTE type; /* X_Reply */
690 CARD8 nOpts;
691 CARD16 sequenceNumber B16;
692 CARD32 length B32;
693 CARD32 optDataStart B32;
694 CARD32 pad0 B32;
695 CARD32 pad1 B32;
696 CARD32 pad2 B32;
697 CARD32 pad3 B32;
698 CARD32 pad4 B32;
699} xLbxStartReply;
700#define sz_xLbxStartReply 32
701#define sz_xLbxStartReplyHdr 8
702
703typedef struct _LbxQueryExtension {
704 CARD8 reqType; /* always LbxReqCode */
705 CARD8 lbxReqType; /* always X_LbxQueryExtension */
706 CARD16 length B16;
707 CARD32 nbytes B32;
708} xLbxQueryExtensionReq;
709#define sz_xLbxQueryExtensionReq 8
710
711typedef struct _LbxQueryExtensionReply {
712 BYTE type; /* X_Reply */
713 CARD8 numReqs;
714 CARD16 sequenceNumber B16;
715 CARD32 length B32;
716 BOOL present;
717 CARD8 major_opcode;
718 CARD8 first_event;
719 CARD8 first_error;
720 CARD32 pad0 B32;
721 CARD32 pad1 B32;
722 CARD32 pad2 B32;
723 CARD32 pad3 B32;
724 CARD32 pad4 B32;
725
726 /* reply & event generating requests */
727} xLbxQueryExtensionReply;
728#define sz_xLbxQueryExtensionReply 32
729
730
731typedef struct _LbxBeginLargeRequest {
732 CARD8 reqType; /* always LbxReqCode */
733 CARD8 lbxReqType; /* always X_LbxBeginLargeRequest */
734 CARD16 length B16;
735 CARD32 largeReqLength B32;
736} xLbxBeginLargeRequestReq;
737#define sz_BeginLargeRequestReq 8
738
739typedef struct _LbxLargeRequestData {
740 CARD8 reqType; /* always LbxReqCode */
741 CARD8 lbxReqType; /* always X_LbxLargeRequestData */
742 CARD16 length B16;
743 /* followed by LISTofCARD8 data */
744} xLbxLargeRequestDataReq;
745#define sz_LargeRequestDataReq 4
746
747typedef struct _LbxEndLargeRequest {
748 CARD8 reqType; /* always LbxReqCode */
749 CARD8 lbxReqType; /* always X_LbxEndLargeRequest */
750 CARD16 length B16;
751} xLbxEndLargeRequestReq;
752#define sz_EndLargeRequestReq 4
753
754
755
756typedef struct _LbxSwitchEvent {
757 BYTE type; /* always eventBase + LbxEvent */
758 BYTE lbxType; /* LbxSwitchEvent */
759 CARD16 pad B16;
760 CARD32 client B32;
761} xLbxSwitchEvent;
762#define sz_xLbxSwitchEvent 8
763
764typedef struct _LbxCloseEvent {
765 BYTE type; /* always eventBase + LbxEvent */
766 BYTE lbxType; /* LbxCloseEvent */
767 CARD16 sequenceNumber B16;
768 CARD32 client B32;
769 CARD32 pad1 B32;
770 CARD32 pad2 B32;
771 CARD32 pad3 B32;
772 CARD32 pad4 B32;
773 CARD32 pad5 B32;
774 CARD32 pad6 B32;
775} xLbxCloseEvent;
776#define sz_xLbxCloseEvent 32
777
778typedef struct _LbxInvalidateTagEvent {
779 BYTE type; /* always eventBase + LbxEvent */
780 BYTE lbxType; /* LbxInvalidateTagEvent */
781 CARD16 sequenceNumber B16;
782 CARD32 tag B32;
783 CARD32 tagType B32;
784 CARD32 pad1 B32;
785 CARD32 pad2 B32;
786 CARD32 pad3 B32;
787 CARD32 pad4 B32;
788 CARD32 pad5 B32;
789} xLbxInvalidateTagEvent;
790#define sz_xLbxInvalidateTagEvent 32
791
792typedef struct _LbxSendTagDataEvent {
793 BYTE type; /* always eventBase + LbxEvent */
794 BYTE lbxType; /* LbxSendTagDataEvent */
795 CARD16 sequenceNumber B16;
796 CARD32 tag B32;
797 CARD32 tagType B32;
798 CARD32 pad1 B32;
799 CARD32 pad2 B32;
800 CARD32 pad3 B32;
801 CARD32 pad4 B32;
802 CARD32 pad5 B32;
803} xLbxSendTagDataEvent;
804#define sz_xLbxSendTagDataEvent 32
805
806typedef struct _LbxListenToOneEvent {
807 BYTE type; /* always eventBase + LbxEvent */
808 BYTE lbxType; /* LbxListenToOneEvent */
809 CARD16 sequenceNumber B16;
810 CARD32 client B32;
811 CARD32 pad1 B32;
812 CARD32 pad2 B32;
813 CARD32 pad3 B32;
814 CARD32 pad4 B32;
815 CARD32 pad5 B32;
816 CARD32 pad6 B32;
817} xLbxListenToOneEvent;
818#define sz_xLbxListenToOneEvent 32
819
820typedef struct _LbxListenToAllEvent {
821 BYTE type; /* always eventBase + LbxEvent */
822 BYTE lbxType; /* LbxListenToAllEvent */
823 CARD16 sequenceNumber B16;
824 CARD32 pad1 B32;
825 CARD32 pad2 B32;
826 CARD32 pad3 B32;
827 CARD32 pad4 B32;
828 CARD32 pad5 B32;
829 CARD32 pad6 B32;
830 CARD32 pad7 B32;
831} xLbxListenToAllEvent;
832#define sz_xLbxListenToOneEvent 32
833
834typedef struct _LbxReleaseCmapEvent {
835 BYTE type; /* always eventBase + LbxEvent */
836 BYTE lbxType; /* LbxReleaseCmapEvent */
837 CARD16 sequenceNumber B16;
838 Colormap colormap B32;
839 CARD32 pad1 B32;
840 CARD32 pad2 B32;
841 CARD32 pad3 B32;
842 CARD32 pad4 B32;
843 CARD32 pad5 B32;
844 CARD32 pad6 B32;
845} xLbxReleaseCmapEvent;
846#define sz_xLbxReleaseCmapEvent 32
847
848
849typedef struct _LbxFreeCellsEvent {
850 BYTE type; /* always eventBase + LbxEvent */
851 BYTE lbxType; /* LbxFreeCellsEvent */
852 CARD16 sequenceNumber B16;
853 Colormap colormap B32;
854 CARD32 pixelStart B32;
855 CARD32 pixelEnd B32;
856 CARD32 pad1 B32;
857 CARD32 pad2 B32;
858 CARD32 pad3 B32;
859 CARD32 pad4 B32;
860} xLbxFreeCellsEvent;
861#define sz_xLbxFreeCellsEvent 32
862
863
864/*
865 * squished X event sizes. If these change, be sure to update lbxquish.c
866 * and unsquish.c appropriately
867 *
868 * lbxsz_* is the padded squished length
869 * lbxupsz_* is the unpadded squished length
870 */
871
872#define lbxsz_KeyButtonEvent 32
873#define lbxupsz_KeyButtonEvent 31
874
875#define lbxsz_EnterLeaveEvent 32
876#define lbxupsz_EnterLeaveEvent 32
877
878#define lbxsz_FocusEvent 12
879#define lbxupsz_FocusEvent 9
880
881#define lbxsz_KeymapEvent 32
882#define lbxupsz_KeymapEvent 32
883
884#define lbxsz_ExposeEvent 20
885#define lbxupsz_ExposeEvent 18
886
887#define lbxsz_GfxExposeEvent 24
888#define lbxupsz_GfxExposeEvent 21
889
890#define lbxsz_NoExposeEvent 12
891#define lbxupsz_NoExposeEvent 11
892
893#define lbxsz_VisibilityEvent 12
894#define lbxupsz_VisibilityEvent 9
895
896#define lbxsz_CreateNotifyEvent 24
897#define lbxupsz_CreateNotifyEvent 23
898
899#define lbxsz_DestroyNotifyEvent 12
900#define lbxupsz_DestroyNotifyEvent 12
901
902#define lbxsz_UnmapNotifyEvent 16
903#define lbxupsz_UnmapNotifyEvent 13
904
905#define lbxsz_MapNotifyEvent 16
906#define lbxupsz_MapNotifyEvent 13
907
908#define lbxsz_MapRequestEvent 12
909#define lbxupsz_MapRequestEvent 12
910
911#define lbxsz_ReparentEvent 24
912#define lbxupsz_ReparentEvent 21
913
914#define lbxsz_ConfigureNotifyEvent 28
915#define lbxupsz_ConfigureNotifyEvent 27
916
917#define lbxsz_ConfigureRequestEvent 28
918#define lbxupsz_ConfigureRequestEvent 28
919
920#define lbxsz_GravityEvent 16
921#define lbxupsz_GravityEvent 16
922
923#define lbxsz_ResizeRequestEvent 12
924#define lbxupsz_ResizeRequestEvent 12
925
926#define lbxsz_CirculateEvent 20
927#define lbxupsz_CirculateEvent 17
928
929#define lbxsz_PropertyEvent 20
930#define lbxupsz_PropertyEvent 17
931
932#define lbxsz_SelectionClearEvent 16
933#define lbxupsz_SelectionClearEvent 16
934
935#define lbxsz_SelectionRequestEvent 28
936#define lbxupsz_SelectionRequestEvent 28
937
938#define lbxsz_SelectionNotifyEvent 24
939#define lbxupsz_SelectionNotifyEvent 24
940
941#define lbxsz_ColormapEvent 16
942#define lbxupsz_ColormapEvent 14
943
944#define lbxsz_MappingNotifyEvent 8
945#define lbxupsz_MappingNotifyEvent 7
946
947#define lbxsz_ClientMessageEvent 32
948#define lbxupsz_ClientMessageEvent 32
949
950#define lbxsz_UnknownEvent 32
951
952#ifdef DEBUG
953
954#define DBG_SWITCH 0x00000001
955#define DBG_CLOSE 0x00000002
956#define DBG_IO 0x00000004
957#define DBG_READ_REQ 0x00000008
958#define DBG_LEN 0x00000010
959#define DBG_BLOCK 0x00000020
960#define DBG_CLIENT 0x00000040
961#define DBG_DELTA 0x00000080
962#endif
963/*
964 * Cancel the previous redefinition of the basic types, thus restoring their
965 * X.h definitions.
966 */
967
968#undef XID
969#undef Atom
970#undef Colormap
971#undef Drawable
972#undef VisualID
973#undef Window
974
975#endif /* _LBXPROTO_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