~ubuntu-branches/ubuntu/gutsy/vnc4/gutsy

« back to all changes in this revision

Viewing changes to unix/xc/lib/PEX5/PEXprotost.h

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2006-05-15 20:35:17 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060515203517-l4lre1ku942mn26k
Tags: 4.1.1+X4.3.0-10
* Correction of critical security issue. Thanks to Martin Kogler
  <e9925248@student.tuwien.ac.at> that informed me about the issue,
  and provided the patch.
  This flaw was originally found by Steve Wiseman of intelliadmin.com.
* Applied patch from Javier Kohen <jkohen@users.sourceforge.net> that
  inform the user that only 8 first characters of the password will
  actually be used when typing more than 8 characters, closes:
  #355619.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Xorg: PEXprotost.h,v 1.4 2001/02/09 02:03:27 xorgcvs Exp $ */
 
2
/*
 
3
 
 
4
Copyright 1992, 1998  The Open Group
 
5
 
 
6
Permission to use, copy, modify, distribute, and sell this software and its
 
7
documentation for any purpose is hereby granted without fee, provided that
 
8
the above copyright notice appear in all copies and that both that
 
9
copyright notice and this permission notice appear in supporting
 
10
documentation.
 
11
 
 
12
The above copyright notice and this permission notice shall be included
 
13
in all copies or substantial portions of the Software.
 
14
 
 
15
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 
16
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 
17
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 
18
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
 
19
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 
20
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 
21
OTHER DEALINGS IN THE SOFTWARE.
 
22
 
 
23
Except as contained in this notice, the name of The Open Group shall
 
24
not be used in advertising or otherwise to promote the sale, use or
 
25
other dealings in this Software without prior written authorization
 
26
from The Open Group.
 
27
 
 
28
*/
 
29
 
 
30
 
 
31
/******************************************************************************
 
32
Copyright 1989, 1990, 1991 by Sun Microsystems, Inc.
 
33
 
 
34
                        All Rights Reserved
 
35
 
 
36
Permission to use, copy, modify, distribute, and sell this software and its
 
37
documentation for any purpose is hereby granted without fee, provided that
 
38
the above copyright notice appear in all copies and that both that copyright
 
39
notice and this permission notice appear in supporting documentation, and that
 
40
the name of Sun Microsystems not be used in advertising or publicity
 
41
pertaining to distribution of the software without specific, written prior
 
42
permission.  Sun Microsystems makes no representations about the
 
43
suitability of this software for any purpose.  It is provided "as is" without
 
44
express or implied warranty.
 
45
 
 
46
SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 
 
47
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT 
 
48
SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 
 
49
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
 
50
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
 
51
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
 
52
SOFTWARE.
 
53
******************************************************************************/
 
54
 
 
55
#ifndef _PEXPROTOST_H_
 
56
#define _PEXPROTOST_H_
 
57
 
 
58
/* Matches revision 5.1C */
 
59
 
 
60
#include <X11/Xmd.h>                    /* defines things like CARD32 */
 
61
 
 
62
 
 
63
/* This is FLOAT as defined and used by the Protocol Encoding */
 
64
#ifndef WORD64
 
65
typedef float PEXFLOAT;
 
66
#else
 
67
typedef CARD32 PEXFLOAT;
 
68
#endif
 
69
 
 
70
 
 
71
typedef CARD32  pexAsfAttribute;
 
72
typedef CARD8   pexAsfValue;
 
73
typedef CARD32  pexBitmask;
 
74
typedef CARD16  pexBitmaskShort;
 
75
typedef CARD16  pexCoordType;   /* rational, nonrational */
 
76
typedef CARD16  pexComposition;
 
77
typedef CARD16  pexCullMode;
 
78
typedef BYTE    pexDynamicType;
 
79
typedef INT16   pexEnumTypeIndex;
 
80
typedef XID     pexLookupTable;
 
81
typedef CARD32  pexName;
 
82
typedef XID     pexNameSet;
 
83
typedef XID     pexPC;
 
84
typedef XID     pexFont;
 
85
 
 
86
#ifndef WORD64
 
87
typedef PEXFLOAT        pexMatrix[4][4];
 
88
typedef PEXFLOAT        pexMatrix3X3[3][3];
 
89
#else
 
90
typedef CARD8           pexMatrix[64];
 
91
typedef CARD8           pexMatrix3X3[36];
 
92
#endif
 
93
 
 
94
typedef XID     pexPhigsWks;
 
95
typedef XID     pexPickMeasure;
 
96
typedef XID     pexRenderer;
 
97
typedef XID     pexSC;
 
98
typedef XID     pexStructure;
 
99
typedef CARD8   pexSwitch;
 
100
typedef CARD16  pexTableIndex;
 
101
typedef CARD16  pexTableType;   /* could be smaller if it ever helps */
 
102
typedef CARD16  pexTextHAlignment;
 
103
typedef CARD16  pexTextVAlignment;
 
104
typedef CARD16  pexTypeOrTableIndex;
 
105
typedef pexEnumTypeIndex        pexColorType;   /* ColorType */
 
106
 
 
107
/* included in others */
 
108
typedef struct {
 
109
    CARD16      length B16;
 
110
    /* list of CARD8 -- don't swap */
 
111
} pexString;
 
112
 
 
113
typedef struct {
 
114
    pexStructure        sid B32;
 
115
    PEXFLOAT            priority B32;
 
116
} pexStructureInfo;
 
117
 
 
118
typedef struct {
 
119
    PEXFLOAT    x B32;
 
120
    PEXFLOAT    y B32;
 
121
} pexVector2D;
 
122
 
 
123
typedef struct {
 
124
    PEXFLOAT    x B32;
 
125
    PEXFLOAT    y B32;
 
126
    PEXFLOAT    z B32;
 
127
} pexVector3D;
 
128
 
 
129
/* Coord structures */
 
130
 
 
131
typedef struct {
 
132
    PEXFLOAT    x B32;
 
133
    PEXFLOAT    y B32;
 
134
} pexCoord2D;
 
135
 
 
136
typedef struct {
 
137
    PEXFLOAT    x B32;
 
138
    PEXFLOAT    y B32;
 
139
    PEXFLOAT    z B32;
 
140
} pexCoord3D;
 
141
 
 
142
typedef struct {
 
143
    PEXFLOAT    x B32;
 
144
    PEXFLOAT    y B32;
 
145
    PEXFLOAT    z B32;
 
146
    PEXFLOAT    w B32;
 
147
} pexCoord4D;
 
148
 
 
149
 
 
150
/* Color structures */
 
151
typedef struct {
 
152
    PEXFLOAT    red B32;
 
153
    PEXFLOAT    green B32;
 
154
    PEXFLOAT    blue B32;
 
155
} pexRgbFloatColor;
 
156
 
 
157
typedef struct {
 
158
    PEXFLOAT    hue B32;
 
159
    PEXFLOAT    saturation B32;
 
160
    PEXFLOAT    value B32;
 
161
} pexHsvColor;
 
162
 
 
163
typedef struct {
 
164
    PEXFLOAT    hue B32;
 
165
    PEXFLOAT    lightness B32;
 
166
    PEXFLOAT    saturation B32;
 
167
} pexHlsColor;
 
168
 
 
169
typedef struct {
 
170
    PEXFLOAT    x B32;
 
171
    PEXFLOAT    y B32;
 
172
    PEXFLOAT    z B32;
 
173
} pexCieColor;
 
174
 
 
175
typedef struct {
 
176
    CARD8       red;
 
177
    CARD8       green;
 
178
    CARD8       blue;
 
179
    CARD8       pad;
 
180
} pexRgb8Color;
 
181
 
 
182
typedef struct {
 
183
    CARD16      red B16;
 
184
    CARD16      green B16;
 
185
    CARD16      blue B16;
 
186
    CARD16      pad B16;
 
187
} pexRgb16Color;
 
188
 
 
189
typedef struct {
 
190
    pexTableIndex       index B16;
 
191
    CARD16              pad B16;
 
192
} pexIndexedColor;
 
193
 
 
194
typedef struct {
 
195
    union {
 
196
        pexIndexedColor         indexed;
 
197
        pexRgb8Color            rgb8;
 
198
        pexRgb16Color           rgb16;
 
199
        pexRgbFloatColor        rgbFloat;
 
200
        pexHsvColor             hsvFloat;
 
201
        pexHlsColor             hlsFloat;
 
202
        pexCieColor             cieFloat;
 
203
    } format;
 
204
} pexColor;
 
205
 
 
206
typedef struct {
 
207
    PEXFLOAT   first B32;
 
208
    PEXFLOAT   second B32;
 
209
    PEXFLOAT   third B32;
 
210
} pexFloatColor;
 
211
 
 
212
typedef struct {
 
213
    pexColorType        colorType B16;  /* ColorType enumerated type */
 
214
    CARD16              unused B16;
 
215
    /* SINGLE COLOR(colorType) */
 
216
} pexColorSpecifier;
 
217
 
 
218
 
 
219
typedef struct {
 
220
    pexEnumTypeIndex    approxMethod B16;
 
221
    CARD16              unused B16;
 
222
    PEXFLOAT            tolerance B32;
 
223
} pexCurveApproxData;
 
224
 
 
225
typedef struct {
 
226
    INT16       x B16;
 
227
    INT16       y B16;
 
228
    PEXFLOAT    z B32;
 
229
} pexDeviceCoord;
 
230
 
 
231
typedef struct {
 
232
    INT16       x B16;
 
233
    INT16       y B16;
 
234
} pexDeviceCoord2D;
 
235
 
 
236
typedef struct {
 
237
    INT16       xmin B16;
 
238
    INT16       ymin B16;
 
239
    INT16       xmax B16;
 
240
    INT16       ymax B16;
 
241
} pexDeviceRect;
 
242
 
 
243
typedef struct {
 
244
    CARD16      elementType B16;
 
245
    CARD16      length B16;
 
246
} pexElementInfo;
 
247
 
 
248
typedef struct {
 
249
    CARD16      whence B16;
 
250
    CARD16      unused B16;
 
251
    INT32       offset B32;
 
252
} pexElementPos;
 
253
 
 
254
typedef struct {
 
255
    pexElementPos       position1;      /* pexElementPos is 8 bytes long */
 
256
    pexElementPos       position2;
 
257
} pexElementRange;
 
258
 
 
259
typedef struct {
 
260
    pexStructure        structure B32;
 
261
    CARD32              offset B32;
 
262
} pexElementRef;
 
263
 
 
264
typedef struct {
 
265
    PEXFLOAT    lowerLeft_x B32;
 
266
    PEXFLOAT    lowerLeft_y B32;
 
267
    PEXFLOAT    upperRight_x B32;
 
268
    PEXFLOAT    upperRight_y B32;
 
269
    PEXFLOAT    concatpoint_x B32;
 
270
    PEXFLOAT    concatpoint_y B32;
 
271
} pexExtentInfo;
 
272
 
 
273
typedef struct {
 
274
    pexEnumTypeIndex    index B16;
 
275
    CARD16              descriptor_length B16;
 
276
} pexEnumTypeDesc;
 
277
 
 
278
typedef struct {
 
279
    PEXFLOAT    point_x B32;
 
280
    PEXFLOAT    point_y B32;
 
281
    PEXFLOAT    point_z B32;
 
282
    PEXFLOAT    vector_x B32;
 
283
    PEXFLOAT    vector_y B32;
 
284
    PEXFLOAT    vector_z B32;
 
285
} pexHalfSpace;
 
286
 
 
287
typedef struct {
 
288
    pexNameSet  incl B32;
 
289
    pexNameSet  excl B32;
 
290
} pexNameSetPair;
 
291
 
 
292
typedef struct {
 
293
    PEXFLOAT    point_x B32;
 
294
    PEXFLOAT    point_y B32;
 
295
    PEXFLOAT    vector_x B32;
 
296
    PEXFLOAT    vector_y B32;
 
297
} pexHalfSpace2D;
 
298
 
 
299
typedef struct {
 
300
    CARD16      composition B16;
 
301
    CARD16      unused B16;
 
302
    pexMatrix   matrix;
 
303
} pexLocalTransform3DData;
 
304
 
 
305
typedef struct {
 
306
    CARD16              composition B16;
 
307
    CARD16              unused B16;
 
308
    pexMatrix3X3        matrix;
 
309
} pexLocalTransform2DData;
 
310
 
 
311
typedef struct {
 
312
    PEXFLOAT    xmin B32;
 
313
    PEXFLOAT    ymin B32;
 
314
    PEXFLOAT    zmin B32;
 
315
    PEXFLOAT    xmax B32;
 
316
    PEXFLOAT    ymax B32;
 
317
    PEXFLOAT    zmax B32;
 
318
} pexNpcSubvolume;
 
319
 
 
320
/*  an OPT_DATA  structure cannot be defined because it has variable content
 
321
 *  and size.  An union structure could be used to define a template for
 
322
 *  the data. However, since unions pad to a fixed amount of space and the
 
323
 *  protocol uses variable lengths, this is not appropriate for protocol
 
324
 *  data types.  The most correct way of defining this data is to define
 
325
 *  one data structure for every possible combination of color, normal and
 
326
 *  edge data that could be given with a vertex or facet.
 
327
 */
 
328
 
 
329
typedef struct {
 
330
    pexStructure        sid B32;
 
331
    CARD32              offset B32;
 
332
    CARD32              pickid B32;
 
333
} pexPickElementRef;
 
334
 
 
335
/* pexPickPath is the old name of the above strucutre.
 
336
   This is wrong, since the above is a Pick Element Ref
 
337
   a Pick Path is a list of Pick Element Refs so naming
 
338
   this structure pexPickPath was wrong, but it can't just
 
339
   be changed without effecting lots of other code....... */
 
340
 
 
341
typedef pexPickElementRef pexPickPath;
 
342
 
 
343
typedef struct {
 
344
    pexTextVAlignment           vertical B16;
 
345
    pexTextHAlignment           horizontal B16;
 
346
} pexTextAlignmentData;
 
347
 
 
348
typedef struct {
 
349
    pexSwitch           visibility;
 
350
    CARD8               unused;
 
351
    CARD16              order B16;
 
352
    pexCoordType        type B16;
 
353
    INT16               approxMethod B16;
 
354
    PEXFLOAT            tolerance B32;
 
355
    PEXFLOAT            tMin B32;
 
356
    PEXFLOAT            tMax B32;
 
357
    CARD32              numKnots B32;
 
358
    CARD32              numCoord B32;
 
359
    /* LISTof FLOAT(numKnots) -- length = order + number of coords */
 
360
    /* LISTof {pexCoord3D|pexCoord4D}(numCoord) */
 
361
} pexTrimCurve;
 
362
 
 
363
typedef struct {
 
364
    CARD8               depth;
 
365
    CARD8               unused;
 
366
    CARD16              type B16;
 
367
    CARD32              visualID B32;
 
368
} pexRendererTarget;
 
369
 
 
370
typedef struct {
 
371
    pexEnumTypeIndex    pickType B16;
 
372
    CARD16              unused B16;
 
373
    /* SINGLE HITBOX() */
 
374
} pexPickRecord;
 
375
 
 
376
typedef struct {
 
377
    PEXFLOAT            ambient B32;
 
378
    PEXFLOAT            diffuse B32;
 
379
    PEXFLOAT            specular B32;
 
380
    PEXFLOAT            specularConc B32;
 
381
    PEXFLOAT            transmission B32; /* 0.0 = opaque, 1.0 = transparent */
 
382
    pexColorType        specular_colorType B16;
 
383
    CARD16              unused B16;
 
384
    /* SINGLE COLOR() */
 
385
} pexReflectionAttr;
 
386
 
 
387
typedef struct {
 
388
    pexEnumTypeIndex    approxMethod B16;
 
389
    CARD16              unused B16;
 
390
    PEXFLOAT            uTolerance B32;
 
391
    PEXFLOAT            vTolerance B32;
 
392
} pexSurfaceApproxData;
 
393
 
 
394
 
 
395
typedef struct {
 
396
    PEXFLOAT    point_x B32;
 
397
    PEXFLOAT    point_y B32;
 
398
    PEXFLOAT    point_z B32;
 
399
    /* SINGLE OPT_DATA() */
 
400
} pexVertex;
 
401
 
 
402
 
 
403
typedef struct {
 
404
    INT16               xmin B16;
 
405
    INT16               ymin B16;
 
406
    PEXFLOAT            zmin B32;
 
407
    INT16               xmax B16;
 
408
    INT16               ymax B16;
 
409
    PEXFLOAT            zmax B32;
 
410
    pexSwitch           useDrawable;
 
411
    BYTE                pad[3];
 
412
} pexViewport;
 
413
 
 
414
typedef struct {
 
415
    CARD16      clipFlags B16;
 
416
    CARD16      unused B16;
 
417
    PEXFLOAT    clipLimits_xmin B32;
 
418
    PEXFLOAT    clipLimits_ymin B32;
 
419
    PEXFLOAT    clipLimits_zmin B32;
 
420
    PEXFLOAT    clipLimits_xmax B32;
 
421
    PEXFLOAT    clipLimits_ymax B32;
 
422
    PEXFLOAT    clipLimits_zmax B32;
 
423
    pexMatrix   orientation;
 
424
    pexMatrix   mapping;
 
425
} pexViewEntry;
 
426
 
 
427
typedef struct {
 
428
    pexTableIndex       index B16;
 
429
    CARD16              unused1 B16;
 
430
    CARD16              clipFlags B16;
 
431
    CARD16              unused2 B16;
 
432
    PEXFLOAT            clipLimits_xmin B32;
 
433
    PEXFLOAT            clipLimits_ymin B32;
 
434
    PEXFLOAT            clipLimits_zmin B32;
 
435
    PEXFLOAT            clipLimits_xmax B32;
 
436
    PEXFLOAT            clipLimits_ymax B32;
 
437
    PEXFLOAT            clipLimits_zmax B32;
 
438
    pexMatrix           orientation;
 
439
    pexMatrix           mapping;
 
440
} pexViewRep;
 
441
 
 
442
/*
 
443
 * typedefs for lookup tables
 
444
 */
 
445
 
 
446
typedef struct {
 
447
    CARD16      definableEntries B16;
 
448
    CARD16      numPredefined B16;
 
449
    CARD16      predefinedMin B16;
 
450
    CARD16      predefinedMax B16;
 
451
} pexTableInfo;
 
452
 
 
453
typedef struct {
 
454
    pexEnumTypeIndex    lineType B16;
 
455
    pexEnumTypeIndex    polylineInterp B16;
 
456
    pexEnumTypeIndex    curveApprox_method B16;
 
457
    CARD16              unused1 B16;
 
458
    PEXFLOAT            curveApprox_tolerance B32;
 
459
    PEXFLOAT            lineWidth B32;
 
460
    pexColorType        lineColorType B16;
 
461
    CARD16              unused2 B16;
 
462
    /* SINGLE COLOR(lineColorType) */
 
463
} pexLineBundleEntry;
 
464
 
 
465
typedef struct {
 
466
    pexEnumTypeIndex    markerType B16;
 
467
    INT16               unused1 B16;
 
468
    PEXFLOAT            markerScale B32;
 
469
    pexColorType        markerColorType B16;
 
470
    CARD16              unused2 B16;
 
471
    /* SINGLE COLOR(markerColorType) */
 
472
} pexMarkerBundleEntry;
 
473
 
 
474
typedef struct {
 
475
    CARD16              textFontIndex B16;
 
476
    CARD16              textPrecision B16;
 
477
    PEXFLOAT            charExpansion B32;
 
478
    PEXFLOAT            charSpacing B32;
 
479
    pexColorType        textColorType B16;
 
480
    CARD16              unused B16;
 
481
    /* SINGLE COLOR(textColorType) */
 
482
} pexTextBundleEntry;
 
483
 
 
484
 
 
485
/*
 
486
    Note that since an InteriorBundleEntry contains 4 embedded instances of 
 
487
    pexColorSpecifier, a variable-sized item, a data structure cannot be
 
488
    defined for it.
 
489
*/
 
490
typedef struct {
 
491
    pexEnumTypeIndex    interiorStyle B16;
 
492
    INT16               interiorStyleIndex B16;
 
493
    pexEnumTypeIndex    reflectionModel B16;
 
494
    pexEnumTypeIndex    surfaceInterp B16;
 
495
    pexEnumTypeIndex    bfInteriorStyle B16;
 
496
    INT16               bfInteriorStyleIndex B16;
 
497
    pexEnumTypeIndex    bfReflectionModel B16;
 
498
    pexEnumTypeIndex    bfSurfaceInterp B16;
 
499
    pexEnumTypeIndex    surfaceApprox_method B16;
 
500
    CARD16              unused B16;
 
501
    PEXFLOAT            surfaceApproxuTolerance B32;
 
502
    PEXFLOAT            surfaceApproxvTolerance B32;
 
503
    /* SINGLE pexColorSpecifier         surfaceColor    */
 
504
    /* SINGLE pexReflectionAttr         reflectionAttr   */
 
505
    /* SINGLE pexColorSpecifier         bfSurfaceColor  */
 
506
    /* SINGLE pexReflectionAttr         bfReflectionAttr */
 
507
} pexInteriorBundleEntry;
 
508
 
 
509
typedef struct {
 
510
    pexSwitch           edges;
 
511
    CARD8               unused1;
 
512
    pexEnumTypeIndex    edgeType B16;
 
513
    PEXFLOAT            edgeWidth B32;
 
514
    pexColorType        edgeColorType B16;
 
515
    CARD16              unused2 B16;
 
516
    /* SINGLE COLOR(edgeColorType) */
 
517
} pexEdgeBundleEntry;
 
518
 
 
519
typedef struct {
 
520
    pexColorType        colorType B16; 
 
521
    CARD16              numx B16;
 
522
    CARD16              numy B16;
 
523
    CARD16              unused B16;
 
524
    /* LISTof Color(numx, numy) 2D array of colors */
 
525
} pexPatternEntry;
 
526
 
 
527
/* a pexColorEntry is just a pexColorSpecifier
 
528
*/
 
529
 
 
530
typedef struct {
 
531
    CARD32      numFonts B32;
 
532
    /* LISTof pexFont( numFonts ) */
 
533
} pexTextFontEntry;
 
534
 
 
535
/* a pexViewEntry is defined above */
 
536
 
 
537
typedef struct {
 
538
    pexEnumTypeIndex    lightType B16;
 
539
    INT16               unused1 B16;
 
540
    PEXFLOAT            direction_x B32;
 
541
    PEXFLOAT            direction_y B32;
 
542
    PEXFLOAT            direction_z B32;
 
543
    PEXFLOAT            point_x B32;
 
544
    PEXFLOAT            point_y B32;
 
545
    PEXFLOAT            point_z B32;
 
546
    PEXFLOAT            concentration B32;
 
547
    PEXFLOAT            spreadAngle B32;
 
548
    PEXFLOAT            attenuation1 B32;
 
549
    PEXFLOAT            attenuation2 B32;
 
550
    pexColorType        lightColorType B16;
 
551
    CARD16              unused2 B16;
 
552
    /* SINGLE COLOR(lightColorType) */
 
553
} pexLightEntry;
 
554
 
 
555
typedef struct {
 
556
    pexSwitch           mode;
 
557
    CARD8               unused1;
 
558
    CARD16              unused2 B16;
 
559
    PEXFLOAT            frontPlane B32;
 
560
    PEXFLOAT            backPlane B32;
 
561
    PEXFLOAT            frontScaling B32;
 
562
    PEXFLOAT            backScaling B32;
 
563
    pexColorType        depthCueColorType B16;
 
564
    CARD16              unused3 B16;
 
565
    /* SINGLE COLOR(depthCueColorType) */
 
566
} pexDepthCueEntry;
 
567
 
 
568
typedef struct {
 
569
    INT16       approxType B16;
 
570
    INT16       approxModel B16;
 
571
    CARD16      max1 B16;
 
572
    CARD16      max2 B16;
 
573
    CARD16      max3 B16;
 
574
    CARD8       dither;
 
575
    CARD8       unused;
 
576
    CARD32      mult1 B32;
 
577
    CARD32      mult2 B32;
 
578
    CARD32      mult3 B32;
 
579
    PEXFLOAT    weight1 B32;
 
580
    PEXFLOAT    weight2 B32;
 
581
    PEXFLOAT    weight3 B32;
 
582
    CARD32      basePixel B32;
 
583
} pexColorApproxEntry;
 
584
 
 
585
 
 
586
/*  Font structures */
 
587
 
 
588
typedef struct {
 
589
    Atom        name B32;
 
590
    CARD32      value B32;
 
591
} pexFontProp;
 
592
 
 
593
typedef struct {
 
594
    CARD32      firstGlyph B32;
 
595
    CARD32      lastGlyph B32;
 
596
    CARD32      defaultGlyph B32;
 
597
    pexSwitch   allExist;
 
598
    pexSwitch   strokeFont;
 
599
    CARD16      unused B16;
 
600
    CARD32      numProps B32;
 
601
    /* LISTof pexFontProp(numProps) */
 
602
} pexFontInfo;
 
603
 
 
604
 
 
605
/* Text Structures */
 
606
 
 
607
typedef struct {
 
608
    INT16       characterSet B16;
 
609
    CARD8       characterSetWidth;
 
610
    CARD8       encodingState;
 
611
    CARD16      unused B16;
 
612
    CARD16      numChars B16;
 
613
    /* LISTof CHARACTER( numChars ) */
 
614
    /* pad */
 
615
} pexMonoEncoding;
 
616
 
 
617
/* CHARACTER is either a CARD8, a CARD16, or a CARD32 */
 
618
 
 
619
 
 
620
/* Parametric Surface Characteristics types */
 
621
 
 
622
/* type 1 None */
 
623
 
 
624
/* type 2 Implementation Dependent */
 
625
 
 
626
typedef struct {
 
627
    CARD16      placementType B16;
 
628
    CARD16      unused B16;
 
629
    CARD16      numUcurves B16;
 
630
    CARD16      numVcurves B16;
 
631
} pexPSC_IsoparametricCurves;           /* type 3 */
 
632
 
 
633
typedef struct {
 
634
    PEXFLOAT    origin_x B32;
 
635
    PEXFLOAT    origin_y B32;
 
636
    PEXFLOAT    origin_z B32;
 
637
    PEXFLOAT    direction_x B32;
 
638
    PEXFLOAT    direction_y B32;
 
639
    PEXFLOAT    direction_z B32;
 
640
    CARD16      numberIntersections B16;
 
641
    CARD16      pad B16;
 
642
    /* LISTof pexCoord3D( numIntersections ) */
 
643
} pexPSC_LevelCurves;                   /*  type 4: MC
 
644
                                            type 5: WC */
 
645
 
 
646
/* Pick Device data records */
 
647
 
 
648
typedef struct {
 
649
    INT16       position_x B16;
 
650
    INT16       position_y B16;
 
651
    PEXFLOAT    distance B32;
 
652
} pexPD_DC_HitBox;                              /* pick device 1 */
 
653
 
 
654
typedef pexNpcSubvolume pexPD_NPC_HitVolume;    /* pick device 2 */
 
655
 
 
656
 
 
657
/* Output Command errors */
 
658
 
 
659
typedef struct {
 
660
    CARD8       type;               /*  0 */
 
661
    CARD8       errorCode;          /* 14 */
 
662
    CARD16      sequenceNumber B16;
 
663
    CARD32      resourceId B32;     /* renderer or structure */
 
664
    CARD16      minorCode B16;
 
665
    CARD8       majorCode;
 
666
    CARD8       unused;
 
667
    CARD16      opcode B16;         /* opcode of failed output command */
 
668
    CARD16      numCommands B16;    /* number successfully done before error */
 
669
    BYTE        pad[16];
 
670
} pexOutputCommandError;
 
671
 
 
672
 
 
673
/* Registered PEX Escapes */
 
674
 
 
675
typedef struct {
 
676
    INT16       fpFormat B16;
 
677
    CARD8       unused[2];
 
678
    CARD32      rdr B32;            /* renderer ID */
 
679
    /* SINGLE ColorSpecifier()  */
 
680
} pexEscapeSetEchoColorData;
 
681
 
 
682
#endif /* _PEXPROTOST_H_ */